APIdia Launch Partner
Top Description Inners Fields Constructors Methods
jdk.internal.perf

public Class PerfCounter

extends Object
Class Inheritance
Imports
java.nio.ByteBuffer, .ByteOrder, .LongBuffer

Performance counter support for internal JRE classes. This class defines a fixed list of counters for the platform to use as an interim solution until RFE# 6209222 is implemented. The perf counters will be created in the jvmstat perf buffer that the HotSpot VM creates. The default size is 32K and thus the number of counters is bounded. You can alter the size with -XX:PerfDataMemorySize=<bytes> option. If there is insufficient memory in the jvmstat perf buffer, the C heap memory will be used and thus the application will continue to run if the counters added exceeds the buffer size but the counters will be missing. See HotSpot jvmstat implementation for certain circumstances that the jvmstat perf buffer is not supported.

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static class

Field Summary

Modifier and TypeField and Description
private final LongBuffer
private final String
private static final Perf
private static final int
private static final int
private static final int
private static final int

Constructor Summary

AccessConstructor and Description
private
PerfCounter(String name, int type)

Method Summary

Modifier and TypeMethod and Description
public synchronized void
add(long value)

Adds the given value to the perf counter.

public void
addElapsedTimeFrom(long startTime)

Adds the elapsed time from the given start time (ns) to the perf counter.

public void
addTime(long interval)

Adds the given interval to the perf counter.

public synchronized long
get()

Returns the current value of the perf counter.

public static PerfCounter
getFindClasses()

Number of findClass calls

public static PerfCounter
getFindClassTime()

Time (ns) spent in finding classes that includes lookup and read class bytes and defineClass

public static PerfCounter
getParentDelegationTime()

Time (ns) spent in the parent delegation to the parent of the defining class loader

public static PerfCounter
getReadClassBytesTime()

Time (ns) spent in finding classes

public static PerfCounter
getZipFileCount()

Number of zip files opened.

public static PerfCounter
getZipFileOpenTime()

Time (ns) spent in opening the zip files that includes building the entries hash table

public void
increment()

Increments the perf counter with 1.

public static PerfCounter
public static PerfCounter
public synchronized void
set(long newValue)

Sets the value of the perf counter to the given newValue.

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

lbback to summary
private final LongBuffer lb
nameback to summary
private final String name
perfback to summary
private static final Perf perf
U_Noneback to summary
private static final int U_None
V_Constantback to summary
private static final int V_Constant
V_Monotonicback to summary
private static final int V_Monotonic
V_Variableback to summary
private static final int V_Variable

Constructor Detail

PerfCounterback to summary
private PerfCounter(String name, int type)

Method Detail

addback to summary
public synchronized void add(long value)

Adds the given value to the perf counter.

addElapsedTimeFromback to summary
public void addElapsedTimeFrom(long startTime)

Adds the elapsed time from the given start time (ns) to the perf counter.

addTimeback to summary
public void addTime(long interval)

Adds the given interval to the perf counter.

getback to summary
public synchronized long get()

Returns the current value of the perf counter.

getFindClassesback to summary
public static PerfCounter getFindClasses()

Number of findClass calls

getFindClassTimeback to summary
public static PerfCounter getFindClassTime()

Time (ns) spent in finding classes that includes lookup and read class bytes and defineClass

getParentDelegationTimeback to summary
public static PerfCounter getParentDelegationTime()

Time (ns) spent in the parent delegation to the parent of the defining class loader

getReadClassBytesTimeback to summary
public static PerfCounter getReadClassBytesTime()

Time (ns) spent in finding classes

getZipFileCountback to summary
public static PerfCounter getZipFileCount()

Number of zip files opened.

getZipFileOpenTimeback to summary
public static PerfCounter getZipFileOpenTime()

Time (ns) spent in opening the zip files that includes building the entries hash table

incrementback to summary
public void increment()

Increments the perf counter with 1.

newConstantPerfCounterback to summary
public static PerfCounter newConstantPerfCounter(String name)
newPerfCounterback to summary
public static PerfCounter newPerfCounter(String name)
setback to summary
public synchronized void set(long newValue)

Sets the value of the perf counter to the given newValue.

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Annotations
@Override
jdk.internal.perf back to summary

pack-priv Class PerfCounter.CoreCounters

extends Object
Class Inheritance

Field Summary

Modifier and TypeField and Description
pack-priv static final PerfCounter
pack-priv static final PerfCounter
pack-priv static final PerfCounter
pack-priv static final PerfCounter
pack-priv static final PerfCounter
pack-priv static final PerfCounter

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

lcback to summary
pack-priv static final PerfCounter lc
lctback to summary
pack-priv static final PerfCounter lct
pdtback to summary
pack-priv static final PerfCounter pdt
rcbtback to summary
pack-priv static final PerfCounter rcbt
zfcback to summary
pack-priv static final PerfCounter zfc
zfotback to summary
pack-priv static final PerfCounter zfot

Constructor Detail

CoreCountersback to summary
pack-priv CoreCounters()