public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Borislav Petkov <bp@amd64.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Frederic Weisbecker <fweisbec@gmail.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [RFC PATCH] perf: Carve out cgroup-related code
Date: Wed, 11 May 2011 17:21:56 +0200	[thread overview]
Message-ID: <20110511152156.GA21707@elte.hu> (raw)
In-Reply-To: <20110511143149.GA26548@aftab>


* Borislav Petkov <bp@amd64.org> wrote:

> 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.

We seem to be in wild agreement wrt. internal.h!

Thanks,

	Ingo

  reply	other threads:[~2011-05-11 16:41 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-11 12:11 [RFC PATCH] perf: Carve out cgroup-related code Borislav Petkov
2011-05-11 13:46 ` Peter Zijlstra
2011-05-11 14:00   ` Ingo Molnar
2011-05-11 14:02   ` Borislav Petkov
2011-05-11 14:13     ` Ingo Molnar
2011-05-11 14:31       ` Borislav Petkov
2011-05-11 15:21         ` Ingo Molnar [this message]
2011-05-11 17:09           ` Borislav Petkov
2011-05-12  8:51             ` Peter Zijlstra
2011-05-12  8:54               ` Peter Zijlstra
2011-05-12 10:18               ` Borislav Petkov
2011-05-12 14:31                 ` Frederic Weisbecker
2011-05-12 15:13                   ` Lin Ming
2011-05-14  8:44                   ` Borislav Petkov
2011-05-14 13:02                     ` Frederic Weisbecker
2011-05-12 10:36             ` Ingo Molnar
2011-05-12 10:54               ` Borislav Petkov
2011-05-12 11:03                 ` Ingo Molnar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110511152156.GA21707@elte.hu \
    --to=mingo@elte.hu \
    --cc=a.p.zijlstra@chello.nl \
    --cc=bp@amd64.org \
    --cc=fweisbec@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox