- Mastering Delphi Programming:A Complete Reference Guide
- Primo? Gabrijel?i?
- 294字
- 2021-06-24 12:33:30
Sampling Profiler
The Sampling Profiler is, as its name suggests, a sampling profiler for Delphi, written by Eric Grange. You can find it at www.delphitools.info. Although it officially supports only Delphi 5 to XE4, it will function well with applications written in modern Delphis.
The strongest part of the Sampling Profiler is its configurability for multithreaded sampling. You can specify which CPUs will execute the profiler and which profiled application. You can also focus on a specific thread by issuing a OutputDebugString('SAMPLING THREAD threadID') command from your code (replace threadID with the real ID of the thread you want to profile). It is also very simple to turn profiling on or off by calling OutputDebugString('SAMPLING ON') and OutputDebugString('SAMPLING OFF').
An interesting feature of the Sampling Profiler, which other profilers don't provide, is the ability to enable web server in the profiler. After that, we can use a browser to connect to the profiler (if firewalls allow us, of course) and we get an instant insight into the currently most executed lines of our program:

The weakest point of the Sampling Profiler is its complete inability to select methods that are of interest to us. As we can see in the following screenshot, we get some methods from Generics.Collections mixed between methods from SlowCode. This only distracts us from our task—trying to find the slow parts of SlowCode.
Saying all that, I must admit that the display of profiling results is really neatly implemented. The results view is simple, clean, and easy to use:

The Sampling Profiler would be a perfect solution for occasional profiling if it would only allow us to select topics of interest.
- Cortex-M3 + μC/OS-II嵌入式系統(tǒng)開發(fā)入門與應(yīng)用
- 龍芯應(yīng)用開發(fā)標(biāo)準(zhǔn)教程
- Applied Unsupervised Learning with R
- 電腦維護(hù)與故障排除傻瓜書(Windows 10適用)
- 電腦軟硬件維修大全(實例精華版)
- Mastering Delphi Programming:A Complete Reference Guide
- 基于ARM的嵌入式系統(tǒng)和物聯(lián)網(wǎng)開發(fā)
- R Deep Learning Essentials
- Creating Flat Design Websites
- Managing Data and Media in Microsoft Silverlight 4:A mashup of chapters from Packt's bestselling Silverlight books
- Hands-On Deep Learning for Images with TensorFlow
- The Artificial Intelligence Infrastructure Workshop
- 單片機(jī)項目設(shè)計教程
- FPGA實驗實訓(xùn)教程
- 可編程邏輯器件項目開發(fā)設(shè)計