lkml.org 
[lkml]   [2011]   [Dec]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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



\
 
 \ /
  Last update: 2011-12-05 14:25    [W:0.079 / U:0.548 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site