diff options
author | Jiri Olsa <jolsa@redhat.com> | 2013-12-03 08:09:24 -0500 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2013-12-04 13:21:25 -0500 |
commit | 97978b3e30a512beba43720365f53fea8d432c97 (patch) | |
tree | be07c0f310f14f2a4ce09c13cc32ac281bf4e578 /tools/perf/builtin-trace.c | |
parent | 29f5ffd3d3ff9abdfc98928f7c4cb4097cefe434 (diff) |
perf tools: Add trace-event global object for tracepoint interface
In order to get the proper plugins processing we need to use full
trace-event interface when creating tracepoint events. So far we were
using shortcut to get the parsed format.
Moving current 'event_format__new' function into trace-event object as
'trace_event__tp_format'.
This function uses properly initialized global trace-event object,
ensuring proper plugins processing.
Signed-off-by: Jiri Olsa <jolsa@redhat.com>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Steven Rostedt <rostedt@goodmis.org>
Link: http://lkml.kernel.org/r/1386076182-14484-11-git-send-email-jolsa@redhat.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/builtin-trace.c')
-rw-r--r-- | tools/perf/builtin-trace.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c index 9f2a242fa79c..56afe339661a 100644 --- a/tools/perf/builtin-trace.c +++ b/tools/perf/builtin-trace.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #include "util/intlist.h" | 11 | #include "util/intlist.h" |
12 | #include "util/thread_map.h" | 12 | #include "util/thread_map.h" |
13 | #include "util/stat.h" | 13 | #include "util/stat.h" |
14 | #include "trace-event.h" | ||
14 | 15 | ||
15 | #include <libaudit.h> | 16 | #include <libaudit.h> |
16 | #include <stdlib.h> | 17 | #include <stdlib.h> |
@@ -1430,11 +1431,11 @@ static int trace__read_syscall_info(struct trace *trace, int id) | |||
1430 | sc->fmt = syscall_fmt__find(sc->name); | 1431 | sc->fmt = syscall_fmt__find(sc->name); |
1431 | 1432 | ||
1432 | snprintf(tp_name, sizeof(tp_name), "sys_enter_%s", sc->name); | 1433 | snprintf(tp_name, sizeof(tp_name), "sys_enter_%s", sc->name); |
1433 | sc->tp_format = event_format__new("syscalls", tp_name); | 1434 | sc->tp_format = trace_event__tp_format("syscalls", tp_name); |
1434 | 1435 | ||
1435 | if (sc->tp_format == NULL && sc->fmt && sc->fmt->alias) { | 1436 | if (sc->tp_format == NULL && sc->fmt && sc->fmt->alias) { |
1436 | snprintf(tp_name, sizeof(tp_name), "sys_enter_%s", sc->fmt->alias); | 1437 | snprintf(tp_name, sizeof(tp_name), "sys_enter_%s", sc->fmt->alias); |
1437 | sc->tp_format = event_format__new("syscalls", tp_name); | 1438 | sc->tp_format = trace_event__tp_format("syscalls", tp_name); |
1438 | } | 1439 | } |
1439 | 1440 | ||
1440 | if (sc->tp_format == NULL) | 1441 | if (sc->tp_format == NULL) |