From: Maynard J. <may...@us...> - 2012-02-01 15:00:52
|
On 02/01/2012 02:11 AM, John stacy wrote: > Hello Team, > > I am a newbie to oprofile usage. My aim is to profile a simple application ( no kernel profiling ) and get the major api function calls execution times using oprofile on my ARMv7 target with Linux 2.6-37 on it. > > OProfile version is 0.9.6. > I compiled my binary with -g option enabled. > > Here are the steps I followed. > > root@omap3evm:~# opcontrol --start --no-vmlinux -V=all With the verbose option, the oprofile daemon spends so much time printing messages that you usually end up with lost samples. So don't use it unless you're debugging some oprofile problem. > Parameters used: > SESSION_DIR /home/me/tmpsession > LOCK_FILE /home/me/tmpsession/lock > SAMPLES_DIR /home/me/tmpsession/samples > CURRENT_SAMPLES_DIR /home/me/tmpsession/samples/current > CPUTYPE timer > BUF_SIZE default value > BUF_WATERSHED default value > CPU_BUF_SIZE default value > SEPARATE_LIB 0 > SEPARATE_KERNEL 0 > SEPARATE_THREAD 0 > SEPARATE_CPU 0 > CALLGRAPH 0 > VMLINUX none > KERNEL_RANGE > XENIMAGE none > XEN_RANGE > executing oprofiled --session-dir=/home/me/tmpsession --separate-lib=0 --separate-kernel=0 --separate-thread=0 --separate-cpu=0 --events= --no-vmlinux --verbose=all ^-- I recommend using "--separate=lib". IMHO, it really should be the default setting. > Using 2.6+ OProfile kernel interface. > Using log file /home/me/tmpsession/samples/oprofiled.log > Daemon started. > Profiler running. > > > root@omap3evm:~# ps w | grep oprofile > 918 root 2644 S /usr/bin/oprofiled --session-dir=/home/me/tmpsession --separate-lib=0 --separate-kernel=0 --separate-thre > 922 root 3152 S grep oprofile > root@omap3evm:~# > > > the opcontrol status is > > root@omap3evm:~# opcontrol --status > Daemon running: pid 918 > Separate options: none > vmlinux file: none > Image filter: none > Call-graph depth: 0 > > > Saved the session. > #opcontrol --save=XYZ By default, the oprofile post-processing tools look for samples in /var/lib/oprofile/samples/current. The "--save=XYZ" above moves the samples to /var/lib/oprofile/samples/XYZ -- that's why you get the "No sample file found" message. There is a mechanism for telling the post-processing tools to look in a different location other than the default -- it's called the "session specification". See http://oprofile.sourceforge.net/doc/results.html#profile-spec-details. -Maynard > Signalling daemon... done > > *root@omap3evm:~# opcontrol --dump* > > *root@omap3evm:~# opreport -l* > /*opreport error: No sample file found: try running opcontrol --dump > or specify a session containing sample files* > / > even for the opannotate > > opannotate --source --output-dir=/path/to/annotated-source /path > *opannotate error: No sample file found: try running opcontrol --dump > or specify a session containing sample files* > > Why am I getting that error? Am I missing anything? > > I have gone through the oprofile manual on what to do when I get no results > > I cross checked the below ones > > 1.Spelling - I tried in both ways by specifying entire path as well as the relative path /usr/bin/tracker-control or tracker-control > 2.Profiler - oprofiled is running > 3. binary ran for around 8 seconds > 4. Events - i dont have any idea? How to cross check what are the events it is providing > 5. Kernel module :- I compiled Linux kernel by enabling profile option and even I tried with insmod manually and the oprofile.ko is instantiated properly. > I dont know about the -p option. > > Can some body throw some light on this problem? I dont have any idea of what I am missing. > > Thanks, > John > > > > > > > > > ------------------------------------------------------------------------------ > Keep Your Developer Skills Current with LearnDevNow! > The most comprehensive online learning library for Microsoft developers > is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, > Metro Style Apps, more. Free future releases when you subscribe now! > http://p.sf.net/sfu/learndevnow-d2d > > > > _______________________________________________ > oprofile-list mailing list > opr...@li... > https://lists.sourceforge.net/lists/listinfo/oprofile-list |