All of lore.kernel.org
 help / color / mirror / Atom feed
From: will.deacon@arm.com (Will Deacon)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/5] ARM: perf: consolidate common PMU behaviour
Date: Tue, 16 Nov 2010 09:47:04 -0000	[thread overview]
Message-ID: <005601cb8573$39cab3f0$ad601bd0$@deacon@arm.com> (raw)
In-Reply-To: <AANLkTi=mu6iG9Yhhtp31g0aDH7+X0i6G8vZiW5FGmV-C@mail.gmail.com>

Hi Jean,

> > diff --git a/arch/arm/kernel/perf_event.c b/arch/arm/kernel/perf_event.c
> > index 07a5035..c49e170 100644
> > --- a/arch/arm/kernel/perf_event.c
> > +++ b/arch/arm/kernel/perf_event.c
> ...
> 
> > @@ -166,6 +165,19 @@ armpmu_map_cache_event(u64 config)
> >  }
> >
> >  static int
> > +armpmu_map_event(u64 config)
> > +{
> > +       int mapping = (*armpmu->event_map)[config];
> > +       return mapping == HW_OP_UNSUPPORTED ? -EOPNOTSUPP : mapping;
> > +}
> > +
> > +static int
> > +armpmu_map_raw_event(u64 config)
> > +{
> > +       return (int)(config & armpmu->raw_event_mask);
> > +}
> > +
> > +static int
> >  armpmu_event_set_period(struct perf_event *event,
> >                        struct hw_perf_event *hwc,
> >                        int idx)
> 
> Those functions could be inlined for performance reason.

Since these are static functions with no side effects, any half-decent
compiler should do the inlining for us. I checked the disassembly to be
sure (GCC based on 4.5.1) and, not only are the above functions inlined,
but __hw_perf_event_init is inlined into armpmu_event_init too.

> Other than that minor remark, I am OK
> Acked-by: Jean Pihet <j-pihet@ti.com>

Thanks,

Will

  reply	other threads:[~2010-11-16  9:47 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-15 17:30 [PATCH 0/5] ARM: perf: split up perf_event.c by architecture Will Deacon
2010-11-15 17:30 ` [PATCH 1/5] ARM: perf: consolidate common PMU behaviour Will Deacon
2010-11-16  8:59   ` Jean Pihet
2010-11-16  9:47     ` Will Deacon [this message]
2010-11-16  9:16   ` Jamie Iles
2010-11-15 17:31 ` [PATCH 2/5] ARM: perf: avoid exposing internal stop function for v6 PMU Will Deacon
2010-11-15 19:02   ` Jamie Iles
2010-11-16  9:57     ` Will Deacon
2010-11-15 17:31 ` [PATCH 3/5] ARM: perf: add _init() functions to PMUs Will Deacon
2010-11-16  9:00   ` Jean Pihet
2010-11-16  9:18   ` Jamie Iles
2010-11-15 17:31 ` [PATCH 4/5] ARM: perf: encode PMU name in arm_pmu structure Will Deacon
2010-11-15 19:03   ` Jamie Iles
2010-11-16  8:29     ` Jean Pihet
2010-11-15 17:31 ` [PATCH 5/5] ARM: perf: separate PMU backends into multiple files Will Deacon
2010-11-16  9:11   ` Jean Pihet
2010-11-16 10:12     ` Will Deacon
2010-11-16  8:32 ` [PATCH 0/5] ARM: perf: split up perf_event.c by architecture Jean Pihet
2010-11-16  9:38   ` Will Deacon

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='005601cb8573$39cab3f0$ad601bd0$@deacon@arm.com' \
    --to=will.deacon@arm.com \
    --cc=linux-arm-kernel@lists.infradead.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.