The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Tim Blechmann <tim@klingt.org>
Cc: Andi Kleen <ak@linux.intel.com>,
	oprofile-list@lists.sf.net, linux-kernel@vger.kernel.org,
	Robert Richter <robert.richter@amd.com>,
	venkatesh.pallipadi@intel.com
Subject: Re: 2.6.28-rc9: oprofile regression
Date: Fri, 16 Jan 2009 09:59:29 +0100 (CET)	[thread overview]
Message-ID: <alpine.LFD.2.00.0901160956170.3400@localhost.localdomain> (raw)
In-Reply-To: <1232067181.6134.74.camel@thinkpad>

On Fri, 16 Jan 2009, Tim Blechmann wrote:
> > Hmm, that confuses the hell out of me. Can you try the patch below,
> > which restores the original code of writing the counter registers ?
> 
> no difference ... i must admit, i already spent some time, trying to
> revert the specific changes of this commit ... i gave up to wait for
> some help from someone, who actually knows how the code is working ...
> 
> possibly it makes sense to compile a full kernel of the first bad kommit
> and introduce the different changes one by one ... i will try to find
> some time for this during the next few days ...
> 
> but if you have more patches, that i can test, please let me know ...

Here is another one, which also reverts the counter reset code and
disables the cpuid(0xa) call. Can you verify that counters are set up
? Can you please provide me your .config ? What's your kernel command
line ?

Thanks,

	tglx
---
Subject: x86-oprofile-debug2.patch
From: Thomas Gleixner <tglx@linutronix.de>
Date: Thu, 15 Jan 2009 21:25:55 +0100

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
 arch/x86/oprofile/op_model_ppro.c |   10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

Index: linux-2.6/arch/x86/oprofile/op_model_ppro.c
===================================================================
--- linux-2.6.orig/arch/x86/oprofile/op_model_ppro.c
+++ linux-2.6/arch/x86/oprofile/op_model_ppro.c
@@ -75,7 +75,7 @@ static void ppro_setup_ctrs(struct op_ms
 			return;
 	}
 
-	if (cpu_has_arch_perfmon) {
+	if (0 && cpu_has_arch_perfmon) {
 		union cpuid10_eax eax;
 		eax.full = cpuid_eax(0xa);
 		if (counter_width < eax.split.bit_width)
@@ -95,15 +95,15 @@ static void ppro_setup_ctrs(struct op_ms
 	for (i = 0; i < num_counters; ++i) {
 		if (unlikely(!CTR_IS_RESERVED(msrs, i)))
 			continue;
-		wrmsrl(msrs->counters[i].addr, -1LL);
+		wrmsr(msrs->counters[i].addr, (u32) 0xFFFFFFFF, 0);
 	}
 
 	/* enable active counters */
 	for (i = 0; i < num_counters; ++i) {
 		if ((counter_config[i].enabled) && (CTR_IS_RESERVED(msrs, i))) {
-			reset_value[i] = counter_config[i].count;
+			reset_value[i] = (1ULL << 32) - counter_config[i].count;
 
-			wrmsrl(msrs->counters[i].addr, -reset_value[i]);
+			wrmsr(msrs->counters[i].addr, (u32) reset_value[i], 0);
 
 			CTRL_READ(low, high, msrs, i);
 			CTRL_CLEAR(low);
@@ -132,7 +132,7 @@ static int ppro_check_ctrs(struct pt_reg
 		rdmsrl(msrs->counters[i].addr, val);
 		if (CTR_OVERFLOWED(val)) {
 			oprofile_add_sample(regs, i);
-			wrmsrl(msrs->counters[i].addr, -reset_value[i]);
+			wrmsr(msrs->counters[i].addr, (u32) reset_value[i], 0);
 		}
 	}
 

  reply	other threads:[~2009-01-16  9:00 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-21 14:23 2.6.28-rc9: oprofile regression Tim Blechmann
2008-12-21 21:23 ` Tim Blechmann
2008-12-22 12:11   ` Robert Richter
2008-12-26  2:42   ` Andi Kleen
2009-01-02 11:04     ` Tim Blechmann
2009-01-14 17:10       ` Thomas Gleixner
2009-01-14 18:19         ` Tim Blechmann
2009-01-15  8:46           ` Thomas Gleixner
2009-01-15  9:14             ` Tim Blechmann
2009-01-15 20:37               ` Thomas Gleixner
2009-01-16  0:53                 ` Tim Blechmann
2009-01-16  8:59                   ` Thomas Gleixner [this message]
2009-01-16 11:29                     ` Tim Blechmann
2009-01-16 15:52                       ` Thomas Gleixner
2009-01-16 16:02                         ` Tim Blechmann
2009-01-17 13:32                     ` Tim Blechmann
2009-01-17 14:14                       ` Robert Richter
2009-01-17 15:09                         ` Tim Blechmann
2009-01-17 15:56                           ` Robert Richter
2009-01-17 16:40                             ` Tim Blechmann
2009-02-11 19:51 ` 2.6.29-rc4 regression (was: Re: 2.6.28-rc9: oprofile regression) Tim Blechmann
2009-02-13 19:07   ` Robert Richter
2009-02-16 10:23     ` Tim Blechmann
2009-02-16 11:33       ` Robert Richter
2009-02-16 12:53         ` 2.6.29-rc4 regression Tim Blechmann
2009-02-17  7:45           ` Mike Galbraith
2009-02-17 21:56             ` Tim Blechmann
2009-02-18  4:54               ` Mike Galbraith
2009-02-16 11:40       ` 2.6.29-rc4 regression (was: Re: 2.6.28-rc9: oprofile regression) Robert Richter
2009-02-19 16:34         ` [PATCH] oprofile: don't set counter width from cpuid on core2 Tim Blechmann
2009-03-03 10:04           ` Robert Richter
2009-03-03 11:05             ` Ingo Molnar
2009-03-03 11:09             ` [tip:x86/urgent] x86: oprofile: don't set counter width from cpuid on Core2 Tim Blechmann
  -- strict thread matches above, loose matches on Subject: below --
2008-12-22 14:55 2.6.28-rc9: oprofile regression Tim Blechmann

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=alpine.LFD.2.00.0901160956170.3400@localhost.localdomain \
    --to=tglx@linutronix.de \
    --cc=ak@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oprofile-list@lists.sf.net \
    --cc=robert.richter@amd.com \
    --cc=tim@klingt.org \
    --cc=venkatesh.pallipadi@intel.com \
    /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