Messages in this thread | | | Date | Thu, 26 Mar 2009 13:20:27 +1100 | From | Paul Mackerras <> | Subject | Re: [PATCH v3] perfcounters: record time running and time enabled for each counter |
| |
Peter Zijlstra writes:
> Paul, should we perhaps also put a format header in the sys_read() > output?
Hmmm..., possibly. It could be useful to have a PERF_FORMAT_GROUP, and then we'd want headers, I guess.
However, to simplify life for userland, we should make it possible to predict the layout for the simple cases (the cases where they have only asked for fixed-length items). For example, if the user only wants the counter value, they should be able to do the read() and know that the counter value is at some fixed offset in the buffer they just read, provided they got the number of bytes they expected. It would be unfortunate if we have to have code to step through a series of tagged records to find the counter value, and additionally have code to cope with not finding the tag we're expecting.
Paul.
| |