Allocation Profiler Tutorial: 5 - Running Unmanaged Sample

Applies to AQTime 8.81, last modified on January 18, 2022

AQTime includes several unmanaged examples, which you can use to explore the Allocation profiler’s functionality. The VCL sample application illustrates how the Allocation profiler can trace creation and deletion of VCL objects inherited from TObject in Delphi and C++Builder applications.

On Windows Vista and later, AQTime samples are located in the <Users>\Public\Documents\AQTime 8 Samples folder. On other operating systems, the samples reside in the <Documents and Settings>\All Users\Documents\AQTime 8 Samples folder.

<AQTime Samples>\Unmanaged\Allocation\BCB  -  Borland C++Builder

<AQTime Samples>\Unmanaged\Allocation\Delphi  -  Borland Delphi

Note: The sample application that is created by compiling the files from these folders is called VCL.

Another unmanaged example, Allocation, which is installed to the <AQTime Samples>\Unmanaged\Allocation\VC folder, illustrates AQTime’s ability to trace allocation and deallocation memory blocks performed with the following C++ functions and operators: new, new[], delete, delete[], malloc, calloc, realloc, expand and free. The work with such applications is similar to the work with the VCL sample (see below).

<AQTime Samples>\Unmanaged\Allocation\VC2013  -  Microsoft Visual C++ (Visual Studio 2013 project)

<AQTime Samples>\Unmanaged\Allocation\VC2005  -  Microsoft Visual C++ (Visual Studio 2005 project)

Note: You can also open Visual Studio samples in later versions of Visual Studio.

The sample application that is created by compiling the files from these folders is called Allocation.

To profile the desired example with AQTime, do the following:

  • Open the application in AQTime.

  • Select Allocation Profiler from the Profilers drop-down list on the Standard toolbar.

    Select Allocation Profiler from the Profilers drop-down list displayed in the AQTime menu of Microsoft Visual Studio.

    Select Allocation Profiler from the Current Profiler submenu displayed in the AQTime menu of Embarcadero RAD Studio.

  • Enable All Project Modules by Classes and disable Entire .NET Code by Classes in the Setup panel.

  • Select Normal from the Profiling Mode drop-down list box that is displayed on AQTime’s Standard toolbar.

    Select Normal from the Profiling Mode drop-down list box that is displayed on Visual Studio’s AQTime toolbar.

    Click the Normal button on RAD Studio’s AQTime Profiling Modes toolbar.

  • Switch to the Collect Stack Information Pane shown to the middle right of the Setup panel and make sure that both the All Project Modules check box and the corresponding Collect info about lines radio button are selected.

  • Press Run on the Standard toolbar.

    Select Run from Visual Studio’s AQTime menu, or press Visual Studio’s Run button while any of AQTime panels is active.

    Select Run With Profiling from Embarcadero RAD Studio’s AQTime menu.

  • Depending on the Show Again Flags options, AQTime may call the Profiler Options dialog. Make sure that both the All Project Modules check box and the corresponding Collect info about lines radio button are selected and press Run to start profiling.

  • AQTime will launch the profiled application. Wait until the application window is displayed on the screen.

  • The following step depends on the application sample you are using:

    • VCL sample application - enter 100 in the edit box and press Execute.

    • Allocation sample application - enter 1, 2 or 3 in the edit box and press Execute.

    The application will create the specified number of VCL objects (memory blocks) and will not delete them.

  • Close the application.

  • AQTime will generate the results that we will analyze at the next step.

Prev     Next

See Also

Allocation Profiler

Highlight search results