Reference Count Profiler Results - Database Structure

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

Results generated by the Reference Count profiler 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 profiling results are stored. This topic describes the structure of a database that stores the exported Reference Count profiler results.

This database consists of several helper tables and a number of tables storing significant data. The helper tables store only identifiers used within the database and some other helper information.

The database consists of the following tables:

The results of the Reference Count profiler are organized into two categories: Classes Data and Objects. The data displayed in the Report panel for each category is stored in the REFERENCE_COUNT_PROFILER_CLASSES_DATA and REFERENCE_COUNT_PROFILER_OBJECTS tables respectively. For the Objects category, additional information on the chosen object is shown in the Creation Call Stack, References and AddRef / Release Call Stack panes of the Details panel and in the Call Tree panel. The data of these panes is stored to the REFERENCE_COUNT_PROFILER_CREATION_CALL_STACK, REFERENCE_COUNT_PROFILER_REFERENCES, REFERENCE_COUNT_PROFILER_ADDREF_RELEASE_CALL_STACK and REFERENCE_COUNT_PROFILER_REFCOUNT_TREE tables.

The following diagram illustrates relations between database tables.

Relations Between Database Tables

Click the image to enlarge it.

Note: The ID and REC_ID columns of the REFERENCE_COUNT_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.

Table Field Name Description
CAPTION String. The caption of the exported result set.
COUNTER_DESCRIPTION Reserved.
COUNTER_FREQUENCY Reserved.
COUNTER_NAME Reserved.
INST_ID Integer. The identifier of the result set.

The REFERENCE_COUNT_PROFILER_ADDREF_RELEASE_CALL_STACK Table

This table contains information about a sequence of function calls that led to creation or deletion of an object reference. Each row in it corresponds to a function call. The data stored in this table corresponds to the data of the AddRef / Release Call Stack table in the Details panel (see Reference Count Profiler - Details Panel). The PARENT_ID field value corresponds to the ID field value of items held in the REFERENCE_COUNT_PROFILER_REFERENCES table.

Table Field Name Description
COL_CALL_NO Integer. Corresponds to the Call No column of the AddRef / Release Call Stack table.
COL_ROUTINE_NAME Integer. This field contains the name of a routine or thread.
  • If the field value is zero or a positive number, then the item is a routine and the value corresponds to the REC_ID field of the REFERENCE_COUNT_PROFILER_META_ROUTINES table.
  • If the field value is -1, then the item corresponds to the <Root> routine used as a parent routine of the topmost level.
  • If the field value is less than -1, then the item is a thread and the value corresponds to the thread’s REC_ID identifier decreased by 2. (COL_ROUTINE_NAME=REFERENCE_COUNT_PROFILER_THREADS.REC_ID-2)
The textual presentation of the routine (thread) name formed on the basis of this field is displayed in the Routine Name column of the AddRef / Release Call Stack table.
COL_SOURCE_LINE String. Corresponds to the Source Line column of the AddRef / Release Call Stack table.
ID Integer. The call’s identifier within the result set.
INST_ID Integer. The identifier of the result set to which the row belongs. This is the same value as the result set’s INST_ID value in the INSTANCES table.
PARENT_ID Integer. The identifier of the AddRef or Release routine’s call, to which the call stack relates. This is the same value as the one stored in the ID column of the REFERENCE_COUNT_PROFILER_REFERENCES table.
REC_ID Integer. The position of the function call in the stack relative to other calls. 0 means the topmost routine in the call stack.

The REFERENCE_COUNT_PROFILER_CLASSES_DATA Table

This table stores information about interface classes whose instances were created during profiling. The data stored in this table corresponds to the data of the Report panel when the Classes Data category is chosen (see Reference Count Profiler - Report Panel). Each row corresponds to a class.

Table Field Name Description
COL_CLASS_NAME Integer. Corresponds to the Class Name column of the Report panel.
COL_LIVE_COUNT Integer. Corresponds to the Live Count column of the Report panel.
COL_LIVE_SIZE Integer. Corresponds to the Live Size column of the Report panel.
COL_MODULE_NAME Integer. Corresponds to the Module Name column of the Report panel.
COL_PEAK_CREATED Integer. Corresponds to the Peak Created column of the Report panel.
COL_PEAK_SIZE Integer. Corresponds to the Peak Size column of the Report panel.
COL_TOTAL_CREATED Integer. Corresponds to the Total Created column of the Report panel.
COL_TOTAL_SIZE Integer. Corresponds to the Total Size column of the Report panel.
ID Integer. The class identifier within the result set.
INST_ID Integer. The identifier of the result set to which the row belongs. This is the same value as the result set’s INST_ID value specified in the INSTANCES table.
PARENT_ID Integer. This field is not used in this table. It stores the -1 value for each item.
REC_ID Integer. Zero-based class identifier within the result set.

The REFERENCE_COUNT_PROFILER_CREATION_CALL_STACK Table

This table contains information about a sequence of function calls that led to creation of an interface object. The data stored in this table corresponds to the data of the Creation Call Stack table in the Details panel (see Reference Count Profiler - Details Panel (Objects Category)). The PARENT_ID field value corresponds to the ID field value of items held in the REFERENCE_COUNT_PROFILER_OBJECTS table.

Table Field Name Description
COL_HIT_COUNT Integer. Corresponds to the Hit Count column of the Creation Call Stack table.
COL_LINERID Integer. Stores the identifier of the line at which the routine was called. This identifier corresponds to the REC_ID field value of the REFERENCE_COUNT_PROFILER_META_LINES table.
COL_ROUTINERID Integer. Stores the identifier of the routine. This identifier corresponds to the REC_ID field value of the REFERENCE_COUNT_PROFILER_META_ROUTINES table.
ID Integer. The call’s identifier within the result set.
INST_ID Integer. The identifier of the result set to which the row belongs. This is the same value as the result set’s INST_ID value specified in the INSTANCES table.
PARENT_ID Integer. The identifier of the object to which the call stack relates. This is the same value as the one stored in the ID column of the REFERENCE_COUNT_PROFILER_OBJECTS table.
REC_ID Integer. The position of the function call in the stack relative to other calls. 0 means the topmost routine in the call stack.

The REFERENCE_COUNT_PROFILER_META_CLASSES_DATA Table

This table stores meta data about interface classes whose instances were created during profiling. The data stored in this table corresponds to the data of the Report panel when the Classes Data category is chosen (see Reference Count Profiler - Report Panel (Classes Data Category)). The table complements the data of the REFERENCE_COUNT_PROFILER_CLASSES_DATA table.

Table Field Name Description
COL_CLASS_NAME String. Corresponds to the Class Name column of the Report panel.
COL_MODULE_NAME String. Corresponds to the Module Name column of the Report panel.
COL_SYMBOL_MONIKER String. The symbol moniker of the class. Used as a helper.
ID Integer. The class identifier within the result set.
INST_ID Integer. The identifier of the result set to which the row belongs. This is the same value as the result set’s INST_ID value specified in the INSTANCES table.
PARENT_ID Not used. Always contains -1.
REC_ID Integer. Zero-based class identifier within the result set.

The REFERENCE_COUNT_PROFILER_META_LINES Table

The REFERENCE_COUNT_PROFILER_META_LINES table stores information about source lines. Each row of the table corresponds to a source line.

Table Field Name Description
COL_SOURCE_LINE Integer. Contains the number of the line in the source file.
ID Integer. The line’s identifier within the result set.
INST_ID Integer. The identifier of the result set to which the row belongs. This is the same value as the result set’s INST_ID value specified in the INSTANCES table.
PARENT_ID Integer. Identifier of the routine to which the line belongs. This value corresponds to the ID field of the REFERENCE_COUNT_PROFILER_META_ROUTINES table.
REC_ID Integer. Zero-based line identifier within the result set.

The REFERENCE_COUNT_PROFILER_META_ROUTINES Table

This table contains information about routines of the profiled application. It is retrieved from the application’s debug information and from the setup information of the AQTime project. The data stored in this table complements the data of the REFERENCE_COUNT_PROFILER_ADDREF_RELEASE_CALL_STACK and REFERENCE_COUNT_PROFILER_REFCOUNT_TREE tables and is displayed in the AddRef/Release Call Stack table of the Details panel and in the Call Tree panel.

Field Name Description
COL_ADDRESS Decimal. The relative virtual address of the function in memory. This value is displayed neither in the AddRef/Release Call Stack table, nor in the Call Tree panel.
COL_ANALYSIS_RESULT String. Specifies whether the function was instrumented or not. If it was, the field is empty. Else, the filed contains the following strings that specify the cause of the instrumentation failure:
  • Less than 5 bytes (for 32-bit applications)
  • Less than 6 bytes (for 64-bit applications)
  • No line info
  • Unsafe code
  • No ret instruction
  • Duplicated code

This value is displayed neither in the AddRef/Release Call Stack table, nor in the Call Tree panel.

COL_CLASS_NAME String. The type of the class to which the function belongs. This value is displayed neither in the AddRef/Release Call Stack table, nor in the Call Tree panel.
COL_CODE_TYPE String. Specifies the type of the function code (x86, x64 and so on). This value is displayed neither in the AddRef/Release Call Stack table, nor in the Call Tree panel.
COL_HIT_COUNT Integer. Specifies how many times the routine was executed during profiling.
COL_MODULE_NAME String. The fully-qualified name of the module that contains the routine’s implementation. Corresponds to the Module Name column of the AddRef/Release Call Stack table and of the Call Tree panel.
COL_NAMESPACE String. The namespace of the method’s class. This value is displayed neither in the AddRef/Release Call Stack table, nor in the Call Tree panel.
COL_PROFILELINES Integer. Specifies whether the routine was profiled on the line or routine level (see About Profiling Levels). This field contains 0 if the routine was profiled on the routine level. Otherwise, the field contains -1. This value is displayed neither in the AddRef/Release Call Stack table, nor in the Call Tree panel.
COL_ROUTINENAME String. Specifies the function’s name. Corresponds to the Routine Name column of the AddRef/Release Call Stack table and Call Tree panel.
COL_SOURCE_FILE String. The name of the file that contains the function code. Corresponds to the Source File column of the AddRef/Release Call Stack table and of the Call Tree panel.
COL_SOURCE_LINE Integer. The number of the source line at which the function’s code starts in the source file. Corresponds to the Source Line column of the AddRef/Release Call Stack table and of the Call Tree panel.
COL_SYMBOL_MONIKER String. The symbol moniker of the routine. Used as a helper.
COL_TOKEN Integer. The routine’s CLR token. Used for managed routines only. This value is displayed neither in the AddRef/Release Call Stack table, nor in the Call Tree panel.
COL_UNIT_NAME String. The name of the unit that contains the routine’s code.
ID Integer. The routine identifier within the result set.
INST_ID Integer. The identifier of the result set to which the row belongs. This is the same value as the result set’s INST_ID value specified in the INSTANCES table.
PARENT_ID Not used. Always contains -1.
REC_ID Integer. Zero-based routine identifier within the result set..

The REFERENCE_COUNT_PROFILER_OBJECTS Table

This table stores information about interface objects that existed at the moment the results were generated. The data stored in this table corresponds to data of the Report panel when the Objects category is chosen (see Reference Count Profiler - Report Panel (Objects Category)).

Table Field Name Description
COL__ Integer. Corresponds to the # column of the Report panel.
COL_ADDRESS Integer. Corresponds to the Address column of the Report panel.
COL_CLASSRID Integer. Holds the identifier of the class. This identifier corresponds to the REC_ID field value of the REFERENCE_COUNT_PROFILER_META_CLASSES_DATA table.
COL_GET_ Integer. Corresponds to the Get # column of the Report panel.
COL_LIVE_REFERENCES Integer. Corresponds to the Live References column of the Report panel.
COL_PEAK_REFERENCES Integer. Corresponds to the Peak References column of the Report panel.
COL_SIZE Integer. Corresponds to the Size column of the Report panel.
COL_THREADRID Integer. Holds the identifier of the thread. This identifier corresponds to the REC_ID field value of the REFERENCE_COUNT_PROFILER_THREADS table.
COL_TOTAL_REFERENCES Integer. Corresponds to the Total References column of the Report panel.
ID Integer. The object identifier within the result set.
INST_ID Integer. The identifier of the result set to which the row belongs. This is the same value as the result set’s INST_ID value specified in the INSTANCES table.
PARENT_ID Not used. Always contains -1.
REC_ID Integer. Zero-based creation number of the given object.

The REFERENCE_COUNT_PROFILER_REFCOUNT_TREE Table

This table stores information about the changes made to the reference counters during the application run. The data stored in this table corresponds to data of the Call Tree panel when the Objects category is chosen (see Reference Count Profiler - Call Tree Panel (Objects Category)). The PARENT_ID field value corresponds to the ID field value of items held in the REFERENCE_COUNT_PROFILER_OBJECTS table.

Table Field Name Description
COL_ROUTINE_HITCOUNT_ON_ENTER Integer. Corresponds to the Routine Hit Count on Enter column of the Call Tree panel.
COL_PARENT_INDEX Integer. This field specifies the tree hierarchy. It stores the REC_ID identifier of the routine that invoked the current routine. For the topmost call, this field holds -1. This field is not displayed in the Call Tree panel.
COL_RESULT_REFCOUNT Integer. Corresponds to the RefCount Change column of the Call Tree panel.
COL_ROUTINE_NAME Integer. This field contains the name of a routine or thread.
  • If the field value is zero or a positive number, then the item is a routine and the value corresponds to the REC_ID field of the REFERENCE_COUNT_PROFILER_META_ROUTINES table.
  • If the field value is -1, then the item corresponds to the <Root> routine used as a parent routine of the topmost level.
  • If the field value is less than -1, then the item is a thread and the value corresponds to the thread’s REC_ID identifier decreased by 2. (COL_ROUTINE_NAME=REFERENCE_COUNT_PROFILER_THREADS.REC_ID-2)
The textual presentation of the routine (thread) name formed on the basis of this field is displayed in the Routine Name column of the Call Tree panel.
COL_SOURCE_LINE Integer. Corresponds to the Source Line column of the Call Tree panel.
ID Integer. The routine identifier within the result set.
INST_ID Integer. The identifier of the result set to which the row belongs. This is the same value as the result set’s INST_ID value specified in the INSTANCES table.
PARENT_ID Integer. The identifier of the object to which the call hierarchy relates. This is the same value as the one stored in the ID column of the REFERENCE_COUNT_PROFILER_OBJECTS table.
REC_ID Integer. The routine identifier in the list of routines. 0 means the topmost routine call.

The REFERENCE_COUNT_PROFILER_REFERENCES Table

This table contains information about the AddRef and Release methods that were called for a particular interface object. The data stored in this table corresponds to the data of the References table in the Details panel (see Reference Count Profiler - Details Panel (Objects Category)). The PARENT_ID field value corresponds to the ID field value of items held in the REFERENCE_COUNT_PROFILER_OBJECTS table.

Table Field Name Description
COL__ Integer. Corresponds to the # column of the References table.
COL_ADDREF_RELEASE Integer. This field contains the name of the object method and can contain one of the following values:
  • 1 - AddRef
  • 0 - Release
The textual names of the methods are displayed in the AddRef/Release column of the References table.
ID Integer. The call’s identifier within the result set.
INST_ID Integer. The identifier of the result set to which the row belongs. This is the same value as the result set’s INST_ID value specified in the INSTANCES table.
PARENT_ID Integer. The identifier of the interface object to which the AddRef/Release calls relate. This is the same value as the one stored in the ID column of the REFERENCE_COUNT_PROFILER_OBJECTS table.
REC_ID Integer. The call’s position in the list of AddRef/Release calls of the chosen object.

The REFERENCE_COUNT_PROFILER_THREADS Table

This table stores information about the application threads that were profiled with the Reference Count profiler.

Field Name Description
COL_NAME String. The name of the thread.
COL_SIZE Integer. The amount of memory used by the thread.
COL_WIN32THREADID String. The operating system’s identifier of the thread.
ID Integer. The thread’s identifier within the result set.
INST_ID Integer. The identifier of the result set to which the given PERFORMANCE_PROFILER_THREADS table item belongs. This is the same value as the results’ INST_ID value specified in the INSTANCES table.
PARENT_ID Integer. This field is not used in this table. It stores the -1 value for each item.
REC_ID Integer. The thread identifier in the list of threads.

The RELATIONS Table

This table contains information about parent-child relations between the database tables holding the results generated by the Reference Count profiler.

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 COL_CHILD_TABLE is a top-level table.
ID Integer. The identifier of a specific relation in the RELATIONS table.
INST_ID Integer. The identifier of the result set. This is the same value that is stored in the INST_ID field of the INSTANCES table.

See Also

Exporting Profiling Results to Database
Reference Count Profiler
Reference Count Profiler Panels Reference

Highlight search results