summaryrefslogtreecommitdiff
path: root/tools/perf/util/trace-event.h
diff options
context:
space:
mode:
authorAdrian Hunter <adrian.hunter@intel.com>2021-05-30 22:22:59 +0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2021-06-01 10:03:17 -0300
commit67e50ce0e32580d90f64556a51b7cb2a872697ca (patch)
treeea3b3867e600877f6f75f894dc21f13ec0b7c794 /tools/perf/util/trace-event.h
parentcac30400a6d8159e2510a4a258db9c4ac6fbbba5 (diff)
perf scripting: Add perf_session to scripting_context
This is preparation for allowing a script to set the itrace options for the session if they have not already been set. 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-5-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.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/perf/util/trace-event.h b/tools/perf/util/trace-event.h
index a939318b88a6..73f5b29472f7 100644
--- a/tools/perf/util/trace-event.h
+++ b/tools/perf/util/trace-event.h
@@ -73,7 +73,8 @@ struct perf_stat_config;
struct scripting_ops {
const char *name;
const char *dirname; /* For script path .../scripts/<dirname>/... */
- int (*start_script) (const char *script, int argc, const char **argv);
+ int (*start_script)(const char *script, int argc, const char **argv,
+ struct perf_session *session);
int (*flush_script) (void);
int (*stop_script) (void);
void (*process_event) (union perf_event *event,
@@ -107,6 +108,7 @@ struct scripting_context {
struct evsel *evsel;
struct addr_location *al;
struct addr_location *addr_al;
+ struct perf_session *session;
};
void scripting_context__update(struct scripting_context *scripting_context,