Messages in this thread | | | Date | Mon, 5 Dec 2011 14:23:40 +0100 | From | Robert Richter <> | Subject | Re: [PATCH] perf: make perf.data more self-descriptive (v8) |
| |
On 01.12.11 09:53:10, Stephane Eranian wrote: > On Thu, Dec 1, 2011 at 7:15 AM, Robert Richter <robert.richter@amd.com> wrote: > > I am asking this because I want to change code in a way that treats > > all features the same, that is just to disable the feature bit on > > failure and then continue anyway. > > > You need to make sure that disabling the bit is enough to still get a consistent > file, i.e., want to undo the effect of writing the feature to the > file. In the case > of the meta-data features I added that was easy simply lseek() back to > the position > before the call. Would that be the case with TRACE_INFO?
It should be. All features can be parsed independently. Offset and size of a feature's data block is stored in struct perf_file_section right after the data block of perf.data (see perf_session__write_ header()). Thus, if a feature does not exist then other features can be processed anyway.
Thanks,
-Robert
-- Advanced Micro Devices, Inc. Operating System Research Center
| |