diff options
author | Adrian Hunter <adrian.hunter@intel.com> | 2021-10-27 11:03:34 +0300 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2021-10-27 16:21:01 -0300 |
commit | 624ff63abfd368fef5fa18ce34e025bc4e37dee5 (patch) | |
tree | 2620521bce727af86ec70bf6cc6f9044a624af2c /tools/perf/util/intel-pt-decoder | |
parent | 4b2b2c6a7d244464b6142cdbfef441de1499e7ff (diff) | |
download | lwn-624ff63abfd368fef5fa18ce34e025bc4e37dee5.tar.gz lwn-624ff63abfd368fef5fa18ce34e025bc4e37dee5.zip |
perf intel-pt: Support itrace d+o option to direct debug log to stdout
It can be useful to see debug output in between normal output.
Add support for AUXTRACE_LOG_FLG_USE_STDOUT to Intel PT.
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-7-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/intel-pt-decoder')
-rw-r--r-- | tools/perf/util/intel-pt-decoder/intel-pt-log.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/perf/util/intel-pt-decoder/intel-pt-log.c b/tools/perf/util/intel-pt-decoder/intel-pt-log.c index 09feb5b07d32..5f5dfc8753f3 100644 --- a/tools/perf/util/intel-pt-decoder/intel-pt-log.c +++ b/tools/perf/util/intel-pt-decoder/intel-pt-log.c @@ -82,10 +82,10 @@ static int intel_pt_log_open(void) if (f) return 0; - if (!log_name[0]) - return -1; - - f = fopen(log_name, "w+"); + if (log_name[0]) + f = fopen(log_name, "w+"); + else + f = stdout; if (!f) { intel_pt_enable_logging = false; return -1; |