APIdia Launch Partner
Top Description Fields Constructors Methods
sun.jvmstat.perfdata.monitor.v2_0

public Class PerfDataBuffer

extends PerfDataBufferImpl
Class Inheritance
Imports
sun.jvmstat.monitor.*, sun.jvmstat.perfdata.monitor.*, java.util.*, java.util.regex.*, java.nio.*

The concrete implementation of version 2.0 of the HotSpot PerfData Instrumentation buffer. This class is responsible for parsing the instrumentation memory and constructing the necessary objects to represent and access the instrumentation objects contained in the memory buffer.

The structure of the 2.0 entry is defined in struct PerfDataEnry as described in perfMemory.hpp. This structure looks like:

typedef struct {
  jint entry_length;         // entry length in bytes
  jint name_offset;          // offset to entry name, relative to start
                             // of entry
  jint vector_length;        // length of the vector. If 0, then scalar.
  jbyte data_type;           // JNI field descriptor type
  jbyte flags;               // miscellaneous attribute flags
                             // 0x01 - supported
  jbyte data_units;          // unit of measure attribute
  jbyte data_variability;    // variability attribute
  jbyte data_offset;         // offset to data item, relative to start
                             // of entry.
} PerfDataEntry;
Author
Brian Doherty
Since
1.5
See Also
AbstractPerfDataBuffer

Field Summary

Modifier and TypeField and Description
private static final ArrayList<Monitor>
pack-priv ArrayList<Monitor>
pack-priv long
pack-priv int
pack-priv IntegerMonitor
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
pack-priv PerfDataBufferPrologue
private static final int
Inherited from sun.jvmstat.perfdata.monitor.PerfDataBufferImpl:
aliasCachealiasMapbufferlvmidmonitors

Constructor Summary

AccessConstructor and Description
public
PerfDataBuffer(ByteBuffer
the buffer containing the instrumentation data
buffer
,
int
the Local Java Virtual Machine Identifier for this instrumentation buffer.
lvmid
)

Construct a PerfDataBuffer instance.

Method Summary

Modifier and TypeMethod and Description
protected void
buildMonitorMap(Map<String, Monitor> map)

Implements abstract sun.jvmstat.perfdata.monitor.PerfDataBufferImpl.buildMonitorMap.

build the map of Monitor objects.

protected void
buildPseudoMonitors(Map<String, Monitor> map)

Build the pseudo monitors used to map the prolog data into counters.

protected MonitorStatus
getMonitorStatus(Map<String, Monitor> map)

Implements abstract sun.jvmstat.perfdata.monitor.PerfDataBufferImpl.getMonitorStatus.

get the list of inserted and removed monitors since last called.

protected void
getNewMonitors(Map<String, Monitor> map)

Implements abstract sun.jvmstat.perfdata.monitor.PerfDataBufferImpl.getNewMonitors.

get the new Monitor objects from the Map of Monitor objects.

protected Monitor
getNextMonitorEntry()

method to extract the next monitor entry from the instrumentation memory.

protected void
synchWithTarget()

Method that waits until the target jvm indicates that its shared memory is safe to access.

Inherited from sun.jvmstat.perfdata.monitor.PerfDataBufferImpl:
findByAliasfindByNamefindByPatterngetBytesgetCapacitygetLocalVmIdgetMonitorStatus

Field Detail

EMPTY_LISTback to summary
private static final ArrayList<Monitor> EMPTY_LIST
insertedMonitorsback to summary
pack-priv ArrayList<Monitor> insertedMonitors
lastNumEntriesback to summary
pack-priv long lastNumEntries
nextEntryback to summary
pack-priv int nextEntry
overflowback to summary
pack-priv IntegerMonitor overflow
PERFDATA_DATAOFFSET_OFFSETback to summary
private static final int PERFDATA_DATAOFFSET_OFFSET
PERFDATA_DATAOFFSET_SIZEback to summary
private static final int PERFDATA_DATAOFFSET_SIZE
PERFDATA_DATATYPE_OFFSETback to summary
private static final int PERFDATA_DATATYPE_OFFSET
PERFDATA_DATATYPE_SIZEback to summary
private static final int PERFDATA_DATATYPE_SIZE
PERFDATA_DATAUNITS_OFFSETback to summary
private static final int PERFDATA_DATAUNITS_OFFSET
PERFDATA_DATAUNITS_SIZEback to summary
private static final int PERFDATA_DATAUNITS_SIZE
PERFDATA_DATAVAR_OFFSETback to summary
private static final int PERFDATA_DATAVAR_OFFSET
PERFDATA_DATAVAR_SIZEback to summary
private static final int PERFDATA_DATAVAR_SIZE
PERFDATA_ENTRYLENGTH_OFFSETback to summary
private static final int PERFDATA_ENTRYLENGTH_OFFSET
PERFDATA_ENTRYLENGTH_SIZEback to summary
private static final int PERFDATA_ENTRYLENGTH_SIZE
PERFDATA_FLAGS_OFFSETback to summary
private static final int PERFDATA_FLAGS_OFFSET
PERFDATA_FLAGS_SIZEback to summary
private static final int PERFDATA_FLAGS_SIZE
PERFDATA_NAMEOFFSET_OFFSETback to summary
private static final int PERFDATA_NAMEOFFSET_OFFSET
PERFDATA_NAMEOFFSET_SIZEback to summary
private static final int PERFDATA_NAMEOFFSET_SIZE
PERFDATA_VECTORLENGTH_OFFSETback to summary
private static final int PERFDATA_VECTORLENGTH_OFFSET
PERFDATA_VECTORLENGTH_SIZEback to summary
private static final int PERFDATA_VECTORLENGTH_SIZE
prologueback to summary
pack-priv PerfDataBufferPrologue prologue
syncWaitMsback to summary
private static final int syncWaitMs

Constructor Detail

PerfDataBufferback to summary
public PerfDataBuffer(ByteBuffer buffer, int lvmid) throws MonitorException

Construct a PerfDataBuffer instance.

This class is dynamically loaded by AbstractPerfDataBuffer#createPerfDataBuffer, and this constructor is called to instantiate the instance.

Parameters
buffer:ByteBuffer

the buffer containing the instrumentation data

lvmid:int

the Local Java Virtual Machine Identifier for this instrumentation buffer.

Method Detail

buildMonitorMapback to summary
protected void buildMonitorMap(Map<String, Monitor> map) throws MonitorException

Implements abstract sun.jvmstat.perfdata.monitor.PerfDataBufferImpl.buildMonitorMap.

Doc from sun.jvmstat.perfdata.monitor.PerfDataBufferImpl.buildMonitorMap.

build the map of Monitor objects.

Exceptions
MonitorException:
Thrown if communications errors occur while communicating with the target.
buildPseudoMonitorsback to summary
protected void buildPseudoMonitors(Map<String, Monitor> map)

Build the pseudo monitors used to map the prolog data into counters.

getMonitorStatusback to summary
protected MonitorStatus getMonitorStatus(Map<String, Monitor> map) throws MonitorException

Implements abstract sun.jvmstat.perfdata.monitor.PerfDataBufferImpl.getMonitorStatus.

Doc from sun.jvmstat.perfdata.monitor.PerfDataBufferImpl.getMonitorStatus.

get the list of inserted and removed monitors since last called.

Exceptions
MonitorException:
Thrown if communications errors occur while communicating with the target.
getNewMonitorsback to summary
protected void getNewMonitors(Map<String, Monitor> map) throws MonitorException

Implements abstract sun.jvmstat.perfdata.monitor.PerfDataBufferImpl.getNewMonitors.

Doc from sun.jvmstat.perfdata.monitor.PerfDataBufferImpl.getNewMonitors.

get the new Monitor objects from the Map of Monitor objects.

Exceptions
MonitorException:
Thrown if communications errors occur while communicating with the target.
getNextMonitorEntryback to summary
protected Monitor getNextMonitorEntry() throws MonitorException

method to extract the next monitor entry from the instrumentation memory. assumes that nextEntry is the offset into the byte array at which to start the search for the next entry. method leaves next entry pointing to the next entry or to the end of data.

synchWithTargetback to summary
protected void synchWithTarget() throws MonitorException

Method that waits until the target jvm indicates that its shared memory is safe to access.