Allocation Profiler Tutorial: 3 - Running the References Sample

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

The References sample application illustrates how the Allocation profiler can trace references held between objects in the profiled application.

Microsoft Visual Studio 2005 Projects:

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

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

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

Microsoft Visual Studio 2013 Projects:

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

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

<AQTime Samples>\Managed\VS2013\Allocation\References\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.

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

  • Verify that the Enable/Disable Profiling button on the Standard toolbarin the AQTime menu of Visual Studioin the AQTime menu of RAD Studio is pressed since AQTime profiles only when this button is pressed.

  • 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 there and press Run to start profiling.

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

  • Once started, the References application creates a binary tree in memory. Each node of this tree is an object. It has two child nodes (objects), which, in their turn, also have child nodes, etc. Each node stores a value of 0 or 1. When the tree is ready, the application "walks" through the nodes of this tree and displays the corresponding notifications on screen:

    Lefthand tree-walk:

    .....

    Righthand tree-walk:

    .....

    Press Enter to exit.

  • 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 RAD Studio’s 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 does not interest us.

Prev     Next

See Also

Allocation Profiler

Highlight search results