aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/trace-event.h
diff options
context:
space:
mode:
authorAdrian Hunter <adrian.hunter@intel.com>2021-05-30 22:22:58 +0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2021-06-01 10:03:02 -0300
commitcac30400a6d8159e2510a4a258db9c4ac6fbbba5 (patch)
treec8084b376db57a363461f224d21d1f6471676743 /tools/perf/util/trace-event.h
parentperf scripting python: Simplify perf-trace-context module functions (diff)
downloadlinux-dev-cac30400a6d8159e2510a4a258db9c4ac6fbbba5.tar.xz
linux-dev-cac30400a6d8159e2510a4a258db9c4ac6fbbba5.zip
perf scripting: Add scripting_context__update()
Move scripting_context update to a separate function and add the arguments of ->process_event() to it. This prepares the way for adding more methods to the perf_trace_context module, by providing the context information that they will need. Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Cc: Andi Kleen <ak@linux.intel.com> Cc: Jiri Olsa <jolsa@redhat.com> Link: https://lore.kernel.org/r/20210530192308.7382-4-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/trace-event.h')
-rw-r--r--tools/perf/util/trace-event.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/tools/perf/util/trace-event.h b/tools/perf/util/trace-event.h
index 35c354a15c3a..a939318b88a6 100644
--- a/tools/perf/util/trace-event.h
+++ b/tools/perf/util/trace-event.h
@@ -11,6 +11,7 @@ union perf_event;
struct perf_tool;
struct thread;
struct tep_plugin_list;
+struct evsel;
struct trace_event {
struct tep_handle *pevent;
@@ -101,8 +102,20 @@ void setup_python_scripting(void);
struct scripting_context {
struct tep_handle *pevent;
void *event_data;
+ union perf_event *event;
+ struct perf_sample *sample;
+ struct evsel *evsel;
+ struct addr_location *al;
+ struct addr_location *addr_al;
};
+void scripting_context__update(struct scripting_context *scripting_context,
+ union perf_event *event,
+ struct perf_sample *sample,
+ struct evsel *evsel,
+ struct addr_location *al,
+ struct addr_location *addr_al);
+
int common_pc(struct scripting_context *context);
int common_flags(struct scripting_context *context);
int common_lock_depth(struct scripting_context *context);