In addition, this class provides methods to create instrumentation objects in the instrumentation buffer for the Java virtual machine that is running these methods. It also contains methods for acquiring the value of a platform specific high resolution clock for time stamp and interval measurement purposes.
getPerf, java.nio.ByteBuffer
| Modifier and Type | Class and Description |
|---|---|
| private static class |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public ByteBuffer | Returns: ByteBuffer a direct allocated byte bufferan integer that uniquely identifies the
target local Java virtual machine. lvmid)Attach to the instrumentation buffer for the specified Java virtual machine. |
| private native ByteBuffer | Returns: ByteBuffer a direct allocated byte bufferan integer that uniquely identifies the
target local Java virtual machine. lvmid)Native method to perform the implementation specific attach mechanism. |
| public native ByteBuffer | Returns: ByteBuffer a direct allocated byte buffer that allows write access to a native memory location containing along value.
see sun.misc.perf.Variability
see sun.misc.perf.Unitsthe name of this entry. name, int the variability characteristic for this entry. variability, int the units for this entry. units, byte[] the initial value for this entry. value, int the maximum length of this byte array. maxLength)Create a |
| public native ByteBuffer | Returns: ByteBuffer a direct allocated ByteBuffer object that allows write access to a native memory location containing along value.
see sun.misc.perf.Variability
see sun.misc.perf.Unitsthe name of this entry. name, int the variability characteristic for this entry. variability, int the units for this entry. units, long the initial value for this entry. value)Create a |
| public ByteBuffer | Returns: ByteBuffer a direct allocated ByteBuffer that allows write access to a native memory location containing along value.
see sun.misc.perf.Variability
see sun.misc.perf.Unitsthe name of this entry. name, int the variability characteristic for this entry. variability, int the units for this entry. units, String the initial value for this entry. value, int the maximum string length for this string
instrument. maxLength)Create a |
| public ByteBuffer | Returns: ByteBuffer a direct allocated ByteBuffer that allows write access to a native memory location containing along value.
see sun.misc.perf.Variability
see sun.misc.perf.Unitsthe name of this entry. name, int the variability characteristic for this entry. variability, int the units for this entry. units, String the initial value for this entry. value)Create a |
| private native void | detach(ByteBuffer
A direct allocated byte buffer created by the
bb)attach method.Native method to perform the implementation specific detach mechanism. |
| public static Perf | Returns: A reference to the singleton Perf instance.Return a reference to the singleton Perf instance. |
| public native long | Returns: the number of ticks of machine dependent resolution since the start of the Java virtual machine.Return the value of the High Resolution Counter. |
| public native long | Returns: the frequency of the High Resolution Counter.Returns the frequency of the High Resolution Counter, in ticks per second. |
| private static native void |
| instance | back to summary |
|---|---|
| private static Perf instance | |
| Perf | back to summary |
|---|---|
| private Perf() | |
| attach | back to summary |
|---|---|
| public ByteBuffer attach(int lvmid) throws IOException Attach to the instrumentation buffer for the specified Java virtual machine.
This method will attach to the instrumentation buffer for the
specified virtual machine. It returns a
If the
If the
| |
| attach0 | back to summary |
|---|---|
| private native ByteBuffer attach0(int lvmid) throws IOException Native method to perform the implementation specific attach mechanism.
The implementation of this method may return distinct or identical
For the Sun HotSpot JVM, two distinct calls to attach to the same target Java virtual machine will result in two distinct ByteBuffer objects returned by this method. This may change in a future release.
| |
| createByteArray | back to summary |
|---|---|
| public native ByteBuffer createByteArray(String name, int variability, int units, byte[] value, int maxLength) Create a
The The underlying implementation may further limit the length of the length of the initial or subsequent value.
Access to the instrument is provided through the returned
| |
| createLong | back to summary |
|---|---|
| public native ByteBuffer createLong(String name, int variability, int units, long value) Create a
Access to the instrument is provided through the returned
| |
| createString | back to summary |
|---|---|
| public ByteBuffer createString(String name, int variability, int units, String value, int maxLength) Create a
The maximum length of the The underlying implementation may further limit the length of the value, but will continue to preserve the null terminator.
Access to the instrument is provided through the returned
| |
| createString | back to summary |
|---|---|
| public ByteBuffer createString(String name, int variability, int units, String value) Create a
The maximum length of the The underlying implementation may further limit the length of the initial or subsequent value, but will continue to preserve the null terminator.
Access to the instrument is provided through the returned
| |
| detach | back to summary |
|---|---|
| private native void detach(ByteBuffer bb) Native method to perform the implementation specific detach mechanism.
If this method is passed a
If this method is passed a
| |
| getPerf | back to summary |
|---|---|
| public static Perf getPerf() Return a reference to the singleton Perf instance. The getPerf() method returns the singleton instance of the Perf class. The returned object provides the caller with the capability for accessing the instrumentation buffer for this or another local Java virtual machine.
Access to the returned | |
| highResCounter | back to summary |
|---|---|
| public native long highResCounter() Return the value of the High Resolution Counter.
The High Resolution Counter returns the number of ticks since
since the start of the Java virtual machine. The resolution of
the counter is machine dependent and can be determined from the
value return by the
| |
| highResFrequency | back to summary |
|---|---|
| public native long highResFrequency() Returns the frequency of the High Resolution Counter, in ticks per
second.
This value can be used to convert the value of the High Resolution
Counter, as returned from a call to the
| |
| registerNatives | back to summary |
|---|---|
| private static native void registerNatives() | |
| Modifier and Type | Field and Description |
|---|---|
| private final ByteBuffer | |
| private final Perf |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public void |
| bb | back to summary |
|---|---|
| private final ByteBuffer bb | |
| perf | back to summary |
|---|---|
| private final Perf perf | |
| CleanerAction | back to summary |
|---|---|
| pack-priv CleanerAction(Perf perf, ByteBuffer bb) | |
| run | back to summary |
|---|---|
| public void run() Implements java. Doc from java. Runs this operation. | |