diff options
| author | Arnaldo Carvalho de Melo <[email protected]> | 2013-09-12 11:27:34 -0300 |
|---|---|---|
| committer | Arnaldo Carvalho de Melo <[email protected]> | 2013-10-09 11:11:06 -0300 |
| commit | 22ae5cf1c9b4e27a3efe96d8fa6d038560a2cf23 (patch) | |
| tree | c2608dcfff216af60a6e976b832694704a5a6beb | |
| parent | 770480592084d2c114adedfbe6740e345aaf2279 (diff) | |
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]>
Link: http://lkml.kernel.org/n/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
| -rw-r--r-- | tools/perf/builtin-trace.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c index 903416c573af..516f6b39b4b6 100644 --- a/tools/perf/builtin-trace.c +++ b/tools/perf/builtin-trace.c @@ -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]) { |