Skip to content
  1. Dec 23, 2010
    • Arnaldo Carvalho de Melo's avatar
      perf symbols: Improve kallsyms symbol end addr calculation · 3b01a413
      Arnaldo Carvalho de Melo authored
      
      
      For kallsyms we don't have the symbol address end, so we do an extra pass and
      set the symbol end addr as being the start of the next minus one.
      
      But this was being done just after we filtered the symbols of a
      particular type (functions, variables), so the symbol end was sometimes
      after what it really is.
      
      Fixing up symbol end also was falling apart when we have symbol aliases,
      then the end address of all but the last alias was being set to be
      before its start.
      
      Fix it up by checking for symbol aliases and making the kallsyms__parse
      routine use the next symbol, whatever its type, as the limit for the
      previous symbol, passing that end address to the callback.
      
      This was detected by the 'perf test' synthetic paranoid regression
      tests, fix it up so that even that case doesn't mislead us.
      
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Stephane Eranian <eranian@google.com>
      LKML-Reference: <new-submission>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      3b01a413
    • Ingo Molnar's avatar
      Merge branch 'tip/perf/core' of... · 9fb67204
      Ingo Molnar authored
      Merge branch 'tip/perf/core' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-trace into perf/core
      9fb67204
  2. Dec 22, 2010
    • Ingo Molnar's avatar
      Merge branch 'perf/core' of... · 8c1df400
      Ingo Molnar authored
      Merge branch 'perf/core' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux-2.6 into perf/core
      8c1df400
    • Ingo Molnar's avatar
      Merge commit 'v2.6.37-rc7' into perf/core · 6c529a26
      Ingo Molnar authored
      
      
      Merge reason: Pick up the latest -rc.
      
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      6c529a26
    • Linus Torvalds's avatar
      Linux 2.6.37-rc7 · 90a8a73c
      Linus Torvalds authored
      v2.6.37-rc7
      90a8a73c
    • Franck Bui-Huu's avatar
      perf probe: Handle gracefully some stupid and buggy line syntaxes · 21dd9ae5
      Franck Bui-Huu authored
      
      
      Currently perf probe doesn't handle those incorrect syntaxes:
      
         $ perf probe -L sched.c:++13
         $ perf probe -L sched.c:-+13
         $ perf probe -L sched.c:10000000000000000000000000000+13
      
      This patches rewrites parse_line_range_desc() to handle them.
      
      As a bonus, it reports more useful error messages instead of: "Tailing
      with invalid character...".
      
      Acked-by: default avatarMasami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
      Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
      LKML-Reference: <1292854685-8230-7-git-send-email-fbuihuu@gmail.com>
      Signed-off-by: default avatarFranck Bui-Huu <fbuihuu@gmail.com>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      21dd9ae5
    • Franck Bui-Huu's avatar
      perf probe: Don't always consider EOF as an error when listing source code · fde52dbd
      Franck Bui-Huu authored
      
      
      When listing a whole file or a function which is located at the end,
      perf-probe -L output wrongly: "Source file is shorter than expected.".
      
      This is because show_one_line() always consider EOF as an error.
      
      This patch fixes this by not considering EOF as an error when dumping
      the trailing lines. Otherwise it's still an error and perf-probe still
      outputs its warning.
      
      Acked-by: default avatarMasami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
      Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
      LKML-Reference: <1292854685-8230-6-git-send-email-fbuihuu@gmail.com>
      Signed-off-by: default avatarFranck Bui-Huu <fbuihuu@gmail.com>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      fde52dbd
    • Franck Bui-Huu's avatar
      perf probe: Fix line range description since a single file is allowed · 9d95b580
      Franck Bui-Huu authored
      
      
      	$ perf-probe -L sched.c
      
      is currently allowed but not documented.
      
      Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
      LKML-Reference: <1292854685-8230-5-git-send-email-fbuihuu@gmail.com>
      Signed-off-by: default avatarFranck Bui-Huu <fbuihuu@gmail.com>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      9d95b580
    • Franck Bui-Huu's avatar
      perf probe: Clean up redundant tests in show_line_range() · 44b81e92
      Franck Bui-Huu authored
      
      
      It also removes some superflous parentheses.
      
      Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
      LKML-Reference: <1292854685-8230-4-git-send-email-fbuihuu@gmail.com>
      Signed-off-by: default avatarFranck Bui-Huu <fbuihuu@gmail.com>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      44b81e92
    • Franck Bui-Huu's avatar
      perf probe: Rewrite show_one_line() to make it simpler · befe3414
      Franck Bui-Huu authored
      
      
      Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
      LKML-Reference: <1292854685-8230-3-git-send-email-fbuihuu@gmail.com>
      Signed-off-by: default avatarFranck Bui-Huu <fbuihuu@gmail.com>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      befe3414
    • Franck Bui-Huu's avatar
      perf probe: Make -L display the absolute path of the dumped file · 62c15fc4
      Franck Bui-Huu authored
      
      
      The actual file used by 'perf probe -L sched.c' is reported in the ouput
      of the command.
      
      But it's simply displayed as it has been given to the command (simply
      sched.c) which is too ambiguous to be really usefull since several
      sched.c files can be found into the same project and we also don't know
      which search path has been used.
      
      Acked-by: default avatarMasami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
      Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
      LKML-Reference: <1292854685-8230-2-git-send-email-fbuihuu@gmail.com>
      Signed-off-by: default avatarFranck Bui-Huu <fbuihuu@gmail.com>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      62c15fc4
    • Masami Hiramatsu's avatar
      perf probe: Cleanup messages · 0e43e5d2
      Masami Hiramatsu authored
      
      
      Add new lines for error or debug messages, change dwarf related words to more
      generic words (or just removed).
      
      Cc: 2nddept-manager@sdl.hitachi.co.jp
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      LKML-Reference: <20101217131211.24123.40437.stgit@ltc236.sdl.hitachi.co.jp>
      Signed-off-by: default avatarMasami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      0e43e5d2
    • David Ahern's avatar
      perf symbols: Add symfs option for off-box analysis using specified tree · ec5761ea
      David Ahern authored
      
      
      The symfs argument allows analysis of perf.data file using a locally accessible
      filesystem tree with debug symbols - e.g., tree created during image builds,
      sshfs mount, loop mounted KVM disk images, USB keys, initrds, etc. Anything
      with an OS tree can be analyzed from anywhere without the need to populate a
      local data store with build-ids.
      
      Commiter notes:
      
      o Fixed up symfs="/" variants handling.
      
      o prefixed DSO__ORIG_GUEST_KMODULE case with symfs too, avoiding use of files
        outside the symfs directory.
      
      LKML-Reference: <1291926427-28846-1-git-send-email-daahern@cisco.com>
      Signed-off-by: default avatarDavid Ahern <daahern@cisco.com>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      ec5761ea
    • Ian Munsie's avatar
      perf record,report,annotate,diff: Process events in order · eac23d1c
      Ian Munsie authored
      
      
      This patch changes perf report to ask for the ID info on all events be
      default if recording from multiple CPUs.
      
      Perf report, annotate and diff will now process the events in order if
      the kernel is able to provide timestamps on all events. This ensures
      that events such as COMM and MMAP which are necessary to correctly
      interpret samples are processed prior to those samples so that they are
      attributed correctly.
      
      Before:
       # perf record ./cachetest
       # perf report
      
       # Events: 6K cycles
       #
       # Overhead  Command      Shared Object                           Symbol
       # ........  .......  .................  ...............................
       #
           74.11%    :3259  [unknown]          [k] 0x4a6c
            1.50%  cachetest  ld-2.11.2.so       [.] 0x1777c
            1.46%    :3259  [kernel.kallsyms]  [k] .perf_event_mmap_ctx
            1.25%    :3259  [kernel.kallsyms]  [k] restore
            0.74%    :3259  [kernel.kallsyms]  [k] ._raw_spin_lock
            0.71%    :3259  [kernel.kallsyms]  [k] .filemap_fault
            0.66%    :3259  [kernel.kallsyms]  [k] .memset
            0.54%  cachetest  [kernel.kallsyms]  [k] .sha_transform
            0.54%    :3259  [kernel.kallsyms]  [k] .copy_4K_page
            0.54%    :3259  [kernel.kallsyms]  [k] .find_get_page
            0.52%    :3259  [kernel.kallsyms]  [k] .trace_hardirqs_off
            0.50%    :3259  [kernel.kallsyms]  [k] .__do_fault
      <SNIP>
      
      After:
       # perf report
      
       # Events: 6K cycles
       #
       # Overhead  Command      Shared Object                           Symbol
       # ........  .......  .................  ...............................
       #
           44.28%  cachetest  cachetest          [.] sumArrayNaive
           22.53%  cachetest  cachetest          [.] sumArrayOptimal
            6.59%  cachetest  ld-2.11.2.so       [.] 0x1777c
            2.13%  cachetest  [unknown]          [k] 0x340
            1.46%  cachetest  [kernel.kallsyms]  [k] .perf_event_mmap_ctx
            1.25%  cachetest  [kernel.kallsyms]  [k] restore
            0.74%  cachetest  [kernel.kallsyms]  [k] ._raw_spin_lock
            0.71%  cachetest  [kernel.kallsyms]  [k] .filemap_fault
            0.66%  cachetest  [kernel.kallsyms]  [k] .memset
            0.54%  cachetest  [kernel.kallsyms]  [k] .copy_4K_page
            0.54%  cachetest  [kernel.kallsyms]  [k] .find_get_page
            0.54%  cachetest  [kernel.kallsyms]  [k] .sha_transform
            0.52%  cachetest  [kernel.kallsyms]  [k] .trace_hardirqs_off
            0.50%  cachetest  [kernel.kallsyms]  [k] .__do_fault
      <SNIP>
      
      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: Thomas Gleixner <tglx@linutronix.de>
      LKML-Reference: <1291872833-839-1-git-send-email-imunsie@au1.ibm.com>
      Signed-off-by: default avatarIan Munsie <imunsie@au1.ibm.com>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      eac23d1c
    • Ian Munsie's avatar
      perf session: Fallback to unordered processing if no sample_id_all · 21ef97f0
      Ian Munsie authored
      
      
      If we are running the new perf on an old kernel without support for
      sample_id_all, we should fall back to the old unordered processing of
      events. If we didn't than we would *always* process events without
      timestamps out of order, whether or not we hit a reordering race. In
      other words, instead of there being a chance of not attributing samples
      correctly, we would guarantee that samples would not be attributed.
      
      While processing all events without timestamps before events with
      timestamps may seem like an intuitive solution, it falls down as
      PERF_RECORD_EXIT events would also be processed before any samples.
      Even with a workaround for that case, samples before/after an exec would
      not be attributed correctly.
      
      This patch allows commands to indicate whether they need to fall back to
      unordered processing, so that commands that do not care about timestamps
      on every event will not be affected. If we do fallback, this will print
      out a warning if report -D was invoked.
      
      This patch adds the test in perf_session__new so that we only need to
      test once per session. Commands that do not use an event_ops (such as
      record and top) can simply pass NULL in it's place.
      
      Acked-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      LKML-Reference: <1291951882-sup-6069@au1.ibm.com>
      Signed-off-by: default avatarIan Munsie <imunsie@au1.ibm.com>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      21ef97f0
  3. Dec 21, 2010
  4. Dec 20, 2010
  5. Dec 19, 2010
  6. Dec 18, 2010