Function Trace Profiler Results - Database Structure

Applies to AQTime 8.81, last modified on May 21, 2021

The Function Trace profiler results are stored in a number of tables within the specified database. The contents of most of these tables correspond to the contents of AQTime panels in which the profiling results are stored. This topic describes the structure of the database that stores the exported Function Trace profiler results.

The database consists of the following tables:

The relationship between the mentioned tables are illustrated in the image below. This relationship is similar to the relationship of the data in AQTime’s Explorer, Report and Details panels that hold the Function Trace profiler results.

Relations Between Database Tables

Click the image to enlarge it.

The top-level table of the database is INSTANCES. It stores the list of exported result sets. Each exported result set has a unique identifier contained in the INST_ID field. All other tables of the database also have INST_ID fields. The values stored in these fields indicate which result set a specific table item belongs.

The profiling results in the Explorer panel are organized into two categories, Call Trace and Routines. The Function Trace profiling information displayed in AQTime’s Report panel for these categories, is stored in the FUNCTION_TRACE_PROFILER_CALL_TRACE and FUNCTION_TRACE_PROFILER_META_ROUTINES tables, respectively. The profiling results displayed in AQTime’s Details panel for each category depends on which item of the Report panel is selected. That is why the tables storing the information displayed in the Details panel have a special PARENT_ID field that specifies the Report panel item to which a specific record relates.

Note: The ID and REC_ID columns of the FUNCTION_TRACE_PROFILER_xxxx tables are not key columns. They may contain repetitive values. In queries you should use these values along with the INST_ID value (the result set identifier).

Below is detailed information about the tables.

The INSTANCES table

This table contains a list of exported result sets. Each result set is identified by the INST_ID value.

Field Name Description
CAPTION String. The name of the result set.
COUNTER_DESCRIPTION String. The name of the counter that was used during profiling. For example, Elapsed Time, CPU Cache Misses, and so on. For more information about counters, see Counters Overview.
COUNTER_FREQUENCY Decimal. The counter frequency.
COUNTER_NAME String. The type of the counter used during profiling. This field can contain one of the following values:
  • Branches
  • Conflicts
  • Faults
  • Misses
  • Replays
  • Switches
  • Time
INST_ID Integer. The result set’s identifier.

The FUNCTION_TRACE_PROFILER_CALL_ROUTES table

This table stores a list of routes that were used to call each routine. Data stored in this table is used to display information in the Call Routes table of the Details panel for the Routines category. Each row corresponds to a call route.

Table Field Name Description
COL_RECID Integer. The identifier of a specific routine within the FUNCTION_TRACE_PROFILER_META_ROUTINES table.
COL_HIT_COUNT Integer. This field stores the same values as the Hit Count field on the Details panel for the Routines category.
COL_ROUTE_NO Integer. This field stores the same values as the Rout No field on the Details panel for the Routines category.
ID Integer. This field stores the identifier of an item within the list of items that are stored in the table and have the same INST_ID value.
INST_ID Integer. Identifier of the result set. This is the same value that is stored in the INST_ID field of the INSTANCES table.
PARENT_ID Integer. This field stores the identifier of a FUNCTION_TRACE_PROFILER_ROUTINES table item that is a parent for a specific item of the FUNCTION_TRACE_PROFILER_CALL_ROUTES table.
REC_ID Integer. The identifier of a specific route within the list of routine’s call routes.

The FUNCTION_TRACE_PROFILER_CALL_STACK table

This table stores information about call stacks that correspond to a call route. Each row of the table corresponds to a call stack entry. Data stored in this table is used to display information in the Call Stack table of the Details panel for the Routines category.

Table Field Name Description
COL_CALL_NO Integer. Position of the routine in the call stack (0 means the topmost routine). This is the same value that is displayed in the Call No column of the Call Stack table.
COL_MODULE_NAME String. The name of the module that contains the routine. This is the same value that is displayed in the Module Name column of the Call Stack table.
COL_RECID Integer. Contains the identifier of the routine in the FUNCTION_TRACE_PROFILER_META_ROUTINES table (the REC_ID field).
COL_ROUTINE_NAME Integer. Contains the identifier of the routine in the FUNCTION_TRACE_PROFILER_META_ROUTINES table (the REC_ID field). You can obtain the routine name from this table.
COL_SOURCE_FILE String. The name of the source file that contains the source code of the routine. This is the same value that is displayed in the Source File column of the Call Stack table.
COL_SOURCE_LINE Decimal. The number of the source line, where the routine’s implementation begins in the source file. This is the same value that is displayed in the Source Line column of the Call Stack table.
ID Integer. Identifier of the call stack entry within the result set.
INST_ID Integer. Identifier of the result set. This is the same value that is stored in the INST_ID field of the INSTANCES table.
PARENT_ID Integer. Identifier of the route to which the function call belongs. This is the same value that is stored in the ID field of the his field stores the identifier of a FUNCTION_TRACE_PROFILER_CALL_ROUTES table.
REC_ID Integer. Same as COL_CALL_NO (position of the routine in the call stack).

The FUNCTION_TRACE_PROFILER_CALL_TRACE table

This table stores the results of each routine call. The fields of this table correspond to the fields of the Report panel when it displays results of the Call Trace category. Each row of the table corresponds to a function call.

Table Field Name Description
COL__S Integer. This field stores the counter value for the routine. This field is displayed in the column of the Report panel, whose name depends on the counter, for instance, Time, Switches, Branches, Faults, Replays and so on.

For the Elapsed Time, User Time and User+Kernel Time counters the value is stored in machine cycles (AQTime automatically converts this value to other units: seconds, milliseconds or microseconds).

COL__S_WITH_CHILDREN Integer. This field stores the counter value for the routine. This value includes the counter values for child routines and is displayed in the With Children column of the Report panel, for instance, Time With Children, Switches With Children, Branches With Children, Faults With Children, Replays With Children and so on.

For the Elapsed Time, User Time and User+Kernel Time counters the value is stored in machine cycles (AQTime automatically converts this value to other units: seconds, milliseconds or microseconds).

COL_CALL_NO Integer. This field stores the call number. This is the same value that is displayed in the Call No column of the Report panel.
COL_LINE_NUMBER Integer. The number of the line from which a specific routine was called.
COL_NEXT Integer. Identifier of the next routine that was called by the parent routine after it called the routine, to which the given row corresponds. This field is used internally to display the sequence of function calls in AQTime panels.
COL_PARENT_NO Integer. Identifier of the routine’s parent routine. This is the same value that is stored in the REC_ID column of this table.
COL_RECID Integer. Identifier of the routine in the FUNCTION_TRACE_PROFILER_META_ROUTINES table (the REC_ID field of this table).
COL_ROUTINE_NAME Integer. Despite the field name it does not contain the routine name. Instead, it stores the identifier of the routine (the REC_ID value) in the FUNCTION_TRACE_PROFILER_META_ROUTINES table. You can retrieve the routine name from this table.
ID Integer. Identifier of the function call within the result set.
INST_ID Integer. Identifier of the result set. This is the same value that is stored in the INST_ID field of the INSTANCES table.
PARENT_ID Integer. Identifier of the thread in which the function call occurred. This is the same value as the value of the ID field of the FUNCTION_TRACE_PROFILER_THREADS table.
REC_ID Integer. The identifier of a specific routine call within the list of thread’s routines.

The FUNCTION_TRACE_PROFILER_META_LINES table

This table stores information about which code lines of the profiled module belongs to a certain routine. Each row of the table corresponds to a source line. The table is related to the FUNCTION_TRACE_PROFILER_META_ROUTINES table.

Table Field Name Description
COL_SOURCE_LINE Integer. This field stores the number of a code line that belongs to a specific routine.
ID Integer. This field stores the identifier of the line within the result set.
INST_ID Integer. Identifier of the result set. This is the same value that is stored in the INST_ID field of the INSTANCES table.
PARENT_ID Integer. Identifier of the routine, to which the line belongs. This is the same value that is stored in the ID field of the FUNCTION_TRACE_PROFILER_META_ROUTINES table.
REC_ID Integer. The identifier of a specific line within the list of routine’s lines.

The FUNCTION_TRACE_PROFILER_META_ROUTINES table

This table stores information about each routine that was included in profiling tasks whose results were exported. The fields of this table correspond to the fields of the Report panel for the Routines category. Each row corresponds to a routine.

Table Field Name Description
COL_ACTIONACTIVE Integer. The value of this field specifies whether the routine was concerned with an enabled action during profiling.
COL_ACTIONDISABLEROUTINE Reserved.
COL_ACTIONPLACEMENT Integer. If the value of this field is 0, the action concerned with the routine has the On Enter execution type. If the field holds 1, the action's execution type is On Exit.
COL_ACTIONTYPE Integer. This field specifies the type of the action concerned with the routine. It can hold one of the following values:
  • 0 - the action type is Enable Profiling
  • 1 - the action type is Disable Profiling
  • 2 - the action type is Get Results
  • 3 - the action type is Clear Results
COL_ADDRESS Decimal. This field stores the same values as the Address field on the Report panel for the Routines category.
COL_ANALYSIS_RESULT String. This field stores the same values as the Analysis Result field on the Report panel for the Routines category.
COL_CALLINGCONVETION Integer. The value of this field specifies the calling convention of the routine. The field can hold one of the following values:
  • 0 - the calling convention is not defined for a specific routine.
  • 1 - the ccall calling convention
  • 2 - the fastcall calling convention
  • 3 - the stdcall calling convention
  • 4 - the syscall calling convention
  • 5 - the thiscall calling convention
  • 6 - the pascal calling convention
  • 7 - the delphi calling convention
COL_CLASS_NAME String. This field stores the same values as the Class Name field on the Report panel for the Routines category.
COL_CODE_TYPE String. This field stores the same values as the Code Type field on the Report panel for the Routines category.
COL_ISCLASSFUNCTION Integer. The value of this field specifies whether the routine is a class function or it does not belong to any class.
COL_LANGUAGEID Integer. This field stores the language identifier of the program language in which the routine was created.
COL_MODULE_NAME String. This field stores the same values as the Module Name field on the Report panel for the Routines category.
COL_NAMESPACE String. This field stores the same values as the Namespace field on the Report panel for the Routines category.
COL_PROFILELINES Integer. Contains 0 or 1. Specifies whether the routine was profiled by lines (1) or not (0).
COL_ROUTINE_NAME String. This field stores the same values as the Routine Name field on the Report panel for the Routines category.
COL_SOURCE_FILE String. This field stores the same values as the Source File field on the Report panel for the Routines category.
COL_SOURCE_LINE Integer. This field stores the same values as the Source Line field on the Report panel for the Routines category.
COL_SYMBOL_MONIKER String. This field stores the same values as the Symbol Moniker field on the Report panel for the Routines category.
COL_TOKEN Integer. This field stores the same values as the Token field on the Report panel for the Routines category.
COL_UNIT_NAME String. This field stores the same values as the Unit Name field on the Report panel for the Routines category.
COL_TRIGGERACTIVE Integer. Contains 0 or 1. Specifies whether the routine was used by a trigger (1) or not (0).
COL_TRIGGERCYCLING Integer. Specifies whether the Cycling property of the trigger concerned with the routine is on.
COL_TRIGGERDISABLEROUTINE Not used.
COL_TRIGGERENABLING Integer. Specifies whether the trigger type is On or Off.
COL_TRIGGERGLOBAL Not used.
COL_TRIGGERGLOBALHITCOUNT Integer. This field value holds the trigger’s hit count for all treads.
COL_TRIGGERPASSCOUNT Integer. Specifies the value of the trigger’s Pass Count property.
COL_TRIGGERWORKCOUNT Integer. Specifies the value of the trigger’s Work Count property.
COL_UNIT_NAME Integer. Stores the name of the unit that holds a specific routine.
ID Integer. Identifier of the routine within the result set.
INST_ID Integer. Identifier of the result set. This is the same value that is stored in the INST_ID field of the INSTANCES table.
PARENT_ID Not used. Always contains -1.
REC_ID Reserved.

The FUNCTION_TRACE_PROFILER_METAPARAMETERS table

This table stores information about parameters of the profiled routines. This table is a child of the FUNCTION_TRACE_PROFILER_META_ROUTINES. Each row corresponds to a parameter.

Table Field Name Description
COL_TYPEID Integer. The value of this field specifies the type of a specific parameter. The field can hold one of the following values:
  • 0x00000000 - parameter type is unknown
  • 0x00000001 - the parameter is of Void type
  • 0x00000002 - the parameter is of Char type
  • 0x00000003 - the parameter is of Uchar type
  • 0x00000004 - the parameter is of Widechar type
  • 0x00000005 - the parameter is of Pascal Char type
  • 0x00000006 - the parameter is of Pchar type
  • 0x00000007 - the parameter is of Short type
  • 0x00000008 - the parameter is of USHORT type
  • 0x00000009 - the parameter is of Integer type
  • 0x0000000A - the parameter is of Uinteger type
  • 0x0000000B - the parameter is of Long type
  • 0x0000000C - the parameter is of Ulong type
  • 0x0000000D - the parameter is of Integer64 type
  • 0x0000000E - the parameter is of Uintger64 type
  • 0x0000000F - the parameter is of Float type
  • 0x00000010 - the parameter is of Double type
  • 0x00000011 - the parameter is of Real48 type
  • 0x00000012 - the parameter is of Extended type
  • 0x00000013 - the parameter is of Real128 type
  • 0x00000014 - the parameter is of Complex type
  • 0x00000015 - the parameter is of Complex32 type
  • 0x00000016 - the parameter is of Complex64 type
  • 0x00000017 - the parameter is of Complex80 type
  • 0x00000018 - the parameter is of Complex128 type
  • 0x00000019 - the parameter is of BCD type
  • 0x0000001A - the parameter is of Boolean type
  • 0x0000001B - the parameter is of WordBool type
  • 0x0000001C - the parameter is of LongBool type
  • 0x0000001D - the parameter is of Currency type
  • 0x0000001E - the parameter is of Date type
  • 0x0000001F - the parameter is of Variant type
  • 0x00000020 - the parameter is of Bit type
  • 0x00000021 - the parameter is of Bstr type
  • 0x00000022 - the parameter is of HResulttype
  • 0x00000023 - the parameter is of Enum type
  • 0x00000024 - the parameter is of Pointer type
  • 0x00000025 - the parameter is of Function type
  • 0x00000026 - the parameter is of Class type
  • 0x00000027 - the parameter is of Struct type
  • 0x00000028 - the parameter is of Union type
  • 0x00000029 - the parameter is of Subrange type
  • 0x0000002A - the parameter is of Modifier type
  • 0x0000002B - the parameter is of Lstring type
  • 0x0000002C - the parameter is of WideString type
  • 0x0000002D - the parameter is of Set type
  • 0x0000002E - the parameter is of Classref type
  • 0x0000002F - the parameter is of Interface type
COL_TYPEMEMSIZE Integer. This field stores the size of the parameter.
COL_TYPENAME Integer. This field stores the name of the parameter.
ID Integer. Identifier of the parameter within the result set.
INST_ID Integer. Identifier of the result set. This is the same value that is stored in the INST_ID field of the INSTANCES table.
PARENT_ID Integer. Identifier of the routine, to which the parameter belongs. This is the same value that is stored in the ID field of the FUNCTION_TRACE_PROFILER_META_ROUTINES table.
REC_ID Integer. Identifier of the parameter within the list of routine’s parameters.

The FUNCTION_TRACE_PROFILER_PARAMETERS_ON_ENTER table

This table stores information about parameters that were passed to a routine when it was called. The fields of this table correspond to the fields of the Parameters On Enter table of the Details for the Call Trace category. Each row corresponds to a parameter.

Table Field Name Description
COL_PARAM_NO Integer. This field stores the same values as the Param No field on the Parameters On Enter panel of the Details one for the Call Trace category.
COL_PARAM_TYPE String. This field stores the same values as the Param Type field on the Parameters On Enter panel of the Details one for the Call Trace category.
COL_PARAM_VALUE String. This field stores the same values as the Param Value field on the Parameters On Enter panel of the Details one for the Call Trace category.
ID Integer. Identifier of the row within the result set.
INST_ID Integer. Identifier of the result set. This is the same value that is stored in the INST_ID field of the INSTANCES table.
PARENT_ID Integer. Identifier of the function call, to which the parameter belongs. This is the same value that is stored in the ID field of the FUNCTION_TRACE_PROFILER_CALL_ROUTES table.
REC_ID Integer. The identifier of a specific input parameter within the list of routine’s input parameters.

The FUNCTION_TRACE_PROFILER_PARAMETERS_ON_EXIT table

This table stores information about parameters that were returned by a routine after its execution was finished. The fields of this table correspond to the fields of the Parameters On Exit panel of the Details for the Call Trace category. Each row corresponds to a parameter.

Table Field Name Description
COL_COMMENT String. This field stores the same values as the Comment field on the Parameters On Exit panel of the Details one for the Call Trace category.
COL_PARAM_NO Integer. This field stores the same values as the Param No field on the Parameters On Exit panel of the Details one for the Call Trace category.
COL_PARAM_TYPE String. This field stores the same values as the Param Type field on the Parameters On Exit panel of the Details one for the Call Trace category.
COL_PARAM_VALUE String. This field stores the same values as the Param Value field on the Parameters On Exit panel of the Details one for the Call Trace category.
ID Integer. Identifier of the row within the result set.
INST_ID Integer. Identifier of the result set. This is the same value that is stored in the INST_ID field of the INSTANCES table.
PARENT_ID Integer. Identifier of the function call, to which the parameter belongs. This is the same value that is stored in the ID field of the FUNCTION_TRACE_PROFILER_CALL_ROUTES table.
REC_ID Integer. The identifier of a specific output parameter within the list of routine’s output parameters.

The FUNCTION_TRACE_PROFILER_ROUTINES table

This table stores the results for each routine that was included in profiling tasks. The fields of this table store the same values as some fields of the Report panel for the Routines category. Each row corresponds to a routine.

Table Field Name Description
COL_ADDRESS Decimal. This field stores the same values as the Address field on the Report panel for the Routines category.
COL_ANALYSIS_RESULT String. This field stores the same values as the Analysis Result field on the Report panel for the Routines category.
COL_CLASS_NAME String. This field stores the same values as the Class Name field on the Report panel for the Routines category.
COL_CODE_TYPE String. This field stores the same values as the Code Type field on the Report panel for the Routines category.
COL_HIT_COUNT Integer. This field stores the same values as the Hit Count field on the Report panel for the Routines category.
COL_MODULE_NAME String. This field stores the same values as the Module Name field on the Report panel for the Routines category.
COL_NAMESPACE String. This field stores the same values as the Namespace field on the Report panel for the Routines category.
COL_SOURCE_FILE String. This field stores the same values as the Source File field on the Report panel for the Routines category.
COL_SOURCE_LINE Integer. This field stores the same values as the Source Line field on the Report panel for the Routines category.
COL_TOKEN Integer. This field stores the same values as the Token field on the Report panel for the Routines category.
COL_UNIT_NAME String. This field stores the same values as the Unit Name field on the Report panel for the Routines category.
ID Integer. Identifier of a row within the result set.
INST_ID Integer. Identifier of the result set. This is the same value that is stored in the INST_ID field of the INSTANCES table.
PARENT_ID Not used. Always contains -1.
REC_ID Integer. Used as the routine’s identifier to link the tables.

The FUNCTION_TRACE_PROFILER_THREADS table

This table stores information about threads used during profiling. Each row corresponds to a thread.

Table Field Name Description
COL_LINE_NUMBER Reserved.
COL_WIN32THREADID Integer. This field stores the operating system identifier of the thread.
ID Integer. The thread’s identifier within the result set.
INST_ID Integer. Identifier of the result set. This is the same value that is stored in the INST_ID field of the INSTANCES table.
PARENT_ID Not used. Always contains -1.
REC_ID Reserved.

The RELATIONS table

This table contains information about parent-child relationships between the database tables holding the Function Trace profiler results.

Field Name Description
COL_CHILD_TABLE String. The name of a child table.
COL_PARENT_TABLE String. The name of a parent table. The NULL value means that the table specified by the COL_CHILD_TABLE is a top-level table.
ID Integer. The identifier of a specific relation within the RELATIONS table.
INST_ID Integer. Identifier of the result set. This is the same value that is stored in the INST_ID field of the INSTANCES table.

See Also

Function Trace Profiler - Overview
Exporting Profiling Results to Database

Highlight search results