The Resource profiler checks how the profiled application uses Windows resources. For each resource instance it displays a stack of function calls that led to the resource instance creation and a call stack for errors that occurred in resource management functions called during the application run.
The Resource profiler organizes results into three categories: Classes Data, Objects and Errors. The Classes Data category provides information about the resource types whose instances existed at the moment the results were being generated. You cannot view call stacks if this category is selected. To view detailed information on existing resource instances, select the Objects category. To view the errors that were generated by these resources, select the Errors category. For more information, see the following sections:
Viewing Call Stacks for Objects
If the Objects category is selected, the Report panel shows information about resource instances that existed at the moment the results were being generated. That is, you can explore call stacks for individual resource leaks.
The call stack information for the selected resource instance is shown in the Details panel. When you choose another object in the Report panel, the content of the Details panel is automatically updated.
To view the call stack, follow these steps:
-
Select the Objects category in the Explorer panel.
-
In the Report panel, select a resource instance.
-
Switch to the Details panel and examine the call stack. The Creation Call Stack page of the Details panel will display the stack of function calls that led to creation of the resource instance. The API function that allocated the given resource instance is at the top of the call stack.
-
To view a routine’s source code, double-click this routine in the Details panel. AQTime will bring up the Editor panel and position the cursor on the routine’s code in it.
Note: The source file of the routine must be specified in the Project Search Directories dialog. In addition, to view the sources of your managed application in the Editor, you need to compile the application with debug information. See How AQTime Profilers Use Metadata and Debug Information.
Viewing Call Stacks for Errors
If the Errors category is selected, the Report panel displays results for errors that occurred in API resource-related functions during the run. The call stack information for the selected error is shown in the Details panel. When you choose another error in the Report panel, the content of the Details panel is automatically updated.
In the Report panel, you can find the description of an error, its error code, the name of the function where the error occurred and the name of the DLL where the function resides. You can switch to the Details panel and examine the call stack. The function where the exception occurred is at the top of the call stack.
Important Notes
-
You cannot view a stack if none of the stack areas is selected in the Collect Stack Information Pane.
-
Using the information provided by AQTime panels, you can find out where a resource instance was created. However, AQTime cannot indicate the place where it must be released, as this depends on your application’s logic.
See Also
Search for Resource Leaks and Errors in Resource Management Functions
Resource Profiler Panels Reference