[Gambas-user] Profiler for Gambas projects

Benoît Minisini gambas at ...1...
Fri Sep 11 18:55:41 CEST 2009


> I haven't use Valgrind, but I think yes, but I'm only interested about
> performace analysis.
> 
> Jussi
> 

OK, I read the wikipedia entry and found how gprof works, and now I can see 
how it could be done:

1) Have a counter for each Gambas function written in Gambas and for each 
public function of each component.

2) Increment this counter each time the function is called.

3) Eventually note the current stack backtrace at each function call.

4) Have another counter for each function.

5) Run a high resolution timer that increments that counter for the current 
function at the time the timer is triggered.

6) Save all this results to disk when the program terminates, or in real time.

But I hate slowing down the interpreter for such things. I have no idea on how 
to implement that in a efficient way. Maybe by compiling a special version of 
the interpreter that dumps this information?

-- 
Benoît Minisini




More information about the User mailing list