Class PerfCounter
java.lang.Object
one.nio.os.perf.PerfCounter
- All Implemented Interfaces:
Closeable, AutoCloseable
- Direct Known Subclasses:
PerfCounterGlobal
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final PerfEvent(package private) int(package private) static final AtomicIntegerFieldUpdater<PerfCounter> protected final longprivate final RingBuffer -
Constructor Summary
ConstructorsConstructorDescriptionPerfCounter(PerfEvent event, RingBuffer ringBuffer, long readFormat, int fd) -
Method Summary
Modifier and TypeMethodDescriptionvoidattachBpf(int fd) voidclose()voiddisable()voidenable()final PerfEventevent()longget()protected long[]getValue()booleanhasReadFormat(int readFormat) (package private) voidioctl(int cmd, int arg) protected long[]voidrefresh(int count) voidreset()protected LocalValuetoValue(long[] raw)
-
Field Details
-
event
-
ringBuffer
-
readFormat
protected final long readFormat -
fd
volatile int fd -
fdUpdater
-
-
Constructor Details
-
PerfCounter
PerfCounter(PerfEvent event, RingBuffer ringBuffer, long readFormat, int fd)
-
-
Method Details
-
event
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-
get
- Throws:
IOException
-
getValue
- Throws:
IOException
-
getRawValue
- Throws:
IOException
-
newBuffer
protected long[] newBuffer() -
toValue
-
hasReadFormat
public boolean hasReadFormat(int readFormat) -
nextSample
-
reset
- Throws:
IOException
-
attachBpf
- Throws:
IOException
-
enable
- Throws:
IOException
-
disable
- Throws:
IOException
-
refresh
- Throws:
IOException
-
ioctl
- Throws:
IOException
-