Re: [PATCH] perf: make perf.data more self-descriptive (v8)

From: Robert Richter
Date: Mon Dec 05 2011 - 08:23:47 EST


On 01.12.11 09:53:10, Stephane Eranian wrote:
> On Thu, Dec 1, 2011 at 7:15 AM, Robert Richter <robert.richter@xxxxxxx> 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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/