From: Arnaldo Carvalho de Melo <acme@infradead.org>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org,
Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>,
Frederic Weisbecker <fweisbec@gmail.com>,
Ingo Molnar <mingo@elte.hu>, Paul Mackerras <paulus@samba.org>,
Pekka Enberg <penberg@kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
yrl.pp-manager.tt@hitachi.com,
Arnaldo Carvalho de Melo <acme@redhat.com>
Subject: [PATCH 01/12] perf probe: Fix regression of variable finder
Date: Fri, 23 Sep 2011 17:26:15 -0300 [thread overview]
Message-ID: <1316809586-28529-2-git-send-email-acme@infradead.org> (raw)
In-Reply-To: <1316809586-28529-1-git-send-email-acme@infradead.org>
From: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Fix to call convert_variable() if previous call does not fail.
To call convert_variable, it ensures "ret" is 0. However, since
"ret" has the return value of synthesize_perf_probe_arg() which
always returns positive value if it succeeded, perf probe doesn't
call convert_variable(). This will cause a SEGV when we add an
event with arguments.
This has to be fixed as it ensures "ret" is greater than 0
(or not negative).
This regression has been introduced by my previous patch, f182e3e1.
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Pekka Enberg <penberg@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: yrl.pp-manager.tt@hitachi.com
Link: http://lkml.kernel.org/r/20110820053922.3286.65805.stgit@fedora15
Signed-off-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/util/probe-finder.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/tools/perf/util/probe-finder.c b/tools/perf/util/probe-finder.c
index 555fc38..5d73262 100644
--- a/tools/perf/util/probe-finder.c
+++ b/tools/perf/util/probe-finder.c
@@ -659,7 +659,7 @@ static int find_variable(Dwarf_Die *sc_die, struct probe_finder *pf)
if (!die_find_variable_at(&pf->cu_die, pf->pvar->var, 0, &vr_die))
ret = -ENOENT;
}
- if (ret == 0)
+ if (ret >= 0)
ret = convert_variable(&vr_die, pf);
if (ret < 0)
--
1.6.2.5
next prev parent reply other threads:[~2011-09-23 20:27 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-23 20:26 [GIT PULL 00/12] perf tools fixes Arnaldo Carvalho de Melo
2011-09-23 20:26 ` Arnaldo Carvalho de Melo [this message]
2011-09-23 20:26 ` [PATCH 02/12] perf symbols: Fix ppc64 SEGV in dso__load_sym with debuginfo files Arnaldo Carvalho de Melo
2011-09-23 20:26 ` [PATCH 03/12] perf symbols: /proc/kallsyms does not sort module symbols Arnaldo Carvalho de Melo
2011-09-23 20:26 ` [PATCH 04/12] perf symbols: Preserve symbol scope when parsing /proc/kallsyms Arnaldo Carvalho de Melo
2011-09-23 20:26 ` [PATCH 05/12] perf symbols: Add some heuristics for choosing the best duplicate symbol Arnaldo Carvalho de Melo
2011-09-23 20:26 ` [PATCH 06/12] perf record: Create events initially disabled and enable after init Arnaldo Carvalho de Melo
2011-09-23 20:26 ` [PATCH 07/12] perf symbols: Synthesize anonymous mmap events Arnaldo Carvalho de Melo
2011-09-23 20:26 ` [PATCH 08/12] perf sort: Fix symbol sort output by separating unresolved samples by type Arnaldo Carvalho de Melo
2011-09-23 20:26 ` [PATCH 09/12] perf tool: Fix endianness handling of u32 data in samples Arnaldo Carvalho de Melo
2011-09-23 20:26 ` [PATCH 10/12] perf symbols: Fix issue with binaries using 16-bytes buildids (v2) Arnaldo Carvalho de Melo
2011-09-23 20:26 ` [PATCH 11/12] perf top: Fix userspace sample addr map offset Arnaldo Carvalho de Melo
2011-09-23 20:26 ` [PATCH 12/12] perf tools: Add support for disabling -Werror via WERROR=0 Arnaldo Carvalho de Melo
2011-09-23 21:03 ` [GIT PULL 00/12] perf tools fixes Linus Torvalds
2011-09-23 21:05 ` Arnaldo Carvalho de Melo
2011-09-23 21:05 ` Linus Torvalds
2011-09-23 21:11 ` Arnaldo Carvalho de Melo
2011-09-23 21:25 ` Arnaldo Carvalho de Melo
2011-09-23 23:12 ` Linus Torvalds
2011-09-23 23:31 ` Arnaldo Carvalho de Melo
2011-09-23 23:46 ` Arnaldo Carvalho de Melo
2011-09-24 3:46 ` David Ahern
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1316809586-28529-2-git-send-email-acme@infradead.org \
--to=acme@infradead.org \
--cc=acme@redhat.com \
--cc=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=masami.hiramatsu.pt@hitachi.com \
--cc=mingo@elte.hu \
--cc=paulus@samba.org \
--cc=penberg@kernel.org \
--cc=peterz@infradead.org \
--cc=torvalds@linux-foundation.org \
--cc=yrl.pp-manager.tt@hitachi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®