RE: problem when Profiling Gtk+............plz help

It seems that the question that you want to ask is "What is the tool that can be used to profile the various function calls in the GTK+ framework?"
As per my information, we tried using Valgrind but could not figure out the options that gives profiling with respect to time for Gtk+ framework.
You have used gprof to do that. Even that did not work.
Can someone please help with the tool that is in use in Gtk+ development community for profiling towards identifying functions that take most of the time in performance?
Thanks and regards,
Nitin Sharma

From: gtk-devel-list-bounces gnome org [mailto:gtk-devel-list-bounces gnome org] On Behalf Of rafeeqh shaik
Sent: Thursday, October 05, 2006 1:46 PM
To: gtk-devel-list gnome org
Subject: problem when Profiling Gtk+............plz help

Hi every one.....


I am  trying to profile( which function takes how much time) the gtk+  for finding out the bottlenecks in the source code.

So here we tried to use the gprof tool available in linux for profiling source code. We are using FEDORA core 5.


Procedure we followed:

From the documentation available in the below site


1) Compiled all the library files listed below with –pg option.






                libjpeg (libezxjpeg)










Now we tried to run a simple application for profiling the gtk+ called helloworld.c which displays a button and when we click on that button window will be closed.


A simple application: helloworld.c(taken from gtk tutorial)(This program will quit from main when helloworld button clicked).


This application compiled using the command:

gcc -Wall -g –pg helloworld.c -o helloworld `pkg-config --cflags gtk+-2.0` \

`pkg-config --libs gtk+-2.0`.


if i run

./helloworld   ...............................created gmon.out.


Application is running fine.


gprof  -b helloworld gmon.out didn't give any information about profiling of the code.




2) Once again we compiled all the library files using the options -–enable-static and –pg

Souce site:


but still no output.




gprof -b helloworld gmon.out



Flat profile:


Each sample counts as 0.01 seconds.

 no time accumulated


  %   cumulative    self              self     total

 time   seconds   seconds     calls  Ts/call  Ts/call  name


                        Call graph



granularity: each sample hit covers 4 byte(s) no time propagated


index % time    self  children     called     name


Index by function name.






Plz help me regarding this.


Thanks in advance




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]