From 67e50ce0e32580d90f64556a51b7cb2a872697ca Mon Sep 17 00:00:00 2001 From: Adrian Hunter Date: Sun, 30 May 2021 22:22:59 +0300 Subject: 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 Cc: Andi Kleen Cc: Jiri Olsa Link: https://lore.kernel.org/r/20210530192308.7382-5-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/util/scripting-engines/trace-event-perl.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'tools/perf/util/scripting-engines/trace-event-perl.c') diff --git a/tools/perf/util/scripting-engines/trace-event-perl.c b/tools/perf/util/scripting-engines/trace-event-perl.c index 5bbf00c1179f..32a721b3e9a5 100644 --- a/tools/perf/util/scripting-engines/trace-event-perl.c +++ b/tools/perf/util/scripting-engines/trace-event-perl.c @@ -473,11 +473,14 @@ static void run_start_sub(void) /* * Start trace script */ -static int perl_start_script(const char *script, int argc, const char **argv) +static int perl_start_script(const char *script, int argc, const char **argv, + struct perf_session *session) { const char **command_line; int i, err = 0; + scripting_context->session = session; + command_line = malloc((argc + 2) * sizeof(const char *)); command_line[0] = ""; command_line[1] = script; -- cgit v1.2.3-70-g09d2