about overflow protection

about overflow protection

Postby fbarisione » Thu Jun 02, 2011 10:32 am

Hello,
I wanted to know if it's possible, that somebody give me a detailed explanation of the following sentence:

"PAPI makes sure the underlying operating system or library guards against overflow of counter values."

I wonder how this is achieved, maybe just by reset the counters to zero?. if that's the case, let me give you an example:
If I'm measuring L1 Cache misses and I get a "X" when PAPI reads the counter, is "X" the actual number or maybe it was a higher value which raise an overflow protection plus "X"?... How can I be sure there weren't any overflow protection when I read a counter?

regards,
fbarisione
 
Posts: 6
Joined: Mon Nov 08, 2010 8:19 am

Re: about overflow protection

Postby danterpstra » Thu Jun 02, 2011 10:54 am

PAPI abstracts the physical counters, which can be of varied resolution, into virtual counters that have 64-bit resolution. This abstraction typically occurs at every context switch, which is frequent enough to insure that physical overflow is avoided. If I did my math right, a 64-bit virtual counter incrementing at 1 GHz would take more than 100 years to overflow.
danterpstra
 
Posts: 63
Joined: Wed Jun 23, 2010 2:21 pm


Return to Classic PAPI

Who is online

Users browsing this forum: No registered users and 0 guests

cron