lkml.org 
[lkml]   [2011]   [May]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
DateWed, 11 May 2011 16:31:49 +0200
FromBorislav Petkov <>
SubjectRe: [RFC PATCH] perf: Carve out cgroup-related code
On Wed, May 11, 2011 at 10:13:42AM -0400, Ingo Molnar wrote:
>
> * Borislav Petkov <bp@amd64.org> wrote:
>
> > On Wed, May 11, 2011 at 09:46:40AM -0400, Peter Zijlstra wrote:
> > > On Wed, 2011-05-11 at 14:11 +0200, Borislav Petkov wrote:
> > > > include/linux/perf_event.h | 138 ++++++++++++-
> > >
> > > I don't like exposing all that in a kernel wide header.. should we maybe
> > > have kernel/events/internal.h?
> >
> > Sounds prudent. Maybe add a patch ontop that moves all perf_event.h
> > exports which are shared _only_ between kernel/events/*.c compilation
> > units to an internal.h header? Ingo?
>
> There's not that many that are in perf_event.h and are only used in
> kernel/event/core.c.
>
> Below is a generated list of all exported functions and their usage sites. Out
> of 40 functions 7 should not be exported:
>
> __perf_sw_event()
> perf_swevent_put_recursion_context()
> perf_pmu_unregister()
> perf_output_copy()
> __perf_event_task_sched_in()
> __perf_event_task_sched_out()
> perf_event_read_value()

Right, but splitting perf_event.c further would cause a bunch more
of them to go up in the header since they're being shared among
kernel/events/*.c files. But in the end, this is a judgement call - I
mean, even the polluting ones have a clearly defined namespace starting
their names with {_-,}perf_*. If you asked me, I'd do an internal.h
header from the get-go so that all is kept as clean as possible.
--
Regards/Gruss,
Boris.

Advanced Micro Devices GmbH
Einsteinring 24, 85609 Dornach
General Managers: Alberto Bozzo, Andrew Bowd
Registration: Dornach, Gemeinde Aschheim, Landkreis Muenchen
Registergericht Muenchen, HRB Nr. 43632


\
 
 \ /
  Last update: 2011-05-11 17:53    [from the cache]
©2003-2010