Recent

Author Topic: LazProfiler (beta)  (Read 20517 times)

Bram71

  • New Member
  • *
  • Posts: 23
Re: LazProfiler (beta)
« Reply #30 on: November 20, 2017, 03:40:52 pm »
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.
 

Bram71

  • New Member
  • *
  • Posts: 23
Re: LazProfiler (beta)
« Reply #31 on: November 20, 2017, 03:49:53 pm »
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).

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3655
  • I like bugs.
Re: LazProfiler (beta)
« Reply #32 on: November 20, 2017, 03:57:53 pm »
@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.
« Last Edit: November 20, 2017, 04:00:46 pm by JuhaManninen »

Pascal

  • Hero Member
  • *****
  • Posts: 832
Re: LazProfiler (beta)
« Reply #33 on: November 20, 2017, 04:08:13 pm »
@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.

I kindly asked GetMem if he is willing to add test(alpha/beta) versions, which he affirmed.
But you are right, i should set up a GitHub repo for this.

@GetMem: If it's okay to you, i've uploaded an updated version. If not, no matter.
laz trunk - fpc trunk 32bit - Windows 10 Pro x64 (1803)

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3655
  • I like bugs.
Re: LazProfiler (beta)
« Reply #34 on: November 20, 2017, 06:00:39 pm »
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.

Pascal

  • Hero Member
  • *****
  • Posts: 832
Re: LazProfiler (beta)
« Reply #35 on: November 21, 2017, 06:25:57 am »
New release:
LazProfiler 0.1.2.0:
- fixed: checks if backup of source was successfully created before writing instrumented source to original file
laz trunk - fpc trunk 32bit - Windows 10 Pro x64 (1803)

avra

  • Hero Member
  • *****
  • Posts: 1736
    • Additional info
Re: LazProfiler (beta)
« Reply #36 on: November 21, 2017, 08:23:58 am »
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?
ct2laz - Conversion between Lazarus and CodeTyphon
bithelpers - Bit manipulation for standard types
pasettimino - Siemens S7 PLC lib

Pascal

  • Hero Member
  • *****
  • Posts: 832
Re: LazProfiler (beta)
« Reply #37 on: November 21, 2017, 08:48:34 am »
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?

Yes, why not. I will cahnge it in next release.
laz trunk - fpc trunk 32bit - Windows 10 Pro x64 (1803)

Pascal

  • Hero Member
  • *****
  • Posts: 832
Re: LazProfiler (beta)
« Reply #38 on: November 21, 2017, 09:09:47 am »
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.

These are Unix specific, aren't they? I have no clue what happens to the program when you add these units. I've never used Lazarus/FPC on Unix.
laz trunk - fpc trunk 32bit - Windows 10 Pro x64 (1803)

Pascal

  • Hero Member
  • *****
  • Posts: 832
Re: LazProfiler (beta)
« Reply #39 on: November 22, 2017, 10:32:34 am »
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).

Could you test 0.1.2.0, please. It should not write instrumented files if backup of original source fails.
laz trunk - fpc trunk 32bit - Windows 10 Pro x64 (1803)

Pascal

  • Hero Member
  • *****
  • Posts: 832
Re: LazProfiler (beta)
« Reply #40 on: September 24, 2018, 11:28:53 am »
New release:
LazProfiler 0.1.3.0:
- renamed menu entries
- include IncludePath. Patch by zamtmn.
- minor refactoring
- fixed recognition of declared record in procedure var section
- fixed memory leaks
laz trunk - fpc trunk 32bit - Windows 10 Pro x64 (1803)

howardpc

  • Hero Member
  • *****
  • Posts: 3203
Re: LazProfiler (beta)
« Reply #41 on: September 24, 2018, 12:45:22 pm »
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.

Pascal

  • Hero Member
  • *****
  • Posts: 832
Re: LazProfiler (beta)
« Reply #42 on: September 24, 2018, 01:56:59 pm »
Thanks for the ingenuity and work that you have put into this, and for sharing the update. This is an impressive tool.

Thanks, you are welcome.

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.
laz trunk - fpc trunk 32bit - Windows 10 Pro x64 (1803)

Pascal

  • Hero Member
  • *****
  • Posts: 832
Re: LazProfiler (beta)
« Reply #43 on: September 24, 2018, 02:12:48 pm »
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.

I just tired to replace the "Before compile" command to:
Code: Text  [Select]
  1. $(LazarusDir)/tools/lazres runtime.lrs "LazProfilerRunTime.pas"=rt "LazProfilerCore.pas"=core "$PkgDir(etpackage)epiktimer.pas"=timer

It works on Windows. Can you give it a try on Linux?
laz trunk - fpc trunk 32bit - Windows 10 Pro x64 (1803)

howardpc

  • Hero Member
  • *****
  • Posts: 3203
Re: LazProfiler (beta)
« Reply #44 on: September 24, 2018, 02:55:27 pm »
Yes, I tried that replacement command, and it works fine on Linux (Mint).
(Earlier the compilation failure message I got pointed to a missing LazProfiler.compiled file, which (before any package compilation) seemed bound to be a file that would not be found).