Hello Suravee,

The daemon also does not start. The starting of the daemon gives the same error as opcontol --start as I had mentioned in my first post.

So, the following output's are just running the script and not during runtime of Oprofile.
The output of  script oprofile_drv_monitor.sh is:

+ test -f /dev/oprofile/enable
+ echo '---- General Info ----'
---- General Info ----
++ cat /dev/oprofile/enable
+ echo '/dev/oprofile/enable                       : 0'
/dev/oprofile/enable                       : 0
++ cat /dev/oprofile/cpu_type
+ echo '/dev/oprofile/cpu_type                     : i386/piii'
/dev/oprofile/cpu_type                     : i386/piii
++ cat /dev/oprofile/buffer_size
+ echo '/dev/oprofile/buffer_size                  : 131072'
/dev/oprofile/buffer_size                  : 131072
++ cat /dev/oprofile/buffer_watershed
+ echo '/dev/oprofile/buffer_watershed             : 32768'
/dev/oprofile/buffer_watershed             : 32768
++ cat /dev/oprofile/cpu_buffer_size
+ echo '/dev/oprofile/cpu_buffer_size              : 8192'
/dev/oprofile/cpu_buffer_size              : 8192
++ cat /dev/oprofile/backtrace_depth
+ echo '/dev/oprofile/backtrace_depth              : 0'
/dev/oprofile/backtrace_depth              : 0
++ cat /dev/oprofile/time_slice
+ echo '/dev/oprofile/time_slice                   : '
/dev/oprofile/time_slice                   :
+ echo ''

+ echo '---- Lost Info ----'
---- Lost Info ----
++ cat /dev/oprofile/stats/event_lost_overflow
+ echo '/dev/oprofile/stats/event_lost_overflow    : 0'
/dev/oprofile/stats/event_lost_overflow    : 0
++ cat /dev/oprofile/stats/bt_lost_no_mapping
+ echo '/dev/oprofile/stats/bt_lost_no_mapping     : 0'
/dev/oprofile/stats/bt_lost_no_mapping     : 0
++ cat /dev/oprofile/stats/sample_lost_no_mapping
+ echo '/dev/oprofile/stats/sample_lost_no_mapping : 0'
/dev/oprofile/stats/sample_lost_no_mapping : 0
++ cat /dev/oprofile/stats/sample_lost_no_mm
+ echo '/dev/oprofile/stats/sample_lost_no_mm      : 0'
/dev/oprofile/stats/sample_lost_no_mm      : 0
++ cat /dev/oprofile/stats/multiplex_counter
+ echo '/dev/oprofile/stats/multiplex_counter      : '
/dev/oprofile/stats/multiplex_counter      :
+ echo ''

+ echo '---- CPU ----'
---- CPU ----
+ echo '  CPU  | sample_lost_overflow | sample_received'
  CPU  | sample_lost_overflow | sample_received
++ ls /dev/oprofile/stats
++ grep cpu
++ sed s/cpu//g
++ sort -n
+ for i in '`ls /dev/oprofile/stats | grep cpu | sed "s/cpu//g" |  sort -n`'
++ cat /dev/oprofile/stats/cpu0/sample_lost_overflow
++ cat /dev/oprofile/stats/cpu0/sample_received
+ echo '  0 | 0 | 0'
  0 | 0 | 0
+ for i in '`ls /dev/oprofile/stats | grep cpu | sed "s/cpu//g" |  sort -n`'
++ cat /dev/oprofile/stats/cpu1/sample_lost_overflow
++ cat /dev/oprofile/stats/cpu1/sample_received
+ echo '  1 | 0 | 0'
  1 | 0 | 0
+ echo ''

+ test -d /dev/oprofile/ibs_fetch
+ echo ''

+ test -d /dev/oprofile/ibs_op
+ echo ''

+ echo '---- PMC ----'
---- PMC ----
+ echo ' Counter | enabled | event | unitmasks | count'
 Counter | enabled | event | unitmasks | count
++ ls /dev/oprofile
++ grep '[0-9]'
++ sort -n
+ for i in '`ls /dev/oprofile | grep [0-9] | sort -n`'
++ cat /dev/oprofile/0/enabled
++ cat /dev/oprofile/0/event
++ cat /dev/oprofile/0/unit_mask
++ cat /dev/oprofile/0/count
+ echo '    0    | 1 | 121 | 0 | 100000'
    0    | 1 | 121 | 0 | 100000
+ for i in '`ls /dev/oprofile | grep [0-9] | sort -n`'
++ cat /dev/oprofile/1/enabled
++ cat /dev/oprofile/1/event
++ cat /dev/oprofile/1/unit_mask
++ cat /dev/oprofile/1/count
+ echo '    1    | 0 | 0 | 0 | 0'
    1    | 0 | 0 | 0 | 0
+ echo ''

And the output oprofiled_monitor.sh of script is:

/usr/local/bin/opcontrol: line 1076: echo: write error: Invalid argument
Using default event: CPU_CLK_UNHALTED:100000:0:1:1
Using 2.6+ OProfile kernel interface.
Failed to open profile device: Operation not permitted
Couldn't start oprofiled.
Check the log file "/var/lib/oprofile/samples/oprofiled.log" and kernel syslog
root@domU-12-31-39-07-7A-71:~# /bin/sh -x oprofiled_monitor.sh
++ which pidof
+ PIDOF=/bin/pidof
++ /bin/pidof oprofiled
+ OPROFILED_PID=
+ test
+ echo 'Daemon pid                   : N/A'
Daemon pid                   : N/A
+ echo ''

+ echo 'Daemon command line          : N/A'
Daemon command line          : N/A
+ echo ''

+ echo 'Daemon file descriptor count : N/A'
Daemon file descriptor count : N/A
+ echo ''

+ test -f /var/lib/oprofile/lock
+ echo '/var/lib/oprofile/lock       : N/A'
/var/lib/oprofile/lock       : N/A
+ echo ''

+ test -f /var/lib/oprofile/complete_dump
+ echo 'Daemon complete_dump time    : N/A'
Daemon complete_dump time    : N/A
+ echo ''

Thanks for help in advance.

Thanks and Regards,
Nupur Garg


On Fri, Oct 16, 2009 at 7:43 PM, Suravee Suthikulpanit <suravee.suthikulpanit@amd.com> wrote:
These two scripts might help gather more information about the daemon
and driver during runtime.

Suravee

On Fri, 2009-10-16 at 08:53 -0500, Robert Richter wrote:
> On 16.10.09 10:37:30, nupur garg wrote:
> > Hello,
> > I wish to know that will compiling the kernel be of any use for this issue
> > as I had pointed out in my previous post.
>
> Could you send also the last lines of the following, I want to see
> which parameters opcontrol tries to write:
>
>  /bin/sh -x /usr/bin/opcontrol --start
>
> It seems there is some incompatibility between oprofile userland and
> the xendriver. Actually we do not support and test this, so there can
> be some flaw with it.
>
> -Robert
>
> >
> > Thanks for the help in advance.
> >
> > Nupur Garg
> >
> >
> > On Fri, Oct 16, 2009 at 5:10 AM, nupur garg <nupurgarg@cs.ucsb.edu> wrote:
> >
> > > Hello Robert,
> > > The answers are inline.
> > >
> > >  # uname -a
> > > Linux domU-12-31-39-07-7A-71 2.6.21.7-2.fc8xen #1 SMP Fri Feb 15 12:34:28
> > > EST 2008 x86_64 GNU/Linux
> > >
> > >  # zgrep -i oprofile /proc/config.gz
> > > gzip: /proc/config.gz: No such file or directory
> > >
> > >  # dmesg | grep -i oprofile
> > > xenoprofile_init: ret 0, events 2, xenoprof_is_primary 0
> > >
> > > # find /dev/oprofile/
> > > /dev/oprofile/
> > > /dev/oprofile/1
> > > /dev/oprofile/1/user
> > > /dev/oprofile/1/kernel
> > > /dev/oprofile/1/unit_mask
> > > /dev/oprofile/1/count
> > >  /dev/oprofile/1/event
> > > /dev/oprofile/1/enabled
> > > /dev/oprofile/0
> > > /dev/oprofile/0/user
> > > /dev/oprofile/0/kernel
> > > /dev/oprofile/0/unit_mask
> > > /dev/oprofile/0/count
> > > /dev/oprofile/0/event
> > > /dev/oprofile/0/enabled
> > > /dev/oprofile/stats
> > > /dev/oprofile/stats/bt_lost_no_mapping
> > > /dev/oprofile/stats/event_lost_overflow
> > > /dev/oprofile/stats/sample_lost_no_mapping
> > > /dev/oprofile/stats/sample_lost_no_mm
> > > /dev/oprofile/stats/cpu1
> > > /dev/oprofile/stats/cpu1/backtrace_aborted
> > > /dev/oprofile/stats/cpu1/sample_lost_overflow
> > > /dev/oprofile/stats/cpu1/sample_received
> > > /dev/oprofile/stats/cpu0
> > > /dev/oprofile/stats/cpu0/backtrace_aborted
> > > /dev/oprofile/stats/cpu0/sample_lost_overflow
> > > /dev/oprofile/stats/cpu0/sample_received
> > > /dev/oprofile/pointer_size
> > > /dev/oprofile/backtrace_depth
> > > /dev/oprofile/cpu_type
> > > /dev/oprofile/cpu_buffer_size
> > > /dev/oprofile/buffer_watershed
> > > /dev/oprofile/buffer_size
> > > /dev/oprofile/buffer
> > > /dev/oprofile/passive_domains
> > > /dev/oprofile/active_domains
> > > /dev/oprofile/dump
> > > /dev/oprofile/enable
> > >
> > >
> > > # echo $(cat /dev/oprofile/cpu_type)
> > > i386/piii
> > >
> > > Thanks and Regards,
> > > Nupur Garg
> > >
> > >
> > >
> > > On Fri, Oct 16, 2009 at 4:17 AM, Robert Richter <robert.richter@amd.com>wrote:
> > >
> > >> On 15.10.09 23:21:36, nupur garg wrote:
> > >> > Hello,
> > >> > The oprofile device is mounted.
> > >>
> > >> Nupur,
> > >>
> > >> what gives the following on your system with oprofile mounted?
> > >>
> > >>  # uname -a
> > >>  # zgrep -i oprofile /proc/config.gz
> > >>  # dmesg | grep -i oprofile
> > >>  # find /dev/oprofile/
> > >>  # echo $(cat /dev/oprofile/cpu_type)
> > >>
> > >> > 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.
> > >>
> > >> This happens if CONFIG_PM is not set and is only needed for
> > >> suspend/resume.
> > >>
> > >> -Robert
> > >>
> > >> --
> > >> Advanced Micro Devices, Inc.
> > >> Operating System Research Center
> > >> email: robert.richter@amd.com
> > >>
> > >>
> > >
>
> --
> Advanced Micro Devices, Inc.
> Operating System Research Center
> email: robert.richter@amd.com
>
>
> ------------------------------------------------------------------------------
> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and stay
> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
> http://p.sf.net/sfu/devconference
> _______________________________________________
> oprofile-list mailing list
> oprofile-list@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/oprofile-list
>