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
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
Thanks Miller,
I've finally gotten to this again as my "baseline" cpu gets worse as soon as I try and add anything to my patch.
I've been unable to coerce (pd.39-2) to create a gmon.out file. I've tried adding -g -pg to CFLAGS as an environment variable, I've tried adding them to CFLAGS in the makefile (after configure). no gmon.out file is created, in any directory on the system. I tried it without the -g also. I've tried adding the flag to CFLAGS and to OPT_CFLAGS. info says my binary is not striped, but says nothing about gprof. Perhaps things are not working on pd-0.39? If anyone has any other pointers, who has been able to "gprof" PD, please drop me a line.
Onto the second part of this message, am I having troubles because my patches are too big?
Due to lots of deep nesting and many instances its hard to guess how many "objs" there are in my system, somewhere between 25,000 and 27,000 objects.
How big are your patches?? Am I just insane, and this damn project should not be working at all?
Thanks, B. Bogart
Miller Puckette wrote:
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
PD-dev mailing list PD-dev@iem.at http://lists.puredata.info/listinfo/pd-dev