Compiler Settings for CodeGear Delphi 2009 for Win32

Applies to AQTime 8.81, last modified on March 03, 2021

This topic explains how to prepare applications created with CodeGear Delphi 2009 for Win32 for AQTime. To learn how to prepare applications created with other Delphi versions, see Compiler Settings for Native Applications.

To prepare a Delphi 2009 for Win32 application for AQTime, you must first ensure that it includes debug information. Follow these steps:

  1. Open your project in Delphi 2009 for Win32.

  2. Select Project > Configuration Manager from the main menu. This will open the Build Configuration Manager dialog. Select the Debug configuration for your project:

    Build Configuration Manager Dialog

    Click the image to enlarge it.

    Close the dialog.

    Note: You can profile your application in any configuration, not just in the Debug one. We chose the Debug configuration to make sure the changes that are made to compiler settings will not affect the Release configuration, which is typically used to build the final version of applications.
  3. Select Project > Options from the main menu. This will open the Project Options dialog.

  4. To set the compiler options, select the Delphi Compiler> Compiling category from the tree view on the left of the dialog.

  5. To include the symbolic debug information, set the Debug information option to True in the Debugging section.

  6. To view the variables local to procedures and functions, set the Local symbols option to True.

  7. If you want to profile VCL classes, for example, TDataset, set the Use Debug .DCUs option to True. Otherwise, AQTime will only be able to profile the classes that are defined in your application.

    Project Options: Compiler

    Click the image to enlarge it.

  8. To set the linker options, select the Delphi Compiler > Linking category from the tree view on the left of the dialog.

  9. Set the Debug information option to True:

    Project Options: Linker

    Click the image to enlarge it.

  10. If you do not want to use the Allocation profiler, skip this step.

    Note that the point of the Allocation profiler is not performance. Its point is to track memory allocations and deallocations. To do this, the profiler requires access to the basic VCL objects (TObject and TInterfacedObject). Therefore, the easiest way to provide this access is to uncheck the Build with runtime packages box in the Resource Compiler > Packages category:

    Project Options: Packages

    Click the image to enlarge it.

    If you want to use the Build with runtime packages option (for instance, to control the exe size), you can still use the Allocation profiler. When you include your application in an AQTime project, you will also have to include the <Windows>\System32\RTL120.BPL file.

    To add a module to an AQTime project, press Add Module on the Setup toolbar or select it from the Setup context menu.

  11. Once you have set the compiler and linker options correctly, rebuild your application and it will be ready for profiling. If you are profiling an ActiveX control or a COM server however, you should register its “debug” version in the system (See Profiling COM Applications).

When your application is ready for release, remember to recompile it without debug information to reduce the application size.

Note: AQTime is incompatible with some third-party tools that modify the binary code of your application (for example, those that add a custom exception handling mechanism). An example of such a tool is EurekaLog. We recommend that you profile your application before processing it with such tools.

See Also

Compiler Settings for Native Applications

Highlight search results