diff options
author | Adrian Hunter <adrian.hunter@intel.com> | 2021-05-30 22:22:58 +0300 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2021-06-01 16:03:02 +0300 |
commit | cac30400a6d8159e2510a4a258db9c4ac6fbbba5 (patch) | |
tree | c8084b376db57a363461f224d21d1f6471676743 /tools/perf/util/scripting-engines/trace-event-perl.c | |
parent | 6337bd0c91f66527741e61ecb73b9cff0d7f48f8 (diff) | |
download | linux-cac30400a6d8159e2510a4a258db9c4ac6fbbba5.tar.xz |
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/scripting-engines/trace-event-perl.c')
-rw-r--r-- | tools/perf/util/scripting-engines/trace-event-perl.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/tools/perf/util/scripting-engines/trace-event-perl.c b/tools/perf/util/scripting-engines/trace-event-perl.c index a837aee24674..5bbf00c1179f 100644 --- a/tools/perf/util/scripting-engines/trace-event-perl.c +++ b/tools/perf/util/scripting-engines/trace-event-perl.c @@ -371,9 +371,6 @@ static void perl_process_tracepoint(struct perf_sample *sample, s = nsecs / NSEC_PER_SEC; ns = nsecs - s * NSEC_PER_SEC; - scripting_context->event_data = data; - scripting_context->pevent = evsel->tp_format->tep; - ENTER; SAVETMPS; PUSHMARK(SP); @@ -457,8 +454,9 @@ static void perl_process_event(union perf_event *event, struct perf_sample *sample, struct evsel *evsel, struct addr_location *al, - struct addr_location *addr_al __maybe_unused) + struct addr_location *addr_al) { + scripting_context__update(scripting_context, event, sample, evsel, al, addr_al); perl_process_tracepoint(sample, evsel, al); perl_process_event_generic(event, sample, evsel); } |