1. 01 11月, 2012 1 次提交
  2. 29 10月, 2012 3 次提交
  3. 18 10月, 2012 1 次提交
  4. 17 10月, 2012 1 次提交
  5. 05 10月, 2012 3 次提交
  6. 15 9月, 2012 2 次提交
  7. 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
  8. 09 9月, 2012 1 次提交
  9. 20 8月, 2012 1 次提交
  10. 06 8月, 2012 1 次提交
  11. 25 7月, 2012 1 次提交
    • K
      perf tools: use XSI-complaint version of strerror_r() instead of GNU-specific · 4cc49d4d
      Kirill A. Shutemov 提交于
      Perf uses GNU-specific version of strerror_r(). The GNU-specific strerror_r()
      returns a pointer to a string containing the error message.  This may be either
      a pointer to a string that the function stores in buf, or a pointer to some
      (immutable) static string (in which case buf is unused).
      
      In glibc-2.16 GNU version was marked with attribute warn_unused_result.  It
      triggers few warnings in perf:
      
      util/target.c: In function ‘perf_target__strerror’:
      util/target.c:114:13: error: ignoring return value of ‘strerror_r’, declared with attribute warn_unused_result [-Werror=unused-result]
      ui/browsers/hists.c: In function ‘hist_browser__dump’:
      ui/browsers/hists.c:981:13: error: ignoring return value of ‘strerror_r’, declared with attribute warn_unused_result [-Werror=unused-result]
      
      They are bugs.
      
      Let's fix strerror_r() usage.
      Signed-off-by: NKirill A. Shutemov <kirill@shutemov.name>
      Acked-by: NUlrich Drepper <drepper@gmail.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Ulrich Drepper <drepper@gmail.com>
      Link: http://lkml.kernel.org/r/20120723210654.GA25248@shutemov.name
      [ committer note: s/assert/BUG_ON/g ]
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      4cc49d4d
  12. 20 6月, 2012 3 次提交
  13. 30 5月, 2012 5 次提交
  14. 13 5月, 2012 3 次提交
  15. 11 5月, 2012 1 次提交
  16. 09 5月, 2012 1 次提交
  17. 08 5月, 2012 1 次提交
  18. 04 5月, 2012 2 次提交
  19. 28 4月, 2012 4 次提交
  20. 26 4月, 2012 1 次提交
  21. 25 4月, 2012 3 次提交
    • A
      perf annotate: Disambiguage offsets and addresses in operands · 44d1a3ed
      Arnaldo Carvalho de Melo 提交于
      We were using ins_ops->target for callq addresses and jump offsets,
      disambiguate by having ins_ops->target.addr and ins_ops->target.offset.
      
      For jumps we'll need both to fixup lines that don't have an offset on
      the <> part.
      
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Namhyung Kim <namhyung@gmail.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Link: http://lkml.kernel.org/n/tip-3nlcmstua75u07ao7wja1rwx@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      44d1a3ed
    • A
      perf annotate browser: Handle NULL jump targets · 9481ede9
      Arnaldo Carvalho de Melo 提交于
      In annotate_browser__mark_jump_targets
      
      702                     dlt = browser->offsets[dl->ops.target];
      703                     bdlt = disasm_line__browser(dlt);
      704                     bdlt->jump_target = true;
      705             }
      706
      707     }
      
      (gdb) p size
      $5 = 2415
      (gdb) p offset
      $6 = 140
      (gdb) p dl->ops.target
      $7 = 143
      (gdb) p browser->offsets[143]
      $8 = (struct disasm_line *) 0x0
      (gdb) p dl->name
      $9 = 0x2363bd0 "je"
      (gdb)
      
      Really strange, the code assumed that at the jump target we would have
      an assembly line, but only in the previous instruction offset we have a
      'lock':
      
      (gdb) p browser->offsets[144]
      $10 = (struct disasm_line *) 0x0
      (gdb) p browser->offsets[142]
      $11 = (struct disasm_line *) 0x27bd620
      (gdb) p browser->offsets[142]->name
      $12 = 0x237a8a0 "lock"
      (gdb)
      
      I'll study this more, but for now I'll just check if there is a
      disasm_line at dl->ops.target, i.e. a valid jump target.
      Reported-by: NHagen Paul Pfeifer <hagen@jauu.net>
      Reported-by: NIngo Molnar <mingo@kernel.org>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Namhyung Kim <namhyung@gmail.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Link: http://lkml.kernel.org/n/tip-inzjrzyqhkzyv78met2vula6@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      9481ede9
    • A
      perf annotate browser: Initial loop detection · a3f895be
      Arnaldo Carvalho de Melo 提交于
      Simple algorithm, just look for the next backward jump that points to
      before the cursor.
      
      Then draw an arrow connecting the jump to its target.
      
      Do this as you move the cursor, entering/exiting possible loops.
      
      Ex (graph chars replaced to avoid mail encoding woes):
      
      avc_has_perm_flags
          0.00 |         nopl   0x0(%rax)
          5.36 |+-> 68:  mov    (%rax),%rax
          5.15 ||        test   %rax,%rax
          0.00 ||      v je     130
          2.96 ||   74:  cmp    -0x20(%rax),%ebx
         47.38 ||        lea    -0x20(%rax),%rcx
          0.28 ||      ^ jne    68
          3.16 ||        cmp    -0x18(%rax),%dx
          0.00 |+------^ jne    68
          4.92 |         cmp    0x4(%rcx),%r13d
          0.00 |       v jne    68
          1.15 |         test   %rcx,%rcx
          0.00 |       v je     130
      Suggested-by: NLinus Torvalds <torvalds@linux-foundation.org>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Namhyung Kim <namhyung@gmail.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Link: http://lkml.kernel.org/n/tip-5gairf6or7dazlx3ocxwvftm@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      a3f895be