[Gambas-user] Profiler for Gambas projects

Ron ron at ...1740...
Fri Sep 11 19:02:25 CEST 2009


Benoît Minisini schreef:
>> 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?
>
>   

I would like to have gprof alike feature added too, my project is 
getting bigger and bigger.
That last option is the best way I guess. We don't want to loose any 
performance during normal use.

Regards,
Ron_2nd.




More information about the User mailing list