lkml.org 
[lkml]   [2014]   [Nov]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH v3 2/3] perf: Userspace event
Date
Hi Pawel,

On Tue, 4 Nov 2014 00:28:37 +0000, Pawel Moll wrote:
> + /*
> + * Data in userspace event record is transparent for the kernel
> + *
> + * Userspace perf tool code maintains a list of known types with
> + * reference implementations of parsers for the data field.
> + *
> + * Overall size of the record (including type and size fields)
> + * is always aligned to 8 bytes by adding padding after the data.
> + *
> + * struct {
> + * struct perf_event_header header;
> + * u32 type;
> + * u32 size;

The struct perf_event_header also has 'size' field and it has the entire
length of the record so it's redundant. Also there's 'misc' field in the
perf_event_header and I guess it can be used as 'type' info as it's
mostly for cpumode and we are in user mode by definition.

Thanks,
Namhyung


> + * char data[size];
> + * char __padding[-size & 7];
> + * struct sample_id sample_id;
> + * };
> + */
> + PERF_RECORD_UEVENT = 11,
> +
> PERF_RECORD_MAX, /* non-ABI */
> };


\
 
 \ /
  Last update: 2014-11-04 08:01    [W:0.117 / U:0.140 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site