Re: [PATCH v4 06/22] perf: Redirect output from inherited events to parents

From: Alexander Shishkin
Date: Tue Sep 09 2014 - 05:54:14 EST


Peter Zijlstra <peterz@xxxxxxxxxxxxx> writes:

> On Wed, Aug 20, 2014 at 03:36:03PM +0300, Alexander Shishkin wrote:
>> In order to collect AUX data from an inherited event, we can redirect its
>> output to parent's ring buffer if possible (they must be cpu affine). This
>> patch adds set_output() to the inheritance path.
>>
>> Signed-off-by: Alexander Shishkin <alexander.shishkin@xxxxxxxxxxxxxxx>
>> ---
>> kernel/events/core.c | 6 ++++++
>> 1 file changed, 6 insertions(+)
>>
>> diff --git a/kernel/events/core.c b/kernel/events/core.c
>> index 67f857ab56..e36478564c 100644
>> --- a/kernel/events/core.c
>> +++ b/kernel/events/core.c
>> @@ -7962,6 +7962,12 @@ inherit_event(struct perf_event *parent_event,
>> = parent_event->overflow_handler_context;
>>
>> /*
>> + * Direct child's output to parent's ring buffer (if any)
>> + */
>> + if (parent_event->cpu != -1)
>> + (void)perf_event_set_output(child_event, parent_event);
>> +
>> + /*
>> * Precalculate sample_data sizes
>> */
>> perf_event__header_size(child_event);
>
> Uhm, nope, see perf_output_begin(), it always redirects output to parent
> events.

Ouch, indeed. We'll just do the same in perf_aux_output_begin().

Regards,
--
Alex
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/