Masami Hiramatsu | 1 Dec 2009 01:19
Picon
Favicon

[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 2009 01:19
Picon
Favicon

[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)

Picon
Favicon

[tip:perf/core] trace_kprobes: Fix a memory leak bug and check kstrdup() return value

Commit-ID:  ba8665d7dd95eb6093ee06f8f624b6acb1e73206
Gitweb:     http://git.kernel.org/tip/ba8665d7dd95eb6093ee06f8f624b6acb1e73206
Author:     Masami Hiramatsu <mhiramat <at> redhat.com>
AuthorDate: Mon, 30 Nov 2009 19:19:20 -0500
Committer:  Ingo Molnar <mingo <at> elte.hu>
CommitDate: Tue, 1 Dec 2009 08:19:59 +0100

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: systemtap <systemtap <at> sources.redhat.com>
Cc: DLE <dle-develop <at> lists.sourceforge.net>
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>
Cc: Frederic Weisbecker <fweisbec <at> gmail.com>
LKML-Reference: <20091201001919.10235.56455.stgit <at> harusame>
(Continue reading)

Masami Hiramatsu | 1 Dec 2009 01:19
Picon
Favicon

[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)

Picon
Favicon

[tip:perf/core] perf probe: Change a debugging message from pr_info to pr_debug

Commit-ID:  f41b1e43c41e99c39a2222578a7806032c045c79
Gitweb:     http://git.kernel.org/tip/f41b1e43c41e99c39a2222578a7806032c045c79
Author:     Masami Hiramatsu <mhiramat <at> redhat.com>
AuthorDate: Mon, 30 Nov 2009 19:19:27 -0500
Committer:  Ingo Molnar <mingo <at> elte.hu>
CommitDate: Tue, 1 Dec 2009 08:20:00 +0100

perf probe: 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: systemtap <systemtap <at> sources.redhat.com>
Cc: DLE <dle-develop <at> lists.sourceforge.net>
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>
Cc: Frederic Weisbecker <fweisbec <at> gmail.com>
LKML-Reference: <20091201001927.10235.63645.stgit <at> harusame>
Signed-off-by: Ingo Molnar <mingo <at> elte.hu>
(Continue reading)

Masami Hiramatsu | 1 Dec 2009 01:19
Picon
Favicon

[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)

Picon
Favicon

[tip:perf/core] perf probe: Add probe-finder.h without libdwarf

Commit-ID:  57d250df7deb3e1742fbf3cc3230119731109552
Gitweb:     http://git.kernel.org/tip/57d250df7deb3e1742fbf3cc3230119731109552
Author:     Masami Hiramatsu <mhiramat <at> redhat.com>
AuthorDate: Mon, 30 Nov 2009 19:19:34 -0500
Committer:  Ingo Molnar <mingo <at> elte.hu>
CommitDate: Tue, 1 Dec 2009 08:20:00 +0100

perf probe: 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: systemtap <systemtap <at> sources.redhat.com>
Cc: DLE <dle-develop <at> lists.sourceforge.net>
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>
Cc: Frederic Weisbecker <fweisbec <at> gmail.com>
LKML-Reference: <20091201001934.10235.44656.stgit <at> harusame>
Signed-off-by: Ingo Molnar <mingo <at> elte.hu>
---
(Continue reading)

Masami Hiramatsu | 1 Dec 2009 01:19
Picon
Favicon

[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)

Picon
Favicon

[tip:perf/core] perf probe: Fix argv array size in probe parser

Commit-ID:  74ca4c0ece52a2d19dae1bcbfc24fcfc5facfeb4
Gitweb:     http://git.kernel.org/tip/74ca4c0ece52a2d19dae1bcbfc24fcfc5facfeb4
Author:     Masami Hiramatsu <mhiramat <at> redhat.com>
AuthorDate: Mon, 30 Nov 2009 19:19:43 -0500
Committer:  Ingo Molnar <mingo <at> elte.hu>
CommitDate: Tue, 1 Dec 2009 08:20:01 +0100

perf probe: Fix argv array size in probe parser

Since the syntax has 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: systemtap <systemtap <at> sources.redhat.com>
Cc: DLE <dle-develop <at> lists.sourceforge.net>
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>
Cc: Frederic Weisbecker <fweisbec <at> gmail.com>
LKML-Reference: <20091201001943.10235.80367.stgit <at> harusame>
Signed-off-by: Ingo Molnar <mingo <at> elte.hu>
(Continue reading)

Masami Hiramatsu | 1 Dec 2009 01:19
Picon
Favicon

[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)

Picon
Favicon

[tip:perf/core] perf probe: Fix probe array index for multiple probe points

Commit-ID:  934b1f5fd0c9a2ddde5a4487695c126243d9a42b
Gitweb:     http://git.kernel.org/tip/934b1f5fd0c9a2ddde5a4487695c126243d9a42b
Author:     Masami Hiramatsu <mhiramat <at> redhat.com>
AuthorDate: Mon, 30 Nov 2009 19:19:51 -0500
Committer:  Ingo Molnar <mingo <at> elte.hu>
CommitDate: Tue, 1 Dec 2009 08:20:01 +0100

perf probe: Fix probe array index for multiple probe points

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

Signed-off-by: Masami Hiramatsu <mhiramat <at> redhat.com>
Cc: systemtap <systemtap <at> sources.redhat.com>
Cc: DLE <dle-develop <at> lists.sourceforge.net>
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>
Cc: Frederic Weisbecker <fweisbec <at> gmail.com>
LKML-Reference: <20091201001950.10235.54781.stgit <at> harusame>
Signed-off-by: Ingo Molnar <mingo <at> elte.hu>
---
(Continue reading)

Masami Hiramatsu | 1 Dec 2009 01:19
Picon
Favicon

[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)

Picon
Favicon

[tip:perf/core] perf probe: Move probe event utility functions to probe-event.c

Commit-ID:  50656eec82684d03add0f4f4b4875a20bd8f9755
Gitweb:     http://git.kernel.org/tip/50656eec82684d03add0f4f4b4875a20bd8f9755
Author:     Masami Hiramatsu <mhiramat <at> redhat.com>
AuthorDate: Mon, 30 Nov 2009 19:19:58 -0500
Committer:  Ingo Molnar <mingo <at> elte.hu>
CommitDate: Tue, 1 Dec 2009 08:20:01 +0100

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: systemtap <systemtap <at> sources.redhat.com>
Cc: DLE <dle-develop <at> lists.sourceforge.net>
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>
Cc: Frederic Weisbecker <fweisbec <at> gmail.com>
LKML-Reference: <20091201001958.10235.90243.stgit <at> harusame>
Signed-off-by: Ingo Molnar <mingo <at> elte.hu>
---
(Continue reading)

Masami Hiramatsu | 1 Dec 2009 01:20
Picon
Favicon

[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)

Picon
Favicon

[tip:perf/core] perf probe: Add argv_split() from lib/argv_split.c

Commit-ID:  e1c01d61a98703fcc80d15b8068ec36d5a215f7e
Gitweb:     http://git.kernel.org/tip/e1c01d61a98703fcc80d15b8068ec36d5a215f7e
Author:     Masami Hiramatsu <mhiramat <at> redhat.com>
AuthorDate: Mon, 30 Nov 2009 19:20:05 -0500
Committer:  Ingo Molnar <mingo <at> elte.hu>
CommitDate: Tue, 1 Dec 2009 08:20:02 +0100

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: systemtap <systemtap <at> sources.redhat.com>
Cc: DLE <dle-develop <at> lists.sourceforge.net>
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>
Cc: Frederic Weisbecker <fweisbec <at> gmail.com>
LKML-Reference: <20091201002005.10235.55602.stgit <at> harusame>
Signed-off-by: Ingo Molnar <mingo <at> elte.hu>
---
(Continue reading)

Wang Liming | 2 Dec 2009 06:44
Favicon

Re: [tip:perf/core] perf probe: Add argv_split() from lib/argv_split.c

Hi Masami,

tip-bot for Masami Hiramatsu wrote:
...
> diff --git a/tools/perf/util/string.c b/tools/perf/util/string.c
> index 2270435..0977cf4 100644
> --- a/tools/perf/util/string.c
> +++ b/tools/perf/util/string.c
>  <at>  <at>  -127,3 +127,104  <at>  <at>  out_err:
>  out:
>  	return length;
>  }
> +
> +/*
> + * Helper function for splitting a string into an argv-like array.
> + * originaly copied from lib/argv_split.c
> + */
> +static const char *skip_sep(const char *cp)
> +{
> +	while (*cp && isspace(*cp))
> +		cp++;
> +
> +	return cp;
> +}
> +
> +static const char *skip_arg(const char *cp)
> +{
> +	while (*cp && !isspace(*cp))
> +		cp++;
> +
(Continue reading)

Frederic Weisbecker | 2 Dec 2009 06:51
Picon

Re: [tip:perf/core] perf probe: Add argv_split() from lib/argv_split.c

On Wed, Dec 02, 2009 at 01:44:56PM +0800, Wang Liming wrote:
> When I compiled "perf", I encountered following error:
>
>     CC util/string.o
> cc1: warnings being treated as errors
> util/string.c: In function 'argv_split':
> util/string.c:216: warning: implicit declaration of function 'strndup'
> util/string.c:216: warning: incompatible implicit declaration of built-in 
> function 'strndup'
> make: *** [util/string.o] Error 1
>
> Do we need to define _GNU_SOURCE in the head? Or maybe I used rather old 
> glibc version.
>
> diff --git a/tools/perf/util/string.c b/tools/perf/util/string.c
> index 0977cf4..ea3eb39 100644
> --- a/tools/perf/util/string.c
> +++ b/tools/perf/util/string.c
>  <at>  <at>  -1,5 +1,8  <at>  <at> 
> +#define _GNU_SOURCE
>  #include <string.h>
>  #include <stdlib.h>
> +
> +#undef _GNU_SOURCE
>  #include "string.h"
>  #include "util.h"

Right, strndup is a GNU extension.
Could you please resend this patch with your signed-off-by
and a proper changelog?
(Continue reading)

Masami Hiramatsu | 1 Dec 2009 01:20
Picon
Favicon

[PATCH -tip 8/9] perf probe: Add --list option for listing current probe events

Add --list option for listing currently defined probe events
in the kernel. This shows events in below format;

[group:event]	<perf-probe probe-definition>

e.g.
[probe:schedule_0]	schedule+30 cpu

Note that source file/line information is not supported yet.
So even if you added a probe by line, it will be shown in
<symbol+offset>.

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    |   12 ++
 tools/perf/util/probe-event.c |  231 ++++++++++++++++++++++++++++++++++++++---
 tools/perf/util/probe-event.h |    5 +
(Continue reading)

Picon
Favicon

[tip:perf/core] perf probe: Add --list option for listing current probe events

Commit-ID:  4de189fe6e5ad8241f6f8709d2e2ba4c3aeae33a
Gitweb:     http://git.kernel.org/tip/4de189fe6e5ad8241f6f8709d2e2ba4c3aeae33a
Author:     Masami Hiramatsu <mhiramat <at> redhat.com>
AuthorDate: Mon, 30 Nov 2009 19:20:17 -0500
Committer:  Ingo Molnar <mingo <at> elte.hu>
CommitDate: Tue, 1 Dec 2009 08:20:02 +0100

perf probe: Add --list option for listing current probe events

Add --list option for listing currently defined probe events
in the kernel. This shows events in below format;

 [group:event]	<perf-probe probe-definition>

for example:

 [probe:schedule_0]	schedule+30 cpu

Note that source file/line information is not supported yet.
So even if you added a probe by line, it will be shown in
<symbol+offset>.

Signed-off-by: Masami Hiramatsu <mhiramat <at> redhat.com>
Cc: systemtap <systemtap <at> sources.redhat.com>
Cc: DLE <dle-develop <at> lists.sourceforge.net>
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>
(Continue reading)

Wang Liming | 2 Dec 2009 05:12
Favicon

Re: [tip:perf/core] perf probe: Add --list option for listing current probe events

Hi Masami,

tip-bot for Masami Hiramatsu wrote:
> Commit-ID:  4de189fe6e5ad8241f6f8709d2e2ba4c3aeae33a
> Gitweb:     http://git.kernel.org/tip/4de189fe6e5ad8241f6f8709d2e2ba4c3aeae33a
> Author:     Masami Hiramatsu <mhiramat <at> redhat.com>
> AuthorDate: Mon, 30 Nov 2009 19:20:17 -0500
> Committer:  Ingo Molnar <mingo <at> elte.hu>
> CommitDate: Tue, 1 Dec 2009 08:20:02 +0100
> 
> perf probe: Add --list option for listing current probe events
> 
> Add --list option for listing currently defined probe events
> in the kernel. This shows events in below format;
> 
>  [group:event]	<perf-probe probe-definition>
> 
> for example:
> 
>  [probe:schedule_0]	schedule+30 cpu
> 
> Note that source file/line information is not supported yet.
> So even if you added a probe by line, it will be shown in
> <symbol+offset>.
...
> +
> +	/* Scan event and group name. */
> +	ret = sscanf(argv[0], "%c:%m[^/ \t]/%m[^ \t]",
> +		     &pr, group, event);
"%m" are typos?
(Continue reading)

Masami Hiramatsu | 2 Dec 2009 05:56
Picon
Favicon

Re: [tip:perf/core] perf probe: Add --list option for listing current probe events

Wang Liming wrote:
> Hi Masami,
> 
> tip-bot for Masami Hiramatsu wrote:
>> Commit-ID:  4de189fe6e5ad8241f6f8709d2e2ba4c3aeae33a
>> Gitweb:    
>> http://git.kernel.org/tip/4de189fe6e5ad8241f6f8709d2e2ba4c3aeae33a
>> Author:     Masami Hiramatsu <mhiramat <at> redhat.com>
>> AuthorDate: Mon, 30 Nov 2009 19:20:17 -0500
>> Committer:  Ingo Molnar <mingo <at> elte.hu>
>> CommitDate: Tue, 1 Dec 2009 08:20:02 +0100
>>
>> perf probe: Add --list option for listing current probe events
>>
>> Add --list option for listing currently defined probe events
>> in the kernel. This shows events in below format;
>>
>>  [group:event]    <perf-probe probe-definition>
>>
>> for example:
>>
>>  [probe:schedule_0]    schedule+30 cpu
>>
>> Note that source file/line information is not supported yet.
>> So even if you added a probe by line, it will be shown in
>> <symbol+offset>.
> ...
>> +
>> +    /* Scan event and group name. */
>> +    ret = sscanf(argv[0], "%c:%m[^/ \t]/%m[^ \t]",
(Continue reading)

Wang Liming | 2 Dec 2009 06:35
Favicon

Re: [tip:perf/core] perf probe: Add --list option for listing current probe events

Masami Hiramatsu wrote:
> Wang Liming wrote:
>> Hi Masami,
>>
>> tip-bot for Masami Hiramatsu wrote:
>>> Commit-ID:  4de189fe6e5ad8241f6f8709d2e2ba4c3aeae33a
>>> Gitweb:    
>>> http://git.kernel.org/tip/4de189fe6e5ad8241f6f8709d2e2ba4c3aeae33a
>>> Author:     Masami Hiramatsu <mhiramat <at> redhat.com>
>>> AuthorDate: Mon, 30 Nov 2009 19:20:17 -0500
>>> Committer:  Ingo Molnar <mingo <at> elte.hu>
>>> CommitDate: Tue, 1 Dec 2009 08:20:02 +0100
>>>
>>> perf probe: Add --list option for listing current probe events
>>>
>>> Add --list option for listing currently defined probe events
>>> in the kernel. This shows events in below format;
>>>
>>>  [group:event]    <perf-probe probe-definition>
>>>
>>> for example:
>>>
>>>  [probe:schedule_0]    schedule+30 cpu
>>>
>>> Note that source file/line information is not supported yet.
>>> So even if you added a probe by line, it will be shown in
>>> <symbol+offset>.
>> ...
>>> +
>>> +    /* Scan event and group name. */
(Continue reading)

Frederic Weisbecker | 2 Dec 2009 07:06
Picon

Re: [tip:perf/core] perf probe: Add --list option for listing current probe events

On Wed, Dec 02, 2009 at 01:35:39PM +0800, Wang Liming wrote:
> Yes, my glibc is old so that "perf" can't be built. I'm using ubuntu 8.04.
>
> Thanks a lot.

What is your glibc version?
%m appears to be supported since 2.7

But if possible we would like perf to be buildable on most
boxes. May be should we use %a instead there.

odd gcc versions will whine because of the confusion with the %a for
floating point things but that can be worked around with (float *) casts (sigh).
Well, since we also have strict aliasing checks, we'll actually need:

scanf("%a", (float *)(void *)str);

We do that in util/trace-event-parse.c

Wang Liming | 2 Dec 2009 07:21
Favicon

Re: [tip:perf/core] perf probe: Add --list option for listing current probe events

Frederic Weisbecker wrote:
> On Wed, Dec 02, 2009 at 01:35:39PM +0800, Wang Liming wrote:
>> Yes, my glibc is old so that "perf" can't be built. I'm using ubuntu 8.04.
>>
>> Thanks a lot.
> 
> 
> 
> What is your glibc version?
> %m appears to be supported since 2.7
I'm using ubuntu 8.04, and glibc version seems to be 2.7.

$dpkg -l |grep libc|less
ii  libc6                                      2.7-10ubuntu4 
                           GNU C Library: Shared libraries
ii  libc6-dev                                  2.7-10ubuntu4 
                           GNU C Library: Development Libraries and Header

$gcc -v
Using built-in specs.
Target: i486-linux-gnu
Configured with: ../src/configure -v 
--enable-languages=c,c++,fortran,objc,obj-c++,treelang --prefix=/usr 
--enable-shared --with-system-zlib --libexecdir=/usr/lib 
--without-included-gettext --enable-threads=posix --enable-nls 
--with-gxx-include-dir=/usr/include/c++/4.2 --program-suffix=-4.2 
--enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --enable-mpfr 
--enable-targets=all --enable-checking=release --build=i486-linux-gnu 
--host=i486-linux-gnu --target=i486-linux-gnu
Thread model: posix
(Continue reading)

Ingo Molnar | 2 Dec 2009 09:31
Picon
Picon
Favicon

Re: [tip:perf/core] perf probe: Add --list option for listing current probe events


* Frederic Weisbecker <fweisbec <at> gmail.com> wrote:

> On Wed, Dec 02, 2009 at 01:35:39PM +0800, Wang Liming wrote:
> > Yes, my glibc is old so that "perf" can't be built. I'm using ubuntu 8.04.
> >
> > Thanks a lot.
> 
> 
> 
> What is your glibc version?
> %m appears to be supported since 2.7
> 
> But if possible we would like perf to be buildable on most
> boxes. May be should we use %a instead there.

Definitely so.

Wang, mind sending a patch for that?

Thanks,

	Ingo
Liming Wang | 2 Dec 2009 09:42
Favicon

[PATCH] perf tools: replace %m with %a in sscanf

Not all glibc support %m and it results in a compile error if
%m not supported. Replace it with %a and (float *) casts.

Signed-off-by: Liming Wang <liming.wang <at> windriver.com>
Acked-by: Frederic Weisbecker <fweisbec <at> gmail.com>
---
 tools/perf/util/probe-event.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/tools/perf/util/probe-event.c b/tools/perf/util/probe-event.c
index e42f3ac..cd7fbda 100644
--- a/tools/perf/util/probe-event.c
+++ b/tools/perf/util/probe-event.c
 <at>  <at>  -199,8 +199,8  <at>  <at>  void parse_trace_kprobe_event(const char *str, char **group, char **event,
 		semantic_error("Too less arguments.");

 	/* Scan event and group name. */
-	ret = sscanf(argv[0], "%c:%m[^/ \t]/%m[^ \t]",
-		     &pr, group, event);
+	ret = sscanf(argv[0], "%c:%a[^/ \t]/%a[^ \t]",
+		     &pr, (float *)(void *)group, (float *)(void *)event);
 	if (ret != 3)
 		semantic_error("Failed to parse event name: %s", argv[0]);
 	pr_debug("Group:%s Event:%s probe:%c\n", *group, *event, pr);
 <at>  <at>  -211,7 +211,7  <at>  <at>  void parse_trace_kprobe_event(const char *str, char **group, char **event,
 	pp->retprobe = (pr == 'r');

 	/* Scan function name and offset */
-	ret = sscanf(argv[1], "%m[^+]+%d", &pp->function, &pp->offset);
+	ret = sscanf(argv[1], "%a[^+]+%d", (float *)(void *)&pp->function, &pp->offset);
(Continue reading)

tip-bot for Liming Wang | 2 Dec 2009 11:44
Favicon

[tip:perf/core] perf tools: Replace %m with %a in sscanf

Commit-ID:  93aaa45a6ad3f983180223601fc663cc551ad499
Gitweb:     http://git.kernel.org/tip/93aaa45a6ad3f983180223601fc663cc551ad499
Author:     Liming Wang <liming.wang <at> windriver.com>
AuthorDate: Wed, 2 Dec 2009 16:42:54 +0800
Committer:  Ingo Molnar <mingo <at> elte.hu>
CommitDate: Wed, 2 Dec 2009 10:12:16 +0100

perf tools: Replace %m with %a in sscanf

Not all glibc support %m and it results in a compile error if
%m not supported. Replace it with %a and (float *) casts.

Signed-off-by: Liming Wang <liming.wang <at> windriver.com>
Acked-by: Frederic Weisbecker <fweisbec <at> gmail.com>
Cc: peterz <at> infradead.org
Cc: mhiramat <at> redhat.com
LKML-Reference: <1259743374-9950-1-git-send-email-liming.wang <at> windriver.com>
Signed-off-by: Ingo Molnar <mingo <at> elte.hu>
---
 tools/perf/util/probe-event.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/tools/perf/util/probe-event.c b/tools/perf/util/probe-event.c
index e42f3ac..cd7fbda 100644
--- a/tools/perf/util/probe-event.c
+++ b/tools/perf/util/probe-event.c
 <at>  <at>  -199,8 +199,8  <at>  <at>  void parse_trace_kprobe_event(const char *str, char **group, char **event,
 		semantic_error("Too less arguments.");

 	/* Scan event and group name. */
(Continue reading)

Masami Hiramatsu | 2 Dec 2009 17:45
Picon
Favicon

Re: [PATCH] perf tools: replace %m with %a in sscanf

Liming Wang wrote:
> Not all glibc support %m and it results in a compile error if
> %m not supported. Replace it with %a and (float *) casts.
> 
> Signed-off-by: Liming Wang<liming.wang <at> windriver.com>
> Acked-by: Frederic Weisbecker<fweisbec <at> gmail.com>
> ---
>   tools/perf/util/probe-event.c |    6 +++---
>   1 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/tools/perf/util/probe-event.c b/tools/perf/util/probe-event.c
> index e42f3ac..cd7fbda 100644
> --- a/tools/perf/util/probe-event.c
> +++ b/tools/perf/util/probe-event.c
>  <at>  <at>  -199,8 +199,8  <at>  <at>  void parse_trace_kprobe_event(const char *str, char **group, char **event,
>   		semantic_error("Too less arguments.");
> 
>   	/* Scan event and group name. */
> -	ret = sscanf(argv[0], "%c:%m[^/ \t]/%m[^ \t]",
> -		&pr, group, event);
> +	ret = sscanf(argv[0], "%c:%a[^/ \t]/%a[^ \t]",
> +		&pr, (float *)(void *)group, (float *)(void *)event);

Hmm, the code itself is OK for me, but I think we need a comment
why we cast (void *) to (float *)...

Thank you,

>   	if (ret != 3)
>   		semantic_error("Failed to parse event name: %s", argv[0]);
(Continue reading)

Masami Hiramatsu | 1 Dec 2009 01:20
Picon
Favicon

[PATCH -tip 9/9] perf probe: Simplify event naming

Simplify event naming as <symbol>_<seqnum>. Each event name is
globally unique (group name is not checked). So, if there is
schedule_0, next probe event on schedule() will be schedule_1.

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 |   67 ++++++++++++++++++++++++++++++++---------
 tools/perf/util/probe-event.h |    3 ++
 2 files changed, 56 insertions(+), 14 deletions(-)

diff --git a/tools/perf/util/probe-event.c b/tools/perf/util/probe-event.c
index 7f4f288..e42f3ac 100644
--- a/tools/perf/util/probe-event.c
+++ b/tools/perf/util/probe-event.c
 <at>  <at>  -403,6 +403,29  <at>  <at>  void show_perf_probe_events(void)
 	strlist__delete(rawlist);
 }
(Continue reading)

Picon
Favicon

[tip:perf/core] perf probe: Simplify event naming

Commit-ID:  b498ce1f2753b9724b2fc05d2057f7d1490cfa93
Gitweb:     http://git.kernel.org/tip/b498ce1f2753b9724b2fc05d2057f7d1490cfa93
Author:     Masami Hiramatsu <mhiramat <at> redhat.com>
AuthorDate: Mon, 30 Nov 2009 19:20:25 -0500
Committer:  Ingo Molnar <mingo <at> elte.hu>
CommitDate: Tue, 1 Dec 2009 08:20:03 +0100

perf probe: Simplify event naming

Simplify event naming as <symbol>_<seqnum>. Each event name is
globally unique (group name is not checked). So, if there is
schedule_0, next probe event on schedule() will be schedule_1.

Signed-off-by: Masami Hiramatsu <mhiramat <at> redhat.com>
Cc: systemtap <systemtap <at> sources.redhat.com>
Cc: DLE <dle-develop <at> lists.sourceforge.net>
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>
Cc: Frederic Weisbecker <fweisbec <at> gmail.com>
LKML-Reference: <20091201002024.10235.2353.stgit <at> harusame>
Signed-off-by: Ingo Molnar <mingo <at> elte.hu>
(Continue reading)

Ingo Molnar | 1 Dec 2009 08:29
Picon
Picon
Favicon

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


* Masami Hiramatsu <mhiramat <at> redhat.com> wrote:

> 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.

Applied, thanks Masami!

> 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.

ok, cool!

One other small detail i noticed wrt. probe naming. Right now if we 
insert a single probe into a function it gets named schedule_0:

 # perf probe schedule
 Could not open vmlinux/module file. Try to use symbols.
 Added new event: p:probe/schedule_0 schedule+0

the next one gets named schedule_1, schedule_2, etc.

It would be nice to special-case the first one and name it 'schedule'. 
Most of the time people insert a single probe into a function, so the _0 
postfix is extra and in most cases unnecessary typing for them.
(Continue reading)

Masami Hiramatsu | 2 Dec 2009 22:53
Picon
Favicon

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

Ingo Molnar wrote:
>
> * Masami Hiramatsu<mhiramat <at> redhat.com>  wrote:
>
>> 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.
>
> Applied, thanks Masami!
>
>> 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.
>
> ok, cool!
>
> One other small detail i noticed wrt. probe naming. Right now if we
> insert a single probe into a function it gets named schedule_0:
>
>   # perf probe schedule
>   Could not open vmlinux/module file. Try to use symbols.
>   Added new event: p:probe/schedule_0 schedule+0
>
> the next one gets named schedule_1, schedule_2, etc.
>
> It would be nice to special-case the first one and name it 'schedule'.
> Most of the time people insert a single probe into a function, so the _0
(Continue reading)


Gmane