building python with profiling support
I've used gprof to profile the interpreter in the past, but I'm stuck trying to it again on my current machine. I configured Python by saying CC="gcc -pg" ../configure That's the way I've built Python for profiling in the past and that's what the README says to do. The python binary that gets generated doesn't generate a gmon.out file. It appears that the problem is with the command used to generate the actual Python executable: c++ -pthread -Xlinker -export-dynamic -o python \ Modules/python.o \ libpython2.4.a -lpthread -ldl -lutil -lm The -pg flag has been lost. Can anyone suggest a recipe that will work? Or suggest how to modify the Makefile so that the -pg flag gets passed along. Jeremy
On Sat, Feb 07, 2004 at 02:25:39PM -0500, Jeremy Hylton wrote:
I've used gprof to profile the interpreter in the past, but I'm stuck trying to it again on my current machine. I configured Python by saying CC="gcc -pg" ../configure
That's the way I've built Python for profiling in the past and that's what the README says to do. The python binary that gets generated doesn't generate a gmon.out file. [snip] Can anyone suggest a recipe that will work? Or suggest how to modify the Makefile so that the -pg flag gets passed along.
I turn profiling on in this way: % CC="cc -pg" LDFLAGS="-pg" ./configure Hye-Shik
Jeremy Hylton wrote:
I've used gprof to profile the interpreter in the past, but I'm stuck trying to it again on my current machine. I configured Python by saying CC="gcc -pg" ../configure [...] Can anyone suggest a recipe that will work? Or suggest how to modify the Makefile so that the -pg flag gets passed along.
It looks like building --without-cxx should work. Martin
Jeremy Hylton
I've used gprof to profile the interpreter in the past, but I'm stuck trying to it again on my current machine. I configured Python by saying CC="gcc -pg" ../configure
That's the way I've built Python for profiling in the past and that's what the README says to do. The python binary that gets generated doesn't generate a gmon.out file.
It appears that the problem is with the command used to generate the actual Python executable:
c++ -pthread -Xlinker -export-dynamic -o python \ Modules/python.o \ libpython2.4.a -lpthread -ldl -lutil -lm
The -pg flag has been lost.
Can anyone suggest a recipe that will work? Or suggest how to modify the Makefile so that the -pg flag gets passed along.
I think when I last did this I pasted the link line into my terminal and added "-pg" by hand... Cheers, mwh -- ARTHUR: The ravenours bugblatter beast of Traal ... is it safe? FORD: Oh yes, it's perfectly safe ... it's just us who are in trouble. -- The Hitch-Hikers Guide to the Galaxy, Episode 6
participants (4)
-
"Martin v. Löwis"
-
Hye-Shik Chang
-
Jeremy Hylton
-
Michael Hudson