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>
This commit is contained in:
@@ -98,6 +98,9 @@ size_t syscall_arg__scnprintf_fd(char *bf, size_t size, struct syscall_arg *arg)
|
||||
size_t syscall_arg__scnprintf_hex(char *bf, size_t size, struct syscall_arg *arg);
|
||||
#define SCA_HEX syscall_arg__scnprintf_hex
|
||||
|
||||
size_t syscall_arg__scnprintf_ptr(char *bf, size_t size, struct syscall_arg *arg);
|
||||
#define SCA_PTR syscall_arg__scnprintf_ptr
|
||||
|
||||
size_t syscall_arg__scnprintf_int(char *bf, size_t size, struct syscall_arg *arg);
|
||||
#define SCA_INT syscall_arg__scnprintf_int
|
||||
|
||||
|
Reference in New Issue
Block a user