]> git.baikalelectronics.ru Git - kernel.git/commit
perf script python: Fix string vs byte array resolving
authorJiri Olsa <jolsa@kernel.org>
Sat, 16 Jul 2016 16:11:18 +0000 (18:11 +0200)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 18 Jul 2016 22:48:04 +0000 (19:48 -0300)
commit7c7cf425ceb60618836fbc7b8cf48265c5539849
tree05febc54f0086c078d723c719eb65bbecf3303a2
parent9d39ee38285a5f71b50971bead15d5e12b61192b
perf script python: Fix string vs byte array resolving

Jirka reported that python code returns all arrays as strings.  This
makes impossible to get all items for byte array tracepoint field
containing 0x00 value item.

Fixing this by scanning full length of the array and returning it as
PyByteArray object in case non printable byte is found.

Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Reported-and-Tested-by: Jiri Pirko <jiri@mellanox.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Steven Rostedt <rostedt@goodmis.org>
Link: http://lkml.kernel.org/r/1468685480-18951-2-git-send-email-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/scripting-engines/trace-event-python.c