1

I have dell desktop with Intel Core i7-4770 @ 3.4GHz CPU.

There, I have installed Ubuntu server 15.04. Afterwards I have install linux-tools-generic and linux-tools-common to install perf tools. However, when I run perf list the hardware section is not there, not even "not supported". The only other thing is that I have done before is to install xen, and Ubuntu is currently running as Dom0. I am not sure if this can have any effect on my problem.

Here is what I get from command perf list:

ubuntuuser@ubuntu:~/work/linux$ perf list

List of pre-defined events (to be used in -e):
  cpu-clock                                          [Software event]
  task-clock                                         [Software event]
  page-faults OR faults                              [Software event]
  context-switches OR cs                             [Software event]
  cpu-migrations OR migrations                       [Software event]
  minor-faults                                       [Software event]
  major-faults                                       [Software event]
  alignment-faults                                   [Software event]
  emulation-faults                                   [Software event]
  dummy                                              [Software event]

  power/energy-cores/                                [Kernel PMU event]
  power/energy-gpu/                                  [Kernel PMU event]
  power/energy-pkg/                                  [Kernel PMU event]
  power/energy-ram/                                  [Kernel PMU event]

  rNNN                                               [Raw hardware event descriptor]
  cpu/t1=v1[,t2=v2,t3 ...]/modifier                  [Raw hardware event descriptor]
   (see 'man perf-list' on how to encode it)

  mem:<addr>[:access]                                [Hardware breakpoint]

  [ Tracepoints not available: Permission denied ]

I would like to know what is my problem? Is it the CPU itself that doesn't have support for hardware events? Or is it kernel from repository that doesn't have hardware events enabled? If it just kernel, I guess I will just have to

2
  • Do you get the particular events you are looking for if you use sudo? i.e. sudo perf list? On my system the list is much much longer when I use sudo. Jun 14, 2015 at 6:29
  • Those are just Tracepoint events.
    – Armen
    Jun 14, 2015 at 17:38

1 Answer 1

1

I didn't get any hardware events listed either, until after I used some. Now, even after a fresh re-boot, some are listed:

doug@s15:~$ perf list hw

List of pre-defined events (to be used in -e):

  branch-instructions OR branches                    [Hardware event]
  branch-misses                                      [Hardware event]
  bus-cycles                                         [Hardware event]
  cache-misses                                       [Hardware event]
  cache-references                                   [Hardware event]
  cpu-cycles OR cycles                               [Hardware event]
  instructions                                       [Hardware event]
  ref-cycles                                         [Hardware event]
  stalled-cycles-backend OR idle-cycles-backend      [Hardware event]
  stalled-cycles-frontend OR idle-cycles-frontend    [Hardware event]

doug@s15:~$ perf list pmu

List of pre-defined events (to be used in -e):

  branch-instructions OR cpu/branch-instructions/    [Kernel PMU event]
  branch-misses OR cpu/branch-misses/                [Kernel PMU event]
  bus-cycles OR cpu/bus-cycles/                      [Kernel PMU event]
  cache-misses OR cpu/cache-misses/                  [Kernel PMU event]
  cache-references OR cpu/cache-references/          [Kernel PMU event]
  cpu-cycles OR cpu/cpu-cycles/                      [Kernel PMU event]
  instructions OR cpu/instructions/                  [Kernel PMU event]
  mem-loads OR cpu/mem-loads/                        [Kernel PMU event]
  mem-stores OR cpu/mem-stores/                      [Kernel PMU event]
  power/energy-cores/                                [Kernel PMU event]
  power/energy-gpu/                                  [Kernel PMU event]
  power/energy-pkg/                                  [Kernel PMU event]
  ref-cycles OR cpu/ref-cycles/                      [Kernel PMU event]
  stalled-cycles-backend OR cpu/stalled-cycles-backend/ [Kernel PMU event]
  stalled-cycles-frontend OR cpu/stalled-cycles-frontend/ [Kernel PMU event]
  uncore_cbox_0/clockticks/                          [Kernel PMU event]
  uncore_cbox_1/clockticks/                          [Kernel PMU event]
  uncore_cbox_2/clockticks/                          [Kernel PMU event]
  uncore_cbox_3/clockticks/                          [Kernel PMU event]
  uncore_imc/data_reads/                             [Kernel PMU event]
  uncore_imc/data_writes/                            [Kernel PMU event]

Earlier I had done these:

doug@s15:~$ sudo ~/bin/perf stat -a sleep 5

 Performance counter stats for 'system wide':

      39997.230896      task-clock (msec)         #    7.998 CPUs utilized            (100.00%)
               396      context-switches          #    0.010 K/sec                    (100.00%)
                 8      cpu-migrations            #    0.000 K/sec                    (100.00%)
                82      page-faults               #    0.002 K/sec
       359,328,178      cycles                    #    0.009 GHz                      (83.29%)
       827,261,275      stalled-cycles-frontend   #  230.22% frontend cycles idle     (83.33%)
       797,161,705      stalled-cycles-backend    #  221.85% backend  cycles idle     (66.74%)
        49,220,050      instructions              #    0.14  insns per cycle
                                                  #   16.81  stalled cycles per insn  (83.37%)
        10,011,396      branches                  #    0.250 M/sec                    (83.37%)
         1,800,790      branch-misses             #   17.99% of all branches          (83.29%)

       5.000925953 seconds time elapsed

doug@s15:~$ sudo ~/bin/perf stat -e cycles,instructions,cache-references,cache-misses,bus-cycles -a sleep 5

 Performance counter stats for 'system wide':

        24,268,338      cycles                                                        (100.00%)
         8,505,561      instructions              #    0.35  insns per cycle          (100.00%)
           657,099      cache-references                                              (100.00%)
            73,174      cache-misses              #   11.136 % of all cache refs      (100.00%)
         1,507,017      bus-cycles

       5.001004407 seconds time elapsed

doug@s15:~$ sudo ~/bin/perf stat -e L1-dcache-loads,L1-dcache-load-misses,L1-dcache-stores sleep 5

 Performance counter stats for 'sleep 5':

           170,208      L1-dcache-loads
            14,139      L1-dcache-load-misses     #    8.31% of all L1-dcache hits
     <not counted>      L1-dcache-stores           (0.00%)

       5.000957676 seconds time elapsed

I do not how know if my list is now complete, nor how to get the complete list if it isn't.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .