From: tip-bot for Masami Hiramatsu <mhiramat@redhat.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@redhat.com,
dle-develop@lists.sourceforge.net, tglx@linutronix.de,
mhiramat@redhat.com, systemtap@sources.redhat.com,
mingo@elte.hu
Subject: [tip:perf/urgent] perf probe: Fix offset to allow signed value
Date: Tue, 16 Mar 2010 14:47:00 -0000 [thread overview]
Message-ID: <tip-67c7ff7c56f38a8ab338fbbfe366621ce6303ba1@git.kernel.org> (raw)
In-Reply-To: <20100315170228.31852.71946.stgit@localhost6.localdomain6>
Commit-ID: 67c7ff7c56f38a8ab338fbbfe366621ce6303ba1
Gitweb: http://git.kernel.org/tip/67c7ff7c56f38a8ab338fbbfe366621ce6303ba1
Author: Masami Hiramatsu <mhiramat@redhat.com>
AuthorDate: Mon, 15 Mar 2010 13:02:28 -0400
Committer: Ingo Molnar <mingo@elte.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@redhat.com>
Cc: systemtap <systemtap@sources.redhat.com>
Cc: DLE <dle-develop@lists.sourceforge.net>
LKML-Reference: <20100315170228.31852.71946.stgit@localhost6.localdomain6>
Signed-off-by: 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);
prev parent reply other threads:[~2010-03-16 14:47 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-15 16:54 [PATCH -tip 1/2] [BUGFIX] perf probe: Fix to make offset to " 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-bot for Masami Hiramatsu [this message]
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=tip-67c7ff7c56f38a8ab338fbbfe366621ce6303ba1@git.kernel.org \
--to=mhiramat@redhat.com \
--cc=dle-develop@lists.sourceforge.net \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=mingo@redhat.com \
--cc=systemtap@sources.redhat.com \
--cc=tglx@linutronix.de \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).