Package one.nio.os.perf
Class RingBuffer
java.lang.Object
one.nio.os.perf.RingBuffer
- All Implemented Interfaces:
Closeable,AutoCloseable
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final longprivate static final intprivate final longprivate static final intprivate static final intprivate final intprivate static final int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()private booleanhasOption(int option) (package private) PerfSampleprivate longreadLong(long offset) private PerfSamplereadSample(long offset)
-
Field Details
-
PAGE_SIZE
private static final int PAGE_SIZE -
HEAD_OFFSET
private static final int HEAD_OFFSET- See Also:
-
TAIL_OFFSET
private static final int TAIL_OFFSET- See Also:
-
PERF_RECORD_SAMPLE
private static final int PERF_RECORD_SAMPLE- See Also:
-
address
private final long address -
mask
private final long mask -
sampleType
private final int sampleType
-
-
Constructor Details
-
RingBuffer
RingBuffer(int fd, int pages, int sampleType) throws IOException - Throws:
IOException
-
-
Method Details
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-
nextSample
PerfSample nextSample() -
readSample
-
hasOption
private boolean hasOption(int option) -
readLong
private long readLong(long offset)
-