1. 17 Feb, 2011 3 commits
    • Arnaldo Carvalho de Melo's avatar
      perf hists: Print number of samples, not the period sum · fec9cbd1
      Arnaldo Carvalho de Melo authored
      So that we match the header where we state the number of events with the
      "Samples" column when using 'perf report -n/--show-nr-samples':
      
       [root@emilia ~]# perf record -a sleep 1
       [ perf record: Woken up 1 times to write data ]
       [ perf record: Captured and wrote 0.111 MB perf.data (~4860 samples) ]
       [root@emilia ~]# perf report --stdio --show-nr-samples
       # Events: 11  cycles
       #
       # Overhead  Samples        Command       Shared Object                        Symbol
       # ........ ..........  ...........  ..................  ............................
       #
           16.65%          1        sleep  [kernel.kallsyms]   [k] unmap_vmas
           16.10%          1         perf  libpthread-2.12.so  [.] __pthread_cleanup_push_defer
           15.79%          2         perf  [kernel.kallsyms]   [k] format_decode
           12.88%          1  kworker/1:2  [kernel.kallsyms]   [k] cache_reap
           10.69%          1      swapper  [kernel.kallsyms]   [k] _raw_spin_lock
            7.55%          1        sleep  [kernel.kallsyms]   [k] prepare_exec_creds
            6.00%          1         perf  [jbd2]              [k] start_this_handle
            5.29%          1         perf  [kernel.kallsyms]   [k] seq_read
            4.75%          1         perf  [kernel.kallsyms]   [k] get_pid_task
            4.30%          1         perf  [kernel.kallsyms]   [k] _raw_spin_unlock_irqrestore
      
       #
       # (For a higher level overview, try: perf report --sort comm,dso)
       #
       [root@emilia ~]#
      Reported-by: default avatarStephane Eranian <eranian@google.com>
      Acked-by: default avatarStephane Eranian <eranian@google.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Tom Zanussi <tzanussi@gmail.com>
      LKML-Reference: <new-submission>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      fec9cbd1
    • Stephane Eranian's avatar
      perf: make perf stat print user provided full event names · f0c55bcf
      Stephane Eranian authored
      This patch changes the way perf stat prints event names at the end of a
      run. Until now, it was trying to reconstruct the event name from its
      encoding. The problem is that it would only print generic events without
      their modifiers (u, k, pp).
      
      This patch saves the event name as passed by the user in the evsel
      struct and uses it to print the final event name.
      
      This would also work in case perf is linked with a library (such as
      libpfm4) which provides full PMU event tables.
      
      $ perf stat -e cycles:u,cycles:k date
      Wed Feb 16 14:58:52 CET 2011
      
       Performance counter stats for 'date':
      
                  568600 cycles:u
                 2779715 cycles:k
      
              0.001908182  seconds time elapsed
      
      Cc: Arun Sharma <arun@sharma-home.net>
      Cc: David S. Miller <davem@davemloft.net>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Robert Richter <robert.richter@amd.com>
      Cc: Stephane Eranian <eranian@gmail.com>
      LPU-Reference: <4d5bdc64.98a1df0a.7aa3.06c2@mx.google.com>
      Signed-off-by: default avatarStephane Eranian <eranian@google.com>
      [ committer note: Fixed a merge problem with 023695d9 "Add cgroup support" ]
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      f0c55bcf
    • Arnaldo Carvalho de Melo's avatar
      perf python: Add cgroup.c to setup.py to get it building again · 4498062e
      Arnaldo Carvalho de Melo authored
      The 023695d9 cset added a new file, util/cgroup.c, that is referenced from
      util/evsel.c, so it needs to be present in util/setup.py so that the python
      shared object binding works, fixing this:
      
      [root@emilia linux]# export PYTHONPATH=~acme/git/build/perf/python/
      [root@emilia linux]# ./tools/perf/python/twatch.py
      Traceback (most recent call last):
        File "./tools/perf/python/twatch.py", line 16, in <module>
          import perf
      ImportError: /home/acme/git/build/perf/python/perf.so: undefined symbol: close_cgroup
      
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Tom Zanussi <tzanussi@gmail.com>
      LKML-Reference: <new-submission>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      4498062e
  2. 16 Feb, 2011 21 commits
  3. 15 Feb, 2011 16 commits