This forum has been archived. All content is frozen. Please use KDE Discuss instead.

How to use --enable-profile correctly?

Tags: None
(comma "," separated)
swolchok
Registered Member
Posts
9
Karma
0
I have compiled ktorrent with --enable-profile and noticed that gprof `which ktorrent` gmon.out shows no output. After searching around a bit, I added KT_PROF_START("processChunk") and KT_PROF_END() at the start and end of SHA1Gen::processChunk, which I am trying to profile. However, this doesn't seem to have worked: gprof `which ktorrent` gmon.out shows a lot of ktorrent functions, but not the one I am looking for, and gprof -b ~/lib54/libktorrent.so gmon.out also doesn't show the function I noted. What's going on?
George
Moderator
Posts
5421
Karma
1

Tue Nov 20, 2007 6:36 pm
That KT_PROF stuff and the enable-profile flag is some old ****, you need to ignore, it is no longer maintained.

You just need to compile with the correct compiler flags (-pg), and the gmon.out should be generated. However profiling shared libs on amd64 doesn't work (last time I checked). If you link statically to libktorrent, it should be possible to profile.


Bookmarks



Who is online

Registered users: Bing [Bot], claydoh, Google [Bot], rblackwell, Yahoo [Bot]