1 /*
2 * Copyright (c) 2001, 2008, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
23 */
24
25 /*
26 * PerfData Version Constants
27 * - Major Version - change whenever the structure of PerfDataEntry changes
28 * - Minor Version - change whenever the data within the PerfDataEntry
29 * structure changes. for example, new unit or variability
30 * values are added or new PerfData subtypes are added.
31 */
32 #define PERFDATA_MAJOR_VERSION 2
33 #define PERFDATA_MINOR_VERSION 0
34
35 /* Byte order of the PerfData memory region. The byte order is exposed in
36 * the PerfData memory region as the data in the memory region may have
37 * been generated by a little endian JVM implementation. Tracking the byte
38 * order in the PerfData memory region allows Java applications to adapt
39 * to the native byte order for monitoring purposes. This indicator is
40 * also useful when a snapshot of the PerfData memory region is shipped
41 * to a machine with a native byte order different from that of the
42 * originating machine.
43 */
44 #define PERFDATA_BIG_ENDIAN 0
143 static void detach(char* addr, size_t bytes, TRAPS);
144
145 static void initialize();
146 static void destroy();
147 static void set_accessible(bool value) {
148 if (UsePerfData) {
149 _prologue->accessible = value;
150 }
151 }
152
153 // filename of backing store or NULL if none.
154 static char* backing_store_filename();
155
156 // returns the complete file path of hsperfdata.
157 // the caller is expected to free the allocated memory.
158 static char* get_perfdata_file_path();
159 };
160
161 void perfMemory_init();
162 void perfMemory_exit();
|
1 /*
2 * Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
23 */
24
25 #ifndef SHARE_VM_RUNTIME_PERFMEMORY_HPP
26 #define SHARE_VM_RUNTIME_PERFMEMORY_HPP
27
28 #include "utilities/exceptions.hpp"
29
30 /*
31 * PerfData Version Constants
32 * - Major Version - change whenever the structure of PerfDataEntry changes
33 * - Minor Version - change whenever the data within the PerfDataEntry
34 * structure changes. for example, new unit or variability
35 * values are added or new PerfData subtypes are added.
36 */
37 #define PERFDATA_MAJOR_VERSION 2
38 #define PERFDATA_MINOR_VERSION 0
39
40 /* Byte order of the PerfData memory region. The byte order is exposed in
41 * the PerfData memory region as the data in the memory region may have
42 * been generated by a little endian JVM implementation. Tracking the byte
43 * order in the PerfData memory region allows Java applications to adapt
44 * to the native byte order for monitoring purposes. This indicator is
45 * also useful when a snapshot of the PerfData memory region is shipped
46 * to a machine with a native byte order different from that of the
47 * originating machine.
48 */
49 #define PERFDATA_BIG_ENDIAN 0
148 static void detach(char* addr, size_t bytes, TRAPS);
149
150 static void initialize();
151 static void destroy();
152 static void set_accessible(bool value) {
153 if (UsePerfData) {
154 _prologue->accessible = value;
155 }
156 }
157
158 // filename of backing store or NULL if none.
159 static char* backing_store_filename();
160
161 // returns the complete file path of hsperfdata.
162 // the caller is expected to free the allocated memory.
163 static char* get_perfdata_file_path();
164 };
165
166 void perfMemory_init();
167 void perfMemory_exit();
168
169 #endif // SHARE_VM_RUNTIME_PERFMEMORY_HPP
|