public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* [PATCH -tip 1/2] [BUGFIX] perf probe: Fix to make offset to signed  value
@ 2010-03-15 16:54 Masami Hiramatsu
  2010-03-15 16:54 ` [PATCH -tip 2/2] [BUGFIX] perf probe: Use origial address instead of CU-based address Masami Hiramatsu
  2010-03-16 14:47 ` [tip:perf/urgent] perf probe: Fix offset to allow signed value tip-bot for Masami Hiramatsu
  0 siblings, 2 replies; 4+ messages in thread
From: Masami Hiramatsu @ 2010-03-15 16:54 UTC (permalink / raw)
  To: Ingo Molnar, lkml; +Cc: systemtap, DLE, Masami Hiramatsu, Ingo Molnar

Fix to make dereference offset intmax_t from uintmax_t, because
it can be minus value (e.g. local variable's offset from frame
pointer).

Signed-off-by: Masami Hiramatsu <mhiramat@redhat.com>
Cc: Ingo Molnar <mingo@elte.hu>
---

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

diff --git a/tools/perf/util/probe-finder.c b/tools/perf/util/probe-finder.c
index f9cbbf1..0e8c8f1 100644
--- a/tools/perf/util/probe-finder.c
+++ b/tools/perf/util/probe-finder.c
@@ -333,8 +333,8 @@ static void show_location(Dwarf_Op *op, struct probe_finder *pf)
 		die("%u exceeds max register number.", regn);
 
 	if (deref)
-		ret = snprintf(pf->buf, pf->len, " %s=+%ju(%s)",
-			       pf->var, (uintmax_t)offs, regs);
+		ret = snprintf(pf->buf, pf->len, " %s=%+jd(%s)",
+			       pf->var, (intmax_t)offs, regs);
 	else
 		ret = snprintf(pf->buf, pf->len, " %s=%s", pf->var, regs);
 	DIE_IF(ret < 0);


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

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

end of thread, other threads:[~2010-03-16 14:48 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-15 16:54 [PATCH -tip 1/2] [BUGFIX] perf probe: Fix to make offset to signed value Masami Hiramatsu
2010-03-15 16:54 ` [PATCH -tip 2/2] [BUGFIX] perf probe: Use origial address instead of CU-based address Masami Hiramatsu
2010-03-16 14:48   ` [tip:perf/urgent] perf probe: Use original " tip-bot for Masami Hiramatsu
2010-03-16 14:47 ` [tip:perf/urgent] perf probe: Fix offset to allow signed value tip-bot for Masami Hiramatsu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).