public class

PerfDataBuffer

extends PerfDataBufferImpl
java.lang.Object
   ↳ sun.jvmstat.perfdata.monitor.PerfDataBufferImpl
     ↳ sun.jvmstat.perfdata.monitor.v1_0.PerfDataBuffer

Class Overview

The concrete implementation of version 1.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.

Summary

[Expand]
Inherited Fields
From class sun.jvmstat.perfdata.monitor.PerfDataBufferImpl
Public Constructors
PerfDataBuffer(ByteBuffer buffer, int lvmid)
Construct a PerfDataBufferImpl instance.
Protected Methods
void buildMonitorMap(Map<StringMonitor> map)
build the map of Monitor objects.
void buildPseudoMonitors(Map<StringMonitor> map)
Build the pseudo monitors used to map the prolog data into counters.
MonitorStatus getMonitorStatus(Map<StringMonitor> map)
get the list of inserted and removed monitors since last called.
void getNewMonitors(Map<StringMonitor> map)
get the new Monitor objects from the Map of Monitor objects.
Monitor getNextMonitorEntry()
method to extract the next monitor entry from the instrumentation memory.
void kludge(Map<StringMonitor> map)
method to make adjustments for known counter problems.
Monitor pollFor(Map<StringMonitor> map, String name, long timeLimit)
Method to poll the instrumentation memory for a counter with the given name.
void synchWithTarget(Map<StringMonitor> map)
Method to provide a gross level of synchronization with the target monitored jvm.
[Expand]
Inherited Methods
From class sun.jvmstat.perfdata.monitor.PerfDataBufferImpl
From class java.lang.Object

Public Constructors

public PerfDataBuffer (ByteBuffer buffer, int lvmid)

Construct a PerfDataBufferImpl instance.

This class is dynamically loaded by createPerfDataBuffer(ByteBuffer, int), and this constructor is called to instantiate the instance.

Parameters
buffer the buffer containing the instrumentation data
lvmid the Local Java Virtual Machine Identifier for this instrumentation buffer.

Protected Methods

protected void buildMonitorMap (Map<StringMonitor> map)

build the map of Monitor objects.

Parameters
map the map of Monitors.

protected void buildPseudoMonitors (Map<StringMonitor> map)

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

protected MonitorStatus getMonitorStatus (Map<StringMonitor> map)

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

Parameters
map the map of Monitors.

protected void getNewMonitors (Map<StringMonitor> map)

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

Parameters
map the map of Monitors.

protected Monitor getNextMonitorEntry ()

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.

protected void kludge (Map<StringMonitor> map)

method to make adjustments for known counter problems. This method depends on the availability of certain counters, which is generally guaranteed by the synchWithTarget() method.

protected Monitor pollFor (Map<StringMonitor> map, String name, long timeLimit)

Method to poll the instrumentation memory for a counter with the given name. The polling period is bounded by the timeLimit argument.

protected void synchWithTarget (Map<StringMonitor> map)

Method to provide a gross level of synchronization with the target monitored jvm. gross synchronization works by polling for the hotspot.rt.hrt.ticks counter, which is the last counter created by the StatSampler initialization code. The counter is updated when the watcher thread starts scheduling tasks, which is the last thing done in vm initialization.