Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: Wu Zhangjin <wuzhangjin@gmail.com>
To: Deng-Cheng Zhu <dengcheng.zhu@gmail.com>
Cc: linux-mips@linux-mips.org, ralf@linux-mips.org,
	a.p.zijlstra@chello.nl, paulus@samba.org, mingo@elte.hu,
	acme@redhat.com, jamie.iles@picochip.com
Subject: Re: [PATCH 3/3] MIPS: implement hardware perf event support
Date: Fri, 16 Apr 2010 01:47:16 +0800	[thread overview]
Message-ID: <1271353636.20625.99.camel@falcon> (raw)
In-Reply-To: <1271349557.7467.424.camel@fun-lab>

Hi, Deng-Cheng

Thanks very much for your Perf support of MIPS.

On Fri, 2010-04-16 at 00:39 +0800, Deng-Cheng Zhu wrote:
> This patch is the HW perf event support. To enable this feature, we can not
> choose the SMTC kernel; Oprofile should be disabled; kernel performance
> events be selected. Then we can enable it in the Kernel type menu.
> 
> Oprofile for MIPS platforms initializes irq at arch init time. Currently we
> do not change this logic to allow PMU reservation.
> 
> If a platform has EIC, we can use the irq base and perf counter irq
> offset defines for the interrupt controller in mipspmu_get_irq().
> 
> Signed-off-by: Deng-Cheng Zhu <dengcheng.zhu@gmail.com>
> ---
>  arch/mips/Kconfig             |    8 +
>  arch/mips/kernel/Makefile     |    2 +
>  arch/mips/kernel/perf_event.c | 1468 +++++++++++++++++++++++++++++++++++++++++
>  3 files changed, 1478 insertions(+), 0 deletions(-)
>  create mode 100644 arch/mips/kernel/perf_event.c
[...]
> + * Copied from Oprofile -- BEGIN
> + */
[...]
> +/* Copied from Oprofile -- END */
> +

Seems you only copied the contents from
arch/mips/oprofile/op_model_mipsxx.c and handle the mipsxx, what about
rm9000(arch/mips/oprofile/op_model_rm9000.c) and
loongson2(arch/mips/oprofile/op_model_loongson2.c)? 

I think it will not work on rm9000 and loongson2 for their performance
counters are different from mipsxx. so suggest you only enable this for
mipsxxx(refer to arch/mips/oprofile/Makefile) via #ifdef and renaming
the current perf_event.c to perf_event_mipsxx.c.

And to reduce the source code duplication, perhaps we need a solution to
share the source code between Oprofile and Perf, and also among mipsxx,
rm9000 and loongson2.

Thanks & Regards,
	Wu Zhangjin

  reply	other threads:[~2010-04-15 17:47 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-15 16:39 [PATCH 3/3] MIPS: implement hardware perf event support Deng-Cheng Zhu
2010-04-15 17:47 ` Wu Zhangjin [this message]
2010-04-17  1:49   ` dengcheng.zhu
2010-04-17  5:04     ` Wu Zhangjin

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=1271353636.20625.99.camel@falcon \
    --to=wuzhangjin@gmail.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=acme@redhat.com \
    --cc=dengcheng.zhu@gmail.com \
    --cc=jamie.iles@picochip.com \
    --cc=linux-mips@linux-mips.org \
    --cc=mingo@elte.hu \
    --cc=paulus@samba.org \
    --cc=ralf@linux-mips.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