Have an amazing solution built in RAD Studio? Let us know. Looking for discounts? Visit our Special Offers page!
CodeDelphiRAD StudioTech Partner

All You Need To Know About The Open Source AsmProfiler 32-Bit Profiler Written In Delphi And Assembly

AsmProfiler is a full tracing 32bit profiler (instrumenting and sampling), written in Delphi and some assembly. AsmProfiler stands for “assembly profiler” because the heart of the profiler is written in assembly.

asmprofiler

According to the author of the project:

There are some (good) profilers available, but these are:

  • Too expensive, and I want that every programmer can use a profiler
  • Too bloated, some profilers I know was so bloated I didn’t knew what to do…
  • Misses some functionality, for example I wanted exact function call logging (even if that uses lots of memory) and I wanted nice chart”

We will now go through some modes of the Profiler. There is not a lot of description and information about the Profiler on the internet. Of what I’ve found there are couple of categories (modes), which are described below. Let’s discuss them in couple of lines.

The *instrumenting mode* of AsmProfiler is less easier to use than the *[AsmProfilerSamplingMode]*, but on the other hand, it gives exact and more detailed results!
It works by detouring the selected functions to some AsmProfiler functions, so the start and end time can be measured.

This mode does not have a fancy GUI yet, but it is not very difficult to get it started.

The *sampling mode* of the AsmProfiler is the easiest mode: you can profile any application with only some mouse clicks! No source code changes or recompilation needed.
This mode will take about 500 till 1000 samples of the running process, so it gives a rough view of what’s going on, and which functions takes the most time.
To get more exact and detailed results, please use the *[AsmProfilerInstrumentingMode]* afterwards.

This is the main screen of the sampling mode of AsmProfiler:

mainscreen-2

Actions

You can choose from 1 of the next 3 actions:

Profiling screen

This is profiling session screen:

profilingscreen-2

For now, you can only profile a running process. To start and profile a new process will be added in the future.

Choose process

To select a process, press the *Select process* button. The next screen will popup:

selectprocess-2

Double click a process or select a process and press the *Profile it* button.

Start profiling

After selecting a process, you can set some options and the *Start* button is enabled:

profilingscreen_start-2

You can start profiling by pressing the *Start sampling* button.

_Note: prepare the action you want to profile in the selected process before you *start sampling*, so you get the “cleanest” profiling as possible (without other disturbing function calls)._

Stop profiling & view results

During the profiling session, you can only press the *Stop sampling* button:

profilingscreen_stop-2

The get more detailed picture of the Profiler and also to download it, please refer to the next link:

https://github.com/andremussche/asmprofiler


Reduce development time and get to market faster with RAD Studio, Delphi, or C++Builder.
Design. Code. Compile. Deploy.
Start Free Trial   Upgrade Today

   Free Delphi Community Edition   Free C++Builder Community Edition

Get some love as Delphi turns 26
Related posts
DelphiRAD Studio

Powerful Built In Database Access Excels Delphi Over WPF And Electron

C++DelphiRAD Studio

Easily Add Visually-Stunning FMX And VCL Styles To Your Windows And Mobile Apps

CodeDelphiTech Partner

Detect Bluetooth Devices Easily In Your Windows Apps With Flexible Component Suite

DatabaseInterBase

Quickly Embed Award-Winning Cross-Platform SQL Database: InterBase ToGo

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

IN THE ARTICLES