On 2010-08-28 01:38, Graeme Geldenhuys wrote:

Alternatively (though not tested) - you should be able to download a
zip archive of the latest code via this URL:
    http://github.com/graemeg/fpprofiler/zipball/HEAD
Tried sample project today. Some a comment and a question:
1) I have a strange error when the same file is modified twice (and afterwards restored twice). One is: insert: E:\lazarus\components\fpprofiler\demo\test001\test001.pp .......... OK
and another is:
insert: .\test001.pp
- After these two modifications modified units have compilation errors (duplicate uses units).
 - When modifications are removed - duplicate files are deleted totally.
 - (BTW, when -r is used for fpp it is passed to fpc and fpc is not happy.)
 - I am attaching console output if it helps at all.
 - I used a workaround:
In procedure InsertProfilingCode(FileList: TStrings; ModTokenProc: TModTokenProc);
-----
  //make a copy of the original files and process them
  for i := 0 to FileList.Count - 1 do
  begin
if FileExists(FileList[i] + FPPROF_EXT) then begin // <-- if the file is processed (backup exists) - do not process it again writer.AddIgnoredFile(FileList[i]); // <-- (don't know if this is required?)
      Continue; // <--
    end; // <--
-----
In procedure RemoveProfilingCodeFromFile(const FileName: string);
-----
begin
if FileExists(FileName) then begin // <-- if there is no backup file - do not delete original file
-----

2) Where should I write comments/bug reports for fpprofiler?


Regards
Žilvinas
E:\lazarus\components\fpprofiler\demo\test001>fpp -r test001.pp  -MObjFPC -Scghi
 -O1 -gl -vewnhi -l -FuE:\lazarus\components\fpprofiler\fpprof\ -Fu. -FUlib\i386
-win32\ -oproject1.exe
GNU FreePascal profiler 0.2
Copyright 2007 Darius Blaszyk. Contributions by Graeme Geldenhuys 2010.
FPP is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
There is absolutely no warranty for FPP.

insert: E:\lazarus\components\fpprofiler\demo\test001\test001.pp .......... OK
insert: E:\lazarus\components\fpprofiler\demo\test001\test_001.pas .......... OK

insert: E:\lazarus\components\fpprofiler\fpprof\fpmake.inc .......... OK
insert: E:\lazarus\components\fpprofiler\fpprof\fpmake.pp .......... OK
insert: E:\lazarus\components\fpprofiler\fpprof\fpprof.pp .......... OK
insert: E:\lazarus\components\fpprofiler\fpprof\fpputils.pas .......... OK
insert: E:\lazarus\components\fpprofiler\fpprof\fppwriter.pas .......... OK
insert: E:\lazarus\components\fpprofiler\fpprof\systemtime.inc .......... OK
insert: E:\lazarus\components\fpprofiler\fpprof\win32systemtime.inc .......... O
K
insert: .\test001.ppinsert: .\test_001.pasexecuting: fpc -gl -FuE:\lazarus\compo
nents\fpprofiler\fpprof -r test001.pp -MObjFPC -Scghi -O1 -gl -vewnhi -l -FuE:\l
azarus\components\fpprofiler\fpprof\ -Fu. -FUlib\i386-win32\ -oproject1.exe

Hint: Start of reading config file E:\lazarus\fpc\fpc_my\bin\i386-win32\fpc.cfg
Hint: End of reading config file E:\lazarus\fpc\fpc_my\bin\i386-win32\fpc.cfg
Error: Illegal parameter: -r
Hint: -? writes help pages
Error: E:\lazarus\fpc\fpc_my\bin\i386-win32\ppc386.exe returned an error exitcod
e (normal if you did not specify a source file to be compiled)
_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to