Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1538802 > unrolled thread

Re: [PATCH v2 1/3] perf: add PERF_RECORD_NAMESPACES to include namespaces related info

Started byHari Bathini <hbathini@linux.vnet.ibm.com>
First post2016-12-08 19:50 +0100
Last post2016-12-09 15:10 +0100
Articles 3 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH v2 1/3] perf: add PERF_RECORD_NAMESPACES to include  namespaces related info Hari Bathini <hbathini@linux.vnet.ibm.com> - 2016-12-08 19:50 +0100
    Re: [PATCH v2 1/3] perf: add PERF_RECORD_NAMESPACES to include  namespaces related info Hari Bathini <hbathini@linux.vnet.ibm.com> - 2016-12-09 11:20 +0100
    Re: [PATCH v2 1/3] perf: add PERF_RECORD_NAMESPACES to include  namespaces related info Peter Zijlstra <peterz@infradead.org> - 2016-12-09 15:10 +0100

#1538802 — Re: [PATCH v2 1/3] perf: add PERF_RECORD_NAMESPACES to include namespaces related info

FromHari Bathini <hbathini@linux.vnet.ibm.com>
Date2016-12-08 19:50 +0100
SubjectRe: [PATCH v2 1/3] perf: add PERF_RECORD_NAMESPACES to include namespaces related info
Message-ID<sMbVv-188-23@gated-at.bofh.it>
Hi Peter,


Sorry for taking so long to respond...


On Thursday 24 November 2016 08:40 PM, Peter Zijlstra wrote:
> On Thu, Nov 24, 2016 at 08:14:29PM +0530, Hari Bathini wrote:
>> @@ -862,6 +875,19 @@ enum perf_event_type {
>>   	 */
>>   	PERF_RECORD_SWITCH_CPU_WIDE		= 15,
>>   
>> +	/*
>> +	 * struct {
>> +	 *	struct perf_event_header	header;
>> +	 *
>> +	 *	u32				pid, tid;
>> +	 *	u64				time;
> pid,tid and time are already present in sample_id. Many of the 'legacy'
> record have redundant information since we added sample_id, but most of
> the new ones haven't and rely on sample_all being set.

I tried using pid/tid from sample data, but realized that pid/tid in 
event_id
could be different from the one in sample data, at least for fork/namespaces
events, since __perf_event_header__init_id( ) that updates the sample data
is getting the pid/tid of current task.

I am not sure if it is advisable to change __perf_event_header__init_id( 
) for this..?

Thanks
Hari

[toc] | [next] | [standalone]


#1539239

FromHari Bathini <hbathini@linux.vnet.ibm.com>
Date2016-12-09 11:20 +0100
Message-ID<sMqrw-21a-29@gated-at.bofh.it>
In reply to#1538802

On Friday 09 December 2016 12:10 AM, Hari Bathini wrote:
> Hi Peter,
>
>
> Sorry for taking so long to respond...
>
>
> On Thursday 24 November 2016 08:40 PM, Peter Zijlstra wrote:
>> On Thu, Nov 24, 2016 at 08:14:29PM +0530, Hari Bathini wrote:
>>> @@ -862,6 +875,19 @@ enum perf_event_type {
>>>        */
>>>       PERF_RECORD_SWITCH_CPU_WIDE        = 15,
>>>   +    /*
>>> +     * struct {
>>> +     *    struct perf_event_header    header;
>>> +     *
>>> +     *    u32                pid, tid;
>>> +     *    u64                time;
>> pid,tid and time are already present in sample_id. Many of the 'legacy'
>> record have redundant information since we added sample_id, but most of
>> the new ones haven't and rely on sample_all being set.
>
> I tried using pid/tid from sample data, but realized that pid/tid in 
> event_id
> could be different from the one in sample data, at least for 
> fork/namespaces
> events, since __perf_event_header__init_id( ) that updates the sample 
> data
> is getting the pid/tid of current task.
>
> I am not sure if it is advisable to change 
> __perf_event_header__init_id( ) for this..?
>

Hi Peter,

Adding task parameter to __perf_event_header__init_id( ) and doing 
something like..

         perf_event_pid(event, task ? task : current)
         perf_event_tid(event, task ? task : current)


Also, for synthesized events, sample_id is not updated currently. 
Working on it as that
is needed if we want to relay on pid, tid values from sample_id. Let me 
know, if this is
what you had in mind or something else altogether..

Thanks
Hari

[toc] | [prev] | [next] | [standalone]


#1539373

FromPeter Zijlstra <peterz@infradead.org>
Date2016-12-09 15:10 +0100
Message-ID<sMu26-4gD-15@gated-at.bofh.it>
In reply to#1538802
On Fri, Dec 09, 2016 at 12:10:20AM +0530, Hari Bathini wrote:
> Hi Peter,
> 
> 
> Sorry for taking so long to respond...
> 
> 
> On Thursday 24 November 2016 08:40 PM, Peter Zijlstra wrote:
> >On Thu, Nov 24, 2016 at 08:14:29PM +0530, Hari Bathini wrote:
> >>@@ -862,6 +875,19 @@ enum perf_event_type {
> >>  	 */
> >>  	PERF_RECORD_SWITCH_CPU_WIDE		= 15,
> >>+	/*
> >>+	 * struct {
> >>+	 *	struct perf_event_header	header;
> >>+	 *
> >>+	 *	u32				pid, tid;
> >>+	 *	u64				time;
> >pid,tid and time are already present in sample_id. Many of the 'legacy'
> >record have redundant information since we added sample_id, but most of
> >the new ones haven't and rely on sample_all being set.
> 
> I tried using pid/tid from sample data, but realized that pid/tid in
> event_id
> could be different from the one in sample data, at least for fork/namespaces
> events, since __perf_event_header__init_id( ) that updates the sample data
> is getting the pid/tid of current task.

Ah indeed. Yes please disregard my comment then.

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web