1. 04 Apr, 2010 5 commits
    • Arnd Bergmann's avatar
      perf_event: Make perf fd non seekable · 3326c1ce
      Arnd Bergmann authored
      Perf_event does not need seeking, so prevent it in order to
      get rid of default_llseek, which uses the BKL.
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Ingo Molnar <mingo@elte.hu>
      [drop the nonseekable_open, not needed for anon inodes]
      Signed-off-by: default avatarFrederic Weisbecker <fweisbec@gmail.com>
      3326c1ce
    • Frederic Weisbecker's avatar
      perf: Fetch hot regs from the template caller · 6cc8a7c1
      Frederic Weisbecker authored
      Trace events can be defined from a template using
      DECLARE_EVENT_CLASS/DEFINE_EVENT or directly with TRACE_EVENT.
      
      In both cases we have a template tracepoint handler, used to
      record the trace, to which we pass our ftrace event instance.
      
      In the function level, if the class is named "foo" and the event
      is named "blah", we have the following chain of calls:
      
      perf_trace_blah() -> perf_trace_templ_foo()
      
      In the case we have several events sharing the class "blah",
      we'll have multiple users of perf_trace_templ_foo(), and it
      won't be inlined by the compiler. This is usually what happens
      with the DECLARE_EVENT_CLASS/DEFINE_EVENT based definition.
      
      But if perf_trace_blah() is the only caller of perf_trace_templ_foo()
      there are fair chances that it will be inlined.
      
      The problem is that we fetch the regs from perf_trace_templ_foo()
      after we rewinded the frame pointer to the second caller, we want
      to reach the caller of perf_trace_blah() to get the right source
      of the event. And we do this by always assuming that
      perf_trace_templ_foo() is not inlined. But as shown above this
      is not always true. And if it is inlined we miss the first caller,
      losing the most important level of precision.
      
      We get:
      	    61.31%       ls  [kernel.kallsyms]  [k] do_softirq
                               |
                               --- do_softirq
                                   irq_exit
                                   do_IRQ
                                   common_interrupt
                                  |
                                  |--25.00%-- tty_buffer_request_room
      
      Instead of:
      	    61.31%       ls  [kernel.kallsyms]  [k] __do_softirq
                               |
                               --- __do_softirq
                                   do_softirq
                                   irq_exit
                                   do_IRQ
                                   common_interrupt
                                  |
                                  |--25.00%-- tty_buffer_request_room
      
      To fix this, we fetch the regs from perf_trace_blah() rather than
      perf_trace_templ_foo() so that we don't have to deal with inlining
      surprises.
      
      That also bring us the advantage of having the true source of the
      event even if we don't have frame pointers.
      Signed-off-by: default avatarFrederic Weisbecker <fweisbec@gmail.com>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Ingo Molnar <mingo@elte.hu>
      6cc8a7c1
    • Frederic Weisbecker's avatar
      perf: Drop the frame reliablity check · 6f4dee06
      Frederic Weisbecker authored
      It is useless now that we have a pure stack frame
      walker, as given addr are always reliable.
      Signed-off-by: default avatarFrederic Weisbecker <fweisbec@gmail.com>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Ingo Molnar <mingo@elte.hu>
      6f4dee06
    • Arnaldo Carvalho de Melo's avatar
      perf TUI: Add a "Zoom into COMM(PID) thread" and reverse operations · a5e29aca
      Arnaldo Carvalho de Melo authored
      Now one can press the right arrow key and in addition to being able to
      filter by DSO, filter out by thread too, or a combination of both
      filters.
      
      With this one can start collecting events for the whole system, then
      focus on a subset of the collected data quickly.
      
      Cc: Avi Kivity <avi@redhat.com>
      Cc: Frédéric Weisbecker <fweisbec@gmail.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Paul Mackerras <paulus@samba.org>
      LKML-Reference: <new-submission>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      a5e29aca
    • Arnaldo Carvalho de Melo's avatar
      perf newt: Add a "Zoom into foo.so DSO" and reverse operations · 83753190
      Arnaldo Carvalho de Melo authored
      Clicking on -> will bring as one of the popup menu options a "Zoom into
      CURRENT DSO", i.e. CURRENT will be replaced by the name of the DSO in
      the current line.
      
      Choosing this option will filter out all samples that didn't took place
      in a symbol in this DSO.
      
      After that the option reverts to "Zoom out of CURRENT DSO", to allow
      going back to the more compreensive view, not filtered by DSO.
      
      Future similar operations will include zooming into a particular thread,
      COMM, CPU, "last minute", "last N usecs", etc.
      
      Cc: Frédéric Weisbecker <fweisbec@gmail.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Paul Mackerras <paulus@samba.org>
      LKML-Reference: <new-submission>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      83753190
  2. 03 Apr, 2010 9 commits
  3. 02 Apr, 2010 26 commits