[Bf-committers] profiling blender (solved)
Campbell Barton
cbarton at metavr.com
Sun May 6 05:53:54 CEST 2007
Hi, it took me a while to work all this out, but its actually pretty
simple in practice - using linux and make
Add these lines to your user-def.mk
export CFLAGS=-pg -ggdb -g3 -pipe -O0 -pedantic
export CCLAGS=-pg -ggdb -g3 -pipe -O0 -pedantic
export DBG_LDFLAGS= -p
run "make clean"
run "make debug"
the new binary will in a path like this..
I symlink blender so its not as annoying
in terminal "ln -s ./obj/linux-glibc2.4-i386/debug/bin/blender
./blender_debug"
Now when you run blender it will generate gmon.out when you exit.
This file is used be gprof to generate the profile.
run "gprof ./blender_debug gmon.out > ./gprofile.txt"
Now you can look at gprofile.txt and see how much time functions are
taking and how many calls are made to each.
I tried to find a wiki where this couldbe added but it seems we only have
http://www.blender.org/development/building-blender/building-with-make/
Which isnt that helpful.
- Cam
More information about the Bf-committers
mailing list