From: Andrew Morton <akpm@linux-foundation.org>
To: Adrian Bunk <bunk@kernel.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [RFC: 2.6 patch] build kernel/profile.o only when requested
Date: Tue, 20 May 2008 03:34:44 -0700 [thread overview]
Message-ID: <20080520033444.de4282f8.akpm@linux-foundation.org> (raw)
In-Reply-To: <20080520102150.GJ17716@cs181133002.pp.htv.fi>
On Tue, 20 May 2008 13:21:50 +0300 Adrian Bunk <bunk@kernel.org> wrote:
> On Tue, May 20, 2008 at 02:01:21AM -0700, Andrew Morton wrote:
> > On Tue, 20 May 2008 00:53:06 +0300 Adrian Bunk <bunk@kernel.org> wrote:
> >
> > > Build kernel/profile.o only if CONFIG_PROFILING is enabled.
> > >
> > > This makes CONFIG_PROFILING=n kernels smaller.
> > >
> > > As a bonus, some profile_tick() calls and one branch from schedule() are
> > > now eliminated with CONFIG_PROFILING=n (but I doubt these are
> > > measurable effects).
> > >
> > > This patch changes the effects of CONFIG_PROFILING=n, but I don't think
> > > having more than two choices would be the better choice.
> > >
> > > This patch also adds the name of the first parameter to the prototypes
> > > of profile_{hits,tick}() since I anyway had to add them for the dummy
> > > functions.
> > >
> >
> > Little nits:
> >
> > > index 05c1cc7..4081fa3 100644
> > > --- a/include/linux/profile.h
> > > +++ b/include/linux/profile.h
> > > @@ -8,8 +8,6 @@
> > >
> > > #include <asm/errno.h>
> > >
> > > -extern int prof_on __read_mostly;
> > > -
> > > #define CPU_PROFILING 1
> > > #define SCHED_PROFILING 2
> > > #define SLEEP_PROFILING 3
> > > @@ -19,14 +17,29 @@ struct proc_dir_entry;
> > > struct pt_regs;
> > > struct notifier_block;
> > >
> > > +#if defined(CONFIG_PROFILING) && defined(CONFIG_PROC_FS)
> > > +void create_prof_cpu_mask(struct proc_dir_entry *);
> >
> > This omits the argument's name, whereas elsewhere you have taken care
> > to introduce the name where it was missing.
> >
> > > +#else
> > > +#define create_prof_cpu_mask(x) do { (void)(x); } while (0)
> >
> > I think this could be a static inline, which is neater.
> >...
>
> In these two cases I only moved code.
>
> And I actually moved the other code and git just decided to move the
> code that stayed instead since it creates less changed lines...
umm, you also changed the declarations of profile_tick() and
profile_hits() but not of create_prof_cpu_mask().
Oh well, I'll do it.
next prev parent reply other threads:[~2008-05-20 10:35 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-19 21:53 [RFC: 2.6 patch] build kernel/profile.o only when requested Adrian Bunk
2008-05-20 9:01 ` Andrew Morton
2008-05-20 10:21 ` Adrian Bunk
2008-05-20 10:34 ` Andrew Morton [this message]
2008-05-20 10:42 ` Adrian Bunk
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=20080520033444.de4282f8.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=bunk@kernel.org \
--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