Class Perf


  • public class Perf
    extends java.lang.Object
    • Constructor Detail

      • Perf

        public Perf()
    • Method Detail

      • open

        public static PerfCounter open​(PerfEvent event,
                                       int pid,
                                       int cpu,
                                       PerfOption... options)
                                throws java.io.IOException
        Throws:
        java.io.IOException
      • open

        public static PerfCounter open​(PerfEvent event,
                                       java.lang.String cgroup,
                                       int cpu,
                                       PerfOption... options)
                                throws java.io.IOException
        Throws:
        java.io.IOException
      • createRingBuffer

        private static RingBuffer createRingBuffer​(int fd,
                                                   PerfOption... options)
                                            throws java.io.IOException
        Throws:
        java.io.IOException
      • optionString

        private static java.lang.String optionString​(PerfOption[] options)
      • optionValue

        private static long optionValue​(PerfOption[] options,
                                        java.lang.String name)
      • optionBits

        private static long optionBits​(PerfOption[] options,
                                       java.lang.String name)
      • openEvent

        static int openEvent​(int pid,
                             int cpu,
                             int type,
                             long config,
                             int breakpoint,
                             int group,
                             java.lang.String options)
                      throws java.io.IOException
        Throws:
        java.io.IOException
      • openFile

        public static int openFile​(java.lang.String fileName)
                            throws java.io.IOException
        Throws:
        java.io.IOException
      • close

        public static void close​(int fd)
      • get

        static long get​(int fd)
                 throws java.io.IOException
        Throws:
        java.io.IOException
      • getValue

        static void getValue​(int fd,
                             long[] value,
                             int off,
                             int len)
                      throws java.io.IOException
        Throws:
        java.io.IOException
      • ioctl

        static void ioctl​(int fd,
                          int cmd,
                          int arg)
                   throws java.io.IOException
        Throws:
        java.io.IOException