This topic explains how to prepare 32-bit applications created with Embarcadero C++Builder XE6 - XE8 and 10 Seattle - 10.3 Rio for AQTime.
To learn how to prepare 64-bit applications created with C++Builder, see Compiler Settings for Embarcadero C++Builder XE6 - XE8 and 10 - 10.3 (64-bit). To learn how to prepare applications created with other C++Builder versions, see Compiler Settings for Native Applications.
To prepare a 32-bit Embarcadero C++Builder application for AQTime, first of all, you need to make sure that it includes debug information. Follow these steps:
Open your project in C++Builder.
Choose Project > Options from the main menu to open the Project Options dialog.
In the tree on the left of the dialog, select the C++ Compiler > Debugging category:
To include symbolic debug information, set the Debug information option to True. In addition, to refer this information to source line numbers, set the Debug line number information option to True.
If you compile your application with CodeGuard enabled, the latter will report errors during the profiler execution. They are related to AQTime hooking code and are not actually errors. We recommend that you disable CodeGuard before profiling your application with AQTime. To do this, set the Enable CodeGuard option to False.
(Optional) To generate stack frames when using the C++ compiler, switch to the C++ Compiler category and set the Standard stack frames option to True.
To set the Delphi compiler options, select the Delphi Compiler > Compiling category from the tree view on the left of the dialog:
To include symbolic debug information, set the Debug information option to Debug information. In addition, to refer this information to source line numbers, set the Local symbols option to True.
(Optional) To generate stack frames when using the Delphi compiler, set the Stack frames option to True.
Switch to the C++ Linker category and set the Full debug information option to True.
Switch to the C++ (Shared Options) category and check the Library path option. Make sure that the path contains the $(BDS)\lib\$(PLATFORM)\debug folder:
If you are not going to use the Allocation profiler, skip this step.
The point of the Allocation profiler is not to check performance. It is designed to track memory usage. If you need to have your application support the Allocation profiler, you must make sure that AQTime has access to the VCL binary code. The easiest way to add support for the Allocation profiler is to set the Link with Dynamic RTL option from the C++ Linker category to False and then uncheck Link with runtime packages in the Packages > Runtime Packages category.
|If you want to keep Link with runtime packages (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\RTL160.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.
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, you need to 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.|