1. 29 10月, 2012 1 次提交
  2. 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
  3. 09 9月, 2012 1 次提交
  4. 06 9月, 2012 1 次提交
  5. 26 7月, 2012 1 次提交
  6. 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
  7. 13 5月, 2012 2 次提交
  8. 12 5月, 2012 2 次提交
  9. 11 5月, 2012 1 次提交
  10. 08 5月, 2012 2 次提交
  11. 26 4月, 2012 1 次提交
  12. 25 4月, 2012 1 次提交
  13. 21 4月, 2012 2 次提交
  14. 20 4月, 2012 1 次提交
  15. 19 4月, 2012 4 次提交
  16. 16 4月, 2012 2 次提交
  17. 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
  18. 08 4月, 2012 1 次提交
  19. 06 4月, 2012 2 次提交
  20. 30 3月, 2012 1 次提交
  21. 28 3月, 2012 1 次提交
  22. 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
  23. 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
  24. 28 11月, 2011 1 次提交
  25. 26 10月, 2011 1 次提交
  26. 30 9月, 2011 1 次提交
  27. 18 8月, 2011 1 次提交
  28. 12 3月, 2011 1 次提交
    • A
      perf symbols: Rename dso->origin to dso->symtab_type · 878b439d
      Arnaldo Carvalho de Melo 提交于
      And the DSO__ORIG_ enum to SYMTAB__, to clarify that this is about from
      where the symtab was obtained.
      
      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>
      878b439d
  29. 23 2月, 2011 1 次提交
  30. 17 2月, 2011 1 次提交
  31. 09 2月, 2011 1 次提交
    • A
      perf annotate: Fix annotate context lines regression · d5e3d747
      Arnaldo Carvalho de Melo 提交于
      The live annotation done in 'perf top' needs to limit the context before
      lines that aren't filtered out by the min percent filter, if we don't do
      that, the screen in a tty often is not enough for showing what is
      interesting: lines with hits and a few source code lines before it.
      Reported-by: NMike Galbraith <efault@gmx.de>
      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>
      d5e3d747