perfMemory.hpp revision 1879
1879N/A * Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved. 0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 0N/A * This code is free software; you can redistribute it and/or modify it 0N/A * under the terms of the GNU General Public License version 2 only, as 0N/A * published by the Free Software Foundation. 0N/A * This code is distributed in the hope that it will be useful, but WITHOUT 0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 0N/A * version 2 for more details (a copy is included in the LICENSE file that 0N/A * accompanied this code). 0N/A * You should have received a copy of the GNU General Public License version 0N/A * 2 along with this work; if not, write to the Free Software Foundation, 0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 1472N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 0N/A * PerfData Version Constants 0N/A * - Major Version - change whenever the structure of PerfDataEntry changes 0N/A * - Minor Version - change whenever the data within the PerfDataEntry 0N/A * structure changes. for example, new unit or variability 0N/A * values are added or new PerfData subtypes are added. 0N/A/* Byte order of the PerfData memory region. The byte order is exposed in 0N/A * the PerfData memory region as the data in the memory region may have 0N/A * been generated by a little endian JVM implementation. Tracking the byte 0N/A * order in the PerfData memory region allows Java applications to adapt 0N/A * to the native byte order for monitoring purposes. This indicator is 0N/A * also useful when a snapshot of the PerfData memory region is shipped 0N/A * to a machine with a native byte order different from that of the 0N/A * originating machine. 0N/A * The PerfDataPrologue structure is known by the PerfDataBuffer Java class 0N/A * libraries that read the PerfData memory region. The size and the position 0N/A * of the fields must be changed along with their counterparts in the 0N/A * PerfDataBuffer Java class. The first four bytes of this structure 0N/A * should never change, or compatibility problems between the monitoring 0N/A * applications and Hotspot VMs will result. The reserved fields are 0N/A * available for future enhancements. 0N/A/* The PerfDataEntry structure defines the fixed portion of an entry 0N/A * in the PerfData memory region. The PerfDataBuffer Java libraries 0N/A * are aware of this structure and need to be changed when this 0N/A * structure changes. 0N/A // 'B','Z','J','I','S','C','D','F','V','L','[' 0N/A body of PerfData memory entry is variable length 0N/A jbyte[name_length] data_name; // name of the data item 0N/A jbyte[pad_length] data_pad; // alignment of data item 0N/A j<data_type>[data_length] data_item; // array of appropriate types. 0N/A // data_length is > 1 only when the 0N/A // data_type is T_ARRAY. 0N/A// Prefix of performance data file. 0N/A// UINT_CHARS contains the number of characters holding a process id 0N/A// (i.e. pid). pid is defined as unsigned "int" so the maximum possible pid value 0N/A// would be 2^32 - 1 (4294967295) which can be represented as a 10 characters 0N/A/* the PerfMemory class manages creation, destruction, 0N/A * and allocation of the PerfData region. 0N/A // methods for attaching to and detaching from the PerfData 0N/A // memory segment of another JVM process on the same system. 0N/A // filename of backing store or NULL if none. 0N/A // returns the complete file path of hsperfdata. 0N/A // the caller is expected to free the allocated memory. 1879N/A#
endif // SHARE_VM_RUNTIME_PERFMEMORY_HPP