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.
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:
You can choose from 1 of the next 3 actions:
This is profiling session screen:
For now, you can only profile a running process. To start and profile a new process will be added in the future.
To select a process, press the *Select process* button. The next screen will popup:
Double click a process or select a process and press the *Profile it* button.
After selecting a process, you can set some options and the *Start* button is enabled:
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:
The get more detailed picture of the Profiler and also to download it, please refer to the next link: