Thread (11 messages) 11 messages, 4 authors, 2012-12-22

Re: [PATCH 1/2] powerpc/perf: Fix finding overflowed PMC in interrupt

flat view

From: Anshuman Khandual <hidden>
Date: 2012-11-06 06:47:26

On 11/06/2012 07:23 AM, Michael Neuling wrote:
quoted hunk ↗ jump to hunk
+	if (!found && pvr_version_is(PVR_POWER7)) {
+		/* check active counters for special buggy p7 overflow */
+		for (i = 0; i < cpuhw->n_events; ++i) {
+			event = cpuhw->event[i];
+			if (!event->hw.idx || is_limited_pmc(event->hw.idx))
 				continue;
-			val = read_pmc(i + 1);
-			if (pmc_overflow(val))
-				write_pmc(i + 1, 0);
+			if (pmc_overflow_power7(val[event->hw.idx - 1])) {

I have couple of questions. 

Can the buggy overflow happen on any of the available counters PMC1-PMC4 ?
Will this approach never reset an actual user defined event (with sample period < 256) ?
Is this related to the counter or the event which it is counting ? Just wondering if we
have to do something more than checking for the count < 256. Just a thought.

Regards
Anshuman
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help