From: tip-bot for Ravi Bangoria <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: alexander.shishkin@linux.intel.com, linux-kernel@vger.kernel.org,
tglx@linutronix.de, namhyung@kernel.org, mingo@kernel.org,
naveen.n.rao@linux.vnet.ibm.com, ananth@in.ibm.com,
ravi.bangoria@linux.vnet.ibm.com, bsingharora@gmail.com,
mhiramat@kernel.org, peterz@infradead.org, acme@redhat.com,
wangnan0@huawei.com, hpa@zytor.com
Subject: [tip:perf/urgent] perf probe: Add function to post process kernel trace events
Date: Tue, 9 Aug 2016 12:20:45 -0700 [thread overview]
Message-ID: <tip-d820456dc70b231d62171ba46b43db0045e9bd57@git.kernel.org> (raw)
In-Reply-To: <1470723805-5081-1-git-send-email-ravi.bangoria@linux.vnet.ibm.com>
Commit-ID: d820456dc70b231d62171ba46b43db0045e9bd57
Gitweb: http://git.kernel.org/tip/d820456dc70b231d62171ba46b43db0045e9bd57
Author: Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com>
AuthorDate: Tue, 9 Aug 2016 01:23:24 -0500
Committer: Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Tue, 9 Aug 2016 12:09:59 -0300
perf probe: Add function to post process kernel trace events
Instead of inline code, introduce function to post process kernel
probe trace events.
Signed-off-by: Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com>
Acked-by: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
Cc: Balbir Singh <bsingharora@gmail.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/r/1470723805-5081-1-git-send-email-ravi.bangoria@linux.vnet.ibm.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/util/probe-event.c | 29 ++++++++++++++++++-----------
1 file changed, 18 insertions(+), 11 deletions(-)
diff --git a/tools/perf/util/probe-event.c b/tools/perf/util/probe-event.c
index 1201f73..234fbfb 100644
--- a/tools/perf/util/probe-event.c
+++ b/tools/perf/util/probe-event.c
@@ -666,22 +666,14 @@ static int add_module_to_probe_trace_events(struct probe_trace_event *tevs,
return ret;
}
-/* Post processing the probe events */
-static int post_process_probe_trace_events(struct probe_trace_event *tevs,
- int ntevs, const char *module,
- bool uprobe)
+static int
+post_process_kernel_probe_trace_events(struct probe_trace_event *tevs,
+ int ntevs)
{
struct ref_reloc_sym *reloc_sym;
char *tmp;
int i, skipped = 0;
- if (uprobe)
- return add_exec_to_probe_trace_events(tevs, ntevs, module);
-
- /* Note that currently ref_reloc_sym based probe is not for drivers */
- if (module)
- return add_module_to_probe_trace_events(tevs, ntevs, module);
-
reloc_sym = kernel_get_ref_reloc_sym();
if (!reloc_sym) {
pr_warning("Relocated base symbol is not found!\n");
@@ -713,6 +705,21 @@ static int post_process_probe_trace_events(struct probe_trace_event *tevs,
return skipped;
}
+/* Post processing the probe events */
+static int post_process_probe_trace_events(struct probe_trace_event *tevs,
+ int ntevs, const char *module,
+ bool uprobe)
+{
+ if (uprobe)
+ return add_exec_to_probe_trace_events(tevs, ntevs, module);
+
+ if (module)
+ /* Currently ref_reloc_sym based probe is not for drivers */
+ return add_module_to_probe_trace_events(tevs, ntevs, module);
+
+ return post_process_kernel_probe_trace_events(tevs, ntevs);
+}
+
/* Try to find perf_probe_event with debuginfo */
static int try_to_find_probe_trace_events(struct perf_probe_event *pev,
struct probe_trace_event **tevs)
prev parent reply other threads:[~2016-08-09 19:21 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-09 6:23 [PATCH 1/2] perf: Add function to post process kernel trace events Ravi Bangoria
2016-08-09 6:23 ` [PATCH 2/2] perf ppc64le: Fix probe location when using DWARF Ravi Bangoria
2016-08-09 14:02 ` Masami Hiramatsu
2016-08-09 15:09 ` Arnaldo Carvalho de Melo
2016-08-09 19:21 ` [tip:perf/urgent] perf probe " tip-bot for Ravi Bangoria
2016-08-10 23:54 ` [PATCH 2/2] perf " Anton Blanchard
2016-08-11 4:31 ` Ravi Bangoria
2016-08-11 11:50 ` Arnaldo Carvalho de Melo
2016-08-11 13:21 ` Ravi Bangoria
2016-08-11 14:49 ` Arnaldo Carvalho de Melo
2016-08-11 17:40 ` Arnaldo Carvalho de Melo
2016-08-12 6:06 ` Anton Blanchard
2016-08-12 13:01 ` Arnaldo Carvalho de Melo
2016-08-16 18:14 ` [tip:perf/urgent] perf ppc64le: Fix build failure when libelf is not present tip-bot for Ravi Bangoria
2016-08-11 15:49 ` [PATCH 2/2] perf ppc64le: Fix probe location when using DWARF Arnaldo Carvalho de Melo
2016-08-09 19:20 ` tip-bot for Ravi Bangoria [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-d820456dc70b231d62171ba46b43db0045e9bd57@git.kernel.org \
--to=tipbot@zytor.com \
--cc=acme@redhat.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=ananth@in.ibm.com \
--cc=bsingharora@gmail.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mhiramat@kernel.org \
--cc=mingo@kernel.org \
--cc=namhyung@kernel.org \
--cc=naveen.n.rao@linux.vnet.ibm.com \
--cc=peterz@infradead.org \
--cc=ravi.bangoria@linux.vnet.ibm.com \
--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;
as well as URLs for NNTP newsgroup(s).