[fpc-devel] internal profiler 2

Peter Vreman peter at freepascal.org
Sat Sep 9 00:32:01 CEST 2006

> This looks promising. I'll look at the code when I get some free time
> and see if I'm able to do anything in this department.
> Ales
>> If it needs to be added this more generic AOP is the best solution.
>> AOP also allows easy tracing on the fly with start/end of procedure
>> infos. We can add a switch that enables AOP code and adds something
>> like:
>> procedure blahblah;
>> begin
>>    if assigned(aoplist) then
>>      process_aoplist(rtti_of_function,aop_begin)
>>    ...
>>    if assigned(aoplist) then
>>      process_aoplist(rtti_of_function,aop_end)
>> end;
>> The additions will be in the implicit init/final code blocks. This
>> all can be added at node tree level and is platform independent.

Look at ncgutil.pas gen_entry_code() and gen_exit_code(). The current code
for gprof (enabled by the cs_profile switch) is also there. So for
profiling this is also the correct position.


More information about the fpc-devel mailing list