All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH -tip 0/4] perf-probe bugfixes
@ 2010-04-02 16:50 Masami Hiramatsu
  2010-04-02 16:50 ` [PATCH -tip 1/4] [BUGFIX] perf probe: Fix --line syntax help and document Masami Hiramatsu
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Masami Hiramatsu @ 2010-04-02 16:50 UTC (permalink / raw)
  To: Ingo Molnar, lkml
  Cc: Paul Mackerras, Arnaldo Carvalho de Melo, Peter Zijlstra,
	Mike Galbraith, Frederic Weisbecker, systemtap, DLE

Hi Ingo,

Before introducing new patches, I'd like to push some bugfixes.
(I'll update previous series and post again.)

Thank you,

---

Masami Hiramatsu (4):
      [BUGFIX][RESEND] perf probe: Fix to close dwarf when failing to analyze it
      [BUGFIX] perf probe: Correct error message for non-structure type
      [BUGFIX] perf probe: Fix not to return non-matched file
      [BUGFIX] perf probe: Fix --line syntax help and document


 tools/perf/Documentation/perf-probe.txt |    2 +-
 tools/perf/builtin-probe.c              |    2 +-
 tools/perf/util/probe-finder.c          |   20 ++++++++++++++------
 3 files changed, 16 insertions(+), 8 deletions(-)

-- 
Masami Hiramatsu
e-mail: mhiramat@redhat.com

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH -tip 1/4] [BUGFIX] perf probe: Fix --line syntax help and document
  2010-04-02 16:50 [PATCH -tip 0/4] perf-probe bugfixes Masami Hiramatsu
@ 2010-04-02 16:50 ` Masami Hiramatsu
  2010-04-02 19:08   ` [tip:perf/core] " tip-bot for Masami Hiramatsu
  2010-04-02 16:50 ` [PATCH -tip 2/4] [BUGFIX] perf probe: Fix not to return non-matched file Masami Hiramatsu
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 9+ messages in thread
From: Masami Hiramatsu @ 2010-04-02 16:50 UTC (permalink / raw)
  To: Ingo Molnar, lkml
  Cc: Paul Mackerras, Arnaldo Carvalho de Melo, Peter Zijlstra,
	Mike Galbraith, Frederic Weisbecker, systemtap, DLE

Just fix typos. --line option accepts ':START-END' syntax,
not ':START:END'.

Signed-off-by: Masami Hiramatsu <mhiramat@redhat.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
---

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

diff --git a/tools/perf/Documentation/perf-probe.txt b/tools/perf/Documentation/perf-probe.txt
index 0f944b3..bb671b3 100644
--- a/tools/perf/Documentation/perf-probe.txt
+++ b/tools/perf/Documentation/perf-probe.txt
@@ -85,7 +85,7 @@ LINE SYNTAX
 -----------
 Line range is descripted by following syntax.
 
- "FUNC[:RLN[+NUM|:RLN2]]|SRC:ALN[+NUM|:ALN2]"
+ "FUNC[:RLN[+NUM|-RLN2]]|SRC:ALN[+NUM|-ALN2]"
 
 FUNC specifies the function name of showing lines. 'RLN' is the start line
 number from function entry line, and 'RLN2' is the end line number. As same as
diff --git a/tools/perf/builtin-probe.c b/tools/perf/builtin-probe.c
index cf2ffa5..b3ba25a 100644
--- a/tools/perf/builtin-probe.c
+++ b/tools/perf/builtin-probe.c
@@ -167,7 +167,7 @@ static const struct option options[] = {
 		    " with existing name"),
 #ifdef DWARF_SUPPORT
 	OPT_CALLBACK('L', "line", NULL,
-		     "FUNC[:RLN[+NUM|:RLN2]]|SRC:ALN[+NUM|:ALN2]",
+		     "FUNC[:RLN[+NUM|-RLN2]]|SRC:ALN[+NUM|-ALN2]",
 		     "Show source code lines.", opt_show_lines),
 	OPT_STRING('k', "vmlinux", &symbol_conf.vmlinux_name,
 		   "file", "vmlinux pathname"),


-- 
Masami Hiramatsu
e-mail: mhiramat@redhat.com

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH -tip 2/4] [BUGFIX] perf probe: Fix not to return non-matched file
  2010-04-02 16:50 [PATCH -tip 0/4] perf-probe bugfixes Masami Hiramatsu
  2010-04-02 16:50 ` [PATCH -tip 1/4] [BUGFIX] perf probe: Fix --line syntax help and document Masami Hiramatsu
@ 2010-04-02 16:50 ` Masami Hiramatsu
  2010-04-02 19:08   ` [tip:perf/core] " tip-bot for Masami Hiramatsu
  2010-04-02 16:50 ` [PATCH -tip 3/4] [BUGFIX] perf probe: Correct error message for non-structure type Masami Hiramatsu
  2010-04-02 16:50 ` [PATCH -tip 4/4] [BUGFIX][RESEND] perf probe: Fix to close dwarf when failing to analyze it Masami Hiramatsu
  3 siblings, 1 reply; 9+ messages in thread
From: Masami Hiramatsu @ 2010-04-02 16:50 UTC (permalink / raw)
  To: Ingo Molnar, lkml
  Cc: Paul Mackerras, Arnaldo Carvalho de Melo, Peter Zijlstra,
	Mike Galbraith, Frederic Weisbecker, systemtap, DLE

Fix cu_find_realpath() not to return the last file path
if that is not matched to input pattern.

Signed-off-by: Masami Hiramatsu <mhiramat@redhat.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
---

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

diff --git a/tools/perf/util/probe-finder.c b/tools/perf/util/probe-finder.c
index db52ec2..b44132e 100644
--- a/tools/perf/util/probe-finder.c
+++ b/tools/perf/util/probe-finder.c
@@ -183,6 +183,8 @@ static const char *cu_find_realpath(Dwarf_Die *cu_die, const char *fname)
 		if (strtailcmp(src, fname) == 0)
 			break;
 	}
+	if (i == nfiles)
+		return NULL;
 	return src;
 }
 


-- 
Masami Hiramatsu
e-mail: mhiramat@redhat.com

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH -tip 3/4] [BUGFIX] perf probe: Correct error message for non-structure type
  2010-04-02 16:50 [PATCH -tip 0/4] perf-probe bugfixes Masami Hiramatsu
  2010-04-02 16:50 ` [PATCH -tip 1/4] [BUGFIX] perf probe: Fix --line syntax help and document Masami Hiramatsu
  2010-04-02 16:50 ` [PATCH -tip 2/4] [BUGFIX] perf probe: Fix not to return non-matched file Masami Hiramatsu
@ 2010-04-02 16:50 ` Masami Hiramatsu
  2010-04-02 19:08   ` [tip:perf/core] " tip-bot for Masami Hiramatsu
  2010-04-02 16:50 ` [PATCH -tip 4/4] [BUGFIX][RESEND] perf probe: Fix to close dwarf when failing to analyze it Masami Hiramatsu
  3 siblings, 1 reply; 9+ messages in thread
From: Masami Hiramatsu @ 2010-04-02 16:50 UTC (permalink / raw)
  To: Ingo Molnar, lkml
  Cc: Paul Mackerras, Arnaldo Carvalho de Melo, Peter Zijlstra,
	Mike Galbraith, Frederic Weisbecker, systemtap, DLE

perf probe outputs incorrect error message when it called with
non-exist field on a non-data structure local variable.

<Before>
 # perf probe vfs_read 'count.hoge'
  Fatal: Structure on a register is not supported yet.
 # perf probe vfs_read 'count->hoge'
  Fatal: Semantic error: hoge must be referred by '.'

This corrects the messsage.

<After>
 # perf probe vfs_read 'count.hoge'
  Fatal: count is not a data structure.
 # perf probe vfs_read 'count->hoge'
  Fatal: count is not a data structure.

Signed-off-by: Masami Hiramatsu <mhiramat@redhat.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
---

 tools/perf/util/probe-finder.c |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/tools/perf/util/probe-finder.c b/tools/perf/util/probe-finder.c
index b44132e..59b0115 100644
--- a/tools/perf/util/probe-finder.c
+++ b/tools/perf/util/probe-finder.c
@@ -429,12 +429,20 @@ static void convert_variable_fields(Dwarf_Die *vr_die, const char *varname,
 		if (die_get_real_type(&type, &type) == NULL)
 			die("Failed to get a type information of %s.", varname);
 
+		/* Verify it is a data structure  */
+		if (dwarf_tag(&type) != DW_TAG_structure_type)
+			die("%s is not a data structure.", varname);
+
 		ref = xzalloc(sizeof(struct kprobe_trace_arg_ref));
 		if (*ref_ptr)
 			(*ref_ptr)->next = ref;
 		else
 			*ref_ptr = ref;
 	} else {
+		/* Verify it is a data structure  */
+		if (dwarf_tag(&type) != DW_TAG_structure_type)
+			die("%s is not a data structure.", varname);
+
 		if (field->ref)
 			die("Semantic error: %s must be referred by '.'",
 			    field->name);
@@ -442,10 +450,6 @@ static void convert_variable_fields(Dwarf_Die *vr_die, const char *varname,
 			die("Structure on a register is not supported yet.");
 	}
 
-	/* Verify it is a data structure  */
-	if (dwarf_tag(&type) != DW_TAG_structure_type)
-		die("%s is not a data structure.", varname);
-
 	if (die_find_member(&type, field->name, &member) == NULL)
 		die("%s(tyep:%s) has no member %s.", varname,
 		    dwarf_diename(&type), field->name);


-- 
Masami Hiramatsu
e-mail: mhiramat@redhat.com

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH -tip 4/4] [BUGFIX][RESEND] perf probe: Fix to close dwarf when failing to analyze it
  2010-04-02 16:50 [PATCH -tip 0/4] perf-probe bugfixes Masami Hiramatsu
                   ` (2 preceding siblings ...)
  2010-04-02 16:50 ` [PATCH -tip 3/4] [BUGFIX] perf probe: Correct error message for non-structure type Masami Hiramatsu
@ 2010-04-02 16:50 ` Masami Hiramatsu
  2010-04-02 19:08   ` [tip:perf/core] " tip-bot for Masami Hiramatsu
  3 siblings, 1 reply; 9+ messages in thread
From: Masami Hiramatsu @ 2010-04-02 16:50 UTC (permalink / raw)
  To: Ingo Molnar, lkml
  Cc: Paul Mackerras, Arnaldo Carvalho de Melo, Peter Zijlstra,
	Mike Galbraith, Frederic Weisbecker, systemtap, DLE

Fix to close libdw routine when failing to analyze it in
find_perf_probe_point().

Signed-off-by: Masami Hiramatsu <mhiramat@redhat.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
---

 tools/perf/util/probe-finder.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/tools/perf/util/probe-finder.c b/tools/perf/util/probe-finder.c
index 59b0115..a851377 100644
--- a/tools/perf/util/probe-finder.c
+++ b/tools/perf/util/probe-finder.c
@@ -818,8 +818,10 @@ int find_perf_probe_point(int fd, unsigned long addr,
 		return -ENOENT;
 
 	/* Find cu die */
-	if (!dwarf_addrdie(dbg, (Dwarf_Addr)addr, &cudie))
-		return -EINVAL;
+	if (!dwarf_addrdie(dbg, (Dwarf_Addr)addr, &cudie)) {
+		ret = -EINVAL;
+		goto end;
+	}
 
 	/* Find a corresponding line */
 	line = dwarf_getsrc_die(&cudie, (Dwarf_Addr)addr);


-- 
Masami Hiramatsu
e-mail: mhiramat@redhat.com

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [tip:perf/core] perf probe: Fix --line syntax help and document
  2010-04-02 16:50 ` [PATCH -tip 1/4] [BUGFIX] perf probe: Fix --line syntax help and document Masami Hiramatsu
@ 2010-04-02 19:08   ` tip-bot for Masami Hiramatsu
  0 siblings, 0 replies; 9+ messages in thread
From: tip-bot for Masami Hiramatsu @ 2010-04-02 19:08 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: linux-kernel, acme, paulus, hpa, mingo, efault, peterz,
	dle-develop, fweisbec, tglx, mhiramat, mingo, systemtap

Commit-ID:  085ea739adf107b5a5d131f3625e517ff4a5181e
Gitweb:     http://git.kernel.org/tip/085ea739adf107b5a5d131f3625e517ff4a5181e
Author:     Masami Hiramatsu <mhiramat@redhat.com>
AuthorDate: Fri, 2 Apr 2010 12:50:39 -0400
Committer:  Ingo Molnar <mingo@elte.hu>
CommitDate: Fri, 2 Apr 2010 19:35:42 +0200

perf probe: Fix --line syntax help and document

Just fix typos. --line option accepts ':START-END' syntax,
not ':START:END'.

Signed-off-by: Masami Hiramatsu <mhiramat@redhat.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: systemtap <systemtap@sources.redhat.com>
Cc: DLE <dle-develop@lists.sourceforge.net>
LKML-Reference: <20100402165038.23551.62590.stgit@localhost6.localdomain6>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
 tools/perf/Documentation/perf-probe.txt |    2 +-
 tools/perf/builtin-probe.c              |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/perf/Documentation/perf-probe.txt b/tools/perf/Documentation/perf-probe.txt
index 0f944b3..bb671b3 100644
--- a/tools/perf/Documentation/perf-probe.txt
+++ b/tools/perf/Documentation/perf-probe.txt
@@ -85,7 +85,7 @@ LINE SYNTAX
 -----------
 Line range is descripted by following syntax.
 
- "FUNC[:RLN[+NUM|:RLN2]]|SRC:ALN[+NUM|:ALN2]"
+ "FUNC[:RLN[+NUM|-RLN2]]|SRC:ALN[+NUM|-ALN2]"
 
 FUNC specifies the function name of showing lines. 'RLN' is the start line
 number from function entry line, and 'RLN2' is the end line number. As same as
diff --git a/tools/perf/builtin-probe.c b/tools/perf/builtin-probe.c
index cf2ffa5..b3ba25a 100644
--- a/tools/perf/builtin-probe.c
+++ b/tools/perf/builtin-probe.c
@@ -167,7 +167,7 @@ static const struct option options[] = {
 		    " with existing name"),
 #ifdef DWARF_SUPPORT
 	OPT_CALLBACK('L', "line", NULL,
-		     "FUNC[:RLN[+NUM|:RLN2]]|SRC:ALN[+NUM|:ALN2]",
+		     "FUNC[:RLN[+NUM|-RLN2]]|SRC:ALN[+NUM|-ALN2]",
 		     "Show source code lines.", opt_show_lines),
 	OPT_STRING('k', "vmlinux", &symbol_conf.vmlinux_name,
 		   "file", "vmlinux pathname"),

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [tip:perf/core] perf probe: Fix not to return non-matched file
  2010-04-02 16:50 ` [PATCH -tip 2/4] [BUGFIX] perf probe: Fix not to return non-matched file Masami Hiramatsu
@ 2010-04-02 19:08   ` tip-bot for Masami Hiramatsu
  0 siblings, 0 replies; 9+ messages in thread
From: tip-bot for Masami Hiramatsu @ 2010-04-02 19:08 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: linux-kernel, acme, paulus, hpa, mingo, efault, peterz,
	dle-develop, fweisbec, tglx, mhiramat, mingo, systemtap

Commit-ID:  c9e385826d4f1ca5a72005ab8503598f791a8dc0
Gitweb:     http://git.kernel.org/tip/c9e385826d4f1ca5a72005ab8503598f791a8dc0
Author:     Masami Hiramatsu <mhiramat@redhat.com>
AuthorDate: Fri, 2 Apr 2010 12:50:45 -0400
Committer:  Ingo Molnar <mingo@elte.hu>
CommitDate: Fri, 2 Apr 2010 19:35:42 +0200

perf probe: Fix not to return non-matched file

Fix cu_find_realpath() not to return the last file path
if that is not matched to input pattern.

Signed-off-by: Masami Hiramatsu <mhiramat@redhat.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: systemtap <systemtap@sources.redhat.com>
Cc: DLE <dle-develop@lists.sourceforge.net>
LKML-Reference: <20100402165045.23551.47780.stgit@localhost6.localdomain6>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
 tools/perf/util/probe-finder.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/tools/perf/util/probe-finder.c b/tools/perf/util/probe-finder.c
index db52ec2..b44132e 100644
--- a/tools/perf/util/probe-finder.c
+++ b/tools/perf/util/probe-finder.c
@@ -183,6 +183,8 @@ static const char *cu_find_realpath(Dwarf_Die *cu_die, const char *fname)
 		if (strtailcmp(src, fname) == 0)
 			break;
 	}
+	if (i == nfiles)
+		return NULL;
 	return src;
 }
 

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [tip:perf/core] perf probe: Correct error message for non-structure type
  2010-04-02 16:50 ` [PATCH -tip 3/4] [BUGFIX] perf probe: Correct error message for non-structure type Masami Hiramatsu
@ 2010-04-02 19:08   ` tip-bot for Masami Hiramatsu
  0 siblings, 0 replies; 9+ messages in thread
From: tip-bot for Masami Hiramatsu @ 2010-04-02 19:08 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: linux-kernel, acme, paulus, hpa, mingo, efault, peterz,
	dle-develop, fweisbec, tglx, mhiramat, mingo, systemtap

Commit-ID:  12e5a7ae475ccb2733d740ffb95d9ca0a18392da
Gitweb:     http://git.kernel.org/tip/12e5a7ae475ccb2733d740ffb95d9ca0a18392da
Author:     Masami Hiramatsu <mhiramat@redhat.com>
AuthorDate: Fri, 2 Apr 2010 12:50:53 -0400
Committer:  Ingo Molnar <mingo@elte.hu>
CommitDate: Fri, 2 Apr 2010 19:35:43 +0200

perf probe: Correct error message for non-structure type

perf probe outputs incorrect error message when it is called with
non-existent field on a non-data structure local variable.

<Before>
 # perf probe vfs_read 'count.hoge'
  Fatal: Structure on a register is not supported yet.
 # perf probe vfs_read 'count->hoge'
  Fatal: Semantic error: hoge must be referred by '.'

This corrects the messsage.

<After>
 # perf probe vfs_read 'count.hoge'
  Fatal: count is not a data structure.
 # perf probe vfs_read 'count->hoge'
  Fatal: count is not a data structure.

Signed-off-by: Masami Hiramatsu <mhiramat@redhat.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: systemtap <systemtap@sources.redhat.com>
Cc: DLE <dle-develop@lists.sourceforge.net>
LKML-Reference: <20100402165052.23551.75866.stgit@localhost6.localdomain6>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
 tools/perf/util/probe-finder.c |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/tools/perf/util/probe-finder.c b/tools/perf/util/probe-finder.c
index b44132e..59b0115 100644
--- a/tools/perf/util/probe-finder.c
+++ b/tools/perf/util/probe-finder.c
@@ -429,12 +429,20 @@ static void convert_variable_fields(Dwarf_Die *vr_die, const char *varname,
 		if (die_get_real_type(&type, &type) == NULL)
 			die("Failed to get a type information of %s.", varname);
 
+		/* Verify it is a data structure  */
+		if (dwarf_tag(&type) != DW_TAG_structure_type)
+			die("%s is not a data structure.", varname);
+
 		ref = xzalloc(sizeof(struct kprobe_trace_arg_ref));
 		if (*ref_ptr)
 			(*ref_ptr)->next = ref;
 		else
 			*ref_ptr = ref;
 	} else {
+		/* Verify it is a data structure  */
+		if (dwarf_tag(&type) != DW_TAG_structure_type)
+			die("%s is not a data structure.", varname);
+
 		if (field->ref)
 			die("Semantic error: %s must be referred by '.'",
 			    field->name);
@@ -442,10 +450,6 @@ static void convert_variable_fields(Dwarf_Die *vr_die, const char *varname,
 			die("Structure on a register is not supported yet.");
 	}
 
-	/* Verify it is a data structure  */
-	if (dwarf_tag(&type) != DW_TAG_structure_type)
-		die("%s is not a data structure.", varname);
-
 	if (die_find_member(&type, field->name, &member) == NULL)
 		die("%s(tyep:%s) has no member %s.", varname,
 		    dwarf_diename(&type), field->name);

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [tip:perf/core] perf probe: Fix to close dwarf when failing to analyze it
  2010-04-02 16:50 ` [PATCH -tip 4/4] [BUGFIX][RESEND] perf probe: Fix to close dwarf when failing to analyze it Masami Hiramatsu
@ 2010-04-02 19:08   ` tip-bot for Masami Hiramatsu
  0 siblings, 0 replies; 9+ messages in thread
From: tip-bot for Masami Hiramatsu @ 2010-04-02 19:08 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: linux-kernel, acme, paulus, hpa, mingo, efault, peterz,
	dle-develop, fweisbec, tglx, mhiramat, mingo, systemtap

Commit-ID:  75ec5a245c7763c397f31ec8964d0a46c54a7386
Gitweb:     http://git.kernel.org/tip/75ec5a245c7763c397f31ec8964d0a46c54a7386
Author:     Masami Hiramatsu <mhiramat@redhat.com>
AuthorDate: Fri, 2 Apr 2010 12:50:59 -0400
Committer:  Ingo Molnar <mingo@elte.hu>
CommitDate: Fri, 2 Apr 2010 19:35:44 +0200

perf probe: Fix to close dwarf when failing to analyze it

Fix to close libdw routine when failing to analyze it in
find_perf_probe_point().

Signed-off-by: Masami Hiramatsu <mhiramat@redhat.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: systemtap <systemtap@sources.redhat.com>
Cc: DLE <dle-develop@lists.sourceforge.net>
LKML-Reference: <20100402165059.23551.95587.stgit@localhost6.localdomain6>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
 tools/perf/util/probe-finder.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/tools/perf/util/probe-finder.c b/tools/perf/util/probe-finder.c
index 59b0115..a851377 100644
--- a/tools/perf/util/probe-finder.c
+++ b/tools/perf/util/probe-finder.c
@@ -818,8 +818,10 @@ int find_perf_probe_point(int fd, unsigned long addr,
 		return -ENOENT;
 
 	/* Find cu die */
-	if (!dwarf_addrdie(dbg, (Dwarf_Addr)addr, &cudie))
-		return -EINVAL;
+	if (!dwarf_addrdie(dbg, (Dwarf_Addr)addr, &cudie)) {
+		ret = -EINVAL;
+		goto end;
+	}
 
 	/* Find a corresponding line */
 	line = dwarf_getsrc_die(&cudie, (Dwarf_Addr)addr);

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2010-04-02 19:09 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-04-02 16:50 [PATCH -tip 0/4] perf-probe bugfixes Masami Hiramatsu
2010-04-02 16:50 ` [PATCH -tip 1/4] [BUGFIX] perf probe: Fix --line syntax help and document Masami Hiramatsu
2010-04-02 19:08   ` [tip:perf/core] " tip-bot for Masami Hiramatsu
2010-04-02 16:50 ` [PATCH -tip 2/4] [BUGFIX] perf probe: Fix not to return non-matched file Masami Hiramatsu
2010-04-02 19:08   ` [tip:perf/core] " tip-bot for Masami Hiramatsu
2010-04-02 16:50 ` [PATCH -tip 3/4] [BUGFIX] perf probe: Correct error message for non-structure type Masami Hiramatsu
2010-04-02 19:08   ` [tip:perf/core] " tip-bot for Masami Hiramatsu
2010-04-02 16:50 ` [PATCH -tip 4/4] [BUGFIX][RESEND] perf probe: Fix to close dwarf when failing to analyze it Masami Hiramatsu
2010-04-02 19:08   ` [tip:perf/core] " tip-bot for Masami Hiramatsu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.