[fpc-devel] profiling under windows

Paul Ishenin webpirat at mail.ru
Fri Nov 20 18:08:28 CET 2009


Paul Ishenin wrote:
> Hello,  FPC developers' list.
>
> I tried to build the compiler with gprof profile code. In the compiler 
> dir I executed:
>
> make clean all OPT="-gl -pg"
>
> As result of linking I have the next errors:
> Linking .\pp.exe
> pp.pas(224,1) Error: Import library not found for c
...
After installing both cygwin and mingw I am able to build compiler with 
gprof support. I needed to pass libs path to the compiler

..\bin\i386-win32\make.exe clean all OPT="-gl -pg 
-FlC:\cygwin\lib;C:\programming\mingw\lib;C:\programming\mingw\lib\gcc\mingw32\3.4.5"

I have attached compiler gprof output of compiler itself. Using output I 
was able to find and improve(?) 3 functions I found in output.

What I can't understand why the biggest %time has the lowest seconds. E.g:
  %   cumulative   self              self     total          
 time   seconds   seconds    calls  Ts/call  Ts/call  name   
  5.11      0.36     0.36                             
CCLASSES_TFPHASHLIST_$__INTERNALFIND$LONGWORD$SHORTSTRING$LONGINT$$LONGINT
...
  0.14      7.05     0.01                             
fpc_shortstr_to_ansistr

As result I don't understand which functions must be reviewed at first. 
Have anybody tried that before?

Best regards,
Paul Ishenin.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: fpc_profile_trial1.patch
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20091121/f2302452/attachment.ksh>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gprof.zip
Type: application/octet-stream
Size: 15310 bytes
Desc: not available
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20091121/f2302452/attachment.obj>


More information about the fpc-devel mailing list