WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: oprofile error: no sample files found: profile specification too strict ?  (Read 6857 times)

Online Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11630
I'm having some trouble getting  oprofile  to work. Running the script:
Code: [Select]
#!/bin/sh
sudo opcontrol --no-vmlinux
sudo opcontrol --separate=kernel
sudo opcontrol --start
./wdemo
sudo opcontrol --shutdown
opreport -l ./wdemo
results in the following:
Code: [Select]
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.
Stopping profiling.
Killing daemon.
error: no sample files found: profile specification too strict ?
Dmesg shows:
Code: [Select]
oprofile: using NMI interrupt.
oprofile: counter #0 on cpu #0 may already be used
I'm running TC4.1 (3.0.3) on a Dell Dimension 4100, Pentium III, 512Meg.
Code: [Select]
quiet tce=sda3 home=sda3 opt=sda3 printk.time=1 profile=2 idle=poll nmi_watchdog=0 nozswap lapic intel_rng.no_fwh_detect=1Anyone have any ideas on what else I might have to do to get this to work?

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
You get that error if your app runs too quickly, ie it took less than 100k cpu cycles with the default. If after that you run opreport without any arguments, do you see the system's stats?

If you need to profile something fast, gprof may be better than oprofile.
« Last Edit: May 27, 2012, 06:05:29 AM by curaga »
The only barriers that can stop you are the ones you create yourself.

Online Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11630
Hi curaga
Running opreport without any arguments returns the same error. From what I understand, it should be generating
NMIs, at which time it takes a sample. /proc/interrupts shows NMI incrementing by one no matter how long I
allow oprofile to run. The "oprofile: counter #0 on cpu #0 may already be used " in demesg probably isn't helping
either. Which kernel was this compiled for? According to SourceForge:
Quote
First you need to build OProfile and install it. ./configure, make, make install is often all you need, but note these arguments to ./configure :
--with-linux

 Use this option to specify the location of the kernel source tree you wish to compile against. The kernel module is built against this source and will only work with a running kernel built from the same source with exact same options, so it is important you specify this option if you need to.

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
None, that advice is outdated. For 2.6 kernels and later oprofile doesn't need the kernel source.

OK, if there's no system stats either, then it's not a too-fast-app. You might want to ask the oprofile guys.
The only barriers that can stop you are the ones you create yourself.

Online Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11630
Hi curaga
OK, thanks.