1. 17 Oct, 2009 1 commit
  2. 12 Oct, 2009 7 commits
    • Masami Hiramatsu's avatar
      perf probe: Add perf probe command support without libdwarf · 23e8ec0d
      Masami Hiramatsu authored
      Enables 'perf probe' even if libdwarf is not installed. If libdwarf is
      not found, 'perf probe' just disables dwarf support. Users can use
      'perf probe' to set up new events by using kprobe_events format.
      Signed-off-by: default avatarMasami Hiramatsu <mhiramat@redhat.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Christoph Hellwig <hch@infradead.org>
      Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
      Cc: Jim Keniston <jkenisto@us.ibm.com>
      Cc: Frank Ch. Eigler <fche@redhat.com>
      LKML-Reference: <20091007222830.1684.25665.stgit@dhcp-100-2-132.bos.redhat.com>
      Signed-off-by: default avatarFrederic Weisbecker <fweisbec@gmail.com>
      23e8ec0d
    • Masami Hiramatsu's avatar
      perf: Add perf probe subcommand, a kprobe-event setup helper · 4ea42b18
      Masami Hiramatsu authored
      Add perf probe subcommand that implements a kprobe-event setup helper
      to the perf command.
      This allows user to define kprobe events using C expressions (C line
      numbers, C function names, and C local variables).
      
      Usage
      -----
       perf probe [<options>] -P 'PROBEDEF' [-P 'PROBEDEF' ...]
      
          -k, --vmlinux <file>  vmlinux/module pathname
          -P, --probe <p|r:[GRP/]NAME FUNC[+OFFS][@SRC]|@SRC:LINE [ARG ...]>
                                probe point definition, where
      		p:	kprobe probe
      		r:	kretprobe probe
      		GRP:	Group name (optional)
      		NAME:	Event name
      		FUNC:	Function name
      		OFFS:	Offset from function entry (in byte)
      		SRC:	Source code path
      		LINE:	Line number
      		ARG:	Probe argument (local variable name or
      			kprobe-tracer argument format is supported.)
      
      Changes in v4:
       - Add _GNU_SOURCE macro for strndup().
      
      Changes in v3:
       - Remove -r option because perf always be used for online kernel.
       - Check malloc/calloc results.
      
      Changes in v2:
       - Check synthesized string length.
       - Rename perf kprobe to perf probe.
       - Use spaces for separator and update usage comment.
       - Check error paths in parse_probepoint().
       - Check optimized-out variables.
      Signed-off-by: default avatarMasami Hiramatsu <mhiramat@redhat.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Christoph Hellwig <hch@infradead.org>
      Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
      Cc: Jim Keniston <jkenisto@us.ibm.com>
      Cc: Frank Ch. Eigler <fche@redhat.com>
      LKML-Reference: <20091008211737.29299.14784.stgit@dhcp-100-2-132.bos.redhat.com>
      Signed-off-by: default avatarFrederic Weisbecker <fweisbec@gmail.com>
      4ea42b18
    • Masami Hiramatsu's avatar
      tracing/kprobes: Robustify fixed field names against variable field names conflicts · e93f4d85
      Masami Hiramatsu authored
      Rename probe-common fixed field names to harder conflictable names,
      because current 'ip', 'func', and other probe field names are easily in
      conflict with user-specified variable names.
      Signed-off-by: default avatarMasami Hiramatsu <mhiramat@redhat.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Christoph Hellwig <hch@infradead.org>
      Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
      Cc: Jim Keniston <jkenisto@us.ibm.com>
      Cc: Frank Ch. Eigler <fche@redhat.com>
      LKML-Reference: <20091007222814.1684.407.stgit@dhcp-100-2-132.bos.redhat.com>
      Signed-off-by: default avatarFrederic Weisbecker <fweisbec@gmail.com>
      e93f4d85
    • Masami Hiramatsu's avatar
      tracing/kprobes: Avoid field name confliction · a703d946
      Masami Hiramatsu authored
      Check whether the argument name is in conflict with other field names
      while creating a kprobe through the debugfs interface.
      
      Changes in v3:
       - Check strcmp() == 0 instead of !strcmp().
      
      Changes in v2:
       - Add common_lock_depth to reserved name list.
      Signed-off-by: default avatarMasami Hiramatsu <mhiramat@redhat.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Christoph Hellwig <hch@infradead.org>
      Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
      Cc: Jim Keniston <jkenisto@us.ibm.com>
      Cc: Frank Ch. Eigler <fche@redhat.com>
      LKML-Reference: <20091007222807.1684.26880.stgit@dhcp-100-2-132.bos.redhat.com>
      Signed-off-by: default avatarFrederic Weisbecker <fweisbec@gmail.com>
      a703d946
    • Masami Hiramatsu's avatar
      tracing/kprobes: Make special variable names more self-explainable · 2e06ff63
      Masami Hiramatsu authored
      Rename special variables to more self-explainable names as below:
      - $rv to $retval
      - $sa to $stack
      - $aN to $argN
      - $sN to $stackN
      Signed-off-by: default avatarMasami Hiramatsu <mhiramat@redhat.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Christoph Hellwig <hch@infradead.org>
      Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
      Cc: Jim Keniston <jkenisto@us.ibm.com>
      Cc: Frank Ch. Eigler <fche@redhat.com>
      LKML-Reference: <20091007222759.1684.3319.stgit@dhcp-100-2-132.bos.redhat.com>
      Signed-off-by: default avatarFrederic Weisbecker <fweisbec@gmail.com>
      2e06ff63
    • Masami Hiramatsu's avatar
      tracing/kprobes: Remove '$ra' special variable · 99329c44
      Masami Hiramatsu authored
      Remove '$ra' (return address) because it is already shown at the head of
      each entry.
      Signed-off-by: default avatarMasami Hiramatsu <mhiramat@redhat.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Christoph Hellwig <hch@infradead.org>
      Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
      Cc: Jim Keniston <jkenisto@us.ibm.com>
      Cc: Frank Ch. Eigler <fche@redhat.com>
      LKML-Reference: <20091007222748.1684.12711.stgit@dhcp-100-2-132.bos.redhat.com>
      Signed-off-by: default avatarFrederic Weisbecker <fweisbec@gmail.com>
      99329c44
    • Masami Hiramatsu's avatar
      tracing/kprobes: Add $ prefix to special variables · 405b2651
      Masami Hiramatsu authored
      Add $ prefix to the special variables(e.g. sa, rv) of kprobe-tracer.
      This resolves consistency issues between kprobe_events and perf-kprobe.
      
      The main goal is to avoid conflicts between local variable names of
      probed functions, used by perf probe, and special variables used
      in the kprobe event creation interface (stack values, etc...) and
      also available from perf probe.
      
      ie: we don't want rv (return value) to conflict with a local variable
      named rv in a probed function.
      Signed-off-by: default avatarMasami Hiramatsu <mhiramat@redhat.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Christoph Hellwig <hch@infradead.org>
      Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
      Cc: Jim Keniston <jkenisto@us.ibm.com>
      Cc: Frank Ch. Eigler <fche@redhat.com>
      LKML-Reference: <20091007222740.1684.91170.stgit@dhcp-100-2-132.bos.redhat.com>
      Signed-off-by: default avatarFrederic Weisbecker <fweisbec@gmail.com>
      405b2651
  3. 03 Oct, 2009 3 commits
    • Masami Hiramatsu's avatar
      tracing/ftrace: Fix to check create_event_dir() when adding new events · 88f70d75
      Masami Hiramatsu authored
      Check result of event_create_dir() and add ftrace_event_call to
      ftrace_events list only if it is succeeded. Thanks to Li for pointing
      it out.
      Signed-off-by: default avatarMasami Hiramatsu <mhiramat@redhat.com>
      Acked-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      Acked-by: default avatarIngo Molnar <mingo@elte.hu>
      Cc: Jim Keniston <jkenisto@us.ibm.com>
      Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Christoph Hellwig <hch@infradead.org>
      Cc: Frank Ch. Eigler <fche@redhat.com>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Jason Baron <jbaron@redhat.com>
      Cc: K.Prasad <prasad@linux.vnet.ibm.com>
      Cc: Lai Jiangshan <laijs@cn.fujitsu.com>
      Cc: Li Zefan <lizf@cn.fujitsu.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
      Cc: Tom Zanussi <tzanussi@gmail.com>
      LKML-Reference: <20090925182054.10157.55219.stgit@omoto>
      Signed-off-by: default avatarFrederic Weisbecker <fweisbec@gmail.com>
      88f70d75
    • Masami Hiramatsu's avatar
      x86: Add VIA processor instructions in opcodes decoder · c0b11d3a
      Masami Hiramatsu authored
      Add VIA processor's Padlock instructions(MONTMUL, XSHA1, XSHA256)
      as parts of the kernel may use them.
      
      This fixes the following crash in opcodes decoder selftests:
      
       make[2]: `scripts/unifdef' is up to date.
         TEST    posttest
       Error: c145cf71:        f3 0f a6 d0             repz xsha256
       Error: objdump says 4 bytes, but insn_get_length() says 3 (attr:0)
       make[1]: *** [posttest] Error 2
       make: *** [bzImage] Error 2
      Reported-by: default avatarIngo Molnar <mingo@elte.hu>
      Signed-off-by: default avatarMasami Hiramatsu <mhiramat@redhat.com>
      Acked-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      Acked-by: default avatarIngo Molnar <mingo@elte.hu>
      Cc: Jim Keniston <jkenisto@us.ibm.com>
      Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Christoph Hellwig <hch@infradead.org>
      Cc: Frank Ch. Eigler <fche@redhat.com>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Jason Baron <jbaron@redhat.com>
      Cc: K.Prasad <prasad@linux.vnet.ibm.com>
      Cc: Lai Jiangshan <laijs@cn.fujitsu.com>
      Cc: Li Zefan <lizf@cn.fujitsu.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
      Cc: Tom Zanussi <tzanussi@gmail.com>
      LKML-Reference: <20090925182037.10157.3180.stgit@omoto>
      Signed-off-by: default avatarFrederic Weisbecker <fweisbec@gmail.com>
      c0b11d3a
    • Masami Hiramatsu's avatar
      tracing/kprobes: Use global event perf buffers in kprobe tracer · a1a138d0
      Masami Hiramatsu authored
      Use new percpu global event buffer instead of stack in kprobe
      tracer while tracing through perf.
      Signed-off-by: default avatarMasami Hiramatsu <mhiramat@redhat.com>
      Acked-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      Acked-by: default avatarIngo Molnar <mingo@elte.hu>
      Cc: Jim Keniston <jkenisto@us.ibm.com>
      Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Christoph Hellwig <hch@infradead.org>
      Cc: Frank Ch. Eigler <fche@redhat.com>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Jason Baron <jbaron@redhat.com>
      Cc: K.Prasad <prasad@linux.vnet.ibm.com>
      Cc: Lai Jiangshan <laijs@cn.fujitsu.com>
      Cc: Li Zefan <lizf@cn.fujitsu.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
      Cc: Tom Zanussi <tzanussi@gmail.com>
      LKML-Reference: <20090925182011.10157.60140.stgit@omoto>
      Signed-off-by: default avatarFrederic Weisbecker <fweisbec@gmail.com>
      a1a138d0
  4. 23 Sep, 2009 29 commits