lkml.org 
[lkml]   [2011]   [Nov]   [30]   [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 29.11.11 10:35:24, Stephane Eranian wrote:
> sec_start = header->data_offset + header->data_size;
> lseek(fd, sec_start + sec_size, SEEK_SET);
>
> err = do_write_feat(fd, header, HEADER_TRACE_INFO, &p, evlist);
> if (err)
> goto out_free;
>
> err = do_write_feat(fd, header, HEADER_BUILD_ID, &p, evlist);
> if (err) {
> perf_header__clear_feat(header, HEADER_BUILD_ID);
> goto out_free;
> }
>
> The 'clear_feat' is missing for TRACE_INFO, that's all. The question is:
> is case do_write_feat(trace_info) fails, is there still a way to parse the file
> correctly? If not, then perf should bail out, if yes, then we need to add the
> clear_feat(TRACE_INFO) in case of error.

The question is, if do_write_feat() fails for HEADER_TRACE_INFO or
HEADER_BUILD_ID then perf_header__adds_write() fails. A failure of any
other feature simple disables it by calling clear_feat(). I noticed
this asymmetry and wonder why?

Also, is there a reason why HEADER_TRACE_INFO starts with bit 1 instead
of bit 0. Is bit 0 reserved for some reason?

Thanks,

-Robert

--
Advanced Micro Devices, Inc.
Operating System Research Center



\
 
 \ /
  Last update: 2011-11-30 16:11    [W:0.480 / U:0.060 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site