Hi Michael,
Thanks for the tip, that is very nice. This is perf looking at the ADSimDetector.
49.4% is in unknown, which is not too helpful. But it shows where the statistics plugin is spending its time. It shows a lot of time in the tcp routines, which is because pvAccess is transmitting 200 images per second, and each image
is 1024x1024 Float64, which is 8 MB per image, for a total of 1600MB/s.
Mark
-----Original Message-----
From: Tech-talk <tech-talk-bounces at aps.anl.gov> On Behalf Of Michael Davidsaver via Tech-talk
Sent: Saturday, July 18, 2020 6:18 PM
To: Siddons, David <siddons at bnl.gov>
Cc: tech-talk at aps.anl.gov
Subject: Re: profiling an IOC
On 7/17/20 1:19 PM, Siddons, David via Tech-talk wrote:
> I'd like to understand where my IOC code is taking its time, and gprof seems like the right tool for this, is that right? Where would I add the compile flags (-pg)?
You might also investigate the Linux 'perf' utility.
It doesn't need any special compiler flags, though it's hard to find much sense without debug symbols.
I especially like the 'top' mode, which can inspect an already running process. eg.
$ perf top -g -p <pid>
https://perf.wiki.kernel.org/index.php/Main_Page