Hi Stefane, Thanks for this. Am I to understand that the original purpose of pfm_arch_start is to just flip the enable bits? Is counting supposed to be enabled after arch_restore_pmcs? My question is really, what is the counting state of the PMU supposed to be after restore? I read the below as restore is supposed to write+start the PMC's immediately.
It's an interesting case on the SiCortex box, because the in-core PMU's have no enable bits (only domain bits) but the off-core PMU has a global enable bit, which need not be twiddled, as one can write 0's to the PMC's there and it won't count. Thanks. Phil On Mar 24, 2008, at 6:03 PM, stephane eranian wrote: > Hello Phil, > > pfm_arch_start() is not called during context switch. It is used only > during pfm_start() and on interrupts on certain architectures. > > pfm_restore_pmcs() is used on context switch to restore the pmcs > (config) registers. > > If all pfm_arch_start() does is to restore the pmcs, then it may as > well > call pfm_arch_restore_pmcs() instead of re-implementing the same > thing. > > > > On Mon, Mar 24, 2008 at 8:17 PM, Philip Mucci <[EMAIL PROTECTED]> > wrote: >> Hi Stefane, >> >> I'm trying to decipher the difference between these two. Currently on >> MIPS as there is no enable bit, these are both identical. Basically: >> >> for (i = 0; i < max_pmc; i++) { >> if (test_bit(i, set->used_pmcs)) >> pfm_arch_write_pmc(ctx, i, set->pmcs[i]); >> } >> >> However, in looking at the comments in the code, I have a concern >> that >> they may both be being called on pfm_ctxsw() and thus I'm doing >> double >> writes to the registers. Can you comment on this? >> >> Phil >> >> ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace _______________________________________________ perfmon2-devel mailing list perfmon2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/perfmon2-devel