/* Byte order of the PerfData memory region. The byte order is exposed in *thePerfDatamemoryregionasthedatainthememoryregionmayhave *beengeneratedbyalittleendianJVMimplementation.Trackingthebyte *orderinthePerfDatamemoryregionallowsJavaapplicationstoadapt *tothenativebyteorderformonitoringpurposes.Thisindicatoris *alsousefulwhenasnapshotofthePerfDatamemoryregionisshipped *toamachinewithanativebyteorderdifferentfromthatofthe *originatingmachine.
*/ #define PERFDATA_BIG_ENDIAN 0 #define PERFDATA_LITTLE_ENDIAN 1
/* *ThePerfDataProloguestructureisknownbythePerfDataBufferJavaclass *librariesthatreadthePerfDatamemoryregion.Thesizeandtheposition *ofthefieldsmustbechangedalongwiththeircounterpartsinthe *PerfDataBufferJavaclass.Thefirstfourbytesofthisstructure *shouldneverchange,orcompatibilityproblemsbetweenthemonitoring *applicationsandHotSpotVMswillresult.Thereservedfieldsare *availableforfutureenhancements.
*/ typedefstruct {
jint magic; // magic number - 0xcafec0c0
jbyte byte_order; // byte order of the buffer
jbyte major_version; // major and minor version numbers
jbyte minor_version;
jbyte accessible; // ready to access
jint used; // number of PerfData memory bytes used
jint overflow; // number of bytes of overflow
jlong mod_time_stamp; // time stamp of last structural modification
jint entry_offset; // offset of the first PerfDataEntry
jint num_entries; // number of allocated PerfData entries
} PerfDataPrologue;
/* The PerfDataEntry structure defines the fixed portion of an entry *inthePerfDatamemoryregion.ThePerfDataBufferJavalibraries *areawareofthisstructureandneedtobechangedwhenthis *structurechanges.
*/ typedefstruct {
jint entry_length; // entry length in bytes
jint name_offset; // offset of the data item name
jint vector_length; // length of the vector. If 0, then scalar
jbyte data_type; // type of the data item - // 'B','Z','J','I','S','C','D','F','V','L','['
jbyte flags; // flags indicating misc attributes
jbyte data_units; // unit of measure for the data type
jbyte data_variability; // variability classification of data type
jint data_offset; // offset of the data item
/* bodyofPerfDatamemoryentryisvariablelength
jbyte[name_length]data_name;// name of the data item jbyte[pad_length]data_pad;// alignment of data item j<data_type>[data_length]data_item;// array of appropriate types. // data_length is > 1 only when the // data_type is T_ARRAY.
*/
} PerfDataEntry;
// Prefix of performance data file. externconstchar PERFDATA_NAME[];
// UINT_CHARS contains the number of characters holding a process id // (i.e. pid). pid is defined as unsigned "int" so the maximum possible pid value // would be 2^32 - 1 (4294967295) which can be represented as a 10 characters // string. staticconst size_t UINT_CHARS = 10;
// methods for attaching to and detaching from the PerfData // memory segment of another JVM process on the same system. staticvoid attach(int vmid, char** addrp, size_t* size, TRAPS); staticvoid detach(char* addr, size_t bytes);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.