Re: [fpc-devel] FPProfiler

2018-02-19 Thread Ozz Nixon
Just a friendly suggestion… You are close to how I did it in Modern Pascal: procedure Test; begin EnterProfiling('MyUnit.Test'); try // <<< real code here finally LeaveProfiling('MyUnit.Test'); end; end; In my profiler, I do not need a string for the Leaving Profiling, I use a

Re: [fpc-devel] FPProfiler

2018-02-19 Thread Benito van der Zander
Hi, In theory a call to _mcount could be replaced with a compilerproc, which you could then override in the RTL, allowing a way to add support for various profilers. If it became fully overridable,  you could put a callback between any branch/line/function and create instrumentalization not j

Re: [fpc-devel] FPProfiler

2018-02-19 Thread Ondrej Pokorny
On 19.02.2018 11:14, Sven Barth via fpc-devel wrote: Am 19.02.2018 11:01 schrieb "Ondrej Pokorny" >: I agree with Simon here. It's a similar scenario like heaptrc. Why not to add a compiler parameter to include profiling info? That would be just great. It'

Re: [fpc-devel] FPProfiler

2018-02-19 Thread Karoly Balogh (Charlie/SGR)
Hi, On Mon, 19 Feb 2018, Sven Barth via fpc-devel wrote: > It's not the same scenario as heaptrc is entirely working in the RTL > without any compiler extension (aside from the -gh parameter). Profiling > code however would require extensions to the compiler whereby it would > also need to handle

Re: [fpc-devel] FPProfiler

2018-02-19 Thread Sven Barth via fpc-devel
Am 19.02.2018 11:01 schrieb "Ondrej Pokorny" : On 19.02.2018 10:25, Anton Shepelev wrote: > Simon Ameis: > > However I think, FPC should generate the profiling >> code itself. Then there is no need to modify the >> code before and after the compilation. >> > Not, I think, for the naive ligh

Re: [fpc-devel] FPProfiler

2018-02-19 Thread Ondrej Pokorny
On 19.02.2018 10:25, Anton Shepelev wrote: Simon Ameis: However I think, FPC should generate the profiling code itself. Then there is no need to modify the code before and after the compilation. Not, I think, for the naive light-weight profiling that FPProfiler offers. Its functionality

Re: [fpc-devel] FPProfiler

2018-02-19 Thread Anton Shepelev
I wrote: >Begin a generic tool, a profiler that need not be >limited to a specific IDE. Correction: Being a generic tool, a profiler need not be limited to a specific IDE. -- Please, do not forward replies to the list to my e-mail. ___ fpc-devel ma

Re: [fpc-devel] FPProfiler

2018-02-19 Thread Anton Shepelev
Simon Ameis: >However I think, FPC should generate the profiling >code itself. Then there is no need to modify the >code before and after the compilation. Not, I think, for the naive light-weight profiling that FPProfiler offers. Its functionality is easily decoupled from that of the

Re: [fpc-devel] FPProfiler

2018-02-19 Thread Anton Shepelev
Florian Klampfl to Anton Shepelev: >>Why is not FPProfiler shipped as a binary with the >>standard FreePascal distribution? >> >>Why does FPProfiler seem to depend on Lazarus? > >Is it usable meanwhile? I have not tried it, but asked this question when I found it missing from the FreePascal d