Resource Profiler Results - Database Structure

Applies to AQTime 8.81, last modified on November 27, 2020

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

The database consists of the following tables:

The relationship between the mentioned tables is 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 Performance profiler results.

Relations Between Database Tables

Click the image to enlarge it.

The top-level table of the database is the INSTANCES one. It stores the list of exported result sets. Each exported result set has its 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 to which result set a specific table item belongs.

The profiling results in the Explorer panel are organized into three categories, Classes Data, Objects and Errors. The Resource profiling information on classes, objects and errors, which is displayed in AQTime’s Report panel, is stored in the RESOURCE_PROFILER_CLASSES_DATA, RESOURCE_PROFILER_OBJECTS and RESOURCE_PROFILER_ERRORS tables, respectively. The profiling results displayed in the AQTime’s Details panel for the Objects 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 object to which a specific record relates.

The Resource profiler saves the call stack for each allocated memory block, created object or detected error. Information about call stack entries collected for objects and memory blocks are saved in the RESOURCE_PROFILER_CREATION_CALL_STACK table. Information about call stack entries collected for errors are saved in the RESOURCE_PROFILER_CALL_STACK table. Each row in these “call stack” tables correspond to a call stack entry. Both columns have the PARENT_ID column that contains the identifier of the object (or error). This is the same value that is stored in the ID column of the RESOURCE_PROFILER_OBJECTS and RESOURCE_PROFILER_ERRORS tables correspondingly.

The database tables having the META suffix in their names contain meta data about the profiled elements - classes, routines and lines.

The RESOURCE_PROFILER_META_ROUTINES table stores the information about profiled routines. The information about routine code lines is stored in the RESOURCE_PROFILER_META_LINES table. The PARENT_ID field of this table specifies the routine to which a specific line belongs.

Note: The ID and REC_ID columns of the RESOURCE_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 Not used for the Allocation Profiler.
COUNTER_FREQUENCY Not used for the Allocation Profiler.
COUNTER_NAME Not used for the Allocation Profiler.
INST_ID Integer. The result set’s identifier.

The RESOURCE_PROFILER_CALL_STACK table

This table stores information about function calls that caused an error. The fields of this table are similar to the Call Stack table shown in AQTime’s Details panel when it displays the call stack for errors that occur during the application's execution. The PARENT_ID field value corresponds to the ID field value of items held in the RESOURCE_PROFILER_ERRORS table. Note that this value cannot be used as a record identifier. To find the corresponding record in the errors table you should also use the INST_ID value.

Table Field Name Description
COL_ROUTINERID Integer. Specifies the identifier of a routine (the REC_ID value) in the RESOURCE_PROFILER_META_ROUTINES table. To search for the routine in this table, you should use the COL_ROUTINERID value and the INST_ID value.
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 (the same value that is stored in the INST_ID column of the INSTANCES table).
PARENT_ID Integer. This field stores the identifier of an RESOURCE_PROFILER_ERRORS table row that is a parent for a specific item of the RESOURCE_PROFILER_CALL_STACK table.
REC_ID Integer. The identifier of a specific call stack item within the object’s call stack. The REC_ID value of the topmost routine in the stack is 0.

The RESOURCE_PROFILER_CLASSES_DATA table

This table stores the information about the classes instances that were created during profiling. The fields of this table correspond to the fields of the Report panel for the Classes category.

Table Field Name Description
COL_CLASS_NAME This field stores the same values as the Class Name field on the Report panel for the Classes category.
COL_LIVE_COUNT Decimal. This field stores the same values as the Live Count field on the Report panel for the Classes category.
COL_LIVE_SIZE Decimal. This field stores the same values as the Live Size field on the Report panel for the Classes category.
COL_MODULE_NAME This field stores the same values as the Module Name field on the Report panel for the Classes category.
COL_PEAK_CREATED Decimal. This field stores the same values as the Peak Created field on the Report panel for the Classes category.
COL_PEAK_SIZE Decimal. This field stores the same values as the Peak Size field on the Report panel for the Classes category.
COL_TOTAL_CREATED Decimal. This field stores the same values as the Total Created field on the Report panel for the Classes category.
COL_TOTAL_SIZE Decimal. This field stores the same values as the Total Size field on the Report panel for the Classes category.
ID Integer. Identifier of the class within the result set.
INST_ID Integer. Identifier of the result set (the same value that is stored in the INST_ID column of the INSTANCES table).
PARENT_ID Not used. Always contains -1.
REC_ID Integer. Used as identifier of the class within the result set.

The RESOURCE_PROFILER_CREATION_CALL_STACK table

This table stores the information about function calls that led to a specific object creation. The fields of this table are similar to the Creation Call Stack AQTime panel ones. The PARENT_ID field value corresponds to the ID field value of items held in the RESOURCE_PROFILER_OBJECTS table.

Table Field Name Description
COL_HIT_COUNT Integer. This field stores the same values as the Hit Count field of the table situated on the Creation Call Stack tab on the Details panel.
COL_LINERID Integer. This field stores the identifier of a source line that corresponds to the call stack entry. This is the same value that is stored in the REC_ID column of the RESOURCE_PROFILER_META_LINES table.
COL_ROUTINERID Integer. This field stores the identifier of a routine to which the call stack entry corresponds. This is the same value that is stored in the REC_ID column of the RESOURCE_PROFILER_META_ROUTINES table.
ID Integer. Identifier of the call stack entry in 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 (the same value that is stored in the INST_ID column of the INSTANCES table).
PARENT_ID Integer. This field contains the identifier of an object, to whose call stack entry corresponds. This is the same value that is stored in the ID column of the RESOURCE_PROFILER_OBJECTS table.
REC_ID Integer. Position of a specific call stack entry within the object’s call stack. The REC_ID value of the topmost entry is 0.

The RESOURCE_PROFILER_ERRORS table

This table stores the information about errors that occurred in resource management functions when the results were generated. The fields of this table are similar to the fields of the AQTime’s Report panel for the Errors category. The PARENT_ID field value corresponds to the ID field value of items held in the RESOURCE_PROFILER_THREADS table.

Table Field Name Description
COL__ Integer. Specifies the creation number of the error. This is the same value that is displayed in the # column of the Report panel.
COL_DESCRIPTION String. Specifies the error description. This is the same value that is shown in the Description field of the Report panel.
COL_ERROR_CODE Integer. Specifies the error code. This value is displayed in the Error Code column of the Report panel.
COL_KIND Integer. Contains one of the following values that specify the category of the resource management function that caused the error:
Value Description
1 Error
2 Warning

The field is used to display values in the Kind column of the Report panel.

COL_NAME String. The name of the function that caused the error. This is the same value that is displayed in the Name column of the Report panel.
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 (the same value that is stored in the INST_ID column of the INSTANCES table).
PARENT_ID Integer. This field stores the identifier of a thread, in which the error occurred. This is the same value that is stored in the ID field of the RESOURCE_PROFILER_THREADS table.
REC_ID Integer. The error identifier within the thread’s errors list.

The RESOURCE_PROFILER_META_CLASSES_DATA table

This table stores the information about the classes whose instances were created during profiling. The fields of this table correspond to the fields of the Report panel for the Classes Data category.

Table Field Name Description
COL_CLASS_NAME String. This field stores the same values as the Class Name field on the Report panel for the Classes category.
COL_MODULE_NAME String. This field stores the same values as the Module Name field on the Report panel for the Classes category.
COL_SYMBOL_MONIKER String. This field stores the symbol moniker for the class whose data is held in a specific item.
ID Integer. Identifier of the class within the result set.
INST_ID Integer. Identifier of the result set (the same value that is stored in the INST_ID column of the INSTANCES table).
PARENT_ID Not used. Always contains -1.
REC_ID Integer. Used as identifier of the class within the result set.

The RESOURCE_PROFILER_META_LINES table

This table stores the information about which code lines of the profiled module belongs to a certain routine. This table is related with the RESOURCE_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. Identifier of the line in the result set.
INST_ID Integer. Identifier of the result set (the same value that is stored in the INST_ID column of the INSTANCES table).
PARENT_ID Integer. Specifies the identifier of the routine, to which a specific code line belongs. This is the same value that is stored in the ID column of the RESOURCE_PROFILER_META_LINES table.
REC_ID Integer. The line’s identifier within the routine’s lines list.

The RESOURCE_PROFILER_META_ROUTINES table

This table stores results for each single routine that was included in profiling tasks whose results were exported.

Table Field Name Description
COL_HIT_COUNT Integer. The number of routine calls that were profiled.
COL_COMPILER The information about which compiler was used to compile a specific routine. This field can store one of the following values:
  • 0 - the value was not defined for the item.
  • 1 - MSVC 6 compiler
  • 2 - Delphi 7 compiler
  • 3 - Builder 6 compiler
  • 7 - MSVS 2005 compiler
COL_ADDRESS Decimal. Routine’s address in memory.
COL_ANALISYS_RESULT String. Specifies if the routine was instrumented or not. If the routine was instrumented, this column is empty. Otherwise, the column displays a short description why the routine was not instrumented:

Less than 5 bytes - The routine occupies less than 5 bytes in memory (fo 32-bit applications).

Less than 6 bytes - The routine occupies less than 6 bytes in memory (fo 64-bit applications).

No line info - The routine was added to a line-level area, but the debug information stores no info about routine lines.

Unsafe code - AQTime was not able to instrument the routine safely. This typically occurs when the routine’s binary code is intermixed with data areas.

No ret instruction - The routine’s binary code does not contain the ret instruction (this may happen if the routine finishes with the jmp instruction).

Duplicated code - The routine whose code coincides with code of another routine.

COL_CLASS_NAME String. Name of the class where the method is defined.
COL_CODE_TYPE String. Specifies the type of the routine’s code. The following values are possible:
  • MSIL - Managed-code routine with MSIL (Microsoft Intermediate Language)code.
  • x64 - 64-bit code routine.
  • x86 - Native-code (unmanaged) routine.
  • Pseudo - Pseudo routine that was created by the context. For example, <JIT Compiler>, <Garbage Collector>, <Unknown PInvoke> or <Root>.
  • PInvoke - Native-code routine for which there is a declaration in one of managed modules and that is called from within the unmanaged code.
  • NGen - Managed routine that was compiled by the ngen utility (CLR Native Image Generator) with the /prof argument in its command line. The ngen compilation means the routine was compiled before the application starts.
  • Script - The routine belongs to a script that was profiled along with the host application.
COL_MODULE_NAME String. The name of the module which contains the profiled routine.
COL_NAMESPACE String. Namespace of the method’s class (this column is used for managed routines only).
COL_PROFILELINES Integer. This field indicates whether a specific routine was profiled by lines.
COL_ROUTINE_NAME String. Method name.
COL_SOURCE_FILE String. Name of the source file for the method. The values for this column are read from the application’s debug info. If debug info does not contain information on the file name, the column is empty.
COL_SOURCE_LINE Integer. Source file’s line number where the method’s implementation begins. The values for this column are read from the application’s debug info.
COL_SYMBOL_MONIKER String. Symbol moniker for a specific routine.
COL_TOKEN Integer. The routine’s token.
COL_UNIT_NAME String. Name of the linkage unit that stores the routine. This column is used for unmanaged (native-code) routines only.
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 (the same value that is stored in the INST_ID column of the INSTANCES table).
PARENT_ID Not used. Always contains -1.
REC_ID Reserved.

The RESOURCE_PROFILER_OBJECTS table

This table stores the information about the objects created during profiling. The fields of this table correspond to the fields of the Report panel for the Objects category. Each row corresponds to a row displayed in the Report panel.

Table Field Name Description
COL__ Decimal. This field stores the same values as the # field on the Report panel for the Objects category.
COL_ADDRESS Decimal. This field stores the same values as the Address field on the Report panel for the Objects category.
COL_CLASSRID Integer. Specifies the identifier of the object’s class. This field contains the same value as the one that is stored in the REC_ID column of the RESOURCE_PROFILER_META_CLASSES_DATA table.
COL_GET_ Integer. This field stores the same values as the Get # field on the Report panel for the Objects category.
COL_SIZE Decimal. This field stores the same values as the Size field on the Report panel for the Objects category.
COL_THREADID Integer. This field stores the identifier of a thread in within the RESOURCE_PROFILER_THREADS table.
ID Integer. Identifier of the object within the result set.
INST_ID Integer. Identifier of the result set (the same value that is stored in the INST_ID column of the INSTANCES table).
PARENT_ID Not used. Always contains -1.
REC_ID Reserved.

The RESOURCE_PROFILER_THREADS table

This table stores the information on operating system identifiers of threads used during profiling.

Table Field Name Description
COL_SIZE Integer. This field stores the size of memory used by threads.
COL_WIN32THREADID Integer. This field stores the operating system identifiers of threads.
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 (the same value that is stored in the INST_ID column of the INSTANCES table).
PARENT_ID Not used. Always contains -1.
REC_ID Reserved.

The RELATIONS table

This table contains the information about parent-child relationships between the database tables holding the Resource 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 (the same value that is stored in the INST_ID column of the INSTANCES table).

See Also

Resource Profiler
Resource Profiler Panels Reference
Exporting Profiling Results to Database

Highlight search results