discuss-gnustep
[Top][All Lists]
Advanced

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

Re: How to profile?


From: nicola
Subject: Re: How to profile?
Date: Tue, 7 Nov 2000 15:14:42 +0000 (GMT)

> I'm trying to optimize some display code in gstep-gui.  To see where I
> can better target my work I'd like to profile the library with the
> testing apps and see where bottlenecks are.  What is the proper way of
> doing this?  I've attempted to use debug=yes profile=yes, but this only
> provides very basic profilling data of message passing and classes
> within the test app, but not anything from within the AppKit.

Support for profiling shared libraries has apparently been added to glibc
2.1 - which is already installed in all our systems - just ready for us to
learn how to do it :) [though I had the impression you can only profile a
single shared lib at a time]

I have not tried yet to use this on GNUstep myself though, anyway here is
the standard example:

$ LD_PROFILE=/lib/libc.so.6 ls
[...]
[on my system, this puts the profiling file into
/var/tmp/libc.so.6.profile]

$ sprof /lib/libc.so.6 /var/tmp/libc.so.6.profile

Flat profile:

Each sample counts as 0.01 seconds.
  %   cumulative   self              self     total
 time   seconds   seconds    calls  us/call  us/call  name
100.00      0.01     0.01      529    18.90           mempcpy
  0.00      0.01     0.00     6592     0.00           flockfile
  0.00      0.01     0.00     6592     0.00           funlockfile
  0.00      0.01     0.00     5865     0.00           strncmp
  0.00      0.01     0.00     5127     0.00           memcpy
  0.00      0.01     0.00     4763     0.00           memchr
[etc...]




reply via email to

[Prev in Thread] Current Thread [Next in Thread]