Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 894f3f17 authored by Arnaldo Carvalho de Melo's avatar Arnaldo Carvalho de Melo
Browse files

perf script: Use event_format__fprintf()

Another case where we a1a58707 ("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: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 5ce2c5b4
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -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);