From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754648AbdKCOSk (ORCPT ); Fri, 3 Nov 2017 10:18:40 -0400 Received: from terminus.zytor.com ([65.50.211.136]:41033 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750794AbdKCOSi (ORCPT ); Fri, 3 Nov 2017 10:18:38 -0400 Date: Fri, 3 Nov 2017 07:16:03 -0700 From: tip-bot for Arnaldo Carvalho de Melo Message-ID: Cc: adrian.hunter@intel.com, acme@redhat.com, dsahern@gmail.com, yuzhoujian@didichuxing.com, jolsa@kernel.org, namhyung@kernel.org, tglx@linutronix.de, mingo@kernel.org, linux-kernel@vger.kernel.org, wangnan0@huawei.com, hpa@zytor.com Reply-To: tglx@linutronix.de, wangnan0@huawei.com, mingo@kernel.org, linux-kernel@vger.kernel.org, hpa@zytor.com, adrian.hunter@intel.com, acme@redhat.com, dsahern@gmail.com, jolsa@kernel.org, yuzhoujian@didichuxing.com, namhyung@kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip:perf/core] perf script: Add a few missing conversions to fprintf style Git-Commit-ID: 69c71252298acad7a25e9499929f723790f48e26 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: 69c71252298acad7a25e9499929f723790f48e26 Gitweb: https://git.kernel.org/tip/69c71252298acad7a25e9499929f723790f48e26 Author: Arnaldo Carvalho de Melo AuthorDate: Thu, 26 Oct 2017 09:51:13 -0300 Committer: Arnaldo Carvalho de Melo CommitDate: Fri, 27 Oct 2017 09:10:09 -0300 perf script: Add a few missing conversions to fprintf style In a1a587073ccd ("perf script: Use fprintf like printing uniformly") there were a few cases that were missed, fix it. Reported-by: yuzhoujian Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-sq9hvfk5mkjdqzlpyiq7jkos@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/builtin-script.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/tools/perf/builtin-script.c b/tools/perf/builtin-script.c index a3add2c..db4ff15 100644 --- a/tools/perf/builtin-script.c +++ b/tools/perf/builtin-script.c @@ -1447,7 +1447,7 @@ static void process_event(struct perf_script *script, perf_sample__fprintf_start(sample, thread, evsel, fp); if (PRINT_FIELD(PERIOD)) - printf("%10" PRIu64 " ", sample->period); + fprintf(fp, "%10" PRIu64 " ", sample->period); if (PRINT_FIELD(EVNAME)) { const char *evname = perf_evsel__name(evsel); @@ -1455,8 +1455,7 @@ static void process_event(struct perf_script *script, if (!script->name_width) script->name_width = perf_evlist__max_name_len(script->session->evlist); - printf("%*s: ", script->name_width, - evname ? evname : "[unknown]"); + fprintf(fp, "%*s: ", script->name_width, evname ?: "[unknown]"); } if (print_flags) @@ -1513,8 +1512,8 @@ static void process_event(struct perf_script *script, perf_sample__fprintf_insn(sample, attr, thread, machine, fp); if (PRINT_FIELD(PHYS_ADDR)) - printf("%16" PRIx64, sample->phys_addr); - printf("\n"); + fprintf(fp, "%16" PRIx64, sample->phys_addr); + fprintf(fp, "\n"); } static struct scripting_ops *scripting_ops;