Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMassimiliano Mantione <massi@mono-cvs.ximian.com>2008-05-23 14:19:36 +0400
committerMassimiliano Mantione <massi@mono-cvs.ximian.com>2008-05-23 14:19:36 +0400
commit143db0316fe60ca015aeb8986218f87737444004 (patch)
treec196815304772e3f070d9b265f76ee458c8d0884 /libgc/alloc.c
parentfcd6be3926010d0a89f6d290057272454e1ce931 (diff)
Moved emitting "GC_EVENT_START" and "GC_EVENT_END" events from "GC_maybe_gc" to "GC_try_to_collect_inner".
svn path=/trunk/mono/; revision=103867
Diffstat (limited to 'libgc/alloc.c')
-rw-r--r--libgc/alloc.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/libgc/alloc.c b/libgc/alloc.c
index e8ab9ddfc5f..9ec6992352a 100644
--- a/libgc/alloc.c
+++ b/libgc/alloc.c
@@ -271,10 +271,6 @@ void GC_maybe_gc()
static int n_partial_gcs = 0;
if (GC_should_collect()) {
- if (GC_notify_event)
- GC_notify_event (GC_EVENT_START);
-
-
if (!GC_incremental) {
GC_gcollect_inner();
n_partial_gcs = 0;
@@ -320,10 +316,6 @@ void GC_maybe_gc()
GC_n_attempts++;
}
}
-
-
- if (GC_notify_event)
- GC_notify_event (GC_EVENT_END);
}
}
@@ -340,6 +332,10 @@ GC_stop_func stop_func;
CLOCK_TYPE start_time, current_time;
# endif
if (GC_dont_gc) return FALSE;
+
+ if (GC_notify_event)
+ GC_notify_event (GC_EVENT_START);
+
if (GC_incremental && GC_collection_in_progress()) {
# ifdef CONDPRINT
if (GC_print_stats) {
@@ -402,6 +398,9 @@ GC_stop_func stop_func;
MS_TIME_DIFF(current_time,start_time));
}
# endif
+ if (GC_notify_event)
+ GC_notify_event (GC_EVENT_END);
+
return(TRUE);
}