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



I can recommend oprofile. gprof does not profile shared libraries.
Better check with 'ldd ./helloworld' that it indeed has been linked
statically.

Stefan
**
rafeeqh shaik wrote:
> 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
>
> http://www.gnu.org/software/binutils/manual/gprof-.9.1/html_mono/gprof.html
> <http://www.gnu.org/software/binutils/manual/gprof-.9.1/html_mono/gprof.html>
>
>  
>
> 1) Compiled all the library files listed below with –pg option.
>
> Source:
>
>  
>
> gtk+-2.10.0
>
>         atk-1.10.1
>
>         DirectFB-0.9.25.1
>
>                 libjpeg (libezxjpeg)
>
>         cairo-1.2.0
>
>                 libxml2-2.6.20
>
>                 libpng-1.2.12
>
>         pango-1.13.3
>
>                 fontconfig-2.3.95
>
>                 freetype-2.1.10
>
>                 zlib-1.2.3
>
>         glib-2.12.0
>
>  
>
> 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
> <http://mail.google.com/mail/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: 
>
> http://mail.gnome.org/archives/gtk-app-devel-list/2000-November/msg00111.html
> <http://mail.gnome.org/archives/gtk-app-devel-list/2000-November/msg00111.html>
>
>
>  
>
> but still no output.
>
>  
>
>  
>
> *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
>
> * *
>
>  
>
>
> -- 
> SHAIK RAFEEQH
>  
> ------------------------------------------------------------------------
>
> _______________________________________________
> gtk-devel-list mailing list
> gtk-devel-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtk-devel-list
>   




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