Skip to content

MstatData

Namespace: Dotsider.Core.Analysis.Models

Assembly: Dotsider.Core.dll

The contents of an ILC size report (.mstat), produced by publishing a Native AOT project with IlcGenerateMstatFile. The file is itself a valid ECMA-335 assembly whose assembly version carries the format version and whose data lives in IL streams; this record is the decoded result. Sections absent from older format versions are empty lists.

public sealed record MstatData : IEquatable<MstatData>

ObjectMstatData

MstatData(int, int, IReadOnlyList<AssemblyRefInfo>, IReadOnlyList<MstatMethod>, IReadOnlyList<MstatType>, IReadOnlyList<MstatBlob>, IReadOnlyList<MstatRvaField>, IReadOnlyList<MstatFrozenObject>, IReadOnlyList<MstatManifestResource>, IReadOnlyList<MstatDeduplicatedMethod>)

Section titled “MstatData(int, int, IReadOnlyList<AssemblyRefInfo>, IReadOnlyList<MstatMethod>, IReadOnlyList<MstatType>, IReadOnlyList<MstatBlob>, IReadOnlyList<MstatRvaField>, IReadOnlyList<MstatFrozenObject>, IReadOnlyList<MstatManifestResource>, IReadOnlyList<MstatDeduplicatedMethod>)”

The contents of an ILC size report (.mstat), produced by publishing a Native AOT project with IlcGenerateMstatFile. The file is itself a valid ECMA-335 assembly whose assembly version carries the format version and whose data lives in IL streams; this record is the decoded result. Sections absent from older format versions are empty lists.

Parameters:

public MstatData(int FormatMajorVersion, int FormatMinorVersion, IReadOnlyList<AssemblyRefInfo> Assemblies, IReadOnlyList<MstatMethod> Methods, IReadOnlyList<MstatType> Types, IReadOnlyList<MstatBlob> Blobs, IReadOnlyList<MstatRvaField> RvaFields, IReadOnlyList<MstatFrozenObject> FrozenObjects, IReadOnlyList<MstatManifestResource> ManifestResources, IReadOnlyList<MstatDeduplicatedMethod> DeduplicatedMethods)

The managed assemblies the report references, in AssemblyRef table order.

Returns: IReadOnlyList<AssemblyRefInfo>

public IReadOnlyList<AssemblyRefInfo> Assemblies { get; init; }

Global data regions (metadata, dehydrated data, hydration tables) by name.

Returns: IReadOnlyList<MstatBlob>

public IReadOnlyList<MstatBlob> Blobs { get; init; }

Method bodies folded into an identical original (format 2.2+).

Returns: IReadOnlyList<MstatDeduplicatedMethod>

public IReadOnlyList<MstatDeduplicatedMethod> DeduplicatedMethods { get; init; }

A report with no entries and format version 0.0 — the baseline for size-budget checks that run without one, where every entry of the build under check diffs as added.

Returns: MstatData

public static MstatData Empty { get; }

The format major version (1 = .NET 7, 2 = .NET 8+).

Returns: Int32

public int FormatMajorVersion { get; init; }

The format minor version (2.1 adds RVA field, frozen object, and resource detail; 2.2 adds deduplicated methods).

Returns: Int32

public int FormatMinorVersion { get; init; }

Frozen object entries (format 2.1+); their bytes also appear in Blobs for back-compat.

Returns: IReadOnlyList<MstatFrozenObject>

public IReadOnlyList<MstatFrozenObject> FrozenObjects { get; init; }

Embedded manifest resources (format 2.1+); their bytes also appear in Blobs for back-compat.

Returns: IReadOnlyList<MstatManifestResource>

public IReadOnlyList<MstatManifestResource> ManifestResources { get; init; }

Every compiled method body with its code, GC info, and EH info sizes.

Returns: IReadOnlyList<MstatMethod>

public IReadOnlyList<MstatMethod> Methods { get; init; }

Field RVA data entries (format 2.1+); their bytes also appear in Blobs for back-compat.

Returns: IReadOnlyList<MstatRvaField>

public IReadOnlyList<MstatRvaField> RvaFields { get; init; }

Every constructed MethodTable with its size.

Returns: IReadOnlyList<MstatType>

public IReadOnlyList<MstatType> Types { get; init; }