Tracing Function Call Parameters and Result Values

Applies to AQTime 8.81, last modified on January 18, 2022

The Function Trace profiler can log information about function call parameters and return values. This information will be logged if the routine belongs to an including area whose Retrieve parameter values property is enabled. This option is available when creating a new area or when modifying the properties of an existing area.

After you perform the profiling and get results, activate the Call Trace results category in the Explorer panel. When this category is chosen, the Report panel displays a sequence of function calls for the application thread that is selected in the Explorer panel. The Details panel contains parameter information for the routine that is selected in the Report panel.

The Details panel displays information on function parameters in two tables: Routine Parameters On Enter and Routine Parameters On Exit. These tables show parameter values for entering and exiting the routine. For more information on panel columns, see Function Trace Profiler - Details Panel Columns (Call Trace Category). The type of information displayed depends on several conditions:

  • For some Borland VCL constructors and destructors an additional parameter can be displayed. It does not exist in the source code but is added by the compiler.
  • If the application was compiled with Optimization enabled, parameter values may be incorrect. We recommend that you turn Optimization off if you want to trace parameter values on calls.
  • For parameters passed by reference, the pointer address is analyzed. If AQTime managed to trace the parameter value then the pointer address (or several addresses in a pointer-to-pointer case) is shown together with the result value, otherwise only the pointer address. The analysis result value depends on the data type. For native applications the following information is displayed:

    Data type Displayed value
    Character The ordinal number of the character.
    Pointer to character The character trailed with ellipses.
    Boolean True or False values.
    Other simple data types: integer, floating point and so on The actual parameter value.
    String Either the whole string text or the first character of the string trailed with ellipses.
    Array The first element of the array.
    Other complex data types Only the memory address.

    For parameters of .NET applications the string value returned by the ToString() function will be shown. For example, the following string value corresponds to an array type: System.Int32[].

  • For the function passed as routine parameter the following information is displayed:

    Column Value Example
    Param Type Function result type and types of function parameters: Result (Param1, Param2, ...) Integer (Integer, Boolean)
    Param Value Function address and possibly a pointer analysis result. 0x0045C8F0
  • Depending on the compiler and user settings, Variant type parameters can be displayed in three ways: as address, structure or variant. In Visual Studio applications, variants are interpreted as address or structure. In Delphi applications - as address or variant. In C++Builder applications, all three interpretations are possible.

  • For class instance passed by reference, only the address is shown. If the object is passed by value, it is parsed into class fields and field-values are displayed in braces. For each class field the following information is shown: type, name and value. Fields are delimited with commas. The maximum number of class fields to be displayed is specified by the Maximum number of fields option. If there are more fields in the class then the value list ends with ellipsis. For example, {string Font_Name = Arial, int Font_Size = 14, ...}.

  • The function result is distinguished with the Return Value mark in the Comments column of the Routine Parameters On Exit pane. The output parameters of a procedure are not specifically marked, but you can track them by comparing the values in the Routine Parameters On Enter and Routine Parameters On Exit panes.

Note: Currently, the Function Trace profiler does not collect information on values of script routines’ parameters.

See Also

Function Trace Profiler - Overview
Call Trace Category

Highlight search results