Skip to content

Feature Request: During a profiler walk of the GC heap reference graph, distinguish references that aren't backed by metadata fields #10179

Closed
@noahfalk

Description

@noahfalk

This is a request from https://github.com/dotnet/coreclr/issues/16274#issuecomment-381434436

Well, could you please add the markers for virtual references in ICorProfilerCallback? I need to know that the reference to LoaderAllocator is virtual. I have the list of classes where the reference to LoaderAllocator isn't virtual. How can I understand after CLR/CoreCLR update that I have to add the new type in the list?

FWIW, I don't think that the information needs to be directly provided as an argument of the ICorProfilerCallback::ObjectReferences API (or a numbered extension of the API), but there would need to be some not too complicated and reasonably performant mechanism for a profiler to learn the information. This is part of a broader ask that the profiler wants to understand not just what references an object has, but specifically how those references correlate to its fields, nested fields, array elements, etc. Right now profilers are using heuristics because the APIs to access types and type layouts have difficulties in some cases. The implicit references created by collectible assemblies add an additional layer of complexity.

Metadata

Metadata

Assignees

Labels

area-Diagnostics-coreclrenhancementProduct code improvement that does NOT require public API changes/additions

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions