Hello,

The oprofile device is mounted.
I had one xen image also, I tried on it and oprofile worked perfectly fine on it. The difference between the ec2 image and this image I found was that in /sys/devices/system/ directory oprofile directory was not there. Looking around more I found that while compiling the kernel, Oprofile has to be set. The steps for that are there at http://www.ibm.com/developerworks/linux/library/l-oprof.html.I do not have a config file of the kernel on this image. But can this be the reason behind the device driver of oprofile not being enabled or the error that I am getting?

Thanks and Regards,
Nupur Garg


On Thu, Oct 15, 2009 at 7:23 PM, Robert Richter <robert.richter@amd.com> wrote:
On 15.10.09 08:04:13, Maynard Johnson wrote:
> nupur garg wrote:
> > Hello,
> > The part of script is:
> >
> > # set a sysctl/oprofilefs parameter
> > set_param()
> > {
> >         if test "$KERNEL_SUPPORT" = "yes"; then
> >                 *echo $2 >$MOUNT/$1*
> I believe the EINVAL is coming from your oprofile kernel driver, since we're writing to the oprofilefs, and the kernel driver has the read/write file operations defined to handle the files created within that file system.  Do you know who the maintainer of your oprofile kernel driver is?  If so, I suggest contacting them for help.
>
> -Maynard
> >         else
> >                 $SYSCTL -w dev.oprofile.$1=$2
> >         fi
> > }
> >
> > The bold line in the above script is the line where the write error is
> > coming. And am using oprofile-0.9.5.
> >
> > Thanks and Regards,
> > Nupur Garg
> >
> >
> > On Thu, Oct 15, 2009 at 2:17 AM, Maynard Johnson <maynardj@us.ibm.com>wrote:
> >
> >> nupur garg wrote:
> >>> Hello,
> >>> I have an ec2-instance running kernel linux-2.6.21.7-2.fc8xen. I am
> >>> trying to run Oprofile on this.

This is a fairly old kernel. Are you using virtualization and is this
dom0?

What prints the following?

 # modprobe -l | grep oprofile

Eventually load the module:

 # modprobe oprofile

Is oprofile available:

 # cat /proc/filesystems | grep oprofile
 nodev   oprofilefs

Mount manually:

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

-Robert

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