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 */
>  };
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to