dotgnu-pnet
[Top][All Lists]
Advanced

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

[Pnet-developers] Simple profiling patch


From: Marc Haisenko
Subject: [Pnet-developers] Simple profiling patch
Date: Mon, 28 Feb 2005 14:07:51 +0100
User-agent: KMail/1.7.1

Hi folks,
I've written a simple profiling patch which I don't (currently) like to add to 
pnet but would like to share it with you guys.

This patch implements very simple time profiling: it times how long a method 
takes to execute. Note that the times are including child method calls, so 
the method that takes the longest in a SWF application is very likely to be 
Application.Run ;-)

The profiling only takes place when the -M switch is given to ilrun and 
enhances the current output by total time all calls to a method took and the 
average time of these method calls (times are in microseconds).

It should compile just fine on all POSIX systems and just won't add the time 
profiling support on systems that don't have gettimeofday (I think I managed 
to guard everything with #ifdef HAVE_GETTIMEOFDAY).

So far this patch works quite fine but still has a bug somewhere (the times 
for some internal constructors like array constructors and String constructor 
are way off, I guess I've missed the entry point here).

The patch is against current CVS. I committed a minor fix today which is 
needed for this patch to work correctly ! Otherwise ilrun will crash. I've 
attached this fix as well (cvm_call.c.patch) for those who'd like to try the 
patch but just have the last source release instead of the current CVS 
version (but I don't know whether this patch applies cleanly to the last 
source release...).

After applying the patch only "make clean all && su -c 'make install'" is 
required.

Feedback is very welcome.

C'ya,
        Marc

-- 
Marc Haisenko
http://darkdust.net
Today is Prickle-Prickle, the 59th day of Chaos in the YOLD 3171

Attachment: cvm_call.c.patch
Description: Text Data

Attachment: profiling-050228.patch
Description: Text Data

Attachment: pgpZHx6klEo6V.pgp
Description: PGP signature


reply via email to

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