-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Closed
Labels
area-Diagnostics-coreclrgood first issueIssue should be easy to implement, good for first-time contributorsIssue should be easy to implement, good for first-time contributors
Milestone
Description
Description
The CLR profiling API callback ICorProfilerCallback::ObjectsAllocatedByClass is not called by the CLR in dotnet 6.
Reproduction Steps
- Implement the
ICorProfilerCallbackinterface - Print to the console in the
ObjectsAllocatedByClasscallback - Eventually also implement
ICorProfilerCallback2and print in theGarbageCollectionStartedcallback, so that you you'll see thatObjectsAllocatedByClassis not called whenGarbageCollectionStartedis. - Use the COR_PRF_MONITOR_GC and COR_PRF_HIGH_MONITOR_NONE event mask 2 flags
- Attach to a NET 5.0 application: it works.
- Attach to a NET 6.0 application: it doesn't work anymore,
ObjectsAllocatedByClassis not called.
Expected behavior
The ObjectsAllocatedByClass callback should be called for each garbage collection like it used to be before.
Actual behavior
The ObjectsAllocatedByClass callback is never called.
Regression?
Yes
Known Workarounds
No workaround was found
Configuration
dotnet version:
- 6.0.101 (not working)
- 5.0.100 (working)
OS: Windows 11 x64
Other information
Could it be due to these recent changes? @davmason

utybo and ydubernet
Metadata
Metadata
Assignees
Labels
area-Diagnostics-coreclrgood first issueIssue should be easy to implement, good for first-time contributorsIssue should be easy to implement, good for first-time contributors