[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <53AC3E37.1010603@linutronix.de>
Date: Thu, 26 Jun 2014 17:37:27 +0200
From: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
To: mingo@...nel.org, hpa@...or.com, linux-kernel@...r.kernel.org,
tzanussi@...il.com, jolsa@...nel.org, namhyung@...nel.org,
tglx@...utronix.de, linux-tip-commits@...r.kernel.org
Subject: Re: [tip:perf/core] perf script/python: Print array argument as string
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@...nel.org>
> AuthorDate: Thu, 29 May 2014 13:44:55 +0900
> Committer: Jiri Olsa <jolsa@...nel.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@...utronix.de
[1] lkml.kernel.org/r/1401207274-8170-2-git-send-email-bigeasy@...utronix.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists