Skip to contentSkip to conversation

perf trace: Write to stderr by default

tip:perf/core tip-bot for Milian Wolff 1 participant 1 message Aug 6, 2015 perf events

lore
Share & tools
lore

tip-bot for Milian Wolff

author merge bot
#0 lore raw
Commit-ID:  007d66a0bd43d886eb3e4aceaf1a96b8743ccaff
Gitweb:     http://git.kernel.org/tip/007d66a0bd43d886eb3e4aceaf1a96b8743ccaff
Author:     Milian Wolff <[email protected]>
AuthorDate: Wed, 5 Aug 2015 16:52:23 -0300
Committer:  Arnaldo Carvalho de Melo <[email protected]>
CommitDate: Wed, 5 Aug 2015 16:52:23 -0300

perf trace: Write to stderr by default

Without this patch, it is cumbersome to read the trace output but ignoring the normal, potentially verbose, output of the debuggee. One common example is doing something like the following:

perf trace -s find /tmp > /dev/null

Without this patch, the trace summary will be lost. Now, it will still be printed at the end. This behavior is also applied by strace.

---
 tools/perf/builtin-trace.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/perf/builtin-trace.c +1 -1
index 98d423e..a474970 100644
@@ -2965,7 +2965,7 @@ int cmd_trace(int argc, const char **argv, const char *prefix __maybe_unused)
 			.mmap_pages    = UINT_MAX,
 			.proc_map_timeout  = 500,
 		},
-		.output = stdout,
+		.output = stderr,
 		.show_comm = true,
 		.trace_syscalls = true,
 	};