try getting ti to compile with "-pg" and then running "gprof" (see the 'man' page). You can get ./configure to add the -pg flag using the CFLAGS and LFLAGS environment variables (there might be other ways too.) But then, somehow you have to get the profiling version of pd in the same directory as non-profiling versions of pd-gui and pd-watchdog (as appropriate) because otherwise they'll all try to write to the same "gmon.out" file.
good luck...
M
On Fri, Dec 28, 2007 at 03:10:00PM -0800, B. Bogart wrote:
Hey all,
I'm trying to track down a strange baseline CPU usage in a patch of mine. Basically I load the patch and it will show a certain baseline CPU amount, even with audio off, no rendering, and no control messages flowing (except for those initially set off by the loadbangs). loading with -noloadbang does not show the baseline CPU.
The amount of CPU seems proportional to the number of abstractions in the patch (about 800 kills the machine at 90%+, 400 uses about 40%)
So I'd like to see what PD functions are using up all the CPU.
I've compiled a PD with ./configure --enable-debug and I do see the -g in the makefile, but oprofile still only shows "pd" as a blackbox.
For Gem I needed to do something with the "strip" stuff, but I don't see any corresponding features in the PD makefile.
Any suggestions?
Thanks all,
B. Bogart
PD-dev mailing list PD-dev@iem.at http://lists.puredata.info/listinfo/pd-dev