Doing Profiling

Christian Esken c.esken at cityweb.de
Wed Dec 11 20:04:34 GMT 2002


Hi,

I want to do some profiling on KDE especilly for abalyzing startup time.
I thought using     ./configure --enable-debug=full --enable-profile   would work out nice.

The stuff is compiled with -g and -pg as seen below.

/bin/sh ../libtool --silent --mode=compile --tag=CXX g++ -DHAVE_CONFIG_H
-I. -I. -I.. -I./../libltdl/ -I../dcop -I../libltdl -I../kdecore -I../kdeui -I../kio -I../kio/kio -I../kio/kfile -I..
-I/opt/CVS/qt-copy//include -I/usr/X11R6/include -I/opt/kdehead/include   -DQT_THREAD_SUPPORT
-D_REENTRANT -I/opt/kdehead/include  -Wnon-virtual-dtor -Wno-long-long -Wundef -Wall -pedantic
-W -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE
-Wcast-align -Wconversion -pg -fno-builtin -g3 -fno-exceptions -fno-check-new 
-DQT_NO_TRANSLATION -DQT_CLEAN_NAMESPACE -DQT_NO_ASCII_CAST -DQT_NO_COMPAT  
-c -o autostart.lo `test -f 'autostart.cpp' || echo './'`autostart.cpp

The problem is, I only get "number of calls" but no timings.

chris at bjork:~> gprof /opt/kdehead/bin/kdeinit a/gmon.out | head -20
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
  0.00      0.00     0.00     6941     0.00     0.00  QGArray::size() const
  0.00      0.00     0.00     4707     0.00     0.00  QGArray::data() const
  0.00      0.00     0.00     4502     0.00     0.00  QShared::deref()
  0.00      0.00     0.00     1363     0.00     0.00  QShared::ref()
  0.00      0.00     0.00     1246     0.00     0.00  QString::length() const
  0.00      0.00     0.00     1216     0.00     0.00  QValueListIterator<QString>::QValueListIterator[in-charge](QValueListNode<QString>*)
  0.00      0.00     0.00     1133     0.00     0.00  QChar::QChar[in-charge](QChar const&)
  0.00      0.00     0.00      777     0.00     0.00  QGArray::at(unsigned) const
  0.00      0.00     0.00      675     0.00     0.00  QString::~QString [in-charge]()
  0.00      0.00     0.00      563     0.00     0.00  QValueListNode<QString>::~QValueL


Anybody knows how to get timings?

Christian





More information about the kde-core-devel mailing list