#1 KDE Runtime Observer report
David Moreno Montero
david at monasteriomono.org
Thu Jul 21 23:41:43 CEST 2005
Hi,
Just a few lines to tell you all how is the KDE runtime observer going.
Please send me any feedback you have: if you try the program and crashes
watching X application, if you dont like the colors, if you have any
suggestion...
KDE Runtime Observed is amied to get a full runtime observer of KDE
applications at runtime, showing information about containment of
objects, signals and slots, and some information when that is emmited.
All without any change, or recompilation nor anything to the observed
application.
First of all it is working and it actually can show you a (limited) tree
with all your objects of any Qt/KDE application, with no big slowdown.
I've prepared a tarball and a debian package at
http://www.monasteriomono.org/programs/kro/
This last weeks I've been working on two fronts. First of all I did a
shared library that overrides all the QObject methods from libqt (that
might be a maintenance problem in the future, but the changes were small
enoght to be repeteable very easily). That library works preloading it
and then loading the application (LD_PRELOAD=/usr/lib/libkrol.so
/usr/bin/konqueror), then a pipe is created at /tmp/ (or $TEMP, and
after opening it (cat /tmp/krop-$(pid)) lot of information is dumped there.
Then I made a GUI that just now is only able to show you a limited tree
view of the running process. The view is limited so it can only show an
open branch and actually it is not implemented to unpack grouped
objects. Objects are grouped by class and level. If you watch the
screenshots you will see hundreds of QObject's packed in one single box,
for example. If you try to open that branch, the first object will be
opened.
I also looked on how to catch correctly the signals/slots and looked on
a gdb based aproach, and maybe i will take that idea later, but it
looked so complicated by the moment.
The biggest problems I found are just two (maybe too technical and
specific for this project): First when I catch the QObject creation, and
send the class type, that class type is always QObject, independant of
the real class. className() method on any QObject should return the
class name, but that is not true at that moment. That forced me to do a
hack and send the class name at other moments (signal connection), and
have impact over performance of observed application.
The seccond one is that I'm not 100% percent sure of catching
everything. My worst worry is about catching all signals, but I guess
I'll have to fight against it later.
Overall I think that about 30% of the project is done, but the hardest
is to come: all the signals stuff. Anyway all my friends are going on
holidays, and I'm staying here (Madrid, Spain, to study and work), so I
will have lot of time to use here.
Thank you.
More information about the Kde-soc
mailing list