From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Ingo Molnar <mingo@kernel.org>
Cc: linux-kernel@vger.kernel.org, Andi Kleen <ak@linux.intel.com>,
Arnaldo Carvalho de Melo <acme@redhat.com>
Subject: [PATCH 04/11] perf stat: Only print NMI watchdog hint when enabled
Date: Tue, 6 Jun 2017 16:26:43 -0300 [thread overview]
Message-ID: <20170606192650.20737-5-acme@kernel.org> (raw)
In-Reply-To: <20170606192650.20737-1-acme@kernel.org>
From: Andi Kleen <ak@linux.intel.com>
Only print the NMI watchdog hint when that watchdog it actually enabled.
This avoids printing these unnecessarily.
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Link: http://lkml.kernel.org/n/tip-lnw7edxnqsphkmeew857wz1i@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/builtin-stat.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c
index a935b5023732..ad9324d1daf9 100644
--- a/tools/perf/builtin-stat.c
+++ b/tools/perf/builtin-stat.c
@@ -1578,6 +1578,7 @@ static void print_header(int argc, const char **argv)
static void print_footer(void)
{
FILE *output = stat_config.output;
+ int n;
if (!null_run)
fprintf(output, "\n");
@@ -1590,7 +1591,9 @@ static void print_footer(void)
}
fprintf(output, "\n\n");
- if (print_free_counters_hint)
+ if (print_free_counters_hint &&
+ sysctl__read_int("kernel/nmi_watchdog", &n) >= 0 &&
+ n > 0)
fprintf(output,
"Some events weren't counted. Try disabling the NMI watchdog:\n"
" echo 0 > /proc/sys/kernel/nmi_watchdog\n"
--
2.9.4
next prev parent reply other threads:[~2017-06-06 19:27 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-06 19:26 [GIT PULL 00/11] perf/urgent fixes Arnaldo Carvalho de Melo
2017-06-06 19:26 ` [PATCH 01/11] perf annotate: Fix failure when filename has special chars Arnaldo Carvalho de Melo
2017-06-06 19:26 ` [PATCH 02/11] perf trace: Add mmap alias for s390 Arnaldo Carvalho de Melo
2017-06-06 19:26 ` [PATCH 03/11] perf annotate: Fix branch instruction with multiple operands Arnaldo Carvalho de Melo
2017-06-06 19:26 ` Arnaldo Carvalho de Melo [this message]
2017-06-06 19:26 ` [PATCH 05/11] perf header: Set proper module name when build-id event found Arnaldo Carvalho de Melo
2017-06-06 19:26 ` [PATCH 06/11] perf symbols: Set module info " Arnaldo Carvalho de Melo
2017-06-06 19:26 ` [PATCH 07/11] perf symbols: Use correct filename for compressed modules in build-id cache Arnaldo Carvalho de Melo
2017-06-06 19:26 ` [PATCH 08/11] perf test: Disable breakpoint signal tests for powerpc Arnaldo Carvalho de Melo
2017-06-06 19:26 ` [PATCH 09/11] perf annotate: Add missing powerpc triplet Arnaldo Carvalho de Melo
2017-06-06 19:26 ` [PATCH 10/11] perf report: Include partial stacks unwound with libdw Arnaldo Carvalho de Melo
2017-06-06 19:26 ` [PATCH 11/11] perf report: Ensure the perf DSO mapping matches what libdw sees Arnaldo Carvalho de Melo
2017-06-07 15:51 ` [GIT PULL 00/11] perf/urgent fixes Ingo Molnar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170606192650.20737-5-acme@kernel.org \
--to=acme@kernel.org \
--cc=acme@redhat.com \
--cc=ak@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox