lkml.org 
[lkml]   [2013]   [Jul]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [tip:perf/core] perf: Update perf_event_type documentation
On Fri, 26 Jul 2013, Peter Zijlstra wrote:

> On Thu, Jul 25, 2013 at 11:20:24PM -0400, Vince Weaver wrote:
> >
> > a thing that personally bothers me are these imaginary struct definitions
> > added as part of the documentation that aren't actually available in the
> > public perf_event.h
> >
> > I can see why it's done, but it can be confusing picking out in later
> > definitions which struct fields are real and which ones are conceptual.
>
> Would it help if we changed the syntax to not look as much as real C
> would?

I've been thinking and I can't really think of a clearer way to present
the layout. So I guess it's fine the way it is. Hopefully not many
people are stuck having to implement code based on header file comments
anyway.

> > It might be clearer
> > if you stuck the perf_event_attr::sample_id_all qualifier each
> > place you add the sample_id field.
>
> Ah, I actually considered that but then got lazy and used the 0 sized
> struct idea :/

It might just be me. For whatever reason the C parser in my head doesn't
handle GNU extensions like 0-sized structs.

Vince


\
 
 \ /
  Last update: 2013-07-27 05:41    [W:0.117 / U:0.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site