perf trace: Factor out the initialization of syscal_arg_fmt->scnprintf
authorArnaldo Carvalho de Melo <acme@redhat.com>
Thu, 3 Oct 2019 18:57:42 +0000 (15:57 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 7 Oct 2019 15:22:18 +0000 (12:22 -0300)
commit8d1d4ff5e239d9ef385444bc0d855127d7b32754
treec4895d14f423f689f16886614f59df224e0a504b
parent3714437d3fcc7956cabcb0077f2a506b61160a56
perf trace: Factor out the initialization of syscal_arg_fmt->scnprintf

We set the default scnprint routines for the syscall args based on its
type or on heuristics based on its names, now we'll use this for
tracepoints as well, so move it out of syscall__set_arg_fmts() and into
a routine that receive just an array of syscall_arg_fmt entries + the
tracepoint format fields list.

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>
Link: https://lkml.kernel.org/n/tip-xs3x0zzyes06c7scdsjn01ty@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/builtin-trace.c