]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
perf script: Use event_format__fprintf()
authorArnaldo Carvalho de Melo <acme@redhat.com>
Thu, 26 Oct 2017 13:26:52 +0000 (10:26 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Fri, 27 Oct 2017 12:10:09 +0000 (09:10 -0300)
Another case where we a1a587073ccd ("perf script: Use fprintf like
printing uniformly") forgot to redirect output to the FILE descriptor,
fix this too.

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Wang Nan <wangnan0@huawei.com>
Cc: yuzhoujian <yuzhoujian@didichuxing.com>
Link: http://lkml.kernel.org/n/tip-jmwx4pgfezw98ezfoj9t957s@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/builtin-script.c

index af0267072d433914a216fc6ca92934ea6b649f6b..b27f21638207e91a8efe98303cf4706781a2b3f0 100644 (file)
@@ -1465,9 +1465,10 @@ static void process_event(struct perf_script *script,
                return;
        }
 
-       if (PRINT_FIELD(TRACE))
-               event_format__print(evsel->tp_format, sample->cpu,
-                                   sample->raw_data, sample->raw_size);
+       if (PRINT_FIELD(TRACE)) {
+               event_format__fprintf(evsel->tp_format, sample->cpu,
+                                     sample->raw_data, sample->raw_size, fp);
+       }
 
        if (attr->type == PERF_TYPE_SYNTH && PRINT_FIELD(SYNTH))
                perf_sample__fprintf_synth(sample, evsel, fp);