diff options
author | Adrian Hunter <adrian.hunter@intel.com> | 2021-05-25 12:51:11 +0300 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2021-05-25 10:07:17 -0300 |
commit | 2ede92173faa14ed6a5272b3e7a6dd6daae3b161 (patch) | |
tree | 15678e58dc7c9a8acedd252c1adf9775165e40f4 /tools/perf/builtin-script.c | |
parent | 0db2134069275d1177c2dd531cbc73578b7ec8ac (diff) | |
download | lwn-2ede92173faa14ed6a5272b3e7a6dd6daae3b161.tar.gz lwn-2ede92173faa14ed6a5272b3e7a6dd6daae3b161.zip |
perf scripting python: Add auxtrace error
Add auxtrace_error to general python scripting.
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/20210525095112.1399-10-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/builtin-script.c')
-rw-r--r-- | tools/perf/builtin-script.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tools/perf/builtin-script.c b/tools/perf/builtin-script.c index 69bce65ea430..7a7a19f52db5 100644 --- a/tools/perf/builtin-script.c +++ b/tools/perf/builtin-script.c @@ -2432,6 +2432,17 @@ static int process_switch_event(struct perf_tool *tool, sample->tid); } +static int process_auxtrace_error(struct perf_session *session, + union perf_event *event) +{ + if (scripting_ops && scripting_ops->process_auxtrace_error) { + scripting_ops->process_auxtrace_error(session, event); + return 0; + } + + return perf_event__process_auxtrace_error(session, event); +} + static int process_lost_event(struct perf_tool *tool, union perf_event *event, @@ -2571,6 +2582,8 @@ static int __cmd_script(struct perf_script *script) } if (script->show_switch_events || (scripting_ops && scripting_ops->process_switch)) script->tool.context_switch = process_switch_event; + if (scripting_ops && scripting_ops->process_auxtrace_error) + script->tool.auxtrace_error = process_auxtrace_error; if (script->show_namespace_events) script->tool.namespaces = process_namespaces_event; if (script->show_cgroup_events) |