Allocation Profiler Tutorial: 1 - Running the Boxing Sample

Applies to AQTime 8.81, last modified on March 03, 2021

To illustrate the use of the Allocation profiler, we will use several sample applications: Boxing, References, VCL and Allocation.

Let’s start with the Boxing example.

Microsoft Visual Studio 2005 Projects:

<AQTime Samples>\Managed\VS2005\Allocation\Boxing\CS  -  Microsoft Visual C# .NET

<AQTime Samples>\Managed\VS2005\Allocation\Boxing\VC  -  Microsoft Visual C++ .NET

<AQTime Samples>\Managed\VS2005\Allocation\Boxing\VB  -  Microsoft Visual Basic .NET

Microsoft Visual Studio 2013 Projects:

<AQTime Samples>\Managed\VS2013\Allocation\Boxing\CS  -  Microsoft Visual C# .NET

<AQTime Samples>\Managed\VS2013\Allocation\Boxing\VC  -  Microsoft Visual C++ .NET

<AQTime Samples>\Managed\VS2013\Allocation\Boxing\VB  -  Microsoft Visual Basic .NET

Note: You can also open Visual Studio samples in later versions of Visual Studio.
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.

To profile this example with AQTime, do the following:

  • Open the application in AQTime.

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

  • 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.

  • 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 the All Project Modules and Entire .NET Code check boxes and the corresponding Collect info about lines radio buttons 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. In the dialog, press Run to start profiling.

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

  • The Boxing application contains two routines: BoxedValues and SimpleValues. The first of them creates 100 structures and saves them to a Hashtable object. The second routine also creates 100 structures of the same type but saves them to an array.

  • During startup, the application calls the BoxedValues routine and displays two messages that notify you about the start and end of the routine.

    Starting BoxedValues...

    BoxedValues finished. Press Enter...

    Press Enter to continue.

  • The application will call the SimpleValues routine:

    Starting SimpleValues...

    SimpleValues finished. Press Enter...

  • Press Get Results on AQTime’s Standard toolbar and AQTime will generate the results.Select Get Results from Visual Studio’s AQTime menu and AQTime will generate the results.Select Get Results from the AQTime menu and AQTime will generate the results. We will analyze this result set later.

  • Press Enter. The application will be closed and AQTime will generate the results again. This result set is not of interest to us.

Prev     Next 

See Also

Allocation Profiler

Highlight search results