]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit - tools/perf/builtin-trace.c
perf trace: Group per syscall arg formatter info into one struct
authorArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 17 Jul 2017 18:22:47 +0000 (15:22 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 19 Jul 2017 02:14:24 +0000 (23:14 -0300)
commit82d4a1109fc302795a184a328f60ad28bf7b5989
tree7e5dbedebcbd35a2f265c76966ec7e520b2286cc
parent65dfa1e7799edd114fbd3949f2783f4e69fd0305
perf trace: Group per syscall arg formatter info into one struct

Instead of having syscall_fmt.{arg_scnprintf,arg_parm}, introduce
struct syscall_arg_fmt and have these two, paving the way for more
state to change the formatting algorithms.

For instance, in the 'fcntl' 'cmd' case it is better not to suppress
it when being zero, showing instead its name "DUPFD".

We had that in an ad-hoc way just for strarrays, but with more involved
cases like fcntl, that can't be done with just a strarray, we'll need
a ".show_zero" arg in the 'cmd' syscall_arg_fmt.

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/n/tip-ch06o2j72zbjx5xww4qp67au@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/builtin-trace.c