All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] perf: Add function to post process kernel trace events
@ 2016-08-09  6:23 Ravi Bangoria
  2016-08-09  6:23 ` [PATCH 2/2] perf ppc64le: Fix probe location when using DWARF Ravi Bangoria
  2016-08-09 19:20 ` [tip:perf/urgent] perf probe: Add function to post process kernel trace events tip-bot for Ravi Bangoria
  0 siblings, 2 replies; 16+ messages in thread
From: Ravi Bangoria @ 2016-08-09  6:23 UTC (permalink / raw)
  To: linux-kernel
  Cc: peterz, mingo, acme, alexander.shishkin, bsingharora,
	naveen.n.rao, ananth, ravi.bangoria, mhiramat, wangnan0,
	namhyung

Instead of inline code, introduce function to post process kernel
probe trace events.

Signed-off-by: Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.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 953dc1a..4e215e7 100644
--- a/tools/perf/util/probe-event.c
+++ b/tools/perf/util/probe-event.c
@@ -664,22 +664,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");
@@ -711,6 +703,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)
-- 
2.7.4

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

end of thread, other threads:[~2016-08-16 18:16 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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:perf/urgent] perf probe: Add function to post process kernel trace events tip-bot for Ravi Bangoria

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.