When you profile your application with the Allocation, Resource, Reference Count or Failure Emulator profiler, AQtime allows collecting the call stack for the profiled application or module. However, the resulting call stack may include unnecessary calls to third-party and system functions. Such calls can make the collected call stack larger and more difficult to analyze. To reduce the size of the call stack and make it easier, AQtime provides you with the Collect Stack Information Pane that lets you control which routines and methods are included into the resulting call stack and which are not.
For instance, using this pane, you can specify which routines, classes or modules are included into the collected call stack. We call such sets of modules, classes and routines, stack areas. In the example above, AQtime traces calls to all of the elements belonging to the specified stack area. One more example is when you need to collect the call stack for all of the modules or methods except for a specific number of them. You may need to exclude one method of the specified class from the tracing and so on. For this purpose, you can create an excluding stack area and AQtime will trace calls to all of the routines and methods, except for the specified ones.
The general procedure of specifying stack areas to be included into the call stack is as follows:
Select the Allocation, Resource, Reference Count or Failure Emulator profiler. For more information, see Selecting the Profiler.
Switch to the Collect Stack Information pane of the Setup panel.
|This pane is shown only for the mentioned profilers.|
Now, you need to select the desired stack area (any of predefined ones) or create a custom stack area that will specify which routines and methods are included into (or excluded from) the call stack.
Predefined stack areas are used when you want to include all of .NET or Java modules into the call stack. Or when you want the call stack to include all of the modules added to the Modules pane. For more information on available predefined stack areas, see the description of the Collect Stack Information Pane.
To enable predefined stack areas, simply select the corresponding check box in the pane and select the corresponding call stack level: Routines only or Collect info about lines. If the first option is selected, the call stack will include information only about routines. If the second option is selected, the collected call stack includes both routine names and information about line numbers from which the function was called.
To create a custom stack area, do the following:
Right-click somewhere within the Collect Stack Information pane.
Select Add Area from the subsequent context menu.
Specify the name for the created stack area and select its type: including or excluding. As it was mentioned, including stack areas are used to specify routines and methods to be included into the call stack. Excluding stack areas are used to exclude specific routines or methods from the call stack.
If you want the collected call stack to include both routine names and information about line numbers from which the function was called, select the Collect info about lines option. Otherwise, select the Routines only option.
Click OK to close the dialog and create the stack area.
Drag the desired modules, classes or methods to the created stack area.
Select the check box that corresponds to the custom stack area to enable it for the next project run.
Run the project. For more information, see Running a Profiling Session.
Now AQtime will trace the call stack according to the specified stack areas.
Click Get Results to command AQtime to generate the test results and then click Terminate to stop the profiling.
After the test run is over, AQtime shows the collected call stack in the Details panel.
|If the panel is empty, most likely, you have not added any module, class or method to the Collect Stack Information pane or you have not selected any stack area in this pane.
One more possible reason is the absence of debug information for the profiled modules that have been added to the Collect Stack Information pane. For more information, see How AQtime Profilers Use Metadata and Debug Information.