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 <[email protected]> To: mailing list for gambas users <[email protected]> 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 [email protected] https://lists.sourceforge.net/lists/listinfo/gambas-user ------------------------------------------------------------------------------ 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 [email protected] https://lists.sourceforge.net/lists/listinfo/gambas-user
