public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Robert Richter <robert.richter@amd.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Ingo Molnar <mingo@kernel.org>,
	Stephane Eranian <eranian@google.com>,
	LKML <linux-kernel@vger.kernel.org>,
	Robert Richter <robert.richter@amd.com>
Subject: [PATCH 4/4] perf, x86: Improve debug output in check_hw_exists()
Date: Wed, 20 Jun 2012 20:46:36 +0200	[thread overview]
Message-ID: <1340217996-2254-5-git-send-email-robert.richter@amd.com> (raw)
In-Reply-To: <1340217996-2254-1-git-send-email-robert.richter@amd.com>

It might be of interest which perfctr msr failed.

Signed-off-by: Robert Richter <robert.richter@amd.com>
---
 arch/x86/kernel/cpu/perf_event.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/arch/x86/kernel/cpu/perf_event.c b/arch/x86/kernel/cpu/perf_event.c
index bb340dc..8d29a35 100644
--- a/arch/x86/kernel/cpu/perf_event.c
+++ b/arch/x86/kernel/cpu/perf_event.c
@@ -178,7 +178,7 @@ static void release_pmc_hardware(void) {}
 
 static bool check_hw_exists(void)
 {
-	u64 val, val_new = 0;
+	u64 val, val_new = ~0;
 	int i, reg, ret = 0;
 
 	/*
@@ -229,6 +229,7 @@ bios_fail:
 
 msr_fail:
 	printk(KERN_CONT "Broken PMU hardware detected, using software events only.\n");
+	printk(KERN_ERR "Failed to access perfctr msr (MSR %x is %Lx)\n", reg, val_new);
 
 	return false;
 }
-- 
1.7.8.4



  parent reply	other threads:[~2012-06-20 18:47 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-20 18:46 [PATCH 0/4] perf, x86: Updates and cleanups Robert Richter
2012-06-20 18:46 ` [PATCH 1/4] perf, x86: Rename Intel specific macros Robert Richter
2012-07-06  6:25   ` [tip:perf/core] perf/x86: " tip-bot for Robert Richter
2012-06-20 18:46 ` [PATCH 2/4] perf, x86: Move Intel specific code to intel_pmu_init() Robert Richter
2012-07-06  6:26   ` [tip:perf/core] perf/x86: " tip-bot for Robert Richter
2012-06-20 18:46 ` [PATCH 3/4] perf, amd: Unify AMD's generic and family 15h pmus Robert Richter
2012-07-06  6:26   ` [tip:perf/core] perf/x86/amd: Unify AMD' s " tip-bot for Robert Richter
2012-06-20 18:46 ` Robert Richter [this message]
2012-06-22 15:53   ` [PATCH 4/4] perf, x86: Improve debug output in check_hw_exists() Peter Zijlstra
2012-06-22 16:36     ` Robert Richter
2012-06-27  9:59       ` Peter Zijlstra
2012-07-06  6:27   ` [tip:perf/core] perf/x86: Improve debug output in check_hw_exists( ) tip-bot for Robert Richter
2012-06-20 20:09 ` [PATCH 0/4] perf, x86: Updates and cleanups Peter Zijlstra

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=1340217996-2254-5-git-send-email-robert.richter@amd.com \
    --to=robert.richter@amd.com \
    --cc=eranian@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.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