From: Wu Zhangjin <wuzhangjin@gmail.com>
To: Deng-Cheng Zhu <dengcheng.zhu@gmail.com>
Cc: loongson-dev <loongson-dev@googlegroups.com>,
linux-mips@linux-mips.org, ralf@linux-mips.org,
Zhang Le <r0bertz@gentoo.org>, yajin <yajinzhou@vm-kernel.org>
Subject: Re: [PATCH] Loongson2: add a primary perf support (not applicable)
Date: Thu, 29 Apr 2010 12:10:12 +0800 [thread overview]
Message-ID: <1272514212.24709.18.camel@localhost> (raw)
In-Reply-To: <o2h1b4d75291004282029m19d46c01hb44bab3893395bae@mail.gmail.com>
On Thu, 2010-04-29 at 11:29 +0800, Deng-Cheng Zhu wrote:
> > And then you need to compile the user-space tools/perf with the following steps
> > if want to local-compile it:
>
> And if you want to cross compile it, besides changing
> tools/perf/perf.h, tools/perf/Makefile also needs to have proper
> CFLAGS/LDFLAGS for headers and libs. Then it's OK to fire "make
> CROSS_COMPILE=$toolchain_prefix".
>
> > Currently, seems "./perf record" and lots of software events not work, anybody
> > have interest in playing with it can refer to {tools/perf/Documentation,
> > arch/mips/kernel/perf_event*, arch/mips/include/asm/pmu.h,
> > arch/x86/kernel/cpu/perf_event*, arch/arm/kernel/perf_event* ...}.
>
> "perf record" works fine on 24K/34K/74K cores. In addition, If you are
> seeing the message "Couldn't record kernel reference relocation
> symbol", and your kernel symbols only have _stext (without _text),
> then search "_text" in builtin-record.c and replace with "_stext".
> Here is the link: http://lkml.org/lkml/2010/1/18/177
Yeah, I have seen the message but have not looked into it, thanks!
>
> For software events, it should be able to work without specific
> changes for loongson, I suppose. Because changes have been done to
> common MIPS code to support software events.
>
Perhaps need to enable some related kernel options for the "kmem:..." is
not in the result of "./perf list", I will check it later.
> > config HW_PERF_EVENTS
> > bool "Enable hardware performance counter support for perf events"
> > - depends on PERF_EVENTS && !MIPS_MT_SMTC && OPROFILE=n && CPU_MIPS32
> > + depends on PERF_EVENTS && !MIPS_MT_SMTC && OPROFILE=n
> > default y
> > help
> > Enable hardware performance counter support for perf events. If
>
> How about adding CPU_LOONGSON2* instead of deleting CPU_MIPS32?
> Because we want the perf functionality to be available when we are
> able to choose it..
Okay, will apply it in the next revision.
BTW: After comparing this patch and your
arch/mips/kernel/perf_event_mipsxx.c, perhaps we can share more common
functions, such as hw_perf_event_destroy(), hw_perf_enable(),
hw_perf_disable() and handle_associated_event()...
Thanks & Regards,
Wu Zhangjin
next prev parent reply other threads:[~2010-04-29 4:10 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-28 15:21 [PATCH] Loongson2: add a primary perf support (not applicable) Wu Zhangjin
2010-04-29 3:29 ` Deng-Cheng Zhu
2010-04-29 4:10 ` Wu Zhangjin [this message]
2010-04-29 10:24 ` Deng-Cheng Zhu
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=1272514212.24709.18.camel@localhost \
--to=wuzhangjin@gmail.com \
--cc=dengcheng.zhu@gmail.com \
--cc=linux-mips@linux-mips.org \
--cc=loongson-dev@googlegroups.com \
--cc=r0bertz@gentoo.org \
--cc=ralf@linux-mips.org \
--cc=yajinzhou@vm-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