Allocation Profiler Results - Database Structure

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

The Allocation profiler results are stored in the 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 a database that stores the exported Allocation 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 Allocation 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 two categories, Classes Data and Objects. The allocation profiling information on classes and objects, which is displayed in AQTime’s Report panel, is stored in the ALLOCATION_PROFILER_CLASSES_DATA and ALLOCATION_PROFILER_OBJECTS tables, respectively. The profiling results displayed in the AQTime’s Details panel for the Objects category, are stored in the ALLOCATION_PROFILER_CREATION_CALL_STACK, ALLOCATION_PROFILER_REFERENCES_FROM and ALLOCATION_PROFILER_REFERENCES_TO tables. Because the Details panel contents changes subject to the object selected in the Report panel, these tables have a special PARENT_ID field that specifies the object, to which a specific record relates.

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

The ALLOCATION_PROFILER_META_ROUTINES table stores the information about profiled routines. The information about routine code lines is stored in the ALLOCATION_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 ALLOCATION_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 the 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 ALLOCATION_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_LIVE_COUNT Decimal. This field stores the same values as the Live Count field on the Report panel for the Classes category.
COL_CLASS_NAME String. This field stores the same values as the Class Name field on the Report panel for the Classes category.
COL_FINALIZABLE Integer. This field stores the same values as the Finalizable 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 String.This field stores the same values as the Module Name field on the Report panel for the Classes category.
COL_NAMESPACE String. This field stores the same values as the Namespace 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_TOKEN Integer. This field stores the same values as the Token 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 row within the result set.
INST_ID Integer. Specifies the 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 ALLOCATION_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 table of the Details panel. The PARENT_ID field value corresponds to the ID field value of items held in the ALLOCATION_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_ROUTINERID Integer. The identifier of the routine that corresponds to the call stack entry. This is the same value that is stored in the REC_ID field of the ALLOCATION_PROFILER_META_ROUTINES table.
ID Integer. Identifier of the row within the result set.
INST_ID Integer. Specifies the 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 object to which the given call stack entry relates. This field contains the same value that is stored in the ID field of the ALLOCATION_PROFILER_OBJECTS table.
REC_ID Integer. The identifier of a item within the object’s creation call stack.

The ALLOCATION_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 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_FINALIZABLE Integer. This field stores the same values as the Finalizable 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_NAMESPACE String. This field stores the same values as the Namespace 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.
COL_TOKEN Integer. This field stores the same values as the Token field on the Report panel for the Classes category.
ID Integer. Identifier of the class within the result set.
INST_ID Integer. Specifies the 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. Identifier of the class within the result set. Used to create links between tables.

The ALLOCATION_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 ALLOCATION_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 within the result set.
INST_ID Integer. Specifies the 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 source line belongs. This is the same value that is stored in the ID field of the ALLOCATION_PROFILER_META_ROUTINES table.
REC_ID Integer. The identifier of a specific line within the list of routine’s lines.

The ALLOCATION_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_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 (for 32-bit applications).

Less than 6 bytes - The routine occupies less than 6 bytes in memory (for 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 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_COMPILER Integer. 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_HIT_COUNT Integer. The number of routine calls that were profiled.
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 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. Identifier of the routine in the result set.
INST_ID Integer. Specifies the 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. This field serves as an additional identifier of the routine within the result set and is used to link the tables.

The ALLOCATION_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.

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. Identifier of the object’s class. This field contains the same value that is stored in the REC_ID field of the ALLOCATION_PROFILER_META_CLASSES table.
COL_GET_ Integer. This field stores the same values as the Get # field on the Report panel for the Objects category.
COL_REFERENCES_FROM Integer. This field stores the same values as the References From field on the Report panel for the Objects category.
COL_REFERENCES_TO Integer. This field stores the same values as the References To field on the Report panel for the Objects category.
COL_ROOT Integer. This field stores the same values as the Root 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_THREADRID Integer. Identifier of the thread in which the object was created. This is the same value that is stored in the REC_ID field of the ALLOCATION_PROFILER_THREADS table.
ID Integer. Identifier of the object within the result set.
INST_ID Integer. Specifies the 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. Identifier of the object within the result set. Used to link tables.

The ALLOCATION_PROFILER_REFERENCES_FROM table

This database table contains information that is used to display profiling results in the References From table of the Details panel. Each row in the table corresponds to a row displayed in the Reference From table (that is, to the “caller” object). The PARENT_ID field contains the identifier of the object, for which the References From table displays the results.

Table Field Name Description
COL__ Decimal. This field stores the same values as the # field of the References From pane on the Details panel.
COL_ADDRESS Decimal. This field stores the same values as the Address field of the References From pane on the Details panel.
COL_COUNT Integer. This field stores the same values as the Count field of the References From pane on the Details panel.
COL_ROOT Integer. This field stores the same values as the Root field of the References From pane on the Details panel.
COL_SIZE Decimal. This field stores the same values as the Size field of the References From pane on the Details panel.
COL_THREADRID Integer. Identifier of the thread, in which the “caller” object was created. This field contains the same value as the value of the REC_ID field of the ALLOCATION_PROFILER_THREADS table.
ID Integer. Identifier of the row within the result set.
INST_ID Integer. Specifies the 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. Specifies the identifier of the object, for which the Reference From table of the Details panel displays data. This field contains the same value as the ID field of the ALLOCATION_PROFILER_OBJECTS table.
REC_ID Integer. Identifier of the “caller” object. This is the same value as the value stored in the REC_ID field of the ALLOCATION_PROFILER_OBJECTS tables.

The ALLOCATION_PROFILER_REFERENCES_TO table

This database table contains information that is used to display profiling results in the References To table of the Details panel. Each row in the table corresponds a row displayed in the Reference To table (that is, to the “callee” object). The PARENT_ID field contains the identifier of the object, for which the References To table displays the results.

Table Field Name Description
COL__ Decimal. This field stores the same values as the # field of the References To pane on the Details panel.
COL_ADDRESS Decimal. This field stores the same values as the Address field of the References To pane on the Details panel.
COL_COUNT Integer. This field stores the same values as the Count field of the References To pane on the Details panel.
COL_ROOT Integer. This field stores the same values as the Root field of the References To pane on the Details panel.
COL_SIZE Decimal. This field stores the same values as the Size field of the References To pane on the Details panel.
COL_THREADRID Integer. Identifier of the thread, in which the “callee” object was created. This field contains the same value as the value of the REC_ID field of the ALLOCATION_PROFILER_THREADS table.
ID Integer. Identifier of the row within the result set.
INST_ID Integer. Specifies the 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. Specifies the identifier of the object, for which the Reference To table of the Details panel displays data. This field contains the same value as the ID field of the ALLOCATION_PROFILER_OBJECTS table.
REC_ID Integer. Identifier of the “callee” object. This is the same value as the value stored in the REC_ID field of the ALLOCATION_PROFILER_OBJECTS tables.

The ALLOCATION_PROFILER_THREADS table

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

Table Field Name Description
COL_NAME String. This field stores threads names.
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. Identifier of the thread in the result set.
INST_ID Integer. Specifies the 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. Identifier of the thread. Used to link the tables.

The RELATIONS table

This table contains the information about parent-child relationships between the database tables.

Field Name Description
COL_CHILD_TABLE String. The name of a child table.
COL_PARENT_TABLE String. The name of a parent table. If this field contains NULL, it 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

Allocation Profiler
Allocation Profiler Results - Overview
Exporting Profiling Results to Database

Highlight search results