Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1694709

Re: [PATCH v2 0/5] perf script python: Provide sample dict to all handlers

From Jiri Olsa <jolsa@redhat.com>
Newsgroups linux.kernel
Subject Re: [PATCH v2 0/5] perf script python: Provide sample dict to all handlers
Date 2017-07-24 15:30 +0200
Message-ID <u6LAS-5qf-21@gated-at.bofh.it> (permalink)
References <u5Ohr-20O-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Fri, Jul 21, 2017 at 03:04:17PM -0700, Arun Kalyanasundaram wrote:
> v2: - Add sample_read struct to the dict (in 3/5).
>     - Increase reference count of callchain in process tracepoint to
>       avoid unnecessary garbage collection (in 4/5).
> 
> The process_event python hook receives a dict with most 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.
> 
> In addition, provide time_enabled, time_running and counter value in the perf_sample dict.
> 
> Initial Discussion: https://lkml.org/lkml/2017/7/1/108
> 
> Arun Kalyanasundaram (5):
>   perf script python: Allocate memory only if handler exists
>   perf script python: Refactor creation of perf sample dict
>   perf script python: Add sample_read to dict
>   perf script python: Add perf_sample dict to tracepoint handlers
>   perf script python: Generate hooks with additional argument
> 

looks good,

Acked-by: Jiri Olsa <jolsa@kernel.org>

thanks,
jirka

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH v2 0/5] perf script python: Provide sample dict to all handlers Arun Kalyanasundaram <arunkaly@google.com> - 2017-07-22 00:10 +0200
  [PATCH v2 1/5] perf script python: Allocate memory only if handler exists Arun Kalyanasundaram <arunkaly@google.com> - 2017-07-22 00:10 +0200
    [tip:perf/core] perf script python: Allocate memory only if handler  exists tip-bot for Arun Kalyanasundaram <tipbot@zytor.com> - 2017-07-26 19:30 +0200
  Re: [PATCH v2 0/5] perf script python: Provide sample dict to all  handlers Jiri Olsa <jolsa@redhat.com> - 2017-07-24 15:30 +0200

csiph-web