Re: [PATCH v3 2/3] perf: Userspace event

2014-11-04 Thread Namhyung Kim
Hi Peter and Pawel, On Tue, 4 Nov 2014 19:40:31 +0100, Peter Zijlstra wrote: > On Tue, Nov 04, 2014 at 04:42:11PM +, Pawel Moll wrote: >> >> 1. I'm wrong and the record doesn't have to be padded to make it 8 bytes >> aligned. Then I can drop the additional size field. > > No, you're right,

Re: [PATCH v3 2/3] perf: Userspace event

2014-11-04 Thread Peter Zijlstra
On Tue, Nov 04, 2014 at 04:42:11PM +, Pawel Moll wrote: > > 1. I'm wrong and the record doesn't have to be padded to make it 8 bytes > aligned. Then I can drop the additional size field. No, you're right, we're supposed to stay 8 byte aligned. > 2. I could impose a limitation on the prctl

Re: [PATCH v3 2/3] perf: Userspace event

2014-11-04 Thread Pawel Moll
On Tue, 2014-11-04 at 06:33 +, Namhyung Kim wrote: > Hi Pawel, > > On Tue, 4 Nov 2014 00:28:37 +, Pawel Moll wrote: > > + /* > > +* Data in userspace event record is transparent for the kernel > > +* > > +* Userspace perf tool code maintains a list of known types with > > +

Re: [PATCH v3 2/3] perf: Userspace event

2014-11-04 Thread Pawel Moll
On Tue, 2014-11-04 at 06:33 +, Namhyung Kim wrote: Hi Pawel, On Tue, 4 Nov 2014 00:28:37 +, Pawel Moll wrote: + /* +* Data in userspace event record is transparent for the kernel +* +* Userspace perf tool code maintains a list of known types with +*

Re: [PATCH v3 2/3] perf: Userspace event

2014-11-04 Thread Peter Zijlstra
On Tue, Nov 04, 2014 at 04:42:11PM +, Pawel Moll wrote: 1. I'm wrong and the record doesn't have to be padded to make it 8 bytes aligned. Then I can drop the additional size field. No, you're right, we're supposed to stay 8 byte aligned. 2. I could impose a limitation on the prctl API

Re: [PATCH v3 2/3] perf: Userspace event

2014-11-04 Thread Namhyung Kim
Hi Peter and Pawel, On Tue, 4 Nov 2014 19:40:31 +0100, Peter Zijlstra wrote: On Tue, Nov 04, 2014 at 04:42:11PM +, Pawel Moll wrote: 1. I'm wrong and the record doesn't have to be padded to make it 8 bytes aligned. Then I can drop the additional size field. No, you're right, we're

Re: [PATCH v3 2/3] perf: Userspace event

2014-11-03 Thread Namhyung Kim
Hi Pawel, On Tue, 4 Nov 2014 00:28:37 +, 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

[PATCH v3 2/3] perf: Userspace event

2014-11-03 Thread Pawel Moll
From: Pawel Moll This patch adds a PR_TASK_PERF_UEVENT prctl call which can be used by any process to inject custom data into perf data stream as a new PERF_RECORD_UEVENT record, if such process is being observed or if it is running on a CPU being observed by the perf framework. The prctl call

[PATCH v3 2/3] perf: Userspace event

2014-11-03 Thread Pawel Moll
From: Pawel Moll m...@pawelmoll.com This patch adds a PR_TASK_PERF_UEVENT prctl call which can be used by any process to inject custom data into perf data stream as a new PERF_RECORD_UEVENT record, if such process is being observed or if it is running on a CPU being observed by the perf

Re: [PATCH v3 2/3] perf: Userspace event

2014-11-03 Thread Namhyung Kim
Hi Pawel, On Tue, 4 Nov 2014 00:28:37 +, 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. +