From: tip-bot for He Kuang <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: hekuang@huawei.com, masami.hiramatsu.pt@hitachi.com,
wangnan0@huawei.com, acme@redhat.com,
linux-kernel@vger.kernel.org, mingo@kernel.org, hpa@zytor.com,
tglx@linutronix.de
Subject: [tip:perf/core] perf probe: Fix a precedence bug
Date: Sat, 28 Feb 2015 01:32:19 -0800 [thread overview]
Message-ID: <tip-f56847c2e99810781f6941d01baff9ae223eeac3@git.kernel.org> (raw)
In-Reply-To: <1425034373-14511-1-git-send-email-hekuang@huawei.com>
Commit-ID: f56847c2e99810781f6941d01baff9ae223eeac3
Gitweb: http://git.kernel.org/tip/f56847c2e99810781f6941d01baff9ae223eeac3
Author: He Kuang <hekuang@huawei.com>
AuthorDate: Fri, 27 Feb 2015 18:52:53 +0800
Committer: Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Fri, 27 Feb 2015 10:31:09 -0300
perf probe: Fix a precedence bug
The minus operator has higher precedence than ?: Add parentheses around
?: fix this.
Before this patch:
$ echo 'p:myprobe do_sys_open' > /sys/kernel/debug/tracing/kprobe_events
$ perf probe -l -k ../vmlinux
kprobes:myprobe (on do_sys_open)
After this patch:
$ echo 'p:myprobe do_sys_open' > /sys/kernel/debug/tracing/kprobe_events
$ perf probe -l -k ../vmlinux
kprobes:myprobe (on do_sys_open@linux.git/fs/open.c)
Signed-off-by: He Kuang <hekuang@huawei.com>
Acked-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/r/1425034373-14511-1-git-send-email-hekuang@huawei.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/util/probe-event.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/perf/util/probe-event.c b/tools/perf/util/probe-event.c
index 9526cf3..7c0e765 100644
--- a/tools/perf/util/probe-event.c
+++ b/tools/perf/util/probe-event.c
@@ -151,7 +151,7 @@ static u64 kernel_get_symbol_address_by_name(const char *name, bool reloc)
sym = __find_kernel_function_by_name(name, &map);
if (sym)
return map->unmap_ip(map, sym->start) -
- (reloc) ? 0 : map->reloc;
+ ((reloc) ? 0 : map->reloc);
}
return 0;
}
prev parent reply other threads:[~2015-02-28 9:32 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-27 9:35 [PATCH] perf: " He Kuang
2015-02-27 10:38 ` He Kuang
2015-02-27 10:40 ` Masami Hiramatsu
2015-02-27 10:52 ` He Kuang
2015-02-27 11:12 ` Masami Hiramatsu
2015-02-27 11:17 ` Masami Hiramatsu
2015-02-28 9:32 ` tip-bot for He Kuang [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-f56847c2e99810781f6941d01baff9ae223eeac3@git.kernel.org \
--to=tipbot@zytor.com \
--cc=acme@redhat.com \
--cc=hekuang@huawei.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=masami.hiramatsu.pt@hitachi.com \
--cc=mingo@kernel.org \
--cc=tglx@linutronix.de \
--cc=wangnan0@huawei.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
Powered by JetHome