Paul, On Tue, Jun 23, 2009 at 2:39 AM, Paul Mackerras<pau...@samba.org> wrote: > > Hmmm, when the counter is running, what you want is not so much the > total time so far as a way to compute the total time so far from the > current TSC/timebase value. So we would need to export tstamp_enabled > and tstamp_running plus a scale/offset for converting the TSC/timebase > value to nanoseconds consistent with ctx->time. On powerpc that's > pretty straightforward because the timebases, but on x86 I gather the > offset and maybe also the scale would need to be per-cpu (which is OK, > because all the values in the mmapped page are only useful on one > specific CPU). > I think you should make it such that reading via mmap and read() are equivalent, one is just lower overhead than the other. Otherwise it would make it more difficult for tools in case of multiplexing where you could fallback to read() and there you would not get the same information.
> How would we compute the scale and offset on x86, given the current > TSC value and ctx->time? > > Paul. > ------------------------------------------------------------------------------ Are you an open source citizen? Join us for the Open Source Bridge conference! Portland, OR, June 17-19. Two days of sessions, one day of unconference: $250. Need another reason to go? 24-hour hacker lounge. Register today! http://ad.doubleclick.net/clk;215844324;13503038;v?http://opensourcebridge.org _______________________________________________ perfmon2-devel mailing list perfmon2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/perfmon2-devel