perf auxtrace: Add itrace d+o option to direct debug log to stdout
authorAdrian Hunter <adrian.hunter@intel.com>
Wed, 27 Oct 2021 08:03:33 +0000 (11:03 +0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 27 Oct 2021 19:20:45 +0000 (16:20 -0300)
It can be useful to see debug output in between normal output.

Add 'o' to the flags of debug option 'd', so that '--itrace=d+o' can
specify output of the debug log to stdout.

Reviewed-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Link: https://lore.kernel.org/r/20211027080334.365596-6-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/Documentation/itrace.txt
tools/perf/util/auxtrace.h

index 141449e97bed4a5704d7c6ea269f8f9e8c83c18b..c52755481e2f350e0c0e6c6176df24bcf117c719 100644 (file)
@@ -62,5 +62,6 @@
        debug messages will or will not be logged. Each flag must be preceded
        by either '+' or '-'. The flags are:
                a       all perf events
+               o       output to stdout
 
        If supported, the 'q' option may be repeated to increase the effect.
index 889f976ea1a0b5fdf6494d67c70cbad3690a7a5c..bbf0d78c64017df9ba97a9d50610773011ea2c2e 100644 (file)
@@ -59,6 +59,7 @@ enum itrace_period_type {
 #define AUXTRACE_ERR_FLG_DATA_LOST     (1 << ('l' - 'a'))
 
 #define AUXTRACE_LOG_FLG_ALL_PERF_EVTS (1 << ('a' - 'a'))
+#define AUXTRACE_LOG_FLG_USE_STDOUT    (1 << ('o' - 'a'))
 
 /**
  * struct itrace_synth_opts - AUX area tracing synthesis options.
@@ -641,6 +642,7 @@ bool auxtrace__evsel_is_auxtrace(struct perf_session *session,
 "                              d[flags]:               create a debug log\n" \
 "                                                      each flag must be preceded by + or -\n" \
 "                                                      log flags are: a (all perf events)\n" \
+"                                                                     o (output to stdout)\n" \
 "                              f:                      synthesize first level cache events\n" \
 "                              m:                      synthesize last level cache events\n" \
 "                              t:                      synthesize TLB events\n" \