perf python: Add support to resolve tracepoint fields
authorJiri Olsa <jolsa@kernel.org>
Sun, 10 Jul 2016 11:08:00 +0000 (13:08 +0200)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 12 Jul 2016 19:19:16 +0000 (16:19 -0300)
commitbae57e3825a3dded15f61cd20c6757d60ad6c712
tree398fd3897e531743e28d0f90a22203066864b2bd
parent377f698db12150a1cf79987dca1d3990fa14a1f8
perf python: Add support to resolve tracepoint fields

Adding tp_getattro callback for sample event. It resolves tracepoint
fields in runtime.

It's now possible to access tracepoint fields in normal fashion like
hardcoded ones (see the example in the next patch).

Reported-and-Tested-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1468148882-10362-9-git-send-email-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/python.c