[Apologies if this is posted twice - it didn't seem to go through from my work email]
I've been experiencing the same problem with operf as the one reported below in September. I haven't seen any resolution for the problem on this list or in the bug tracker. The problem is:
* using opcontrol 0.98 to collect LLC_MISSES works for me * using operf 0.98 to collect LLC_MISSES (or other non-CPU_CLK_UNHALTED events) on the same program and system doesn't produce any sample file for me
Is this a known issue?
If I am doing something wrong, or if there is something I can do to help diagnose the problem, please let me know. Details below my signature.
Log of operf run: ------------------ + operf --events=LLC_MISSES:10000::0:1 bin/fma3d operf: Profiler started [... program output ...] Profiling done. + opreport -d bin/fma3d Using /home/donb/test/fma3d/oprofile_data/samples/ for samples directory. opreport error: No sample file found: If using opcontrol for profiling, try running 'opcontrol --dump'; otherwise, specify a session containing sample files.
$ ls -lR oprofile_data/ oprofile_data/: total 8 -rw-rw-r-- 1 donb sw 721 Dec 7 14:57 abi drwxrwxr-x 3 donb sw 4096 Dec 7 14:57 samples/
oprofile_data/samples: total 8 drwxrwxr-x 2 donb sw 4096 Dec 7 14:56 current/ -rw-rw-r-- 1 donb sw 690 Dec 7 14:57 operf.log
oprofile_data/samples/current: total 0
Log of opcontrol run: ---------------------- [... removed ./oprofile_data directory ...] + cat /proc/sys/kernel/nmi_watchdog 0 + sudo opcontrol --deinit Unloading oprofile module + sudo opcontrol --setup --no-vmlinux + sudo opcontrol --init + sudo opcontrol --event=LLC_MISSES:10000::0:1 + sudo opcontrol --reset + sudo opcontrol --setup --no-vmlinux + sudo opcontrol --start --separate=thread,library ATTENTION: Use of opcontrol is discouraged. Please see the man page for operf. Daemon started. Profiler running. + bin/fma3d [... program output ...] + sudo opcontrol --dump + sudo opcontrol --shutdown Stopping profiling. Killing daemon. + opreport -d bin/fma3d Using /var/lib/oprofile/samples/ for samples directory. CPU: Intel Sandy Bridge microarchitecture, speed 2593.32 MHz (estimated) Counted LLC_MISSES events (Last level cache demand requests from this core that missed the LLC) with a unit mask of 0x41 (No unit mask) count 10000 vma samples % symbol name 00450240 2 33.3333 platq_internal_forces_ 00450292 1 50.0000 00450335 1 50.0000 0041c4b0 1 16.6667 material_41_integration_ 0041d2a7 1 100.000 00457b30 1 16.6667 platq_stress_integration_ 00457f61 1 100.000 004e1120 1 16.6667 solve_ 004e1e05 1 100.000 0051a800 1 16.6667 subcycling_partition_ 0051a801 1 100.000
On 9/19/2012 8:28 AM, Christian Kaiser wrote: > On 09/19/2012 03:45 PM, Maynard Johnson wrote: >> On 09/19/2012 03:08 AM, Christian Kaiser wrote: >>> Hi all, >>> >>> I am currently testing operf from the latest oprofile release (0.9.8) >>> and I realized that other events than "CPU_CLK_UNHALTED" are not working >>> for me, e.g. LLC_MISSES. I get the following message, calling opreport: >> I've tested 0.9.8 (both operf and opcontrol) on a Sandybridge and I see events other than CPU_CLK_UNHALTED, including LLC_MISSES. >>> " >>> $ opreport >>> Using /home/christian/test/oprofile_data/samples/ for samples directory. >>> opreport error: No sample file found: If using opcontrol for profiling, >>> try running 'opcontrol --dump'; otherwise, specify a session containing >>> " >>> >> [snip] >>> This was a test on a server with Nehalem CPU (Xeon W5580) running >>> Scientific Linux 6.0, oprofile 0.9.8 and a recent kernel 3.5.4 (from >>> elrepo.org). Command line was "operf -V all -e LLC_MISSES:6000:0:0:1 -t >>> -l ./test-app". >> I trust you don't use the "-V all" option normally . . . >>> I did not dig much deeper into this but I did a short test with >>> opcontrol system-wide profiling and there I have the same problem. >> Let's start by making sure that 0.9.8 opcontrol is having the same problem. As the man page for operf states (and as seen above in the first line output from your 'opreport' command), operf uses<current_dir>/oprofile_data as the session-dir and will store sample data therein. So if opreport finds an "oprofile_data" directory in the cur dir, it assumes it should look there for samples. On the other hand, opcontrol uses /var/lib/oprofile as the session-dir. After running opcontrol, you want to make sure that opreport looks for samples in /var/lib/oprofile, so if your current directory has an oprofile_data dir, either delete it or move to a different directory. >> >> So please verify again that opcontrol 0.9.8 is having the same problem. And in your reply, list *all* of the events you've tried for which you've been unsuccessful in getting samples. > > I tested for LLC_MISSES with opcontrol, which is successfully reporting > some cache misses (see bolow). > > " > [root@host]# opcontrol -e LLC_MISSES:6000 > [root@host]# opcontrol --deinit > [root@host]# rm -rf /var/lib/oprofile/* > [root@host]# opcontrol --init > [root@host]# opcontrol --status > Daemon not running > Session-dir: /var/lib/oprofile > Event 0: LLC_MISSES:6000:65:1:1 > Separate options: thread > vmlinux file: none > Image filter: none > Call-graph depth: 0 > Unloading oprofile module > [root@host]# opcontrol --start > ATTENTION: Use of opcontrol is discouraged. Please see the man page for > operf. > Using 2.6+ OProfile kernel interface. > Using log file /var/lib/oprofile/samples/oprofiled.log > Daemon started. > Profiler running. > [root@host]# ./test-app > [root@host]# opcontrol --stop > Stopping profiling. > [root@host]# opreport --symbols --threshold=1 --demangle=smart -m all > Using /var/lib/oprofile/samples/ for samples directory. > warning: /no-vmlinux could not be found. > CPU: Intel Core/i7, speed 3199.82 MHz (estimated) > Counted LLC_MISSES events (Last level cache demand requests from this > core that missed the LLC) with a unit mask of 0x41 (No unit mask) count > 6000 > samples % app name symbol name > 1073 78.8391 no-vmlinux /no-vmlinux > 51 3.7472 libc-2.12.so __strncpy_ssse3 > [...] > " > > Running the same with operf for the application results in the reported > problem: > " > [root@host]# opcontrol --deinit > Killing daemon. > Unloading oprofile module > [root@host]# operf -l -t -e LLC_MISSES:6000 ./test-app > operf: Profiler started > > Profiling done. > [root@host]# opreport --symbols --threshold=1 --demangle=smart -m all > Using /tmp/test/oprofile_data/samples/ for samples directory. > opreport error: No sample file found: If using opcontrol for profiling, > try running 'opcontrol --dump'; otherwise, specify a session containing > sample files. > > " > > Removing the -l and -t parameter does not change the behavior. > > Thanks, > Christian >