From 50cb5ee999b749ca0c570d3b5136b36547167814 Mon Sep 17 00:00:00 2001 From: Filip Navara Date: Mon, 14 Aug 2023 15:51:37 +0200 Subject: [PATCH] Change how toggle refs are reported in gcdump (#90467) --- src/mono/mono/eventpipe/ep-rt-mono-runtime-provider.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/mono/mono/eventpipe/ep-rt-mono-runtime-provider.c b/src/mono/mono/eventpipe/ep-rt-mono-runtime-provider.c index 72bf3da399b..ccb91d0ca41 100644 --- a/src/mono/mono/eventpipe/ep-rt-mono-runtime-provider.c +++ b/src/mono/mono/eventpipe/ep-rt-mono-runtime-provider.c @@ -386,6 +386,9 @@ static const uint32_t BULK_ROOT_STATIC_VAR_EVENT_TYPE_SIZE = #define GC_TYPE_NGC 0 #define GC_ROOT_FLAGS_NONE 0 #define GC_ROOT_FLAGS_PINNING 1 +#define GC_ROOT_FLAGS_WEAKREF 2 +#define GC_ROOT_FLAGS_INTERIOR 4 +#define GC_ROOT_FLAGS_REFCOUNTED 8 #define GC_ROOT_KIND_STACK 0 #define GC_ROOT_KIND_FINALIZER 1 #define GC_ROOT_KIND_HANDLE 2 @@ -3983,6 +3986,11 @@ fire_gc_event_bulk_root_edge ( root_kind = GC_ROOT_KIND_HANDLE; root_id = address; break; + case MONO_ROOT_SOURCE_TOGGLEREF : + root_kind = GC_ROOT_KIND_HANDLE; + root_flags = GC_ROOT_FLAGS_REFCOUNTED; + root_id = address; + break; default : break; } -- GitLab