Skip to content

RFC perf script python: Provide perf_sample dict to all handlers

Arun Kalyanasundaram lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest4 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4perf script python: Allocate memory only if handler existstools/perf/util/scripting-engines/trace-event-python.c+22 -160 replies
2/4perf script python: Refactor creation of perf sample dicttools/perf/util/scripting-engines/trace-event-python.c+53 -410 replies
3/4perf script python: Add perf_sample dict to tracepoint handlerstools/perf/util/scripting-engines/trace-event-python.c+36 -10 replies
4/4perf script python: Generate hooks with additional argumenttools/perf/util/scripting-engines/trace-event-python.c+17 -30 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC 0/4] perf script python: Provide perf_sample dict to all handlers

The process_event python hook receives a dict with all perf_sample entries.

Other handlers (e.g. trace_unhandled, python_process_tracepoint) predate the introduction of this dict and do not receive it. This patch series adds the dict to all handlers, aiming to unify the information passed to them.

This change adds an additional argument to the affected handlers. To keep backwards compatibility (and avoid unnecessary work), do not pass the aforementioned dict if the number of arguments signals that handler version predates this change.

Initial Discussion: https://lkml.org/lkml/2017/7/1/108

Arun Kalyanasundaram (4):
perf script python: Allocate memory only if handler exists perf script python: Refactor creation of perf sample dict perf script python: Add perf_sample dict to tracepoint handlers perf script python: Generate hooks with additional argument

 .../util/scripting-engines/trace-event-python.c    | 189 ++++++++++++++-------
 1 file changed, 128 insertions(+), 61 deletions(-)
Signature · 1 line
2.13.2.932.g7449e964c-goog