Tiny Core Linux

Tiny Core Extensions => TCE Talk => Topic started by: Rich on May 26, 2012, 11:29:30 PM

Title: oprofile error: no sample files found: profile specification too strict ?
Post by: Rich on May 26, 2012, 11:29:30 PM
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?
Title: Re: oprofile error: no sample files found: profile specification too strict ?
Post by: curaga on May 27, 2012, 06:03:53 AM
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.
Title: Re: oprofile error: no sample files found: profile specification too strict ?
Post by: Rich on May 27, 2012, 01:10:00 PM
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.
Title: Re: oprofile error: no sample files found: profile specification too strict ?
Post by: curaga on May 27, 2012, 01:24:07 PM
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.
Title: Re: oprofile error: no sample files found: profile specification too strict ?
Post by: Rich on May 27, 2012, 01:26:08 PM
Hi curaga
OK, thanks.