Re: pmc(3): when are the counters updated?

2012-03-12 Thread Fabien Thomas
Le 11 mars 2012 à 16:45, Vitaly Magerya a écrit : Hi, folks. I'm trying to use pmc(3) to analyze code fragments, and I've run into strange behavior: the counter values returned by pmc_read(3) sometimes show no increment between readings, but are updated a second later; even if the PMC in

Re: pmc(3): when are the counters updated?

2012-03-12 Thread Vitaly Magerya
Fabien Thomas wrote: So, what's going on here? Is this the intended behavior, or can it be changed? And how do I get accurate readings? If i remember well: The current code will get real HW PMC if the PMC is running and attached to owner. The first case is not true in your code so you get

Re: pmc(3): when are the counters updated?

2012-03-12 Thread Harald Servat
2012/3/12 Vitaly Magerya vmage...@gmail.com Fabien Thomas wrote: So, what's going on here? Is this the intended behavior, or can it be changed? And how do I get accurate readings? If i remember well: The current code will get real HW PMC if the PMC is running and attached to owner.

pmc(3): when are the counters updated?

2012-03-11 Thread Vitaly Magerya
Hi, folks. I'm trying to use pmc(3) to analyze code fragments, and I've run into strange behavior: the counter values returned by pmc_read(3) sometimes show no increment between readings, but are updated a second later; even if the PMC in question was stopped before. Here's a test program: