Vandrovnik 214 Posted April 23, 2020 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
Fr0sT.Brutal 900 Posted April 23, 2020 https://github.com/Fr0sT-Brutal/awesome-pascal#code-checkreview-debug 5 1 Share this post Link to post
Vandrovnik 214 Posted April 23, 2020 Thank you, AsmProfiler suites the best. Share this post Link to post
Rollo62 536 Posted April 23, 2020 (edited) 3 hours ago, Fr0sT.Brutal said: https://github.com/Fr0sT-Brutal/awesome-pascal#code-checkreview-debug Thanks for that list. Would be great if also the platform tags could be maintained in that list. (VCL, FMX, FPC, Win, Macos, Android, IOS, Linux). Edited April 23, 2020 by Rollo62 Share this post Link to post
Anders Melander 1784 Posted April 23, 2020 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. 1 Share this post Link to post
Lars Fosdal 1792 Posted April 23, 2020 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? Share this post Link to post
David Heffernan 2345 Posted April 23, 2020 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. 2 Share this post Link to post
Anders Melander 1784 Posted April 23, 2020 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
Tom F 83 Posted April 23, 2020 (edited) 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 April 23, 2020 by Tom F 3 Share this post Link to post
David Heffernan 2345 Posted April 23, 2020 I've really not found a reliable profiler for x64 windows code. Have I missed anything? Share this post Link to post
Anders Melander 1784 Posted April 23, 2020 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. Share this post Link to post
Tom F 83 Posted April 23, 2020 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
Anders Melander 1784 Posted April 23, 2020 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
David Heffernan 2345 Posted April 23, 2020 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. 2 Share this post Link to post
Anders Melander 1784 Posted April 23, 2020 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
pyscripter 689 Posted April 24, 2020 https://github.com/ase379/gpprofile2017 A revamped version of the good old instrumenting profiler by @Primož Gabrijelčič. Share this post Link to post
eivindbakkestuen 47 Posted April 24, 2020 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. 🙂 3 Share this post Link to post
HeZa 3 Posted April 24, 2020 Is anybody aware if there is a profiler, which can profile the unit initialization, with output of unit name and time? 1 Share this post Link to post
Darian Miller 361 Posted April 25, 2020 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. 1 Share this post Link to post
Tom F 83 Posted April 25, 2020 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
Darian Miller 361 Posted April 25, 2020 Economics is a factor, but when the roadmap only includes items from 2013 and 2014 then it certainly feels like an abandoned product so expectation of future support is also a factor. https://www.nexusdb.com/mantis/roadmap_page.php Share this post Link to post
Darian Miller 361 Posted April 25, 2020 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
Attila Kovacs 629 Posted April 25, 2020 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: Then right-clink on the red bullets, "Breakpoint properties" -> "Advanced" On the first one: (actually you don't need the "Log result" here) On the second: (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 1 2 Share this post Link to post
Fr0sT.Brutal 900 Posted April 26, 2020 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
Attila Kovacs 629 Posted April 26, 2020 @Fr0sT.Brutal I was starting like that but I wanted a human readable output. But yes, basically you are right. Share this post Link to post