Re[2]: [fpc-devel] profiling under windows

2009-11-20 Thread JoshyFun
Hello Vincent,

Friday, November 20, 2009, 8:30:49 AM, you wrote:

>> pp.pas(224,1) Error: Import library not found for c
>> pp.pas(224,1) Error: Import library not found for gmon
>> pp.pas(224,1) Error: Import library not found for cygwin
>> pp.pas(224,1) Error: Import library not found for user32
>> pp.pas(224,1) Error: Import library not found for kernel32
>> pp.pas(224,1) Error: Import library not found for gcc
VS> I have those files in c:\cygwin\lib. I don't know anymore what cygwin 
packages I
VS> installed to get them.
VS> Last time I tried (a couple of months ago), I could compile Lazarus with 
profiling
VS> info, but the gprof output file remained empty, IIRC.

I had used it one year ago for a project and I had to install mingw32
and cygwin and add the libs paths to the "other library" of the
project. This is my search path for that project, maybe it helps:

C:\cygwin\bin\;C:\cygwin\lib\;C:\Mingw\lib\;C:\Mingw\lib\gcc\mingw32\3.4.5\

Obviously one of them is not needed ;)

-- 
Best regards,
 JoshyFun

___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re[2]: [fpc-devel] profiling under windows

2009-11-20 Thread JoshyFun
Hello Paul,

Friday, November 20, 2009, 6:08:28 PM, you wrote:

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

Because that's it time, which is splitted with other functions called
by itself, so discounted the time of the called functions the
investigated function only spend a few seconds (self). Example:

procedure Dummy();
begin
  FillChar(P,$7FFF,0);
  FillChar(P,$7FFF,0);
  FillChar(P,$7FFF,0);
  FillChar(P,$7FFF,0);
end;

Dummy will get the highest cumulative time, but its (self) real time
would be almost nothing.

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

You must get the "calls", functions with more calls are usually the
ones that would get more benefit from any optimization. Also look for
functions (specially the basic ones) that spend too much time.

-- 
Best regards,
 JoshyFun

___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel