perf trace: Don't print zeroed args
tip-bot for Arnaldo Carvalho de Melo
merge botCommit-ID: 22ae5cf1c9b4e27a3efe96d8fa6d038560a2cf23 Gitweb: http://git.kernel.org/tip/22ae5cf1c9b4e27a3efe96d8fa6d038560a2cf23 Author: Arnaldo Carvalho de Melo <[email protected]> AuthorDate: Thu, 12 Sep 2013 11:27:34 -0300 Committer: Arnaldo Carvalho de Melo <[email protected]> CommitDate: Wed, 9 Oct 2013 11:11:06 -0300
perf trace: Don't print zeroed args
This way we make the output more compact.
If somebody complain (and provide a sane reason why we would like to see zeroes) we can make it an optional, ~/.perfconfig configurable knob.
Cc Adrian Hunter <[email protected]>
Cc David Ahern <[email protected]>
Cc Frederic Weisbecker <[email protected]>
Cc Jiri Olsa <[email protected]>
Cc Mike Galbraith <[email protected]>
Cc Paul Mackerras <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Stephane Eranian <[email protected]>
Signed-off-by Arnaldo Carvalho de Melo <[email protected]>
--- tools/perf/builtin-trace.c | 3 +++ 1 file changed, 3 insertions(+)
tools/perf/builtin-trace.c +3 -0
@@ -818,6 +818,9 @@ static size_t syscall__scnprintf_args(struct syscall *sc, char *bf, size_t size,if (arg.mask & bit)continue ; +if (args[arg.idx] ==0 ) +continue ; + printed +=scnprintf (bf + printed, size - printed,"%s%s: " , printed ?", " :"" , field->name);if (sc->arg_scnprintf && sc->arg_scnprintf[arg.idx]) {