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


Groups > linux.kernel > #1432137 > unrolled thread

Re: [RFC PATCH 2/2] perf: Filter events based on perf-namespace

Started byPeter Zijlstra <peterz@infradead.org>
First post2016-06-27 18:00 +0200
Last post2016-06-28 13:50 +0200
Articles 2 — 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: [RFC PATCH 2/2] perf: Filter events based on perf-namespace Peter Zijlstra <peterz@infradead.org> - 2016-06-27 18:00 +0200
    Re: [RFC PATCH 2/2] perf: Filter events based on perf-namespace Aravinda Prasad <aravinda@linux.vnet.ibm.com> - 2016-06-28 13:50 +0200

#1432137 — Re: [RFC PATCH 2/2] perf: Filter events based on perf-namespace

FromPeter Zijlstra <peterz@infradead.org>
Date2016-06-27 18:00 +0200
SubjectRe: [RFC PATCH 2/2] perf: Filter events based on perf-namespace
Message-ID<rOH73-2eF-9@gated-at.bofh.it>
On Tue, Jun 14, 2016 at 10:19:51PM +0530, Aravinda Prasad wrote:
> Whenever perf tool is executed inside a container, this
> patch restricts the events to the perf-namespace in which
> the perf tool is executing.
> 
> This patch is based on the existing support available
> for tracing with cgroups.
> 
> TODO:
>     - Avoid code duplication.

Can't you, at perf_event_open() time, convert a per-cpu event into a
per-cpu-per-cgroup event for these namespace thingies?

That seems to immediately and completely remove all that duplication.

[toc] | [next] | [standalone]


#1432909

FromAravinda Prasad <aravinda@linux.vnet.ibm.com>
Date2016-06-28 13:50 +0200
Message-ID<rOZGG-6ug-11@gated-at.bofh.it>
In reply to#1432137

On Monday 27 June 2016 09:20 PM, Peter Zijlstra wrote:
> On Tue, Jun 14, 2016 at 10:19:51PM +0530, Aravinda Prasad wrote:
>> Whenever perf tool is executed inside a container, this
>> patch restricts the events to the perf-namespace in which
>> the perf tool is executing.
>>
>> This patch is based on the existing support available
>> for tracing with cgroups.
>>
>> TODO:
>>     - Avoid code duplication.
> 
> Can't you, at perf_event_open() time, convert a per-cpu event into a
> per-cpu-per-cgroup event for these namespace thingies?
> 
> That seems to immediately and completely remove all that duplication.
> 

Yes.. that seems possible. Let me check that out.

-- 
Regards,
Aravinda

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web