From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932265AbdKCOUC (ORCPT ); Fri, 3 Nov 2017 10:20:02 -0400 Received: from terminus.zytor.com ([65.50.211.136]:50235 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752867AbdKCOUA (ORCPT ); Fri, 3 Nov 2017 10:20:00 -0400 Date: Fri, 3 Nov 2017 07:16:28 -0700 From: tip-bot for Arnaldo Carvalho de Melo Message-ID: Cc: wangnan0@huawei.com, tglx@linutronix.de, namhyung@kernel.org, jolsa@kernel.org, acme@redhat.com, mpe@ellerman.id.au, dsahern@gmail.com, adrian.hunter@intel.com, ak@linux.intel.com, hpa@zytor.com, yuzhoujian@didichuxing.com, mingo@kernel.org, linux-kernel@vger.kernel.org Reply-To: namhyung@kernel.org, tglx@linutronix.de, jolsa@kernel.org, wangnan0@huawei.com, adrian.hunter@intel.com, dsahern@gmail.com, mpe@ellerman.id.au, acme@redhat.com, hpa@zytor.com, ak@linux.intel.com, linux-kernel@vger.kernel.org, mingo@kernel.org, yuzhoujian@didichuxing.com To: linux-tip-commits@vger.kernel.org Subject: [tip:perf/core] perf script: Use pr_debug where appropriate Git-Commit-ID: 5ce2c5b4e484a87a8af48649775796fb349684db 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: 5ce2c5b4e484a87a8af48649775796fb349684db Gitweb: https://git.kernel.org/tip/5ce2c5b4e484a87a8af48649775796fb349684db Author: Arnaldo Carvalho de Melo AuthorDate: Thu, 26 Oct 2017 09:55:22 -0300 Committer: Arnaldo Carvalho de Melo CommitDate: Fri, 27 Oct 2017 09:10:09 -0300 perf script: Use pr_debug where appropriate We have facilities for reporting unexpected, unlikely errors, use them. Cc: Adrian Hunter Cc: Andi Kleen Cc: David Ahern Cc: Jiri Olsa Cc: Michael Ellerman Cc: Namhyung Kim Cc: Wang Nan Cc: yuzhoujian Link: http://lkml.kernel.org/n/tip-c7j22xfjf1j773g7ufp607q0@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/builtin-script.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/tools/perf/builtin-script.c b/tools/perf/builtin-script.c index db4ff15..af02670 100644 --- a/tools/perf/builtin-script.c +++ b/tools/perf/builtin-script.c @@ -769,27 +769,26 @@ static int grab_bb(u8 *buffer, u64 start, u64 end, * but the exit is not. Let the caller patch it up. */ if (kernel != machine__kernel_ip(machine, end)) { - printf("\tblock %" PRIx64 "-%" PRIx64 " transfers between kernel and user\n", - start, end); + pr_debug("\tblock %" PRIx64 "-%" PRIx64 " transfers between kernel and user\n", start, end); return -ENXIO; } memset(&al, 0, sizeof(al)); if (end - start > MAXBB - MAXINSN) { if (last) - printf("\tbrstack does not reach to final jump (%" PRIx64 "-%" PRIx64 ")\n", start, end); + pr_debug("\tbrstack does not reach to final jump (%" PRIx64 "-%" PRIx64 ")\n", start, end); else - printf("\tblock %" PRIx64 "-%" PRIx64 " (%" PRIu64 ") too long to dump\n", start, end, end - start); + pr_debug("\tblock %" PRIx64 "-%" PRIx64 " (%" PRIu64 ") too long to dump\n", start, end, end - start); return 0; } thread__find_addr_map(thread, *cpumode, MAP__FUNCTION, start, &al); if (!al.map || !al.map->dso) { - printf("\tcannot resolve %" PRIx64 "-%" PRIx64 "\n", start, end); + pr_debug("\tcannot resolve %" PRIx64 "-%" PRIx64 "\n", start, end); return 0; } if (al.map->dso->data.status == DSO_DATA_STATUS_ERROR) { - printf("\tcannot resolve %" PRIx64 "-%" PRIx64 "\n", start, end); + pr_debug("\tcannot resolve %" PRIx64 "-%" PRIx64 "\n", start, end); return 0; } @@ -802,7 +801,7 @@ static int grab_bb(u8 *buffer, u64 start, u64 end, *is64bit = al.map->dso->is_64_bit; if (len <= 0) - printf("\tcannot fetch code for block at %" PRIx64 "-%" PRIx64 "\n", + pr_debug("\tcannot fetch code for block at %" PRIx64 "-%" PRIx64 "\n", start, end); return len; }