Re: "Subtracting" runs?

Nikolaus Rath <[email protected]> Wed, 26 Dec 2018 20:27:01 +0000
Newsgroups gmane.linux.oprofile
Message-ID <[email protected]>
On Dec 10 2018, John Levon <[email protected]> wrote:
> On Fri, Dec 07, 2018 at 02:19:24PM +0000, Nikolaus Rath wrote:
>
>> Is there a way to "subtract" two oprofile runs from each other?
>> Basically, I have a process that takes much longer when run with a
>> specific parameter, and I would like to find out where the extra time is
>> spent.
>
> http://oprofile.sourceforge.net/doc/opreport.html#opreport-diff

Thanks! I have trouble getting it to work though. Following the
instructions verbatim, I get:

(I am not concerned about the lost samples at this point)

,----
| $ operf tests/readall /lib 
| operf: Profiler started
| Read 621.19 MB from 8370 files.
| * * * * WARNING: Profiling rate was throttled back by the kernel * * * *
| The number of samples actually recorded is less than expected, but is
| probably still statistically valid.  Decreasing the sampling rate is the
| best option if you want to avoid throttling.
| 
| WARNING: Lost samples detected! See /home/nikratio/build/oprofile_data/samples/operf.log for details.
| Lowering the sampling rate may reduce or eliminate lost samples.
| See the '--events' option description in the operf man page for help.
| 
| Profiling done.
| 
| $ oparchive -o orig tests/readall 
| Using /home/nikratio/build/oprofile_data/samples/ for session-dir
| 
| WARNING! Some of the events were throttled. Throttling occurs when
| the initial sample rate is too high, causing an excessive number of
| interrupts.  Decrease the sampling frequency. Check the directory
| /home/nikratio/build/oprofile_data/samples/current/stats/throttled
| for the throttled event names.
| 
| 
| WARNING: Lost samples detected! See /home/nikratio/build/oprofile_data/samples/operf.log for details.
| NOTE: The sample data in this archive is located at /home/nikratio/build/oprofile_data
| and is being moved to the standard location of /var/lib/oprofile/.
| warning: /ext4 could not be found.
| warning: /fscrypto could not be found.
| 
| $ operf tests/readall /lib --sleep
| operf: Profiler started
| Read 621.19 MB from 8370 files.
| 
| WARNING: Lost samples detected! See /home/nikratio/build/oprofile_data/samples/operf.log for details.
| Lowering the sampling rate may reduce or eliminate lost samples.
| See the '--events' option description in the operf man page for help.
| 
| Profiling done.
| 
| $ opreport --session-dir=`pwd`/oprofile_data/ tests/readall -l { archive:./orig } { }
| opreport error: No sample found: Please specify a session containing 
| sample data.
`----

What am I doing wrong? Note that I did not recompile but use a different
flag, but I hope that's not the problem.


I also tried moving around data in oprofile_data/samples manually,
(because I was a little annoyed by the size of the archive created by
oparchive). I got that to produce output, but for some reason the binary
used in each run did not get matched up correctly (i.e., I would
consistently get +100% and -100% diffs on both sides).


Thanks!
-Nikolaus


-- 
GPG Fingerprint: ED31 791B 2C5C 1613 AF38 8B8A D113 FCAC 3C4E 599F

             »Time flies like an arrow, fruit flies like a Banana.«


_______________________________________________
oprofile-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/oprofile-list