From: Ian Campbell <Ian.Campbell@citrix.com>
To: Julien Grall <julien.grall@linaro.org>
Cc: stefano.stabellini@eu.citrix.com, tim@xen.org, xen-devel@lists.xen.org
Subject: Re: [PATCH v3] xen: arm: enable perf counters
Date: Wed, 14 Jan 2015 15:14:57 +0000 [thread overview]
Message-ID: <1421248497.19103.277.camel@citrix.com> (raw)
In-Reply-To: <54B68626.1080608@linaro.org>
On Wed, 2015-01-14 at 15:07 +0000, Julien Grall wrote:
> Hi Ian,
>
> On 14/01/15 14:33, Ian Campbell wrote:
> > diff --git a/xen/arch/arm/irq.c b/xen/arch/arm/irq.c
> > index 25ecf1d..604fc81 100644
> > --- a/xen/arch/arm/irq.c
> > +++ b/xen/arch/arm/irq.c
> > @@ -179,7 +179,12 @@ void do_IRQ(struct cpu_user_regs *regs, unsigned int irq, int is_fiq)
> > {
> > struct irq_desc *desc = irq_to_desc(irq);
> >
> > - /* TODO: perfc_incr(irqs); */
> > + perfc_incr(irqs);
> > +
> > + if (irq < 32) /* SGIs do not come down this path */
>
> if ( irq < 32 )
>
> Maybe an ASSERT(irq >= 16) to check the validity of the comment.
OK.
> > + perfc_incr(psci_cpu_on);
>
> I find confusing to use psci_cpu_on because it may refer to the host psci.
>
> Maybe renaming to vpsci_ would be better?
Yes, good idea.
>
> [..]
>
> > @@ -2113,6 +2146,7 @@ asmlinkage void do_trap_hypervisor(struct cpu_user_regs *regs)
> >
> > default:
> > bad_trap:
> > + perfc_incr(trap_bad);
>
> I don't think this perf counters is useful. When the CPU is receiving a
> bad trap Xen will panic in do_unexpected_trap.
Good point, I'll drop.
> > +#endif
>
> Missing the Emacs local variables.
Will add.
>
> > diff --git a/xen/include/asm-arm/perfc_defn.h b/xen/include/asm-arm/perfc_defn.h
> > new file mode 100644
> > index 0000000..df86879
> > --- /dev/null
> > +++ b/xen/include/asm-arm/perfc_defn.h
> > @@ -0,0 +1,74 @@
> > +/* This file is legiimately included multiple times. */
>
> Legacy for xen/include/perfc_defn.h?
No, since this file is included by that. perfc_defn.* contain lists
which are included multiple times using different definitions of
PERFCOUNTER etc to produce different bits of the require infrastructure
(definitions vs declarations). asm-x86/perfc_defn.h is identical in this
respect.
> > +/*#ifndef __XEN_PERFC_DEFN_H__*/
>
> All headers in asm-arm use __ARCH_ARM_* or __ARM_*
>
> This would avoid the strange reason to not use guard in xen/perfc_defn.h.
No it wouldn't.
>
> [..]
>
> > +/*#endif*/ /* __XEN_PERFC_DEFN_H__ */
>
> Missing local variables for emacs.
Will add.
Ian.
next prev parent reply other threads:[~2015-01-14 15:14 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-14 14:33 [PATCH v3] xen: arm: enable perf counters Ian Campbell
2015-01-14 15:07 ` Julien Grall
2015-01-14 15:14 ` Ian Campbell [this message]
2015-01-14 15:19 ` Julien Grall
2015-01-14 15:25 ` Ian Campbell
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=1421248497.19103.277.camel@citrix.com \
--to=ian.campbell@citrix.com \
--cc=julien.grall@linaro.org \
--cc=stefano.stabellini@eu.citrix.com \
--cc=tim@xen.org \
--cc=xen-devel@lists.xen.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.