Class Perf
java.lang.Object
one.nio.os.perf.Perf
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final int(package private) static final int(package private) static final int(package private) static final int(package private) static final int(package private) static final int(package private) static final int(package private) static final int(package private) static final int(package private) static final int(package private) static final intstatic final boolean -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidclose(int fd) private static RingBuffercreateRingBuffer(int fd, PerfOption... options) (package private) static longget(int fd) (package private) static voidgetValue(int fd, long[] value, int off, int len) private static booleanhasOption(PerfOption[] options, PerfOption option) (package private) static voidioctl(int fd, int cmd, int arg) static PerfCounteropen(PerfEvent event, int pid, int cpu, PerfOption... options) static PerfCounteropen(PerfEvent event, String cgroup, int cpu, PerfOption... options) (package private) static intstatic intstatic PerfCounterGlobalopenGlobal(PerfEvent event, int pid, PerfOption... options) private static PerfOptionoption(PerfOption[] options, String name) private static longoptionBits(PerfOption[] options, String name) private static StringoptionString(PerfOption[] options) private static longoptionValue(PerfOption[] options, String name)
-
Field Details
-
IS_SUPPORTED
public static final boolean IS_SUPPORTED -
CURRENT_PID
public static final int CURRENT_PID- See Also:
-
ANY_PID
public static final int ANY_PID- See Also:
-
ANY_CPU
public static final int ANY_CPU- See Also:
-
IOCTL_RESET
- See Also:
-
IOCTL_ENABLE
- See Also:
-
IOCTL_DISABLE
- See Also:
-
IOCTL_REFRESH
- See Also:
-
IOCTL_PERIOD
- See Also:
-
IOCTL_SET_OUTPUT
- See Also:
-
IOCTL_SET_FILTER
- See Also:
-
IOCTL_ID
- See Also:
-
IOCTL_SET_BPF
- See Also:
-
IOCTL_PAUSE_OUTPUT
- See Also:
-
-
Constructor Details
-
Perf
public Perf()
-
-
Method Details
-
open
public static PerfCounter open(PerfEvent event, int pid, int cpu, PerfOption... options) throws IOException - Throws:
IOException
-
open
public static PerfCounter open(PerfEvent event, String cgroup, int cpu, PerfOption... options) throws IOException - Throws:
IOException
-
openGlobal
public static PerfCounterGlobal openGlobal(PerfEvent event, int pid, PerfOption... options) throws IOException - Throws:
IOException
-
createRingBuffer
- Throws:
IOException
-
optionString
-
optionValue
-
option
-
optionBits
-
hasOption
-
openEvent
static int openEvent(int pid, int cpu, int type, long config, int breakpoint, int group, String options) throws IOException - Throws:
IOException
-
openFile
- Throws:
IOException
-
close
public static void close(int fd) -
get
- Throws:
IOException
-
getValue
- Throws:
IOException
-
ioctl
- Throws:
IOException
-