ManagedNativeIndex
Namespace: Dotsider.Core.Analysis
Assembly: Dotsider.Core.dll
Joins pre-ILC managed methods to the native evidence of the AOT image they were compiled into: native symbols (via IlcNameDemangler, keyed from real companion metadata instead of the binary’s reduced recovered types) and mstat size rows. Built once, queried per-frame — every lookup is a dictionary hit.
public sealed class ManagedNativeIndexInheritance
Section titled “Inheritance”Object → ManagedNativeIndex
Properties
Section titled “Properties”AmbiguousCount
Section titled “AmbiguousCount”Methods whose native evidence is shared with sibling overloads.
Returns: Int32
public int AmbiguousCount { get; }ExactCount
Section titled “ExactCount”Methods that own native evidence outright.
Returns: Int32
public int ExactCount { get; }Methods
Section titled “Methods”Every managed method’s correlation, in source order.
Returns: IReadOnlyList<MethodCorrelation>
public IReadOnlyList<MethodCorrelation> Methods { get; }MstatOnlyCount
Section titled “MstatOnlyCount”Methods with mstat size evidence but no native symbol to disassemble.
Returns: Int32
public int MstatOnlyCount { get; }NotInImageCount
Section titled “NotInImageCount”Methods with no native evidence — trimmed, fully inlined, or bodiless.
Returns: Int32
public int NotInImageCount { get; }TotalCorrelatedSize
Section titled “TotalCorrelatedSize”The correlated native bytes, deduplicated: every evidence pool — owned or shared — contributes exactly once, with mstat sizes preferred over symbol sizes.
Returns: Int64
public long TotalCorrelatedSize { get; }Methods
Section titled “Methods”Build(IReadOnlyList<ManagedMethodSource>, IReadOnlyList<NativeSymbol>, MstatData?)
Section titled “Build(IReadOnlyList<ManagedMethodSource>, IReadOnlyList<NativeSymbol>, MstatData?)”Builds the index from managed method sources, the image’s native symbols, and its mstat report. Deliberately data-shaped — no analyzer required — so synthetic inputs exercise every join rule without real binaries.
Parameters:
sources(IReadOnlyList<ManagedMethodSource>): The pre-ILC assemblies: the root managed input and any local references.nativeSymbols(IReadOnlyList<NativeSymbol>): The AOT image’s native symbols (empty when no symbol source exists).mstat(MstatData): The image’s mstat report, or null when absent.
Returns: ManagedNativeIndex
public static ManagedNativeIndex Build(IReadOnlyList<ManagedMethodSource> sources, IReadOnlyList<NativeSymbol> nativeSymbols, MstatData? mstat)Find(string, int)
Section titled “Find(string, int)”Finds a method’s correlation by its assembly simple name and metadata token. Tokens collide across assemblies, so the composite key is required.
Parameters:
assemblyName(String): The assembly simple name the method is defined in.methodToken(Int32): The method’s metadata token.
Returns: MethodCorrelation
public MethodCorrelation? Find(string assemblyName, int methodToken)FindByAddress(ulong)
Section titled “FindByAddress(ulong)”Finds the correlation whose native code covers virtualAddress — an address anywhere inside a correlated symbol, not only its entry point — or null for uncorrelated (runtime/stub) code.
Parameters:
virtualAddress(UInt64): A virtual address, e.g. from a stack trace or a call target.
Returns: MethodCorrelation
public MethodCorrelation? FindByAddress(ulong virtualAddress)FindByNativeSymbol(NativeSymbol)
Section titled “FindByNativeSymbol(NativeSymbol)”Finds the correlation a native symbol belongs to, keyed by its virtual address. For a shared (overload) pool the first candidate is returned; its Status reveals the ambiguity.
Parameters:
symbol(NativeSymbol): The native symbol to look up.
Returns: MethodCorrelation
public MethodCorrelation? FindByNativeSymbol(NativeSymbol symbol)Remarks
Section titled “Remarks”The join is grouped by (assembly, declaring type, method name): ILC’s mangling
collapses signatures, so overloads form one evidence pool that no single candidate
owns. A single-method group owns its evidence (CorrelatedExact,
several symbols meaning generic instantiations); a multi-method group is shared
(CorrelatedAmbiguous), reported on every sibling
but counted once in TotalCorrelatedSize. Overload-suffix assignment
(_0/_1) is never guessed — the same policy the demangler applies.