I do not think that this comand wil lever work for Linux users:
before_compile.cmd $(LazarusDir) $PkgDir(etpackage)epiktimer.pas
Is this mandatory?
What it does?
Maybe a link should be added here:
http://wiki.lazarus.freepascal.org/Profiling
Do you know about FPProfiler? How does your profiler compare with it?
http://wiki.lazarus.freepascal.org/FPProfiler
Саn't to install r56436What's the output of your message window? There you can see the compiler errors.
What's the output of your message window? There you can see the compiler errors.
What's the output of your message window? There you can see the compiler errors.
LazProfilerCore.pas(143,15) Error: Identifier not found "TList"
I suspect that the fpc version at me too old. Please, specify the minimum fpc version in requirements of installation
You need FPC and Lazarus trunk versions to be able to install it!
As it needs generics and addition PascalParser funktionality (FPC) and new IDE addon functions (Lazarus)
Seeing your tagline @zoltanleo you are already using trunk so it would probably be more efficient to ask about revision number. Then again, TList is a standard class that exists... well... since the beginning of time. I suspect you have other errors listed before that error or perhaps have a faulty installation.It is difficult for me to assume other reasons. At present I have trunk fpc and IDE versions also (see my profile). I tried to establish by subj and a traditional way, and by means of Onlinepackagemanager.
@zoltanleo: Maybe you should update FPC and Lazarus to latest revisions and try again.Thanks for council. I and will arrive
I have only one request, specify number of the minimum audit fpc after which profiler can be established with guarantee ;)
@Pascal
Thanks for this excellent tool! Already the beta looks very promising.
For Lazarus this is 56254 .
For FPC you need at least 37235.
Ok, be warned! It is a BETA!
Make a backup / spare copy of your "to profile" project sources before trying. I'm glad i did.
Installed and tried with latest trunk. All seams ok when profiling a "small" project. When i try a big project (> 100k lines) i get error 416, list index out of bounds. After that i am unable to reopen and or rebuild the project for normal running / debugging. Als also "Run > Cleanup profiler" does not work on the big project so the code is full of the added profiling enter and exit routines.
Anyone else getting a list index out of bounds?
Make sure that the package's "Execute before" entry is blank.@Pascal, please remove the "Execute before" or change it so it compiles on Linux and other platforms.
Some of the toolbar buttons operate on selected packages but some don't.Not selected but checked packages.
For example you would expect the "Open" button to open a selected package but it does not! Clearly there should be 2 visually separated toolbars.The "Open" tool button opens the local repository in the file manager. Opening every checked package make no sense, what if somebody checks 25 package? OPM should open 25 explorer/file manager window? If you wish to open the broken package in the IDE, you should close OPM and click the error on the message window. OPM is a modal window anyways, you cannot work with the IDE until is opened.
Make sure that the package's "Execute before" entry is blank.@Pascal, please remove the "Execute before" or change it so it compiles on Linux and other platforms.
@Pascal, you could also add "$(IDEBuildOptions)" to the compiler "Custom Options" of your package. Then it is built with the same debug flags as the IDE itself. It would allow people to send you backtraces of errors better. A backtrace may be enough to find a bug.
Actually Bram71 already has range check enabled as he got an "index out of bounds" error.
Anybody testing beta or development versions should enable all debug flags and checks.
Sadly not, it's a commercial application i maintain for a client.
I will try later to find out where exactly the out of bounds is happening. The out of bounds happens when selecting the "Run > profile" before the actual compile cycle starts. The code in the project is nothing fancy, there's just a lot of it spread over multiple include folders.
I have included a small other project that also fails to profile. Its a small (audio) function generator using uos (you might need to download the portaudio dll's and place them in al "lib" subfolder where the compiled executable resides if you actually try to run it). See the function LoadAudio on line 94 of main.pas.
When doing "Run > Profile" this project fails somewhere in uos.pas after some comment. At least thats where the ide opens the file.
@pascalDone.
@GetMem: I uploaded an updated package. Could you please replace the old one?
Quote@pascalDone.
@GetMem: I uploaded an updated package. Could you please replace the old one?
I also noticed on this project (the first time i tried) that the profiler trips over wrong eof characters (visible after the end. in the ide). After removing the old (dos? / D7) eof chars i got to the point where it gives the out of bounds error.
On the big project i get the error when instrumenting before anything in the messages window in the ide appears.
After that i am no longer able to open the project without the out of bounds error. I also have to restore the source from my backup because in a lot of files the LazProfilerRunTime is still in the uses sections. Checked again and there are no backup copies in the source folders.
After restore from my backup i can just build and run the project again. I checked if there where any file acces and or rights issues on the folders and that is not the case. Also all file names are in 8.3 format since its a project that has been a work in progress since Delphi 1...
@GetMem: I uploaded an updated package. Could you please replace the old one?
Also done! Package has to be updated by GetMem.@Pascal, where are the original sources kept? There is some revision control system, right?
@GetMem: I uploaded an updated package. Could you please replace the old one?Also done! Package has to be updated by GetMem.@Pascal, where are the original sources kept? There is some revision control system, right?
Your initial announcement only mentions the Online Package Manager repository as a download source.
I have a feeling you misuse the OpkMan and its admin GetMem as a revision control system. If so, then you have seriously misunderstood its purpose. It is meant for released packages. The actual development before a release must happen somewhere else.
GitHub seems to be the fashion of today but there are plenty of other good choices, too.
GetMem, please guide people when they misuse your OpkMan.
But you are right, i should set up a GitHub repo for this.Lazarus CCR is also a valid option. It has got a bad reputation because many of its projects' authors have fled. For the active maintainers however Subversion and the repository itself work very well.
Sources can be cleared with "Run > Cleanup Profiler" after studying the error.Reading something like "Run > Cleanup Profiler and restore original files" would be more informative for me. If I didn't read it I would not link original message to restoring project files. What do you think? Any better idea?
Sources can be cleared with "Run > Cleanup Profiler" after studying the error.Reading something like "Run > Cleanup Profiler and restore original files" would be more informative for me. If I didn't read it I would not link original message to restoring project files. What do you think? Any better idea?
Ok, will do.
I further tested the near empty test project and when adding cmem or cthreads to the project source the application won't start when profiling and you get the profiler screen with all the zero counts.
Hmm,
The project_executable.lazprofiler_setting file does not get created for the big project so i think the error occurs before it is written to file. For the funcgen or test project it gets written (same output folder).
Thanks for the ingenuity and work that you have put into this, and for sharing the update. This is an impressive tool.
However, on Linux, I could only get it to compile by removing the "before compile" command. Which does not seem to affect functionality after very limited testing.
However, on Linux, I could only get it to compile by removing the "before compile" command. Which does not seem to affect functionality after very limited testing.
It only creats the runtime.lrs with the needed sources (LazProfilerRunTime.pas, LazProfilerCore.pas and epiktimer.pas).
It's only needed if you modify these sources.
Yes, I tried that replacement command, and it works fine on Linux (Mint).
>>Anyone else getting a list index out of bounds?
Yes. I have "List index 82 out of bounds" with https://github.com/zamtmn/zcad project
We need CallGraph like http://wiki.lazarus.freepascal.org/File:Fpprofiler_callgraph.png
>>Anyone else getting a list index out of bounds?
Yes. I have "List index 82 out of bounds" with https://github.com/zamtmn/zcad project
Fine! I'll have a look.
>>Anyone else getting a list index out of bounds?I used ZCad for testing. Many thanks. I already found some problems and corrected them in 0.2.0.0
Yes. I have "List index 82 out of bounds" with https://github.com/zamtmn/zcad project
I get the error shown.
What do you think I am doing wrong?
Bug reports, suggestions and feature requests are welcome.
Bug reports, suggestions and feature requests are welcome.
Not sure how exactly your profiler works, but one feature would be absolutely great for me: if it could output a code coverage report!
A year ago, I tried to copy the code coverage feature from phpunit. To sum it up: this can help to verify that test code covers all methods or even lines that should be tested. My approach works (https://gitlab.com/ccrdude/laz-codecoverage-helper), but is way too slow for line-based reports.
Could LazProfiler report results by line, or is it method based only?
Very good, thanks. Will test later in component.
Will LazProfiler be available with Lazarus 2.0.10 (FPC 3.2.0)?It is broken. I comment all writeln to avoid error message in opening project, but TPascalScanner will raise 'No support for resources of type "%s"' (.lfm or .res).
I'm very interested in this project. In the absence of a response about its status, I try to wake up the thread. I hope the author, who is a forum member and did a great job, can reply. Thanks in advance.