From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755282AbdKCOT0 (ORCPT ); Fri, 3 Nov 2017 10:19:26 -0400 Received: from terminus.zytor.com ([65.50.211.136]:45531 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751370AbdKCOTU (ORCPT ); Fri, 3 Nov 2017 10:19:20 -0400 Date: Fri, 3 Nov 2017 07:16:54 -0700 From: tip-bot for Arnaldo Carvalho de Melo Message-ID: Cc: jolsa@kernel.org, tglx@linutronix.de, namhyung@kernel.org, mingo@kernel.org, yuzhoujian@didichuxing.com, acme@redhat.com, dsahern@gmail.com, wangnan0@huawei.com, linux-kernel@vger.kernel.org, hpa@zytor.com, adrian.hunter@intel.com Reply-To: hpa@zytor.com, linux-kernel@vger.kernel.org, adrian.hunter@intel.com, yuzhoujian@didichuxing.com, acme@redhat.com, mingo@kernel.org, wangnan0@huawei.com, dsahern@gmail.com, tglx@linutronix.de, jolsa@kernel.org, namhyung@kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip:perf/core] perf script: Use event_format__fprintf() Git-Commit-ID: 894f3f1732cb4ae543d406e4fca1585e8c303a1c X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: 894f3f1732cb4ae543d406e4fca1585e8c303a1c Gitweb: https://git.kernel.org/tip/894f3f1732cb4ae543d406e4fca1585e8c303a1c Author: Arnaldo Carvalho de Melo AuthorDate: Thu, 26 Oct 2017 10:26:52 -0300 Committer: Arnaldo Carvalho de Melo CommitDate: Fri, 27 Oct 2017 09:10:09 -0300 perf script: Use event_format__fprintf() 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 Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Cc: yuzhoujian Link: http://lkml.kernel.org/n/tip-jmwx4pgfezw98ezfoj9t957s@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/builtin-script.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tools/perf/builtin-script.c b/tools/perf/builtin-script.c index af02670..b27f216 100644 --- a/tools/perf/builtin-script.c +++ b/tools/perf/builtin-script.c @@ -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);