Jump to content
Vandrovnik

Profiler for Delphi

Recommended Posts

Hello,

 

Please can you advise a profiler for Win32/Win64 applications (made in Delphi)? Free, when possible (I do not need the profiler often).

What I have found using Google was expensive or quite outdated or buggy.

Kind regards,

 

Karel

 

Share this post


Link to post

In my experience you get what you pay for. None of the free profilers has ever worked satisfactory for me.

I would recommend AQTime or VTune but they are both a bit expensive.
I prefer VTune but as it doesn't support Delphi debug info it's only suitable for asm level profiling. It's excellent for that though.

  • Thanks 1

Share this post


Link to post
1 hour ago, Lars Fosdal said:

Anders, what about https://github.com/andremussche/map2dbg?
Can that produce the necessary debug files for VTune to play ball on Delphi line by line?

I've had mixed results with that. What we really really need is a way to generate PDB files. If only Emba would add that functionality.

  • Like 2

Share this post


Link to post
2 minutes ago, David Heffernan said:

What we really really need is a way to generate PDB files.

Yes. AFAIK VTune requires PDB-files.

 

I've tried various tds to pdb converters but AFAIR they didn't work.

Share this post


Link to post

I used AQTime for many years, but it seemed to me that SmartBear wasn't really interested in the Delphi market and their product suffered ... and was expensive.

I more recently purchased Nexus Quality Suite and was very happy with it.  Great tool, great support, great modern product: https://www.nexusdb.com/support/index.php?q=node/27156.  

As someone previously said, "You get what you pay for."  NQS was well worth what we paid for it.

Edited by Tom F
  • Like 3

Share this post


Link to post
1 hour ago, Tom F said:

Nexus Quality Suite ... great modern product

Isn't that just the old TurboPower profiler. The UI doesn't seem to have been updated since then. Ugh.

image.thumb.png.587d6defa4fec4a922b5f48620802283.png

Share this post


Link to post
 
 
 
 
Just now, Anders Melander said:

Isn't that just the old TurboPower profiler. The UI doesn't seem to have been updated since then. Ugh.

 

Yes, it's the old TurboPower profiler.  The UI didn't bother me.  No doubt it could be improved, but I found it easy to understand and get my work done.  

Share this post


Link to post
1 hour ago, David Heffernan said:

a reliable profiler for x64 windows code

I've used both VTune and AQTime with 64-bit projects and I can't recall that I had problems with it.

What's your experience?

Share this post


Link to post
1 hour ago, Anders Melander said:

I've used both VTune and AQTime with 64-bit projects and I can't recall that I had problems with it.

What's your experience?

VTune works well. AQTime was an unmitigated AV fest when I last tried it. 

  • Haha 2

Share this post


Link to post
1 hour ago, David Heffernan said:

AQTime was an unmitigated AV fest when I last tried it.

Well, I must admit it's been at least 3 years since I last used AQTime on a 64-bit project, and I no longer have a license for it, so my memories of the experience might have improved with age.

I'll need a 64 bit profiler for my current project sooner or later so I guess I'll get a refresher.

Share this post


Link to post
6 hours ago, Anders Melander said:

Isn't that just the old TurboPower profiler. The UI doesn't seem to have been updated since then. Ugh.

 

We are aware that the UI isn't modern anymore, and work is underway to improve that. However, @Tom F is right to say it just works (up to and including the latest Rio version!). Which allows the users to get their work done and move on. 🙂

  • Like 3

Share this post


Link to post

Is anybody aware if there is a profiler, which can profile the unit initialization, with output of unit name and time?

  • Like 1

Share this post


Link to post
On 4/23/2020 at 12:26 PM, Tom F said:

I used AQTime for many years, but it seemed to me that SmartBear wasn't really interested in the Delphi market and their product suffered ... and was expensive.

I more recently purchased Nexus Quality Suite and was very happy with it.  Great tool, great support, great modern product: https://www.nexusdb.com/support/index.php?q=node/27156.  

As someone previously said, "You get what you pay for."  NQS was well worth what we paid for it.

 

The problem with NQS is lack of updates.  The latest release is 1.63 from April 5, 2019.  One minor version before that on Jan 8, 2019, two versions in 2017, and then it jumps to 2015.    My renewal is due but it hasn't been updated since I purchased it so I haven't pulled the trigger on renewal.

 

I originally purchased the TurboPower version many years ago and always preferred it over AQTime.  The pricing for AQTime has always been higher and is now $1,900 per concurrent user.  You can get a cheaper version at $600 but they don't allow you to run it on a VM.  So the best price by far is NQS at about $310, especially if you can time it with a nice discount code.  

 

 

 

  • Like 1

Share this post


Link to post
 
 
 
1
19 minutes ago, Darian Miller said:

 

The problem with NQS is lack of updates. 

It sounds to me that your main complaint is an economic one? — the vendor hasn't updated the software during the year following your initial purchase (during which time it would be free.)

I've had that happen and I know it can be disappointing. TBH, being a small one-man business myself, I've done that on a few occasions to my customers too. 😯 

The good news as far as I'm concerned is that there are no bug fixes or improvements I'm anxiously waiting for in NQS.  I suppose the UI could use a facelift and some rough edges in the workflow polished. But, in general, NQS does what I need it too: I was able to quickly narrow down the bottlenecks in my application and test my fixes.  

Tom

Share this post


Link to post
On 4/23/2020 at 8:56 PM, eivindbakkestuen said:

We are aware that the UI isn't modern anymore, and work is underway to improve that. However, @Tom F is right to say it just works (up to and including the latest Rio version!). Which allows the users to get their work done and move on. 🙂

 

"Work is underway"  Is there any projected timeframe?  

Share this post


Link to post
On 4/24/2020 at 7:35 AM, HeZa said:

Is anybody aware if there is a profiler, which can profile the unit initialization, with output of unit name and time?

As I could not find anything measuring the InitUnits, and it has its reasons, I come up with this poor mans profiler:

 

Two breakpoints is System.pas, one on TProc(P)(); in "procedure InitUnits;" and the other on the very next asm line:

image.thumb.png.3bc787c2af1eb6d5293361c679f44ce9.png

 

Then right-clink on the red bullets, "Breakpoint properties" -> "Advanced"

 

On the first one:

image.png.868b320c99dfaca366bd59edbf8c2dcd.png (actually you don't need the "Log result" here)

 

On the second:

image.png.6ab94517b9b871023d9b2a1f34faf94e.png

 

(I have attached the InitHelper.pas to this post.)

 

And just run the app.

It will take a time to finish, then you can save the Events and process/investigate the output.

Of course, the measured times are higher because of the debugger, but it gives a very good orientation for finding bottlenecks.

 

To check the unit, place a conditional breakpoint on "I" somewhere.

 

 

 

 

 

InitHelper.pas

  • Like 1
  • Thanks 2

Share this post


Link to post
9 hours ago, Attila Kovacs said:

As I could not find anything measuring the InitUnits, and it has its reasons, I come up with this poor mans profiler:

It could be even simpler. Just "eval expression" `IntToStr(GetTickCount)` and log the result.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×