From 5c4dc54dd2e285028be9962dba46c1473f846602 Mon Sep 17 00:00:00 2001 From: Nathan Ricci Date: Wed, 21 Aug 2019 16:27:02 -0400 Subject: [PATCH] Implemented precise. Commit migrated from https://github.com/mono/mono/commit/f913945e76e5df1ee80a204a43df8770a7af0dd9 --- src/mono/mono/metadata/sgen-mono.c | 5 ++--- src/mono/mono/sgen/sgen-gc.c | 5 ----- src/mono/mono/sgen/sgen-gc.h | 1 + 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/src/mono/mono/metadata/sgen-mono.c b/src/mono/mono/metadata/sgen-mono.c index 65a1321..bddd953 100644 --- a/src/mono/mono/metadata/sgen-mono.c +++ b/src/mono/mono/metadata/sgen-mono.c @@ -2535,12 +2535,11 @@ mono_gc_get_total_allocated_bytes(MonoBoolean precise) if (precise) { mono_threads_begin_global_suspend(); - guint64 count = sgen_updated_allocation_count(); + sgen_update_allocation_count(); mono_threads_end_global_suspend(); - return count; } - return total_bytes_allocated + return total_bytes_allocated; } diff --git a/src/mono/mono/sgen/sgen-gc.c b/src/mono/mono/sgen/sgen-gc.c index 2e53802..1572800 100644 --- a/src/mono/mono/sgen/sgen-gc.c +++ b/src/mono/mono/sgen/sgen-gc.c @@ -3917,9 +3917,4 @@ sgen_check_canary_for_object (gpointer addr) } } -guint64 sgen_get_precise_allocation_count (void) -{ - -} - #endif /* HAVE_SGEN_GC */ diff --git a/src/mono/mono/sgen/sgen-gc.h b/src/mono/mono/sgen/sgen-gc.h index 9276a8e..62f7b2e 100644 --- a/src/mono/mono/sgen/sgen-gc.h +++ b/src/mono/mono/sgen/sgen-gc.h @@ -1077,6 +1077,7 @@ typedef enum { } SgenAllocatorType; void sgen_clear_tlabs (void); +void sgen_update_allocation_count (void); GCObject* sgen_alloc_obj (GCVTable vtable, size_t size) MONO_PERMIT (need (sgen_lock_gc, sgen_stop_world)); -- 2.7.4