ViewArticle

[Collapse]AQtime/viewarticle/43079/
 [Expand]General Information/viewarticle/43079/
 [Collapse]Getting Started/viewarticle/43449/
  [Expand]General Information/viewarticle/43505/
  [Collapse]Doing One Profiler Run/viewarticle/43454/
    1. Preparing an Application for Profiling/viewarticle/43474/
    2. Creating a Profiling Project/viewarticle/43073/
    3. Choosing What to Profile and When/viewarticle/42952/
    4. Selecting a Profiler/viewarticle/43338/
    5. Starting the Profiler Run/viewarticle/42961/
    6. Analyzing Profiling Results/viewarticle/43185/
 [Expand]Profiling Applications With AQtime/viewarticle/43100/
 [Expand]AQtime Reference/viewarticle/43097/
 [Expand]Development Tools Integration/viewarticle/43508/
 [Expand]Samples and Tutorials/viewarticle/43120/
 [Expand]Other Tools for Optimizing Your Applications/viewarticle/43008/
 [Expand]AQtime Licensing Guide/viewarticle/43331/
Updated: 8/2/2017 Applies To: AQtime 8 Rating: No votes Click to rate: PoorNot badAverageGoodExcellent
Getting Started - Doing One Profiler Run

5. Starting the Profiler Run

Before Starting the Profiling

Besides the main preliminary steps (such as creating a project, specifying what to profile or selecting a profiler), there are a few more checks to go through before starting the run:

  • Check that you have set the running conditions as they need to be. For an EXE, these are the (possible) runtime arguments, for a DLL, the (necessary) host application. Most of the time, you do not have to do anything, because you are testing an exe that takes no parameters, or because you simply want to keep the existing settings. To check or change conditions, use Run | Parameters from the main menu.To check or change conditions, use AQtime | Parameters from Visual Studio’s menu.To check or change conditions, use AQtime | Parameters from RAD Studio’s menu. This leads you to the Run Parameters dialog, which has a box both for parameters and for host application. See Profiling Dynamic Link Libraries for details on the latter.

  • Make sure that the necessary modules (for example, DLLs) can be loaded.

  • Specify the type of profiled executable using the Profiling Mode drop-down list box on AQtime’s Standard toolbar. This list includes the following items:the Profiling Mode drop-down list box on Visual Studio’s AQtime toolbar. This list includes the following items:the AQtime Profiling Modes toolbar in Embarcadero RAD Studio. This toolbar includes the following items:

    Normal - Means that the profiled executable is a regular managed or unmanaged executable or library. This item is selected by default.

    ASP.NET - Means that the profiled executable is an ASP.NET application or .NET Web service. To profile a Windows service, select Service profiling. For more information on how to profile ASP.NET applications, see Profiling ASP.NET Applications.

    IIS - Means that the profiled executable is an IIS application or Web service created with an unmanaged compiler. For more information on profiling such applications, see Profiling IIS Applications.

    COM Server - Means the profiled executable is a COM application. For more information, see Profiling COM Applications.

    Service- Means that the profiled executable is a Windows service. Do not use it for ASP.NET service profiling. For more information on how to profile services, see Profiling Services.

  • Make sure that the Enable/Disable Profiling button on the Standard toolbar is in its normal pressed-in state (as shown), unless you want to start with profiling turned off, overriding your trigger and action settings.

  • If you are using the Performance or Function Trace profiler and your computer’s CPU (for instance, Intel Pentium M) supports dynamic CPU frequency mode, you should disable the dynamic change of the CPU frequency in order to obtain accurate results. If the CPU frequency is changed dynamically, the timing results may be inaccurate.

  • If you are using the Allocation profiler, make sure that you have checked one or more class-level areas. Otherwise, you may receive empty results. This typically concerns profiling of .NET applications and the reason for this is quite simple: the profiler always tracks memory-block allocations done by non-class memory management routines such as new or alloc. Therefore, if you start profiling a .NET application and there are no class-level areas selected, the profiler will not notify you, since that .NET application may include unmanaged sections of code and these sections may call non-class memory management routines, which you may want to profile.

Two notes:

  • If you use a computer that has several processors or a multiple-core processor (for example, dual-core CPU) and has Windows XP Service Pack 2, then you must install the Windows update #896256 in order for AQtime to be able to profile your application correctly. The update is available on Microsoft’s web site:

    http://support.microsoft.com/kb/896256

  • In order for AQtime to be able to profile your application, the user account, under which AQtime will be running, must have administrator permissions. The easiest way to grant these permissions is to add this account to the Administrators group.

Starting the Profiler Run

To start profiling, press Run on the Standard toolbar or select Run | Run from AQtime’s main menu.

To start profiling, select AQtime | Run from Visual Studio’s main menu.

An alternative way to start profiling is to press Visual Studio’s Run button or selecting Debug | Run menu item while one of AQtime’s panels is active or while an AQtime panel is selected in the Solution Explorer.

Note: Depending on the current project and solution configuration the Debug | Run menu item and corresponding Run button can be renamed to Debug | Start Debugging and Start Debugging.

To start profiling, select AQtime | Run With Profiling from RAD Studio’s main menu.

An alternative way to start profiling is to press RAD Studio’s Run button on the Debug toolbar or select the Run | Run menu item while one of AQtime’s panels is active or while an AQtime panel is selected in the Project Manager.

After you selected RunRunAQtime | Run With Profiling, AQtime displays the Profiler Options dialog where you can check or modify profiling options and conditions for the coming profiler run. AQtime will start profiling after you close the dialog.

x64 editions of the Windows operating system require that the “bitness” of a process and the module that is loaded into this process be the same (in other words, 32-bit modules can be loaded only into a 32-bit process and 64-bit modules can be loaded only into a 64-bit process). This limitation may exist when profiling a dynamic link library, an in-process COM server or any other module that is loaded into a process. If the “bitness” of the module and process is not the same, AQtime will stop profiling and display an error message informing you about the problem.

Some points while executing the application:

  • Run the operations that you need to profile (for instance, those where you suspect a bottleneck). You might plan your run before starting, to be sure you hit all the high (or rather, low) points.

  • You can use the Enable/Disable Profiling buttonthe AQtime | Enable/Disable Profiling menu itemthe AQtime | Enable/Disable Profiling menu item to suspend profiling, but not execution, while you run through parts of the application you do not need to profile. See Choosing What to Profile and When for the caveat.

  • AQtime generates results when the application execution is over. To obtain profiling results during the run, select Get Results from the Run menu or from the Standard toolbar select AQtime | Get Results from Visual Studio’s main menu select AQtime | Get Results from RAD Studio’s main menu. You may also need to use this item if the profiling process never ends. See Getting Results During Profiling for more information.

  • If you profile a managed application, you can click Force Garbage Collectionselect AQtime | Force Garbage Collectionclick the Force Garbage Collection button to initiate garbage collecting in the profiled process. You may do this, for instance, to see which objects will be removed and which will remain in memory. Note that the Force Garbage Collection button does not reside on any toolbar by default. However, you can add the button to any RAD Studio’s toolbar via the Toolbar Customization dialog. In this dialog, switch to the Commands page, select the Run.AQtime category in the Categories list, drag the Force Garbage Collection command from the Commands list and drop it on the needed toolbar.

  • If you want to force the application process to end, click Terminate select AQtime | Terminate select AQtime | Terminate. You may need to do this if the application cannot normally be ended without rebooting, logging off or some other drastic intervention, or if it simply stopped responding. Pressing Terminate does not generate profiling results.

  • Some profilers, with some over-enthusiastic settings, may slow application execution to the point where you mistake it for a crash.

  • Once you have gone through the operations you wanted, exit the application. Do not accumulate needless profile data.

    If this has happened, you can flush all gathered results. To do this, select Clear Results from the Run menu, or from the Standard toolbarselect AQtime | Clear Results from Visual Studio’s main menuselect AQtime | Clear Results from RAD Studio’s main menu (see Clearing Results During Profiling).

Once you exit, the resultant profile will be displayed in AQtime’s Report panel.

See also
Optimizing the Profiling Process


© 2018 SmartBear Software. All rights reserved.
Email Send feedback on this document