The Platform Compliance profiler typically produces a huge amount of results. This happens because by default the profiler analyzes all static calls to system libraries that it finds (this number is large), and this number is multiplied by the number of checked platforms.
To decrease the amount of results and to make the result analysis easier, you can narrow down the profiling scope. You do this by defining profiling areas in your project. In this case, the profiler will analyze calls from the modules you added to the profiling areas.
The entire procedure includes the following steps:
1. Add System Libraries to Your Project
To use profiling areas with the Platform Compliance profiler, the system libraries, which your profiled module uses, must be included in your AQTime project.
To determine what system libraries your profiled module depends on, you can use the PE Reader panel:
-
Open the PE Reader panel:
-
To add a library to your project, right-click it in the PE Reader panel and choose Add Module to Project from the context menu:
2. Create and Configure Profiling Areas
After you add system libraries to your project, you need to create profiling areas of the including or excluding types to specify the modules you want to profile.
-
To check calls to specific system libraries:
-
Disable the All Project Modules predefined area.
-
Create one or more areas of the including type.
-
Add the desired system libraries to the including areas you created.The easiest way to do this is to drag the libraries from the Modules list to the area. See also Adding Code to Areas.
See Example 1 below.
-
-
To check all the libraries except for a few of them:
-
Create one or more areas of the excluding type.
-
Add the system libraries you would like to exclude from analysis to these areas.
-
Check whether the All Project Modules area is enabled, or whether you have libraries in including areas in your project. If you have only excluding areas and the All Project Modules area is disabled, the profiler will have nothing to analyze.
Note that you can exclude not only the entire system libraries from analysis, but also some of their functions. See Example 2 below.
-
Example 1
Suppose, you want to check how your application supports calls to functions of the user32.dll library, but you do not want to verify calls to other libraries. To exclude them from profiling, do the following:
-
Add the user32.dll library to the project. To do this, open the PE Reader panel, right-click user32.dll and select Add Module to Project from the context menu.
-
In the Setup panel, right-click the Code to Profile pane and select Add Profiling Area from the context menu. In the subsequent dialog, create a new area of the including type.
-
Drag the user32.dll library from the Modules list of the Setup panel to the including area you created. Make sure the check boxes of the area and of the library are selected.
-
Disable the All Project Modules predefined area to command AQTime to profile only code in including areas.
Now, the Platform Compliance profiler will analyze calls to the user32.dll library and skip calls to other system libraries.
Note that AQTime offers multiple ways of creating profiling areas and adding code to them. We've described only one of the possible approaches. To learn more, see the topics of the Using Areas section.
Example 2
To exclude only some functions of a system library from profiling (not the entire library), you add these functions to an excluding area. Suppose, you want to exclude the GetMenu
function of the user32.dll library from analysis. To do this, follow the steps below:
-
Add the user32.dll library to the project.
-
Create an area of the excluding type and add the
GetMenu
function to it. Make sure the check boxes of the area and of theGetMenu
function are selected. -
Make sure that the All Project Modules predefined area is enabled, or that you have user32.dll in an including area:
If your project is configured as shown in the image above, the profiler will analyze calls to all system functions, except for calls to GetMenu
.
See Also
Platform Compliance Profiler
Platform Compliance Profiler Options