1. 18 2月, 2011 2 次提交
    • A
      perf list: Allow filtering list of events · 668b8788
      Arnaldo Carvalho de Melo 提交于
      The man page has the details, here are some examples:
      
      [root@emilia ~]# perf list *fault*  *:*wait*
      
      List of pre-defined events (to be used in -e):
        page-faults OR faults                      [Software event]
        minor-faults                               [Software event]
        major-faults                               [Software event]
        alignment-faults                           [Software event]
        emulation-faults                           [Software event]
      
        radeon:radeon_fence_wait_begin             [Tracepoint event]
        radeon:radeon_fence_wait_end               [Tracepoint event]
        writeback:wbc_writeback_wait               [Tracepoint event]
        writeback:wbc_balance_dirty_wait           [Tracepoint event]
        writeback:writeback_congestion_wait        [Tracepoint event]
        writeback:writeback_wait_iff_congested     [Tracepoint event]
        sched:sched_wait_task                      [Tracepoint event]
        sched:sched_process_wait                   [Tracepoint event]
        sched:sched_stat_wait                      [Tracepoint event]
        sched:sched_stat_iowait                    [Tracepoint event]
        syscalls:sys_enter_epoll_wait              [Tracepoint event]
        syscalls:sys_exit_epoll_wait               [Tracepoint event]
        syscalls:sys_enter_epoll_pwait             [Tracepoint event]
        syscalls:sys_exit_epoll_pwait              [Tracepoint event]
        syscalls:sys_enter_rt_sigtimedwait         [Tracepoint event]
        syscalls:sys_exit_rt_sigtimedwait          [Tracepoint event]
        syscalls:sys_enter_waitid                  [Tracepoint event]
        syscalls:sys_exit_waitid                   [Tracepoint event]
        syscalls:sys_enter_wait4                   [Tracepoint event]
        syscalls:sys_exit_wait4                    [Tracepoint event]
        syscalls:sys_enter_waitpid                 [Tracepoint event]
        syscalls:sys_exit_waitpid                  [Tracepoint event]
      [root@emilia ~]#
      Suggested-by: NIngo Molnar <mingo@elte.hu>
      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: NArnaldo Carvalho de Melo <acme@redhat.com>
      668b8788
    • A
      perf report: Tell the user when a perf.data file has no samples · 74cfc17d
      Arnaldo Carvalho de Melo 提交于
      [root@emilia ~]# perf report --stdio
      The perf.data file has no samples!
      [root@emilia ~]#
      
      The TUI shows a popup warning message with the same message.
      Reported-by: NIngo Molnar <mingo@elte.hu>
      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: Steven Rostedt <rostedt@goodmis.org>
      Cc: Tom Zanussi <tzanussi@gmail.com>
      LKML-Reference: <new-submission>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      74cfc17d
  2. 17 2月, 2011 10 次提交
    • A
      perf record: Delay setting the header writing atexit call · 712a4b60
      Arnaldo Carvalho de Melo 提交于
      While testing the --filter option I noticed that we were writing lots of
      unneeded stuff to the perf.data header when the filter ioctl fails, so
      move the atexit(atexit_header) call to after we create the counters
      successfully.
      
      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: NArnaldo Carvalho de Melo <acme@redhat.com>
      712a4b60
    • A
      perf hists: Print number of samples, not the period sum · fec9cbd1
      Arnaldo Carvalho de Melo 提交于
      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: NStephane Eranian <eranian@google.com>
      Acked-by: NStephane 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: NArnaldo Carvalho de Melo <acme@redhat.com>
      fec9cbd1
    • S
      perf: make perf stat print user provided full event names · f0c55bcf
      Stephane Eranian 提交于
      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: NStephane Eranian <eranian@google.com>
      [ committer note: Fixed a merge problem with 023695d9 "Add cgroup support" ]
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      f0c55bcf
    • A
      perf python: Add cgroup.c to setup.py to get it building again · 4498062e
      Arnaldo Carvalho de Melo 提交于
      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: NArnaldo Carvalho de Melo <acme@redhat.com>
      4498062e
    • M
      perf probe: Show filename which contains target function · 8737ebde
      Masami Hiramatsu 提交于
      Show filename which contains a target function with the function name on
      "--lines" mode, because perf-probe just shows the first function even if
      there are many same-name functions.
      
      Originally adopted by Franck Bui-Huu's patch which shows file name
      instead of function name. I've just modified it to show both of function
      name and file name, because of completeness of output.
      
       E.g.)
       $ perf probe -L t_show
       <t_show@/home/mhiramat/ksrc/linux-2.6-tip/kernel/trace/ftrace.c:0>
            0  static int t_show(struct seq_file *m, void *v)
            1  {
            2         struct ftrace_iterator *iter = m->private;
       ...
      
       $ perf probe -L t_show@trace/trace.c
       <t_show@/home/mhiramat/ksrc/linux-2.6-tip/kernel/trace/trace.c:0>
            0  static int t_show(struct seq_file *m, void *v)
            1  {
                      struct tracer *t = v;
       ...
      Original-patch-by: NFranck Bui-Huu <fbuihuu@gmail.com>
      Cc: 2nddept-manager@sdl.hitachi.co.jp
      Cc: Franck Bui-Huu <fbuihuu@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      LKML-Reference: <20110210090816.1809.43426.stgit@ltc236.sdl.hitachi.co.jp>
      Signed-off-by: NMasami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      8737ebde
    • M
      perf probe: Support function@filename syntax for --line · e116dfa1
      Masami Hiramatsu 提交于
      Since "perf probe --add" supports function@filename syntax, --line
      option should also support it.
      
      Cc: 2nddept-manager@sdl.hitachi.co.jp
      Cc: Franck Bui-Huu <fbuihuu@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: linux-kernel@vger.kernel.org
      LKML-Reference: <20110210090810.1809.26913.stgit@ltc236.sdl.hitachi.co.jp>
      Signed-off-by: NMasami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      e116dfa1
    • J
      perf tools: Update Makefile with some help · 4187e262
      Jesse Brandeburg 提交于
      The perf makefile is nicely complete except for
      
      a) an uninstall option
      b) a 'make help' description
      
      This patch implements b)
      it also comments out other non-working makefile targets
      Signed-off-by: NJesse Brandeburg <jesse.brandeburg@intel.com>
      LKML-Reference: <new-submission>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      4187e262
    • A
      perf annotate browser: Use the percent color for the whole line · b99976e2
      Arnaldo Carvalho de Melo 提交于
      Not just for the percentage number, to see the hot lines more easily.
      
      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: NArnaldo Carvalho de Melo <acme@redhat.com>
      b99976e2
    • A
      perf annotate: Check if offset is less than symbol size · 289c0820
      Arnaldo Carvalho de Melo 提交于
      Just like done on symbol__inc_addr_samples to catch misparsed offsets
      from objdump.
      
      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: NArnaldo Carvalho de Melo <acme@redhat.com>
      289c0820
    • A
      perf ui: Serialize screen updates · 5c35d69f
      Arnaldo Carvalho de Melo 提交于
      The ui operations so far were used by just one thread, but 'perf top
      --tui' now has two threads updating the screen, so we need to use a
      mutex to avoid garbling the screen.
      
      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: NArnaldo Carvalho de Melo <acme@redhat.com>
      5c35d69f
  3. 16 2月, 2011 28 次提交