Thanks  a ton .. setting the timer mode worked ... I actually rebooted the machine to unload the module - cause rmmod kept complaining that the module was in use.
After rebooting, I did modprobe oprofile timer=1

Is there a better way of dynamically setting this?

On Wed, Aug 11, 2010 at 10:22 PM, Maynard Johnson <maynardj@us.ibm.com> wrote:
On 08/11/2010 11:30 AM, C K Kashyap wrote:

I tried on a fresh install of Fedora core 13 x86_64 on VMWare. Oprofile came
Ah!  Just noticed the "VMWare" reference in your previous note.  OProfile only works in timer mode with VMWare.  See FAQ http://oprofile.sourceforge.net/faq/.  You'll need to manually load the oprofile module with timer=1 module parameter.

-Maynard

with it -

[root@kashyap ~]# opcontrol --shutdown
Stopping profiling.
Killing daemon.
[root@kashyap ~]# opcontrol --reset
[root@kashyap ~]# opcontrol --start
Using default event: CPU_CLK_UNHALTED:100000:0:1:1
Using 2.6+ OProfile kernel interface.
Using log file /var/lib/oprofile/samples/oprofiled.log
Daemon started.
Profiler running.
[root@kashyap ~]# opcontrol --status
Daemon running: pid 3976
Separate options: library
vmlinux file: none
Image filter: none
Call-graph depth: 100
[root@kashyap ~]# opcontrol --dump
[root@kashyap ~]# opreport
opreport error: No sample file found: try running opcontrol --dump
or specify a session containing sample files

Just does not seem to budge!!!



On Wed, Aug 11, 2010 at 7:20 PM, Maynard Johnson <maynardj@us.ibm.com
<mailto:maynardj@us.ibm.com>> wrote:

   On 08/11/2010 1:54 AM, C K Kashyap wrote:

       Hi William,
       I'd really appreciate your help here. I'v tried this multiple times -

       Created a clean RHEL4 Update 6 x86_64 machine (on VMWare) - installed the
       oprofile rpm and then tried
       opcontrol --no-vmlinux
       opcontrol --start

       and no matter what I do, opreport just says this -

       [root@localhost ~]# opreport
       opreport error: No sample file found: try running opcontrol --dump
       or specify a session containing sample files


   Do 'opcontrol --status'.  What do you see for "Image filter"?  From the
   profiling run below, I see you ran "opcontrol --image=/bin/ls", which tells
   oprofile to only store samples that result from running that command.  The
   specified image filter is cached, so subsequent runs of oprofile will
   continue to use that same filter.  To change it back to the default "no
   filter" state, run 'opcontrol --shutdown' and then 'opcontrol --image=all'.
     I recommend against using this option unless you have a very good reason,
   since it can tend to lead to confusion in later profiling runs if you don't
   reset it back to the default right away.

   -Maynard


       Regards,
       Kashyap

       On Tue, Aug 10, 2010 at 11:49 PM, William Cohen <wcohen@redhat.com
       <mailto:wcohen@redhat.com>
       <mailto:wcohen@redhat.com <mailto:wcohen@redhat.com>>> wrote:

           On 08/10/2010 12:53 PM, C K Kashyap wrote:
       >   Hi,
       >
       >   Can you please tell me if I'm doing something wrong -
       >
       >
       >   [root@localhost ~]# opcontrol --start
       >   Using default event: CPU_CLK_UNHALTED:100000:0:1:1
       >   Using 2.6+ OProfile kernel interface.
       >   Using log file /var/lib/oprofile/samples/oprofiled.log
       >   Daemon started.
       >   Profiler running.
       >   [root@localhost ~]# opcontrol --event=CPU_CLK_UNHALTED:400000
           --event=DATA_MEM_REFS:10000
       >   [root@localhost ~]# opcontrol --no-vmlinux
       >   [root@localhost ~]# opcontrol --image=/bin/ls
       >   [root@localhost ~]# ls
       >   anaconda-ks.cfg  install.log  install.log.syslog  yinst
       >   [root@localhost ~]# opcontrol --dump
       >   [root@localhost ~]# opreport
       >   error: no sample files found: profile specification too strict ?
       >   [root@localhost ~]# ls -l /var/lib/oprofile/
       >   total 20
       >   -rw-r--r--  1 root root  724 Aug 10 09:50 abi
       >   -rw-r--r--  1 root root    2 Aug 10 09:52 complete_dump
       >   drwxrwxrwx  2 root root 4096 Aug 10 09:46 jitdump
       >   -rw-r--r--  1 root root    5 Aug 10 09:50 lock
       >   prw-rw-rw-  1 root root    0 Aug 10 09:52 opd_pipe
       >   drwxr-xr-x  3 root root 4096 Aug 10 09:46 samples
       >   [root@localhost ~]#
       >
       >

           Hi Kashyap,

           It helps to start oprofile running with:

           opcontrol --start


           There is a cheat sheet at:

       http://oprofile.sourceforge.net/docs/

           Given the short duration of  /bin/ls, you might not get samples. You
       might
           try --image on something more substantial. You might also want to use
           --separate=library to associate library samples with the executable.
       Many
           programs in linux are making heavy use of shared libraries.


           -Will


         ------------------------------------------------------------------------------
           This SF.net email is sponsored by

           Make an app they can't live without
           Enter the BlackBerry Developer Challenge
       http://p.sf.net/sfu/RIM-dev2dev
           _______________________________________________
           oprofile-list mailing list
       oprofile-list@lists.sourceforge.net
       <mailto:oprofile-list@lists.sourceforge.net>
       <mailto:oprofile-list@lists.sourceforge.net
       <mailto:oprofile-list@lists.sourceforge.net>>

       https://lists.sourceforge.net/lists/listinfo/oprofile-list




       --
       Regards,
       Kashyap



       ------------------------------------------------------------------------------
       This SF.net email is sponsored by

       Make an app they can't live without
       Enter the BlackBerry Developer Challenge
       http://p.sf.net/sfu/RIM-dev2dev



       _______________________________________________
       oprofile-list mailing list
       oprofile-list@lists.sourceforge.net
       <mailto:oprofile-list@lists.sourceforge.net>
       https://lists.sourceforge.net/lists/listinfo/oprofile-list





--
Regards,
Kashyap




--
Regards,
Kashyap