[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-67c7ff7c56f38a8ab338fbbfe366621ce6303ba1@git.kernel.org>
Date: Tue, 16 Mar 2010 14:46:46 GMT
From: tip-bot for Masami Hiramatsu <mhiramat@...hat.com>
To: linux-tip-commits@...r.kernel.org
Cc: linux-kernel@...r.kernel.org, hpa@...or.com, mingo@...hat.com,
dle-develop@...ts.sourceforge.net, tglx@...utronix.de,
mhiramat@...hat.com, systemtap@...rces.redhat.com, mingo@...e.hu
Subject: [tip:perf/urgent] perf probe: Fix offset to allow signed value
Commit-ID: 67c7ff7c56f38a8ab338fbbfe366621ce6303ba1
Gitweb: http://git.kernel.org/tip/67c7ff7c56f38a8ab338fbbfe366621ce6303ba1
Author: Masami Hiramatsu <mhiramat@...hat.com>
AuthorDate: Mon, 15 Mar 2010 13:02:28 -0400
Committer: Ingo Molnar <mingo@...e.hu>
CommitDate: Tue, 16 Mar 2010 10:02:18 +0100
perf probe: Fix offset to allow signed value
Fix dereference offset to intmax_t from uintmax_t, because
it can have negative values (for example local variable's offset
from frame pointer).
Signed-off-by: Masami Hiramatsu <mhiramat@...hat.com>
Cc: systemtap <systemtap@...rces.redhat.com>
Cc: DLE <dle-develop@...ts.sourceforge.net>
LKML-Reference: <20100315170228.31852.71946.stgit@...alhost6.localdomain6>
Signed-off-by: Ingo Molnar <mingo@...e.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);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists