[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <18758.54934.718129.837813@cargo.ozlabs.ibm.com>
Date: Tue, 16 Dec 2008 09:13:42 +1100
From: Paul Mackerras <paulus@...ba.org>
To: Vince Weaver <vince@...ter.net>
Cc: Ingo Molnar <mingo@...e.hu>, linux-kernel@...r.kernel.org,
Thomas Gleixner <tglx@...utronix.de>,
Andrew Morton <akpm@...ux-foundation.org>,
Stephane Eranian <eranian@...glemail.com>,
Eric Dumazet <dada1@...mosbay.com>,
Robert Richter <robert.richter@....com>,
Arjan van de Ven <arjan@...radead.org>,
Peter Anvin <hpa@...or.com>,
Peter Zijlstra <a.p.zijlstra@...llo.nl>,
"David S. Miller" <davem@...emloft.net>,
perfctr-devel@...ts.sourceforge.net
Subject: Re: [patch] Performance Counters for Linux, v4
Vince Weaver writes:
> I'm trying a more complicated benchmark and getting even stranger
> results.
>
> This is still on the Q6600 machine
>
> The benchmark does a loop, reading some memory. It should have
> roughly:
> 12295 instructions
> 4096 memory loads
> 4096 branches
>
> perfmon3 is close on all of these stats, and this is consistent
> across runs with a small variation (+/- 3 or so).
>
> The timec program returns 0 (!) for all of the stats except
> retired instruction count! And with certain combinations
> of counters I get 0 for all counts. No error messages
> are printed.
>
> Is this expected behavior?
When you have more software counters than hardware counters, the
kernel will be time-slicing the counters, but because your program
doesn't run for very long, it's possible that only the first set will
ever get to count anything.
That doesn't seem to explain all the 0 values (since the kernel should
be able to use at least 2 hardware counters on your machine, I expect)
but it might be part of the explanation.
Paul.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists