Messages in this thread | | | Date | Tue, 23 Jun 2009 10:33:06 +1000 | From | Paul Mackerras <> | Subject | Re: I.5 - Mmaped count |
| |
stephane eranian writes:
> Unless you tell me that pc->index is marked invalid (0) when the > event is not scheduled. I don't see how you can avoid reading > the wrong value. I am assuming that is the event is not scheduled > lock remains constant.
That's what happens; when pc->index == 0, the event is not scheduled and the current count is in pc->offset.
> Assuming the event is active when you enter the loop and you > read a value. How to get the timing information to scale the > count?
At present you'd have to do a read(). It wouldn't be hard to add fields to mmapped page to enable the user program to compute up-to-date timing information from the TSC (x86) or timebase (powerpc) value. We'll do that.
Paul.
| |