public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
To: mingo@kernel.org, hpa@zytor.com, linux-kernel@vger.kernel.org,
	tzanussi@gmail.com, jolsa@kernel.org, namhyung@kernel.org,
	tglx@linutronix.de, linux-tip-commits@vger.kernel.org
Subject: Re: [tip:perf/core] perf script/python: Print array argument as string
Date: Thu, 26 Jun 2014 17:37:27 +0200	[thread overview]
Message-ID: <53AC3E37.1010603@linutronix.de> (raw)
In-Reply-To: <tip-e646fe730a324098a718f1c9b2f349efb99d5457@git.kernel.org>

On 06/12/2014 02:01 PM, tip-bot for Namhyung Kim wrote:

> Commit-ID:  e646fe730a324098a718f1c9b2f349efb99d5457
> Gitweb:     http://git.kernel.org/tip/e646fe730a324098a718f1c9b2f349efb99d5457
> Author:     Namhyung Kim <namhyung@kernel.org>
> AuthorDate: Thu, 29 May 2014 13:44:55 +0900
> Committer:  Jiri Olsa <jolsa@kernel.org>
> CommitDate: Mon, 9 Jun 2014 12:21:03 +0200
> 
> perf script/python: Print array argument as string
> 
> With the Sebastian's change of handling num array argument (of raw
> syscall enter), the script still failed to work like this:

This patch got merged. It fixes something that was introduced by
  "perf script: move the number processing into its own function" [0]
  "perf script: handle the num array type in python properly" [1]

which was not yet merged.

[0] lkml.kernel.org/r/1401207274-8170-1-git-send-email-bigeasy@linutronix.de
[1] lkml.kernel.org/r/1401207274-8170-2-git-send-email-bigeasy@linutronix.de

>   $ perf record -e raw_syscalls:* sleep 1
>   $ perf script -g python
>   $ perf script -s perf-script.py
>   ...
>   Traceback (most recent call last):
>     File "perf-script.py", line 42, in raw_syscalls__sys_enter
>       (id, args),
>   TypeError: %u format: a number is required, not list
>   Fatal Python error: problem in Python trace event handler
>   Aborted (core dumped)
> 
> This is because the generated script tries to print the array arg as
> unsigned integer (%u).  Since the python seems to convert arguments to
> strings by default, just using %s solved the problem for me.

Sebastian

  reply	other threads:[~2014-06-26 15:37 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-27 16:14 [PATCH 1/2] perf script: move the number processing into its own function Sebastian Andrzej Siewior
2014-05-27 16:14 ` [PATCH 2/2] perf script: handle the num array type in python properly Sebastian Andrzej Siewior
2014-05-29  4:43   ` Namhyung Kim
2014-05-30  9:39     ` Sebastian Andrzej Siewior
2014-05-29  4:44   ` [PATCH] perf script/python: Print array argument as string Namhyung Kim
2014-06-03 18:55     ` Jiri Olsa
2014-06-12 12:01     ` [tip:perf/core] " tip-bot for Namhyung Kim
2014-06-26 15:37       ` Sebastian Andrzej Siewior [this message]
2014-06-26 19:22         ` Jiri Olsa
2014-05-29  4:39 ` [PATCH 1/2] perf script: move the number processing into its own function Namhyung Kim

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=53AC3E37.1010603@linutronix.de \
    --to=bigeasy@linutronix.de \
    --cc=hpa@zytor.com \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=namhyung@kernel.org \
    --cc=tglx@linutronix.de \
    --cc=tzanussi@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