Skip to content

MstatSizeIndex

Namespace: Dotsider.Core.Analysis

Assembly: Dotsider.Core.dll

The normalized view of an ILC size report that every size consumer shares: raw rows aggregated under build-stable identity keys, one double-count policy for the 2.1+ detail sections, owner-based attribution for frozen objects, and per-assembly / per-namespace byte totals. SizeAnalyzer builds the Size Map from it, MstatDiffer compares two of them, and budget evaluation reads its aggregates — so a total shown in one place always equals the same total shown in another.

public sealed class MstatSizeIndex

ObjectMstatSizeIndex

Attributable bytes per assembly: methods, MethodTables, RVA fields, and resources by their defining assembly, frozen objects by their owning type’s assembly (ownerless bytes land under UnattributedName). Blobs are global and excluded.

Returns: IReadOnlyDictionary<String, Int64>

public IReadOnlyDictionary<string, long> AssemblyTotals { get; }

The decoded report the index was built from.

Returns: MstatData

public MstatData Data { get; }

Every normalized entry, in first-occurrence order per section.

Returns: IReadOnlyList<MstatSizeEntry>

public IReadOnlyList<MstatSizeEntry> Entries { get; }

Attributable bytes per namespace, folded across assemblies: methods and MethodTables by their namespace, RVA fields by their declaring type’s namespace, frozen objects by their owning type’s namespace (ownerless bytes land under UnattributedName). Blobs and resources carry no namespace and are excluded. The global namespace keys as an empty string.

Returns: IReadOnlyDictionary<String, Int64>

public IReadOnlyDictionary<string, long> NamespaceTotals { get; }

The detail-section policy the index applied.

Returns: MstatSectionPolicy

public MstatSectionPolicy Policy { get; }

The total attributable bytes — the same figure the Size Map reports for the build.

Returns: Int64

public long Total { get; }

Builds the index under an explicit detail-section policy. Two indexes are comparable by MstatDiffer only when they share a policy — use MstatData) for a pair of reports.

Parameters:

Returns: MstatSizeIndex

The normalized index.

public static MstatSizeIndex Create(MstatData data, MstatSectionPolicy policy)

Builds the index for one report on its own, using MstatData).

Parameters:

Returns: MstatSizeIndex

The normalized index.

public static MstatSizeIndex Create(MstatData data)

The attribution bucket for bytes no assembly or namespace can honestly be charged for — frozen objects with no owning type, such as string literals. Scoped size budgets never draw from this bucket, but it stays visible in the aggregates so the bytes are never silently dropped.

Returns: String

public const string UnattributedName = "(unattributed)"