![pexelsphoto373543 | Embarcadero RAD Studio Delphi C++Builder Blogs](https://i0.wp.com/blogs.embarcadero.com/wp-content/uploads/2020/09/pexels-photo-373543.jpeg?resize=1140%2C694&ssl=1)
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 | Embarcadero RAD Studio Delphi C++Builder Blogs asmprofiler](https://i0.wp.com/blogs.embarcadero.com/wp-content/uploads/2020/11/asmprofiler-7215026.png?resize=750%2C450&ssl=1)
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 | Embarcadero RAD Studio Delphi C++Builder Blogs mainscreen 2](https://i0.wp.com/blogs.embarcadero.com/wp-content/uploads/2020/11/Mainscreen-9067025.png?resize=750%2C551&ssl=1)
Table of Contents
Actions
You can choose from 1 of the next 3 actions:
Profiling screen
This is profiling session screen:
![ProfilingScreen | Embarcadero RAD Studio Delphi C++Builder Blogs profilingscreen 2](https://i0.wp.com/blogs.embarcadero.com/wp-content/uploads/2020/11/ProfilingScreen-9246668.png?resize=750%2C675&ssl=1)
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 | Embarcadero RAD Studio Delphi C++Builder Blogs selectprocess 2](https://i0.wp.com/blogs.embarcadero.com/wp-content/uploads/2020/11/SelectProcess-3405308.png?resize=750%2C604&ssl=1)
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:
![ProfilingScreenstart | Embarcadero RAD Studio Delphi C++Builder Blogs profilingscreen start 2](https://i0.wp.com/blogs.embarcadero.com/wp-content/uploads/2020/11/ProfilingScreen_start-1192898.png?resize=750%2C683&ssl=1)
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:
![ProfilingScreenstop | Embarcadero RAD Studio Delphi C++Builder Blogs profilingscreen stop 2](https://i0.wp.com/blogs.embarcadero.com/wp-content/uploads/2020/11/ProfilingScreen_stop-5984871.png?resize=750%2C683&ssl=1)
The get more detailed picture of the Profiler and also to download it, please refer to the next link:
https://github.com/andremussche/asmprofiler
Design. Code. Compile. Deploy.
Start Free Trial Upgrade Today
Free Delphi Community Edition Free C++Builder Community Edition