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>Inheritance
Section titled “Inheritance”Object → MstatData
Implements
Section titled “Implements”Constructors
Section titled “Constructors”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:
FormatMajorVersion(Int32): The format major version (1 = .NET 7, 2 = .NET 8+).FormatMinorVersion(Int32): The format minor version (2.1 adds RVA field, frozen object, and resource detail; 2.2 adds deduplicated methods).Assemblies(IReadOnlyList<AssemblyRefInfo>): The managed assemblies the report references, in AssemblyRef table order.Methods(IReadOnlyList<MstatMethod>): Every compiled method body with its code, GC info, and EH info sizes.Types(IReadOnlyList<MstatType>): Every constructed MethodTable with its size.Blobs(IReadOnlyList<MstatBlob>): Global data regions (metadata, dehydrated data, hydration tables) by name.RvaFields(IReadOnlyList<MstatRvaField>): Field RVA data entries (format 2.1+); their bytes also appear in Blobs for back-compat.FrozenObjects(IReadOnlyList<MstatFrozenObject>): Frozen object entries (format 2.1+); their bytes also appear in Blobs for back-compat.ManifestResources(IReadOnlyList<MstatManifestResource>): Embedded manifest resources (format 2.1+); their bytes also appear in Blobs for back-compat.DeduplicatedMethods(IReadOnlyList<MstatDeduplicatedMethod>): Method bodies folded into an identical original (format 2.2+).
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)Properties
Section titled “Properties”Assemblies
Section titled “Assemblies”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; }DeduplicatedMethods
Section titled “DeduplicatedMethods”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; }FormatMajorVersion
Section titled “FormatMajorVersion”The format major version (1 = .NET 7, 2 = .NET 8+).
Returns: Int32
public int FormatMajorVersion { get; init; }FormatMinorVersion
Section titled “FormatMinorVersion”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; }FrozenObjects
Section titled “FrozenObjects”Frozen object entries (format 2.1+); their bytes also appear in Blobs for back-compat.
Returns: IReadOnlyList<MstatFrozenObject>
public IReadOnlyList<MstatFrozenObject> FrozenObjects { get; init; }ManifestResources
Section titled “ManifestResources”Embedded manifest resources (format 2.1+); their bytes also appear in Blobs for back-compat.
Returns: IReadOnlyList<MstatManifestResource>
public IReadOnlyList<MstatManifestResource> ManifestResources { get; init; }Methods
Section titled “Methods”Every compiled method body with its code, GC info, and EH info sizes.
Returns: IReadOnlyList<MstatMethod>
public IReadOnlyList<MstatMethod> Methods { get; init; }RvaFields
Section titled “RvaFields”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; }Methods
Section titled “Methods”Deconstruct(out int, out int, out IReadOnlyList<AssemblyRefInfo>, out IReadOnlyList<MstatMethod>, out IReadOnlyList<MstatType>, out IReadOnlyList<MstatBlob>, out IReadOnlyList<MstatRvaField>, out IReadOnlyList<MstatFrozenObject>, out IReadOnlyList<MstatManifestResource>, out IReadOnlyList<MstatDeduplicatedMethod>)
Section titled “Deconstruct(out int, out int, out IReadOnlyList<AssemblyRefInfo>, out IReadOnlyList<MstatMethod>, out IReadOnlyList<MstatType>, out IReadOnlyList<MstatBlob>, out IReadOnlyList<MstatRvaField>, out IReadOnlyList<MstatFrozenObject>, out IReadOnlyList<MstatManifestResource>, out IReadOnlyList<MstatDeduplicatedMethod>)”Parameters:
FormatMajorVersion(Int32)FormatMinorVersion(Int32)Assemblies(IReadOnlyList<AssemblyRefInfo>)Methods(IReadOnlyList<MstatMethod>)Types(IReadOnlyList<MstatType>)Blobs(IReadOnlyList<MstatBlob>)RvaFields(IReadOnlyList<MstatRvaField>)FrozenObjects(IReadOnlyList<MstatFrozenObject>)ManifestResources(IReadOnlyList<MstatManifestResource>)DeduplicatedMethods(IReadOnlyList<MstatDeduplicatedMethod>)
public void Deconstruct(out int FormatMajorVersion, out int FormatMinorVersion, out IReadOnlyList<AssemblyRefInfo> Assemblies, out IReadOnlyList<MstatMethod> Methods, out IReadOnlyList<MstatType> Types, out IReadOnlyList<MstatBlob> Blobs, out IReadOnlyList<MstatRvaField> RvaFields, out IReadOnlyList<MstatFrozenObject> FrozenObjects, out IReadOnlyList<MstatManifestResource> ManifestResources, out IReadOnlyList<MstatDeduplicatedMethod> DeduplicatedMethods)Equals(MstatData?)
Section titled “Equals(MstatData?)”Parameters:
other(MstatData)
Returns: Boolean
public bool Equals(MstatData? other)Equals(object?)
Section titled “Equals(object?)”Parameters:
obj(Object)
Returns: Boolean
public override bool Equals(object? obj)GetHashCode()
Section titled “GetHashCode()”Returns: Int32
public override int GetHashCode()ToString()
Section titled “ToString()”Returns: String
public override string ToString()Members
Section titled “Members”operator !=(MstatData?, MstatData?)
Section titled “operator !=(MstatData?, MstatData?)”Parameters:
Returns: Boolean
public static bool operator !=(MstatData? left, MstatData? right)operator ==(MstatData?, MstatData?)
Section titled “operator ==(MstatData?, MstatData?)”Parameters:
Returns: Boolean
public static bool operator ==(MstatData? left, MstatData? right)