perf trace: Show NULL when syscall pointer args are 0
authorArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 17 Dec 2018 15:21:09 +0000 (12:21 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 18 Dec 2018 19:15:18 +0000 (16:15 -0300)
commitce05539f20b337221d3310baf73b45317dab067c
tree252646078cb8ae0d81b243a65a62a264c64b4280
parent2c83dfae021306d528b21dceb8d128ca16524c5a
perf trace: Show NULL when syscall pointer args are 0

Matching strace's output format. The 'format' file for the syscall
tracepoints have an indication if the arg is a pointer, with some
exceptions like 'mmap' that has its first arg as an 'unsigned long', so
use a heuristic using the argument name, i.e. if it contains the 'addr'
substring, format it with the pointer formatter.

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Luis Cláudio Gonçalves <lclaudio@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Wang Nan <wangnan0@huawei.com>
Link: https://lkml.kernel.org/n/tip-ddghemr8qrm6i0sb8awznbze@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/builtin-trace.c
tools/perf/trace/beauty/beauty.h