wxWidget ( wxGtk) profiling

10 views
Skip to first unread message

truecool

unread,
Nov 4, 2009, 11:21:46 PM11/4/09
to wx-dev
Hi All,
I am trying for the profiling of wxGtk. I tried enabling profiling
while configure of wxGtk but when I run gprof for minimal sample,
given in source code , it give all time data as 0.0.( I also build
sample application with -pg option) . I am not very good in Linux.

Could anyone please suggest some good profiling tool or existing set-
up which can help me in improving performance of wxGtk( wxWidgets) or
any related documentation or correct approach .

On comparing sample window creation time of wxGtk with gtk
applications , there is good time difference ( 3 times) which I want
to improve some how.


Regards,
Gaurav Verma

Vadim Zeitlin

unread,
Nov 5, 2009, 7:20:33 AM11/5/09
to wx-...@googlegroups.com
On Wed, 4 Nov 2009 20:21:46 -0800 (PST) truecool <gauravv...@gmail.com> wrote:

t> I am trying for the profiling of wxGtk. I tried enabling profiling
t> while configure of wxGtk but when I run gprof for minimal sample,
t> given in source code , it give all time data as 0.0.( I also build
t> sample application with -pg option) . I am not very good in Linux.

I don't know what could explain it, I did use gprof with wx in the past
although it was mostly for non-GUI code.

t> Could anyone please suggest some good profiling tool or existing set-
t> up which can help me in improving performance of wxGtk( wxWidgets) or
t> any related documentation or correct approach .

I use kcachegrind for profiling myself. Maybe there are better choices, I
didn't look at the state of Linux profiling tools since many years.

t> On comparing sample window creation time of wxGtk with gtk
t> applications , there is good time difference ( 3 times) which I want
t> to improve some how.

This would be very welcome, of course. Good luck!
VZ

tonda...@post.cz

unread,
Nov 6, 2009, 3:27:00 PM11/6/09
to wx-...@googlegroups.com
Hello,
I succesfully profiled wxWindets application by Oprofile. But I focused to the application not the wxWidgets...
I added flags "-g -pg" to the compiler and linker, to enable debugging symbols and allow profiling on source line accuracy.
I don't know well the "valgrind --tool=callgrind" way, but the raw comparison is that the oprofile slow down the application only little but the valgrind takes ages.
Also you can start/stop oprofile independently on the application (profile only part of the session).
On the other hand oprofile is statistical tool, so accuracy is smaller.
Other experience:
- sometimes is problem to measure inline function, the time is added to calling function
- profile very depends on optimization settings, in my case the "debug" cause a lot of time wasted in STL classes

Have a nice day,
TonyMi

Reply all
Reply to author
Forward
0 new messages