chicken-users
[Top][All Lists]
Advanced

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

Re: [Chicken-users] Reset counters when profiling Chicken programs


From: Sven Hartrumpf
Subject: Re: [Chicken-users] Reset counters when profiling Chicken programs
Date: Sat, 30 Aug 2014 11:53:45 +0200 (CEST)

Hi Peter.

Thanks for your answers!

Fri, 29 Aug 2014 09:13:45 +0200, Peter.Bex wrote:
> On Fri, Aug 29, 2014 at 09:03:52AM +0200, Sven Hartrumpf wrote:
>> Is there a Chicken function to reset all counters (to 0) when
>> a program is run in profile mode?
>> Background: I need profiling results, but only after my program
>> reached a specific point and until it terminates.
> 
> Unfortunately, there's none that I know of.
> 
> A nasty trick I sometimes use is to extract "interesting" parts
> from a procedure and put it into a differently-named one, so that
> it shows up separate from the rest of the procedures.  Depending
> on the exact layout of your program, you could try and do that,
> like so (or perhaps improved on with some macrology):
...
> This is extremely ugly, and if you're profiling a large program that
> won't really be possible.

Exactly.
There are 5000 functions in my little program - not an option here :-)

> Perhaps we can come up with an API for interfacing with the profiler,
> for (beyond) CHICKEN 5.

That would be great.
Another useful function would be to write current profile information
with a function like (profile-write file). In this way, one could
easily determine what happened between two given profile snapshots.

Ciao
Sven



reply via email to

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