perf trace: Don't print zeroed args
authorArnaldo Carvalho de Melo <[email protected]>
Thu, 12 Sep 2013 14:27:34 +0000 (11:27 -0300)
committerArnaldo Carvalho de Melo <[email protected]>
Wed, 9 Oct 2013 14:11:06 +0000 (11:11 -0300)
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]>
Link: http://lkml.kernel.org/n/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
tools/perf/builtin-trace.c

index 903416c573af5d504f4b5f0f72569b03f65b5323..516f6b39b4b667fd15ad6dcd110e170b5b0c0a92 100644 (file)
@@ -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]) {