1. 16 3月, 2013 4 次提交
  2. 15 2月, 2013 1 次提交
    • N
      perf annotate: Fix warning message on a missing vmlinux · e3a34029
      Namhyung Kim 提交于
      When perf annotate runs with no vmlinux file it cannot annotate kernel
      symbols because the kallsyms only provides symbol addresses.  So it
      recommends to run perf buildid-cache to install proper vmlinux image.
      
      But running perf buildid-cache -av vmlinux as the message gives me a
      following error:
      
        $ perf buildid-cache -av /home/namhyung/build/kernel/vmlinux
        Couldn't add v: No such file or directory
      
      Since the -a option receives a parameter, 'v' should not be after the
      option.
      
      In addition -a option is not work for this case since the build-id cache
      already has a kallsyms with same build-id so it'll fail with EEXIST.
      Use recently added -u (--update) option for it.
      Signed-off-by: NNamhyung Kim <namhyung@kernel.org>
      Cc: Andi Kleen <andi@firstfloor.org>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Pekka Enberg <penberg@kernel.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Link: http://lkml.kernel.org/r/1360227734-375-6-git-send-email-namhyung@kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      e3a34029
  3. 10 11月, 2012 2 次提交
    • N
      perf annotate: Merge same lines in summary view · 41127965
      Namhyung Kim 提交于
      The --print-line option of perf annotate command shows summary for
      each source line.  But it didn't merge same lines so that it can
      appear multiple times.
      
      * before:
      
        Sorted summary for file /home/namhyung/bin/mcol
        ----------------------------------------------
           21.71 /home/namhyung/tmp/mcol.c:26
           20.66 /home/namhyung/tmp/mcol.c:25
            9.53 /home/namhyung/tmp/mcol.c:24
            7.68 /home/namhyung/tmp/mcol.c:25
            7.67 /home/namhyung/tmp/mcol.c:25
            7.66 /home/namhyung/tmp/mcol.c:26
            7.49 /home/namhyung/tmp/mcol.c:26
            6.92 /home/namhyung/tmp/mcol.c:25
            6.81 /home/namhyung/tmp/mcol.c:25
            1.07 /home/namhyung/tmp/mcol.c:26
            0.52 /home/namhyung/tmp/mcol.c:25
            0.51 /home/namhyung/tmp/mcol.c:25
            0.51 /home/namhyung/tmp/mcol.c:24
      
      * after:
      
        Sorted summary for file /home/namhyung/bin/mcol
        ----------------------------------------------
           50.77 /home/namhyung/tmp/mcol.c:25
           37.94 /home/namhyung/tmp/mcol.c:26
           10.04 /home/namhyung/tmp/mcol.c:24
      
      To do that, introduce percent_sum field so that the normal
      line-by-line output doesn't get changed.
      Signed-off-by: NNamhyung Kim <namhyung@kernel.org>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Link: http://lkml.kernel.org/r/1352440729-21848-1-git-send-email-namhyung@kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      41127965
    • N
      perf annotate: Whitespace fixups · 2ba34aaa
      Namhyung Kim 提交于
      Some lines are indented by whitespace characters rather than tabs.  Fix
      them.
      Signed-off-by: NNamhyung Kim <namhyung@kernel.org>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Link: http://lkml.kernel.org/r/1352482044-3443-3-git-send-email-namhyung@kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      2ba34aaa
  4. 31 10月, 2012 1 次提交
  5. 29 10月, 2012 1 次提交
  6. 11 9月, 2012 1 次提交
    • I
      perf tools: Use __maybe_used for unused variables · 1d037ca1
      Irina Tirdea 提交于
      perf defines both __used and __unused variables to use for marking
      unused variables. The variable __used is defined to
      __attribute__((__unused__)), which contradicts the kernel definition to
      __attribute__((__used__)) for new gcc versions. On Android, __used is
      also defined in system headers and this leads to warnings like: warning:
      '__used__' attribute ignored
      
      __unused is not defined in the kernel and is not a standard definition.
      If __unused is included everywhere instead of __used, this leads to
      conflicts with glibc headers, since glibc has a variables with this name
      in its headers.
      
      The best approach is to use __maybe_unused, the definition used in the
      kernel for __attribute__((unused)). In this way there is only one
      definition in perf sources (instead of 2 definitions that point to the
      same thing: __used and __unused) and it works on both Linux and Android.
      This patch simply replaces all instances of __used and __unused with
      __maybe_unused.
      Signed-off-by: NIrina Tirdea <irina.tirdea@intel.com>
      Acked-by: NPekka Enberg <penberg@kernel.org>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Namhyung Kim <namhyung.kim@lge.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Link: http://lkml.kernel.org/r/1347315303-29906-7-git-send-email-irina.tirdea@intel.com
      [ committer note: fixed up conflict with a116e05d in builtin-sched.c ]
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      1d037ca1
  7. 09 9月, 2012 1 次提交
  8. 06 9月, 2012 1 次提交
  9. 26 7月, 2012 1 次提交
  10. 25 7月, 2012 1 次提交
    • J
      perf symbols: Factor DSO symtab types to generic binary types · 44f24cb3
      Jiri Olsa 提交于
      Adding interface to access DSOs so it could be used
      from another place.
      
      New DSO binary type is added - making current SYMTAB__*
      types more general:
         DSO_BINARY_TYPE__* = SYMTAB__*
      
      Following function is added to return path based on the specified
      binary type:
         dso__binary_type_file
      Signed-off-by: NJiri Olsa <jolsa@redhat.com>
      Cc: Arun Sharma <asharma@fb.com>
      Cc: Benjamin Redelings <benjamin.redelings@nescent.org>
      Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
      Cc: Cyrill Gorcunov <gorcunov@openvz.org>
      Cc: Frank Ch. Eigler <fche@redhat.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Robert Richter <robert.richter@amd.com>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Tom Zanussi <tzanussi@gmail.com>
      Cc: Ulrich Drepper <drepper@gmail.com>
      Link: http://lkml.kernel.org/r/1342959280-5361-10-git-send-email-jolsa@redhat.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      44f24cb3
  11. 13 5月, 2012 2 次提交
  12. 12 5月, 2012 2 次提交
  13. 11 5月, 2012 1 次提交
  14. 08 5月, 2012 2 次提交
  15. 26 4月, 2012 1 次提交
  16. 25 4月, 2012 1 次提交
  17. 21 4月, 2012 2 次提交
  18. 20 4月, 2012 1 次提交
  19. 19 4月, 2012 4 次提交
  20. 16 4月, 2012 2 次提交
  21. 12 4月, 2012 1 次提交
    • N
      perf annotate: Fix a build error · a31b7cc0
      Namhyung Kim 提交于
          CC util/annotate.o
      util/annotate.c: In function symbol__annotate:
      util/annotate.c:87:16: error: parsed_line may be used uninitialized in this function [-Werror=maybe-uninitialized]
      util/annotate.c:211:22: note: parsed_line was declared here
      cc1: all warnings being treated as errors
      make: *** [util/annotate.o] Error 1
      make: *** Waiting for unfinished jobs....
      Signed-off-by: NNamhyung Kim <namhyung.kim@lge.com>
      Cc: Andi Kleen <andi@firstfloor.org>
      Cc: Ashay Rane <ashay.rane@tacc.utexas.edu>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Link: http://lkml.kernel.org/r/87ty0tlv4i.fsf@dasan.aot.lge.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      a31b7cc0
  22. 08 4月, 2012 1 次提交
  23. 06 4月, 2012 2 次提交
  24. 30 3月, 2012 1 次提交
  25. 28 3月, 2012 1 次提交
  26. 05 3月, 2012 1 次提交
    • N
      perf annotate: Add missing newline on error message · ff2a6617
      Namhyung Kim 提交于
      If perf.data couldn't find vmlinux image for the given build-id,
      it would print error message. However it lacked a newline at the
      end, so the output looked like below:
      
       $ perf annotate --stdio
       No vmlinux file with build id 63b554b2e90f14a4bced200008865e757d3e8b36
       was found in the path.
      
       Please use:
      
         perf buildid-cache -av vmlinux
      
       or:
      
         --vmlinux vmlinux Percent |   Source code & Disassembly of a.out
       ------------------------------------------------
                :
                :
                :
                :      Disassembly of section .text:
                :
                :      00000000004004f4 <foo>:
           0.00 :        4004f4:       push   %rbp
           0.00 :        4004f5:       mov    %rsp,%rbp
           0.00 :        4004f8:       movl   $0x0,-0x4(%rbp)
           0.00 :        4004ff:       jmp    400517 <foo+0x23>
          14.70 :        400501:       mov    0x200b28(%rip),%rax        # 601030 <count>
           0.02 :        400508:       add    $0x1,%rax
           0.01 :        40050c:       mov    %rax,0x200b1d(%rip)        # 601030 <count>
           0.01 :        400513:       addl   $0x1,-0x4(%rbp)
          13.92 :        400517:       cmpl   $0x98967f,-0x4(%rbp)
          71.33 :        40051e:       jle    400501 <foo+0xd>
           0.00 :        400520:       leaveq
           0.00 :        400521:       retq
      
      Fix it by adding a newline at the end of the message. It doesn't affect
      the tui output AFAICS. New output will look like this:
      
       ...
       or:
      
         --vmlinux vmlinux
        Percent |   Source code & Disassembly of a.out
       ------------------------------------------------
                :
                :
                :
                :      Disassembly of section .text:
       ...
      
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Namhyung Kim <namhyung@gmail.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Link: http://lkml.kernel.org/r/1329986784-4916-6-git-send-email-namhyung.kim@lge.comSigned-off-by: NNamhyung Kim <namhyung.kim@lge.com>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      ff2a6617
  27. 24 12月, 2011 1 次提交
    • I
      perf tools: Fix truncated annotation · f41612f4
      Ingo Molnar 提交于
      I get such truncated annotation results in 'perf top':
      
               :        Disassembly of section .text:                                                   ▒
               :                                                                                        ▒
               :        ffffffff810966a8 <nr_iowait_cpu>:                                               ▒
          4.94 :        ffffffff810966a8:       movslq %edi,%rdi                                        ▒
          3.70 :        ffffffff810966ab:       mov    $0x13700,%rax                                    ▒
          0.00 :        ffffffff810966b2:       add    -0x7e32cb00(,%rdi,8),%rax                        ▒
          8.64 :        ffffffff810966ba:       mov    0x7e0(%rax),%eax                                 ▒
         82.72 :        ffffffff810966c0:       cltq                                                    ▒
      
      Note the missing 'retq' which is there in the original function:
      
      ffffffff810966a8 <nr_iowait_cpu>:
      ffffffff810966a8:       48 63 ff                movslq %edi,%rdi
      ffffffff810966ab:       48 c7 c0 00 37 01 00    mov    $0x13700,%rax
      ffffffff810966b2:       48 03 04 fd 00 35 cd    add    -0x7e32cb00(,%rdi,8),%rax
      ffffffff810966b9:       81
      ffffffff810966ba:       8b 80 e0 07 00 00       mov    0x7e0(%rax),%eax
      ffffffff810966c0:       48 98                   cltq
      ffffffff810966c2:       c3                      retq
      
      ffffffff810966c3 <this_cpu_load>:
      
      I'm using a fairly recent binutils:
      
        GNU objdump version 2.21.51.0.6-2.fc16 20110118
      
      AFAICS the bug is simply that sym->end points to the last byte
      of the symbol in question - while objdump's --stop-address
      expects the last byte plus 1 to disassemble the full range.
      
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Link: http://lkml.kernel.org/r/20111223130804.GA24305@elte.huSigned-off-by: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      f41612f4