1. 17 Nov, 2009 2 commits
    • Masami Hiramatsu's avatar
      x86: Show symbol name if insn decoder test failed · 35039eb6
      Masami Hiramatsu authored
      Show symbol name if insn decoder test find a difference.
      This will help us to find out where the issue is.
      Signed-off-by: default avatarMasami Hiramatsu <mhiramat@redhat.com>
      Cc: systemtap <systemtap@sources.redhat.com>
      Cc: DLE <dle-develop@lists.sourceforge.net>
      Cc: Stephen Rothwell <sfr@canb.auug.org.au>
      Cc: Randy Dunlap <rdunlap@xenotime.net>
      Cc: Jim Keniston <jkenisto@us.ibm.com>
      Cc: Stephen Rothwell <sfr@canb.auug.org.au>
      LKML-Reference: <20091116230624.5250.49813.stgit@harusame>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      35039eb6
    • Masami Hiramatsu's avatar
      x86: Add verbose option to insn decoder test · d65ff75f
      Masami Hiramatsu authored
      Add verbose option to insn decoder test. This dumps decoded
      instruction when building kernel with V=1.
      Signed-off-by: default avatarMasami Hiramatsu <mhiramat@redhat.com>
      Cc: systemtap <systemtap@sources.redhat.com>
      Cc: DLE <dle-develop@lists.sourceforge.net>
      Cc: Stephen Rothwell <sfr@canb.auug.org.au>
      Cc: Randy Dunlap <rdunlap@xenotime.net>
      Cc: Jim Keniston <jkenisto@us.ibm.com>
      Cc: Stephen Rothwell <sfr@canb.auug.org.au>
      LKML-Reference: <20091116230618.5250.18762.stgit@harusame>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      d65ff75f
  2. 08 Nov, 2009 1 commit
    • Frederic Weisbecker's avatar
      tracing, perf_events: Protect the buffer from recursion in perf · 444a2a3b
      Frederic Weisbecker authored
      While tracing using events with perf, if one enables the
      lockdep:lock_acquire event, it will infect every other perf
      trace events.
      
      Basically, you can enable whatever set of trace events through
      perf but if this event is part of the set, the only result we
      can get is a long list of lock_acquire events of rcu read lock,
      and only that.
      
      This is because of a recursion inside perf.
      
      1) When a trace event is triggered, it will fill a per cpu
         buffer and submit it to perf.
      
      2) Perf will commit this event but will also protect some data
         using rcu_read_lock
      
      3) A recursion appears: rcu_read_lock triggers a lock_acquire
         event that will fill the per cpu event and then submit the
         buffer to perf.
      
      4) Perf detects a recursion and ignores it
      
      5) Perf continues its work on the previous event, but its buffer
         has been overwritten by the lock_acquire event, it has then
         been turned into a lock_acquire event of rcu read lock
      
      Such scenario also happens with lock_release with
      rcu_read_unlock().
      
      We could turn the rcu_read_lock() into __rcu_read_lock() to drop
      the lock debugging from perf fast path, but that would make us
      lose the rcu debugging and that doesn't prevent from other
      possible kind of recursion from perf in the future.
      
      This patch adds a recursion protection based on a counter on the
      perf trace per cpu buffers to solve the problem.
      
      -v2: Fixed lost whitespace, added reviewed-by tag
      Signed-off-by: default avatarFrederic Weisbecker <fweisbec@gmail.com>
      Reviewed-by: default avatarMasami Hiramatsu <mhiramat@redhat.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Li Zefan <lizf@cn.fujitsu.com>
      Cc: Jason Baron <jbaron@redhat.com>
      LKML-Reference: <1257477185-7838-1-git-send-email-fweisbec@gmail.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      444a2a3b
  3. 04 Nov, 2009 6 commits
  4. 03 Nov, 2009 1 commit
  5. 29 Oct, 2009 10 commits
    • Masami Hiramatsu's avatar
      perf/probes: Support function entry relative line number · b0ef0732
      Masami Hiramatsu authored
      Add function-entry relative line number specifying support to
      perf-probe. This allows users to define probes by line number
      from entry of the function.
      
       e.g.
      
        perf probe schedule:16
      Signed-off-by: default avatarMasami Hiramatsu <mhiramat@redhat.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Jim Keniston <jkenisto@us.ibm.com>
      Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
      Cc: Christoph Hellwig <hch@infradead.org>
      Cc: Frank Ch. Eigler <fche@redhat.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Jason Baron <jbaron@redhat.com>
      Cc: K.Prasad <prasad@linux.vnet.ibm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
      LKML-Reference: <20091027204319.30545.30678.stgit@harusame>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      b0ef0732
    • Masami Hiramatsu's avatar
      perf/probes: Improve probe point syntax of perf-probe · 253977b0
      Masami Hiramatsu authored
      This changes probe point syntax of perf-probe as below
      
       <SRC>[:ABS_LN] [ARGS]
       or
       <FUNC>[+OFFS|%return][@SRC] [ARGS]
      
      And event name and event group name are automatically
      generated based on probe-symbol and offset as below.
      
       perfprobes/SYMBOL_OFFSET[_NUM]
      
      Where SYMBOL is the probing symbol and OFFSET is
      the byte offset from the symbol.
      Signed-off-by: default avatarMasami Hiramatsu <mhiramat@redhat.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Jim Keniston <jkenisto@us.ibm.com>
      Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
      Cc: Christoph Hellwig <hch@infradead.org>
      Cc: Frank Ch. Eigler <fche@redhat.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Jason Baron <jbaron@redhat.com>
      Cc: K.Prasad <prasad@linux.vnet.ibm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
      LKML-Reference: <20091027204310.30545.84984.stgit@harusame>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      253977b0
    • Masami Hiramatsu's avatar
      perf/probes: Improve command-line option of perf-probe · 46ab4926
      Masami Hiramatsu authored
      Change command-line option from -P to --add, and accepting
      probes without --add too.
      
        perf probe --add "probe-define"
      
      or, just:
      
        perf probe "probe-define"
      Signed-off-by: default avatarMasami Hiramatsu <mhiramat@redhat.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Jim Keniston <jkenisto@us.ibm.com>
      Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
      Cc: Christoph Hellwig <hch@infradead.org>
      Cc: Frank Ch. Eigler <fche@redhat.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Jason Baron <jbaron@redhat.com>
      Cc: K.Prasad <prasad@linux.vnet.ibm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
      LKML-Reference: <20091027204301.30545.48600.stgit@harusame>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      46ab4926
    • Masami Hiramatsu's avatar
      perf/probes: Exit searching after finding target function · 8030c5f5
      Masami Hiramatsu authored
      Exit searching after finding real (not-inlined) function,
      because there should be no same symbol in that CU.
      Signed-off-by: default avatarMasami Hiramatsu <mhiramat@redhat.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Jim Keniston <jkenisto@us.ibm.com>
      Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
      Cc: Christoph Hellwig <hch@infradead.org>
      Cc: Frank Ch. Eigler <fche@redhat.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Jason Baron <jbaron@redhat.com>
      Cc: K.Prasad <prasad@linux.vnet.ibm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
      LKML-Reference: <20091027204252.30545.19251.stgit@harusame>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      8030c5f5
    • Masami Hiramatsu's avatar
      kprobe-tracer: Compare both of event-name and event-group to find probe · dd004c47
      Masami Hiramatsu authored
      Fix find_probe_event() to compare both of event-name and
      event-group. Without this fix, kprobe-tracer overwrites existing
      same event-name probe even if its group-name is different.
      Signed-off-by: default avatarMasami Hiramatsu <mhiramat@redhat.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Jim Keniston <jkenisto@us.ibm.com>
      Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
      Cc: Christoph Hellwig <hch@infradead.org>
      Cc: Frank Ch. Eigler <fche@redhat.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Jason Baron <jbaron@redhat.com>
      Cc: K.Prasad <prasad@linux.vnet.ibm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
      LKML-Reference: <20091027204244.30545.27516.stgit@harusame>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      dd004c47
    • Masami Hiramatsu's avatar
      x86: Add Intel FMA instructions to x86 opcode map · 3f7e454a
      Masami Hiramatsu authored
      Add Intel FMA(FUSED-MULTIPLY-ADD) instructions to x86 opcode map
      for x86 instruction decoder.
      Signed-off-by: default avatarMasami Hiramatsu <mhiramat@redhat.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Jim Keniston <jkenisto@us.ibm.com>
      Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
      Cc: Christoph Hellwig <hch@infradead.org>
      Cc: Frank Ch. Eigler <fche@redhat.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Jason Baron <jbaron@redhat.com>
      Cc: K.Prasad <prasad@linux.vnet.ibm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
      LKML-Reference: <20091027204235.30545.33997.stgit@harusame>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      3f7e454a
    • Masami Hiramatsu's avatar
      x86: AVX instruction set decoder support · e0e492e9
      Masami Hiramatsu authored
      Add Intel AVX(Advanced Vector Extensions) instruction set
      support to x86 instruction decoder. This adds insn.vex_prefix
      field for storing VEX prefixes, and introduces some original
      tags for expressing opcodes attributes.
      Signed-off-by: default avatarMasami Hiramatsu <mhiramat@redhat.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Jim Keniston <jkenisto@us.ibm.com>
      Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
      Cc: Christoph Hellwig <hch@infradead.org>
      Cc: Frank Ch. Eigler <fche@redhat.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Jason Baron <jbaron@redhat.com>
      Cc: K.Prasad <prasad@linux.vnet.ibm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
      LKML-Reference: <20091027204226.30545.23451.stgit@harusame>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      e0e492e9
    • Masami Hiramatsu's avatar
      x86: Add pclmulq to x86 opcode map · 82cb5702
      Masami Hiramatsu authored
      Add pclmulq opcode to x86 opcode map.
      Signed-off-by: default avatarMasami Hiramatsu <mhiramat@redhat.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Jim Keniston <jkenisto@us.ibm.com>
      Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
      Cc: Christoph Hellwig <hch@infradead.org>
      Cc: Frank Ch. Eigler <fche@redhat.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Jason Baron <jbaron@redhat.com>
      Cc: K.Prasad <prasad@linux.vnet.ibm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
      LKML-Reference: <20091027204219.30545.82039.stgit@harusame>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      82cb5702
    • Masami Hiramatsu's avatar
      x86: Merge INAT_REXPFX into INAT_PFX_* · 04d46c1b
      Masami Hiramatsu authored
      Merge INAT_REXPFX into INAT_PFX_* macro and rename it to
      INAT_PFX_REX.
      Signed-off-by: default avatarMasami Hiramatsu <mhiramat@redhat.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Jim Keniston <jkenisto@us.ibm.com>
      Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
      Cc: Christoph Hellwig <hch@infradead.org>
      Cc: Frank Ch. Eigler <fche@redhat.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Jason Baron <jbaron@redhat.com>
      Cc: K.Prasad <prasad@linux.vnet.ibm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
      LKML-Reference: <20091027204211.30545.58090.stgit@harusame>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      04d46c1b
    • Masami Hiramatsu's avatar
      x86: Fix SSE opcode map bug · 7f387d3f
      Masami Hiramatsu authored
      Fix superscripts position because some superscripts of SSE
      opcode are not put in correct position.
      Signed-off-by: default avatarMasami Hiramatsu <mhiramat@redhat.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Jim Keniston <jkenisto@us.ibm.com>
      Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
      Cc: Christoph Hellwig <hch@infradead.org>
      Cc: Frank Ch. Eigler <fche@redhat.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Jason Baron <jbaron@redhat.com>
      Cc: K.Prasad <prasad@linux.vnet.ibm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
      LKML-Reference: <20091027204204.30545.97296.stgit@harusame>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      7f387d3f
  6. 23 Oct, 2009 6 commits
    • Arnaldo Carvalho de Melo's avatar
      perf probe: Print debug messages using pr_*() · b7cb10e7
      Arnaldo Carvalho de Melo authored
      Use the new pr_{err,warning,debug,etc} printout methods, just
      like in the kernel.
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Masami Hiramatsu <mhiramat@redhat.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Mike Galbraith <efault@gmx.de>
      LKML-Reference: <1256153646-10097-1-git-send-email-acme@redhat.com>
      [ Split this patch out, to keep perf/probes separate. ]
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      b7cb10e7
    • Ingo Molnar's avatar
      Merge branch 'perf/core' into perf/probes · 43315956
      Ingo Molnar authored
      Conflicts:
      	tools/perf/Makefile
      
      Merge reason:
      
       - fix the conflict
       - pick up the pr_*() infrastructure to queue up dependent patch
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      43315956
    • Arnaldo Carvalho de Melo's avatar
      perf tools: Unify debug messages mechanisms · 6beba7ad
      Arnaldo Carvalho de Melo authored
      We were using eprintf in some places, that looks at a global
      'verbose' level, and at other places passing a 'v' parameter to
      specify the verbosity level, unify it by introducing
      pr_{err,warning,debug,etc}, just like in the kernel.
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Mike Galbraith <efault@gmx.de>
      LKML-Reference: <1256153646-10097-1-git-send-email-acme@redhat.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      6beba7ad
    • Frederic Weisbecker's avatar
      perf tools: Drop asm/types.h wrapper · 802da5f2
      Frederic Weisbecker authored
      Wrapping the kernel headers is dangerous when it comes to arch
      headers. Once we wrap asm/types.h, it will also replace the
      glibc asm/types.h, not only the kernel one.
      
      This results in build errors on some machines.
      
      Drop this wrapper and do its work from linux/types.h wrapper,
      also the glibc asm/types.h can already handle most of the type
      definition it was doing (typedef __u64, __u32, etc...).
      
      Todo: Check the others asm/*.h wrappers to prevent from other
      conflicts.
      Reported-by: default avatarIngo Molnar <mingo@elte.hu>
      Signed-off-by: default avatarFrederic Weisbecker <fweisbec@gmail.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Anton Blanchard <anton@samba.org>
      LKML-Reference: <1256246604-17156-3-git-send-email-fweisbec@gmail.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      802da5f2
    • Frederic Weisbecker's avatar
      perf tools: Bind callchains to the first sort dimension column · a4fb581b
      Frederic Weisbecker authored
      Currently, the callchains are displayed using a constant left
      margin. So depending on the current sort dimension
      configuration, callchains may appear to be well attached to the
      first sort dimension column field which is mostly the case,
      except when the first dimension of sorting is done by comm,
      because these are right aligned.
      
      This patch binds the callchain to the first letter in the first
      column, whatever type of column it is (dso, comm, symbol).
      Before:
      
           0.80%             perf  [k] __lock_acquire
                   __lock_acquire
                   lock_acquire
                   |
                   |--58.33%-- _spin_lock
                   |          |
                   |          |--28.57%-- inotify_should_send_event
                   |          |          fsnotify
                   |          |          __fsnotify_parent
      
      After:
      
           0.80%             perf  [k] __lock_acquire
                             __lock_acquire
                             lock_acquire
                             |
                             |--58.33%-- _spin_lock
                             |          |
                             |          |--28.57%-- inotify_should_send_event
                             |          |          fsnotify
                             |          |          __fsnotify_parent
      
      Also, for clarity, we don't put anymore the callchain as is but:
      
      - If we have a top level ancestor in the callchain, start it
        with a first ascii hook.
      
        Before:
      
           0.80%             perf  [kernel]                        [k] __lock_acquire
                             __lock_acquire
                               lock_acquire
                             |
                             |--58.33%-- _spin_lock
                             |          |
                             |          |--28.57%-- inotify_should_send_event
                             |          |          fsnotify
                            [..]       [..]
      
         After:
      
           0.80%             perf  [kernel]                         [k] __lock_acquire
                             |
                             --- __lock_acquire
                                 lock_acquire
                                |
                                |--58.33%-- _spin_lock
                                |          |
                                |          |--28.57%-- inotify_should_send_event
                                |          |          fsnotify
                               [..]       [..]
      
      - Otherwise, if we have several top level ancestors, then
        display these like we did before:
      
             1.69%           Xorg
                             |
                             |--21.21%-- vread_hpet
                             |          0x7fffd85b46fc
                             |          0x7fffd85b494d
                             |          0x7f4fafb4e54d
                             |
                             |--15.15%-- exaOffscreenAlloc
                             |
                             |--9.09%-- I830WaitLpRing
      Signed-off-by: default avatarFrederic Weisbecker <fweisbec@gmail.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Anton Blanchard <anton@samba.org>
      LKML-Reference: <1256246604-17156-2-git-send-email-fweisbec@gmail.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      a4fb581b
    • Frederic Weisbecker's avatar
      perf tools: Fix missing top level callchain · af0a6fa4
      Frederic Weisbecker authored
      While recursively printing the branches of each callchains, we
      forget to display the root. It is never printed.
      
      Say we have:
      
          symbol
          f1
          f2
           |
           -------- f3
           |        f4
           |
           ---------f5
                    f6
      
      Actually we never see that, instead it displays:
      
          symbol
          |
          --------- f3
          |         f4
          |
          --------- f5
                    f6
      
      However f1 is always the same than "symbol" and if we are
      sorting by symbols first then "symbol", f1 and f2 will be well
      aligned like in the above example, so displaying f1 looks
      redundant here.
      
      But if we are sorting by something else first (dso, comm,
      etc...), displaying f1 doesn't look redundant but rather
      necessary because the symbol is not well aligned anymore with
      its callchain:
      
           comm     dso        symbol
           f1
           f2
           |
           --------- [...]
      
      And we want the callchain to be obvious.
      So we fix the bug by printing the root branch, but we also
      filter its first entry if we are sorting by symbols first.
      Reported-by: default avatarAnton Blanchard <anton@samba.org>
      Signed-off-by: default avatarFrederic Weisbecker <fweisbec@gmail.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      LKML-Reference: <1256246604-17156-1-git-send-email-fweisbec@gmail.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      af0a6fa4
  7. 21 Oct, 2009 5 commits
    • Ingo Molnar's avatar
      x86, instruction decoder: Fix test_get_len build rules · 9bf4e7fb
      Ingo Molnar authored
      Add the kernel source include file as well to the include files
      search path, to fix this build bug:
      
       In file included from arch/x86/tools/test_get_len.c:28:
         arch/x86/lib/insn.c:21:26: error: linux/string.h: No such file or directory
      
      Cc: Masami Hiramatsu <mhiramat@redhat.com>
      Cc: systemtap<systemtap@sources.redhat.com>
      Cc: DLE <dle-develop@lists.sourceforge.net>
      Cc: Jim Keniston <jkenisto@us.ibm.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      LKML-Reference: <20091020165531.4145.21872.stgit@dhcp-100-2-132.bos.redhat.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      9bf4e7fb
    • Steven Rostedt's avatar
      perf tools: Use strsep() over strtok_r() for parsing single line · 4e3b799d
      Steven Rostedt authored
      The second argument in the strtok_r() function is not to be used
      generically and can have different implementations. Currently
      the function parsing of the perf trace code uses the second
      argument to copy data from. This can crash the tool or just have
      unpredictable results.
      
      The correct solution is to use strsep() which has a defined
      result.
      
      I also added a check to see if the result was correct, and will
      break out of the loop in case it fails to parse as expected.
      Reported-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      LKML-Reference: <20091020232034.237814877@goodmis.org>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      4e3b799d
    • Steven Rostedt's avatar
      perf tools: Add 'make DEBUG=1' to remove the -O6 cflag · 60d526f7
      Steven Rostedt authored
      When using gdb to debug perf, it is practically impossible to
      use when perf is compiled with -O6. For developers, this patch
      adds the DEBUG feature to the make command line so that a
      developer can easily remove the optimization flag.
      
      LKML-Reference: <1255590330.8392.446.camel@twins>
      Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      LKML-Reference: <20091020232033.984323261@goodmis.org>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      60d526f7
    • Masami Hiramatsu's avatar
      x86: Add AES opcodes to opcode map · 9983d60d
      Masami Hiramatsu authored
      Add Intel AES opcodes to x86 opcode map. These opcodes are
      used in arch/x86/crypt/aesni-intel_asm.S.
      Signed-off-by: default avatarMasami Hiramatsu <mhiramat@redhat.com>
      Cc: systemtap<systemtap@sources.redhat.com>
      Cc: DLE <dle-develop@lists.sourceforge.net>
      Cc: Jim Keniston <jkenisto@us.ibm.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      LKML-Reference: <20091020165531.4145.21872.stgit@dhcp-100-2-132.bos.redhat.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      9983d60d
    • Masami Hiramatsu's avatar
      x86: Fix group attribute decoding bug · 06ed6ba5
      Masami Hiramatsu authored
      Fix a typo in inat_get_group_attribute() which should refer
      inat_group_tables, not inat_escape_tables.
      Signed-off-by: default avatarMasami Hiramatsu <mhiramat@redhat.com>
      Cc: systemtap<systemtap@sources.redhat.com>
      Cc: DLE <dle-develop@lists.sourceforge.net>
      Cc: Jim Keniston <jkenisto@us.ibm.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      LKML-Reference: <20091020165524.4145.97333.stgit@dhcp-100-2-132.bos.redhat.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      06ed6ba5
  8. 20 Oct, 2009 9 commits
    • Arnaldo Carvalho de Melo's avatar
      perf top: Fix symbol annotation · c88e4bf6
      Arnaldo Carvalho de Melo authored
      We need to use map->unmap_ip() here too to match section
      relative symbol address to the absolute address needed to match
      objdump -dS addresses.
      Reported-by: default avatarMike Galbraith <efault@gmx.de>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Paul Mackerras <paulus@samba.org>
      LKML-Reference: <1256061295-19835-1-git-send-email-acme@redhat.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      c88e4bf6
    • Arnaldo Carvalho de Melo's avatar
      perf annotate: Remove requirement of passing a symbol name · 8f0b0373
      Arnaldo Carvalho de Melo authored
      If the user doesn't pass a symbol name to annotate, it will
      annotate all the symbols that have hits, in order, just like
      'perf report -s comm,dso,symbol'.
      
      This is a natural followup patch to the one that uses
      output_hists to find the symbols with hits.
      
      The common case is to annotate the first few entries at the top
      of a perf report, so lets type less characters.
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Mike Galbraith <efault@gmx.de>
      LKML-Reference: <1256058509-19678-1-git-send-email-acme@redhat.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      8f0b0373
    • Arnaldo Carvalho de Melo's avatar
      perf annotate: Use the sym_priv_size area for the histogram · e4204992
      Arnaldo Carvalho de Melo authored
      We have this sym_priv_size mechanism for attaching private areas
      to struct symbol entries but annotate wasn't using it, adding
      private areas to struct symbol in addition to a ->priv pointer.
      
      Scrap all that and use the sym_priv_size mechanism.
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Mike Galbraith <efault@gmx.de>
      LKML-Reference: <1256055940-19511-1-git-send-email-acme@redhat.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      e4204992
    • Arnaldo Carvalho de Melo's avatar
      perf tools: Add ->unmap_ip operation to struct map · ed52ce2e
      Arnaldo Carvalho de Melo authored
      We need this because we get section relative addresses when
      reading the symtabs, but when a tool like 'perf annotate' needs
      to match these address to what 'objdump -dS' produces we need
      the address + section back again.
      
      So in annotate now we look at the 'struct hist_entry' instances
      (that weren't really being used) so that we iterate only over
      the symbols that had some hit and get the map where that
      particular hit happened so that we can get the right address to
      match with annotate.
      
      Verified that at least:
      
       perf annotate mmap_read_counter # Uses the ~/bin/perf binary
       perf annotate --vmlinux /home/acme/git/build/perf/vmlinux intel_pmu_enable_all
      
      on a 'perf record perf top' session seems to work.
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Mike Galbraith <efault@gmx.de>
      LKML-Reference: <1255979877-12533-1-git-send-email-acme@redhat.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      ed52ce2e
    • Arjan van de Ven's avatar
      perf timechart: Add a process filter · bbe2987b
      Arjan van de Ven authored
      During the Kernel Summit demo of perf/ftrace/timechart, there
      was a feature request to have a process filter for timechart so
      that you can zoom into one or a few processes that you are
      really interested in.
      
      This patch adds basic support for this feature, the -p
      (--process) option now can select a PID or a process name to be
      shown. Multiple -p options are allowed, and the combined set
      will be included in the output.
      Signed-off-by: default avatarArjan van de Ven <arjan@linux.intel.com>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      LKML-Reference: <20091020070939.7d0fb8a7@infradead.org>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      bbe2987b
    • Ingo Molnar's avatar
      Merge branch 'perf/urgent' into perf/core · c258449b
      Ingo Molnar authored
      Merge reason: Queue up dependent patch.
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      c258449b
    • Arjan van de Ven's avatar
      perf timechart: Improve the visual appearance of scheduler delays · 2e600d01
      Arjan van de Ven authored
      [from KS feedback]
      
      Currently, scheduler delays are shown in a mostly transparent,
      light yellow color. This color is rather hard to see on several
      screens, especially projectors.
      
      This patch changes the color of the scheduler delays to be a
      much more "hard" yellow that survived the kernel summit
      projector.
      Reported-by: default avatarLinus Torvalds <torvalds@osdl.org>
      Signed-off-by: Arjan van de Ven <arjan@linux.intel.com
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      LKML-Reference: <20091020064731.20ae126a@infradead.org>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      2e600d01
    • Arjan van de Ven's avatar
      perf timechart: Fix the wakeup-arrows that point to non-visible processes · 3bc2a39c
      Arjan van de Ven authored
      The timechart wakeup arrows currently show no process
      information when the waker/wakee are processes that are not
      actually chosen to be shown on the timechart.
      
      This patch fixes this oversight, by looking through all
      processes (after giving preference to visible processes) as well
      as falling back to just showing the PID if no name for the
      process can be resolved.
      Signed-off-by: default avatarArjan van de Ven <arjan@linux.intel.com>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      LKML-Reference: <20091020064649.0e4959b2@infradead.org>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      3bc2a39c
    • Arnaldo Carvalho de Melo's avatar
      perf tools: Add bunch of missing headers to LIB_H · 79b9ad36
      Arnaldo Carvalho de Melo authored
      Build dependencies were not properly mapped out.
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      LKML-Reference: <1255973491-11626-1-git-send-email-acme@redhat.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      79b9ad36