* [BUG] The Perf support of MIPS is broken for the upstream changes
@ 2010-11-04 15:20 wu zhangjin
2010-11-04 15:30 ` Ralf Baechle
0 siblings, 1 reply; 2+ messages in thread
From: wu zhangjin @ 2010-11-04 15:20 UTC (permalink / raw)
To: Deng-Cheng Zhu; +Cc: Ralf Baechle, linux-mips
Hi, Deng Cheng
Just took a try to add the Perf support for Loongson but failed for
the skeleton of the Perf Support of MIPS was broken.
After some investigation, I have found several important changes have
been applied for the upstream Perf event, which has broken the Perf
support of MIPS.
Here lists several important changes:
1. e360adbe29241a0194e10e20595360dd7b98a2b3: irq_work: Add generic
hardirq context callbacks
This commit has added "generic hardirq context
callbacks": irq_work, which are designed particularly for NMI code that
needs to interact with the rest of the system.
Like ARM, MIPS performance counters do not raise NMI upon overflow,
instead, they emit regular interrupts, so, simply remove the empty
set_perf_event_pending() in perf_event.h and call irq_work_run() instead of
perf_event_do_pend() is needed.
2. a4eaf7f14675cb512d69f0c928055e73d0c6d252: perf: Rework the PMU methods
This has replaced the pmu::{enable,disable,start,stop,unthrottle} with
pmu::{add,del,start,stop}, which has made the current implementation
of Perf for MIPS completely broken, so, we also need to make related
changes.
3. b0a873ebbf87bf38bf70b5e39a7cadc96099fa13: perf: Register PMU implementations
The weak hw_perf_event_init() function is replaced by a new member:
event_init()
of struct pmu().
You can track more upstream changes via the following command:
$ git log {kernel/perf_event.c,include/linux/perf_event.h}
Of course, at first, you may need to clone/pull a latest mainline kernel.
Regards,
Wu Zhangjin
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [BUG] The Perf support of MIPS is broken for the upstream changes
2010-11-04 15:20 [BUG] The Perf support of MIPS is broken for the upstream changes wu zhangjin
@ 2010-11-04 15:30 ` Ralf Baechle
0 siblings, 0 replies; 2+ messages in thread
From: Ralf Baechle @ 2010-11-04 15:30 UTC (permalink / raw)
To: wu zhangjin; +Cc: Deng-Cheng Zhu, linux-mips
On Thu, Nov 04, 2010 at 11:20:19PM +0800, wu zhangjin wrote:
> $ git log {kernel/perf_event.c,include/linux/perf_event.h}
>
> Of course, at first, you may need to clone/pull a latest mainline kernel.
Note that the linux-mips.org kernel repository is a superset of the
mainline kernel. To reduce the confusion I just don't push any of Linus'
tags but the kernel objects are all there.
Anybody who wants to get Linus' tags or a linus branch as well can fetch
from Linus tree. The size increase is minimal.
Ralf
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-11-04 15:31 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-04 15:20 [BUG] The Perf support of MIPS is broken for the upstream changes wu zhangjin
2010-11-04 15:30 ` Ralf Baechle
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.