Heap Dump File Information

Introduction

Garbage collector heap dump files are text files that include information for every object present in the garbage collector heap at the time the dump is generated. The XNA Framework Remote Performance Monitor creates the heap dumps. For more information about generating heap dumps, see How to: Generate a Garbage Collector Heap Dump.

Heap Dump File Records

Each line in the heap dump text file contains one record. The five types of records in the file are as follows.

AppDomain record – identifies the application domain to which the dump file applies.

Type record – describes a type that is present in the heap.

Object record – describes an instance of a type that is present in the heap.

Root record – describes a root instance.

End AppDomain record – marks the end of the dump file.

Each record contains several elements separated by spaces. The first element in each line indicates the record type. The following example shows a section of a dump file.

Note

This example is intended to show the format of the file, and may not be semantically accurate.

AppDomain Record

An AppDomain record marks the beginning of a file section that pertains to a particular application domain. All the type, object, and root information for the garbage collector heap for that application domain is included in this section of the file. All AppDomain records close with a corresponding End AppDomain record.

The AppDomain record has four elements.

Letter "a" – identifies the record as an AppDomain record.

Version number – number used to track the file format of the dump file. For example, in the .NET Compact Framework version 2.0 Service Pack 2, this number is always "2".

AppDomain name – name of the application domain used to generate the heap dump file. This is typically the name of the executable that ran in the application domain.

Time stamp – time that the log data was generated. This value shows the number of milliseconds, represented as a hex value, since the device booted.

The following example shows an AppDomain record.

a 2 HH3.exe 763f9d2

Type Record

Type records identify types in the garbage collector heap. Each Type record contains three elements.

Letter "t" – identifies the record as a Type record.

Type ID – unique numeric identifier for the type. This identifier ties object instances to their types. (See the description of Object records in the next section.)

Note

The type ID is not guaranteed to be unique across dump files. For example, the identifier for the "CorporateContacts" type in the following example is not guaranteed to be "a1" in a different dump that is taken from the same application at a different point in time.

Type name – fully qualified name of the type.

The following example shows a Type record.

t a1 com.PBSG.WATS.HH3.Biz.Entity.CorporateContacts

Object Record

Object records describe specific instances of types in the garbage collector heap. Object records have a variable number of elements.

The first four elements are required, and are as follows.

Letter "o" – identifies the record as an Object record.

Object ID – unique numeric identifier for the object.

Note

Object identifiers are not guaranteed to be unique across dump files. Because object identifiers can change in different dumps of the same heap, it is not possible to develop tools that identify trends across dump files.

Type ID – identifier for the type of the object.

Object size – size, in bytes, of the object instance.

In addition to the four required elements, Object records may have a variable number of the following element.