Masami Hiramatsu | 1 Dec 01:02 2009
Picon

[PATCH -next] [Cleanup] x86: Fix comments of register/stack access functions

Fix typos and some redundant comments of register/stack access functions
in asm/ptrace.h.

Signed-off-by: Masami Hiramatsu <mhiramat <at> redhat.com>
Suggested-by: Wenji Huang <wenji.huang <at> oracle.com>
---

 arch/x86/include/asm/ptrace.h |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/x86/include/asm/ptrace.h b/arch/x86/include/asm/ptrace.h
index a3d49dd..3d11fd0 100644
--- a/arch/x86/include/asm/ptrace.h
+++ b/arch/x86/include/asm/ptrace.h
 <at>  <at>  -227,8 +227,8  <at>  <at>  extern const char *regs_query_register_name(unsigned int offset);
  *  <at> regs:	pt_regs from which register value is gotten.
  *  <at> offset:	offset number of the register.
  *
- * regs_get_register returns the value of a register whose offset from  <at> regs
- * is  <at> offset. The  <at> offset is the offset of the register in struct pt_regs.
+ * regs_get_register returns the value of a register. The  <at> offset is the
+ * offset of the register in struct pt_regs address which specified by  <at> regs.
  * If  <at> offset is bigger than MAX_REG_OFFSET, this returns 0.
  */
 static inline unsigned long regs_get_register(struct pt_regs *regs,
 <at>  <at>  -244,7 +244,7  <at>  <at>  static inline unsigned long regs_get_register(struct pt_regs *regs,
  *  <at> regs:	pt_regs which contains kernel stack pointer.
  *  <at> addr:	address which is checked.
  *
- * regs_within_kenel_stack() checks  <at> addr is within the kernel stack page(s).
(Continue reading)

Masami Hiramatsu | 1 Dec 01:08 2009
Picon

[PATCH -tip v6.1 04/11] kprobes: Jump optimization sysctl interface

Add /proc/sys/debug/kprobes-optimization sysctl which enables and disables
kprobes jump optimization on the fly for debugging.

Changes in v6.1:
 - Remove ctl_name = CTL_UNNUMBERED for linux-next compatibility.

Changes in v6:
 - Update comments and coding style.

Signed-off-by: Masami Hiramatsu <mhiramat <at> redhat.com>
Cc: Ananth N Mavinakayanahalli <ananth <at> in.ibm.com>
Cc: Ingo Molnar <mingo <at> elte.hu>
Cc: Jim Keniston <jkenisto <at> us.ibm.com>
Cc: Srikar Dronamraju <srikar <at> linux.vnet.ibm.com>
Cc: Christoph Hellwig <hch <at> infradead.org>
Cc: Steven Rostedt <rostedt <at> goodmis.org>
Cc: Frederic Weisbecker <fweisbec <at> gmail.com>
Cc: H. Peter Anvin <hpa <at> zytor.com>
Cc: Anders Kaseorg <andersk <at> ksplice.com>
Cc: Tim Abbott <tabbott <at> ksplice.com>
Cc: Andi Kleen <andi <at> firstfloor.org>
Cc: Jason Baron <jbaron <at> redhat.com>
Cc: Mathieu Desnoyers <mathieu.desnoyers <at> polymtl.ca>
---

 include/linux/kprobes.h |    8 ++++
 kernel/kprobes.c        |   89 +++++++++++++++++++++++++++++++++++++++++++++--
 kernel/sysctl.c         |   12 ++++++
 3 files changed, 106 insertions(+), 3 deletions(-)

(Continue reading)

Masami Hiramatsu | 1 Dec 01:19 2009
Picon

[PATCH -tip 0/9] perf-probe updates

Hi,

Here are bugfixes and updates for perf-probe and kprobe-tracer.
I've fixed some minor bugs and added --list option and simple
probe naming.

TODO:
 - Support build-id checking.
 - Support --del option to remove probes.
 - Support --line option to show which lines user can probe.
 - Support lazy string matching.

Thank you,

---

Masami Hiramatsu (9):
      perf probe: Simplify event naming
      perf probe: Add --list option for listing current probe events
      perf probe: Add argv_split() from lib/argv_split.c
      perf probe: Move probe event utility functions to probe-event.c
      perf probe: Fix probe array index for multiple probe point
      perf probe: Fix argv array size in probe parser
      perf probe: Fix to add probe-finder.h without libdwarf
      perf probe: Fix to change a debugging message from pr_info to pr_debug
      trace_kprobes: Fix a memory leak bug and check kstrdup return value

 kernel/trace/trace_kprobe.c   |   26 ++
 tools/perf/Makefile           |    4 
 tools/perf/builtin-probe.c    |  236 ++------------------
(Continue reading)

Masami Hiramatsu | 1 Dec 01:19 2009
Picon

[PATCH -tip 1/9] trace_kprobes: Fix a memory leak bug and check kstrdup return value

Fix a memory leak case in create_trace_probe(). When an argument is
too long (> MAX_ARGSTR_LEN), it just jumps to error path. In that case
tp->args[i].name is not released.
This also fixes a bug to check kstrdup()'s return value.

Signed-off-by: Masami Hiramatsu <mhiramat <at> redhat.com>
Cc: Ingo Molnar <mingo <at> elte.hu>
Cc: Steven Rostedt <rostedt <at> goodmis.org>
Cc: Jim Keniston <jkenisto <at> us.ibm.com>
Cc: Ananth N Mavinakayanahalli <ananth <at> in.ibm.com>
Cc: Christoph Hellwig <hch <at> infradead.org>
Cc: Frank Ch. Eigler <fche <at> redhat.com>
Cc: Frederic Weisbecker <fweisbec <at> gmail.com>
Cc: Jason Baron <jbaron <at> redhat.com>
Cc: K.Prasad <prasad <at> linux.vnet.ibm.com>
Cc: Peter Zijlstra <peterz <at> infradead.org>
Cc: Srikar Dronamraju <srikar <at> linux.vnet.ibm.com>
Cc: Arnaldo Carvalho de Melo <acme <at> redhat.com>
---

 kernel/trace/trace_kprobe.c |   26 +++++++++++++++++++-------
 1 files changed, 19 insertions(+), 7 deletions(-)

diff --git a/kernel/trace/trace_kprobe.c b/kernel/trace/trace_kprobe.c
index 72d0c65..aff5f80 100644
--- a/kernel/trace/trace_kprobe.c
+++ b/kernel/trace/trace_kprobe.c
 <at>  <at>  -483,7 +483,8  <at>  <at>  static int parse_probe_vars(char *arg, struct fetch_func *ff, int is_return)
 	return ret;
 }
(Continue reading)

Masami Hiramatsu | 1 Dec 01:19 2009
Picon

[PATCH -tip 2/9] perf probe: Fix to change a debugging message from pr_info to pr_debug

Change annoying debug-info using notice from pr_info() to pr_debug(),
since the message always printed when user adds a probe point which
requires debug-info.

Signed-off-by: Masami Hiramatsu <mhiramat <at> redhat.com>
Cc: Ingo Molnar <mingo <at> elte.hu>
Cc: Steven Rostedt <rostedt <at> goodmis.org>
Cc: Jim Keniston <jkenisto <at> us.ibm.com>
Cc: Ananth N Mavinakayanahalli <ananth <at> in.ibm.com>
Cc: Christoph Hellwig <hch <at> infradead.org>
Cc: Frank Ch. Eigler <fche <at> redhat.com>
Cc: Frederic Weisbecker <fweisbec <at> gmail.com>
Cc: Jason Baron <jbaron <at> redhat.com>
Cc: K.Prasad <prasad <at> linux.vnet.ibm.com>
Cc: Peter Zijlstra <peterz <at> infradead.org>
Cc: Srikar Dronamraju <srikar <at> linux.vnet.ibm.com>
Cc: Arnaldo Carvalho de Melo <acme <at> redhat.com>
---

 tools/perf/builtin-probe.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/tools/perf/builtin-probe.c b/tools/perf/builtin-probe.c
index a2f6daf..4e418af 100644
--- a/tools/perf/builtin-probe.c
+++ b/tools/perf/builtin-probe.c
 <at>  <at>  -351,7 +351,7  <at>  <at>  int cmd_probe(int argc, const char **argv, const char *prefix __used)
 #ifdef NO_LIBDWARF
 		semantic_error("Debuginfo-analysis is not supported");
 #else	/* !NO_LIBDWARF */
(Continue reading)

Masami Hiramatsu | 1 Dec 01:19 2009
Picon

[PATCH -tip 3/9] perf probe: Fix to add probe-finder.h without libdwarf

Add probe-finder.h as LIB_H without libdwarf, because that
header is included even if no libdwarf.

Signed-off-by: Masami Hiramatsu <mhiramat <at> redhat.com>
Cc: Ingo Molnar <mingo <at> elte.hu>
Cc: Steven Rostedt <rostedt <at> goodmis.org>
Cc: Jim Keniston <jkenisto <at> us.ibm.com>
Cc: Ananth N Mavinakayanahalli <ananth <at> in.ibm.com>
Cc: Christoph Hellwig <hch <at> infradead.org>
Cc: Frank Ch. Eigler <fche <at> redhat.com>
Cc: Frederic Weisbecker <fweisbec <at> gmail.com>
Cc: Jason Baron <jbaron <at> redhat.com>
Cc: K.Prasad <prasad <at> linux.vnet.ibm.com>
Cc: Peter Zijlstra <peterz <at> infradead.org>
Cc: Srikar Dronamraju <srikar <at> linux.vnet.ibm.com>
Cc: Arnaldo Carvalho de Melo <acme <at> redhat.com>
---

 tools/perf/Makefile |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/tools/perf/Makefile b/tools/perf/Makefile
index f1537a9..76e4b04 100644
--- a/tools/perf/Makefile
+++ b/tools/perf/Makefile
 <at>  <at>  -369,6 +369,7  <at>  <at>  LIB_H += util/sort.h
 LIB_H += util/hist.h
 LIB_H += util/thread.h
 LIB_H += util/data_map.h
+LIB_H += util/probe-finder.h
(Continue reading)

Masami Hiramatsu | 1 Dec 01:19 2009
Picon

[PATCH -tip 4/9] perf probe: Fix argv array size in probe parser

Since the syntax had been changed, probe definition needs parameters
less than MAX_PROBE_ARGS + 1 (probe-point + arguments).

Signed-off-by: Masami Hiramatsu <mhiramat <at> redhat.com>
Cc: Ingo Molnar <mingo <at> elte.hu>
Cc: Steven Rostedt <rostedt <at> goodmis.org>
Cc: Jim Keniston <jkenisto <at> us.ibm.com>
Cc: Ananth N Mavinakayanahalli <ananth <at> in.ibm.com>
Cc: Christoph Hellwig <hch <at> infradead.org>
Cc: Frank Ch. Eigler <fche <at> redhat.com>
Cc: Frederic Weisbecker <fweisbec <at> gmail.com>
Cc: Jason Baron <jbaron <at> redhat.com>
Cc: K.Prasad <prasad <at> linux.vnet.ibm.com>
Cc: Peter Zijlstra <peterz <at> infradead.org>
Cc: Srikar Dronamraju <srikar <at> linux.vnet.ibm.com>
Cc: Arnaldo Carvalho de Melo <acme <at> redhat.com>
---

 tools/perf/builtin-probe.c |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/tools/perf/builtin-probe.c b/tools/perf/builtin-probe.c
index 4e418af..510fdd4 100644
--- a/tools/perf/builtin-probe.c
+++ b/tools/perf/builtin-probe.c
 <at>  <at>  -151,7 +151,7  <at>  <at>  static void parse_probe_point(char *arg, struct probe_point *pp)
 /* Parse an event definition. Note that any error must die. */
 static void parse_probe_event(const char *str)
 {
-	char *argv[MAX_PROBE_ARGS + 2];	/* Event + probe + args */
(Continue reading)

Masami Hiramatsu | 1 Dec 01:19 2009
Picon

[PATCH -tip 5/9] perf probe: Fix probe array index for multiple probe point

Fix the index of formatted probe array for multiple probe
point, which should be probes[i] instead of probes[0].

Signed-off-by: Masami Hiramatsu <mhiramat <at> redhat.com>
Cc: Ingo Molnar <mingo <at> elte.hu>
Cc: Steven Rostedt <rostedt <at> goodmis.org>
Cc: Jim Keniston <jkenisto <at> us.ibm.com>
Cc: Ananth N Mavinakayanahalli <ananth <at> in.ibm.com>
Cc: Christoph Hellwig <hch <at> infradead.org>
Cc: Frank Ch. Eigler <fche <at> redhat.com>
Cc: Frederic Weisbecker <fweisbec <at> gmail.com>
Cc: Jason Baron <jbaron <at> redhat.com>
Cc: K.Prasad <prasad <at> linux.vnet.ibm.com>
Cc: Peter Zijlstra <peterz <at> infradead.org>
Cc: Srikar Dronamraju <srikar <at> linux.vnet.ibm.com>
Cc: Arnaldo Carvalho de Melo <acme <at> redhat.com>
---

 tools/perf/builtin-probe.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/tools/perf/builtin-probe.c b/tools/perf/builtin-probe.c
index 510fdd4..5f47e62 100644
--- a/tools/perf/builtin-probe.c
+++ b/tools/perf/builtin-probe.c
 <at>  <at>  -428,7 +428,7  <at>  <at>  end_dwarf:
 					pp->retprobe ? 'r' : 'p',
 					PERFPROBE_GROUP,
 					pp->function, pp->offset, i,
-					pp->probes[0]);
(Continue reading)

Masami Hiramatsu | 1 Dec 01:19 2009
Picon

[PATCH -tip 6/9] perf probe: Move probe event utility functions to probe-event.c

Split probe event (kprobe-events and perf probe events) utility
functions from builtin-probe.c to probe-event.c.

Signed-off-by: Masami Hiramatsu <mhiramat <at> redhat.com>
Cc: Ingo Molnar <mingo <at> elte.hu>
Cc: Steven Rostedt <rostedt <at> goodmis.org>
Cc: Jim Keniston <jkenisto <at> us.ibm.com>
Cc: Ananth N Mavinakayanahalli <ananth <at> in.ibm.com>
Cc: Christoph Hellwig <hch <at> infradead.org>
Cc: Frank Ch. Eigler <fche <at> redhat.com>
Cc: Frederic Weisbecker <fweisbec <at> gmail.com>
Cc: Jason Baron <jbaron <at> redhat.com>
Cc: K.Prasad <prasad <at> linux.vnet.ibm.com>
Cc: Peter Zijlstra <peterz <at> infradead.org>
Cc: Srikar Dronamraju <srikar <at> linux.vnet.ibm.com>
Cc: Arnaldo Carvalho de Melo <acme <at> redhat.com>
---

 tools/perf/Makefile           |    2 
 tools/perf/builtin-probe.c    |  227 +---------------------------------
 tools/perf/util/probe-event.c |  273 +++++++++++++++++++++++++++++++++++++++++
 tools/perf/util/probe-event.h |   10 ++
 4 files changed, 294 insertions(+), 218 deletions(-)
 create mode 100644 tools/perf/util/probe-event.c
 create mode 100644 tools/perf/util/probe-event.h

diff --git a/tools/perf/Makefile b/tools/perf/Makefile
index 76e4b04..f8537cf 100644
--- a/tools/perf/Makefile
+++ b/tools/perf/Makefile
(Continue reading)

Masami Hiramatsu | 1 Dec 01:20 2009
Picon

[PATCH -tip 7/9] perf probe: Add argv_split() from lib/argv_split.c

Add argv_split() ported from lib/argv_split.c to string.c and use it
in util/probe-event.c.

Signed-off-by: Masami Hiramatsu <mhiramat <at> redhat.com>
Cc: Ingo Molnar <mingo <at> elte.hu>
Cc: Steven Rostedt <rostedt <at> goodmis.org>
Cc: Jim Keniston <jkenisto <at> us.ibm.com>
Cc: Ananth N Mavinakayanahalli <ananth <at> in.ibm.com>
Cc: Christoph Hellwig <hch <at> infradead.org>
Cc: Frank Ch. Eigler <fche <at> redhat.com>
Cc: Frederic Weisbecker <fweisbec <at> gmail.com>
Cc: Jason Baron <jbaron <at> redhat.com>
Cc: K.Prasad <prasad <at> linux.vnet.ibm.com>
Cc: Peter Zijlstra <peterz <at> infradead.org>
Cc: Srikar Dronamraju <srikar <at> linux.vnet.ibm.com>
Cc: Arnaldo Carvalho de Melo <acme <at> redhat.com>
---

 tools/perf/util/probe-event.c |   55 ++++++----------------
 tools/perf/util/string.c      |  101 +++++++++++++++++++++++++++++++++++++++++
 tools/perf/util/string.h      |    2 +
 3 files changed, 118 insertions(+), 40 deletions(-)

diff --git a/tools/perf/util/probe-event.c b/tools/perf/util/probe-event.c
index 7335a3b..e3a683a 100644
--- a/tools/perf/util/probe-event.c
+++ b/tools/perf/util/probe-event.c
 <at>  <at>  -32,6 +32,7  <at>  <at> 

 #undef _GNU_SOURCE
(Continue reading)


Gmane