AnsweredAssumed Answered

Performance measurement using oprofile on MPC5200 embedded platform

Question asked by John Koshi on Apr 20, 2009
Latest reply on Apr 21, 2009 by Carl Norman
Hi,
I'm trying to get Oprofile to work on an embedded system (Freescale MPC5200, and
Linux release tag ltib-mpc5200-20051213). I added the following to the config file:
    CONFIG_PROFILING=y
    CONFIG_OPROFILE=y
and enabled the following:
    CONFIG_PKG_OPROFILE=y
On the first build, I got dependency errors, so I added the binutils and popt pkgs to
the config file.
Thereafter, it built correctly, but when the image is transferred to the target, and I
run any opcontrol command (for example: opcontrol --no-vmlinux), I get:
    FATAL: Module oprofile not found.
    FATAL: Module oprofile not found.
    Kernel doesn't support oprofile.
When I do an lsmod | grep oprof, oprofile doesn't show up.
In /usr/bin, I have op_help, opannotate, oparchive, opcontrol, opgprof, opreport,
oprofiled, and opstack. The directory /usr/share/oprofile is present, with all the arch
subdirs. Also, the docs are present in /usr/share/oprofile.
I got the same result building with CONFIG_OPROFILE=m.
Any idea why this is happening? To me it looks like the driver is not being built and
included correctly.
One caveat to our build method is that we specify the device directories during the
image build, by "mknod dev/watchdog c 10 130", etc., in the rootfs of the image that
gets installed on the target, and so udevd is not enabled on the target. Do I need to
add an entry for oprofile? Will building as a kernel module not work in this case, ie:
with CONFIG_OPROFILE=y?
Any help would be greatly appreciated.
regards,
John

Outcomes