[Gambas-user] Profiler for Gambas projects

David Villalobos Cambronero david_villalobos_c at ...43...
Fri Sep 11 19:20:29 CEST 2009


What about having an Option to select if run in performace analysis or not, so the compiler will have all the needed code, but only executed if wanted?

 Regards


--
David



----- Original Message ----
From: Benoît Minisini <gambas at ...1...>
To: mailing list for gambas users <gambas-user at lists.sourceforge.net>
Sent: Friday, September 11, 2009 10:55:41 AM
Subject: Re: [Gambas-user] Profiler for Gambas projects

> 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

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Gambas-user mailing list
Gambas-user at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user









More information about the User mailing list