[LITMUS^RT] ARM compilation patches.
Christopher Kenna
cjk at cs.unc.edu
Mon Oct 1 21:58:40 CEST 2012
On Mon, Oct 1, 2012 at 12:52 PM, Manohar Vanga <mvanga at mpi-sws.org> wrote:
>> Regarding the enabling of performance counters, it looks like a patch was submitted for enabling and using them on ARMv7 processors (both A8 and A9). I didn't check exactly when this was introduced: (http://lxr.free-electrons.com/source/arch/arm/kernel/perf_event_v7.c) I think you could just try back porting that file into the tree.
>
> This looks like it's been in the tree for quite a while. It's there in the LitmusRT tree! It can be enabled with CONFIG_CPU_V7 :-)
Those are performance counters that you can set up in user space via
system calls, but we just want a simple get_cycles() available to us
in the kernel for tracing purposes. The perf events framework is meant
to profile tasks that are running, and therefore does all sorts of
performance counter multiplexing that we don't want. However, you are
right that fundamentally this is the same code that we need to use. It
just has more stuff around it to make it general and available to the
perf framework.
Another problem I had with the perf framework was that it did not work
on a PandaBoard under an older kernel. I never figured out why. I was
able to code the assembly instructions into the kernel and have them
work on one CPU. On the Exynos-based ODROID-X the perf commands all
work fine, and dmesg reports to me that: hw perfevents: enabled with
ARMv7 Cortex-A9 PMU driver, 7 counters available.
More information about the litmus-dev
mailing list