lkml.org 
[lkml]   [2009]   [Nov]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/6] perf/core: Provide a kernel-internal interface to get to performance counters
On Mon, 2 Nov 2009 14:46:55 +1100
Paul Mackerras <paulus@samba.org> wrote:

> Frederic Weisbecker writes:
>
> > /*
> > + * perf_event_create_kernel_counter
> > + * MUST be called from a kernel thread.
>
> Why? The reason for this requirement isn't obvious to me. It would
> be good to have the reason documented in the comment for the sake of
> people modifying the code in future.

because if you call it from another context it will attach to that
context... and go away when that context goes away...



--
Arjan van de Ven Intel Open Source Technology Centre
For development, discussion and tips for power savings,
visit http://www.lesswatts.org


\
 
 \ /
  Last update: 2009-11-02 06:41    [W:0.247 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site