Hi Robert,
Thanks for the feedback. I checked and found:
/proc/filesystems does not contain oprofile
mkdir /dev/oprofile - OK
mount -t oprofilefs -o nodev /dev/oprofile - fails
Can't find /dev/oprofile in /etc/fstab
One thing I found in the configuration of the Freescale kernel
is that it does not provide an "Instrumentation support" choice.
In fact, I manually added the lines:
to the config file, although the CONFIG_PKG_OPROFILE=y
selection was present. It also does not have an APIC selection.
However, if the package can be enabled, I would have thought
it would install correctly, even if the lines I added were ignored.

From: Robert Richter <robert.richter@amd.com>
To: John Koshi <jkoshi@yahoo.com>
Cc: Monthadar Al Jaberi <monthadar@gmail.com>; oprofile-list@lists.sourceforge.net
Sent: Monday, April 20, 2009 4:00:25 PM
Subject: Re: Oprofile on an embedded system

On 20.04.09 13:14:54, John Koshi wrote:
> I checked the script and found that it was not finding the "dirname" command.
> When I checked our busybox configuration, I found dirname was not enabled,
> so I enabled it, rebuilt, and tested again. Now, I get just:
>     FATAL: Module oprofile not found.
>     FATAL: Module oprofile not found.
>     Kernel doesn't support oprofile.

The script tries to mount the oprofile filesystem that the kernel
should provide. It checks /proc/filesystems, you should get something
like this on your system:

# cat /proc/filesystems | grep oprofile
nodev  oprofilefs

If it is not there, the script tries then to load the oprofile module
and checks the filesystem again. oprofile should then be listed in
/proc/modules and also oprofilefs in /proc/filesystems. If not, the
script fails. Maybe /proc is disabled or not available? Not sure if
this is a config option.

You can also try to mount oprofile directly:

# mkdir /dev/oprofile
# mount -t oprofilefs nodev /dev/oprofile


Advanced Micro Devices, Inc.
Operating System Research Center
email: robert.richter@amd.com