linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jiri Olsa <jolsa@redhat.com>
To: Arun Kalyanasundaram <arunkaly@google.com>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>,
	linux-kernel@vger.kernel.org,
	Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@redhat.com>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Jiri Olsa <jolsa@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>,
	"David S . Miller" <davem@davemloft.net>,
	SeongJae Park <sj38.park@gmail.com>,
	davidcc@google.com, Stephane Eranian <eranian@google.com>
Subject: Re: [RFC 0/4] perf script python: Provide perf_sample dict to all handlers
Date: Tue, 18 Jul 2017 10:35:38 +0200	[thread overview]
Message-ID: <20170718083538.GA22545@krava> (raw)
In-Reply-To: <20170717221040.88148-1-arunkaly@google.com>

On Mon, Jul 17, 2017 at 03:10:36PM -0700, Arun Kalyanasundaram wrote:
> 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(-)

looks good, but any idea the perf-script.py output gives
some trash at the end of 'comm' args? like:

sched__sched_stat_runtime     1 199971.010182869    21999 perf                  comm=perf^@^@-x86_64-l^@, pid=21999


thanks,
jirka

  parent reply	other threads:[~2017-07-18  8:35 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-17 22:10 [RFC 0/4] perf script python: Provide perf_sample dict to all handlers Arun Kalyanasundaram
2017-07-17 22:10 ` [RFC 1/4] perf script python: Allocate memory only if handler exists Arun Kalyanasundaram
2017-07-17 22:10 ` [RFC 2/4] perf script python: Refactor creation of perf sample dict Arun Kalyanasundaram
2017-07-17 22:10 ` [RFC 3/4] perf script python: Add perf_sample dict to tracepoint handlers Arun Kalyanasundaram
2017-07-17 22:10 ` [RFC 4/4] perf script python: Generate hooks with additional argument Arun Kalyanasundaram
2017-07-18  8:35 ` Jiri Olsa [this message]
2017-07-18 18:18   ` [RFC 0/4] perf script python: Provide perf_sample dict to all handlers Arun Kalyanasundaram

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170718083538.GA22545@krava \
    --to=jolsa@redhat.com \
    --cc=acme@kernel.org \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=arunkaly@google.com \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=davidcc@google.com \
    --cc=eranian@google.com \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=sj38.park@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).