X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mono%2Fsgen%2Fsgen-gc.c;h=d5416f0df3630ee6a6bc5b4781bc0e9c5442873c;hb=098f6e8aa8ead1a80b751fa34e5e049439c2f0c3;hp=1c54fc261f9ecd5133b5edc84f467de7169917ec;hpb=0f0b9c2913f0ca8f700378c22cd28485ae52efeb;p=mono.git diff --git a/mono/sgen/sgen-gc.c b/mono/sgen/sgen-gc.c index 1c54fc261f9..d5416f0df36 100644 --- a/mono/sgen/sgen-gc.c +++ b/mono/sgen/sgen-gc.c @@ -195,6 +195,7 @@ #include #include +#include #undef pthread_create #undef pthread_join @@ -1855,7 +1856,7 @@ collect_nursery (const char *reason, gboolean is_overflow, SgenGrayQueue *unpin_ major_collector.finish_nursery_collection (); TV_GETTIME (last_minor_collection_end_tv); - InterlockedAdd64 (&gc_stats.minor_gc_time, TV_ELAPSED (last_minor_collection_start_tv, last_minor_collection_end_tv)); + UnlockedAdd64 (&gc_stats.minor_gc_time, TV_ELAPSED (last_minor_collection_start_tv, last_minor_collection_end_tv)); sgen_debug_dump_heap ("minor", InterlockedRead (&gc_stats.minor_gc_count) - 1, NULL); @@ -2349,7 +2350,7 @@ major_do_collection (const char *reason, gboolean is_overflow, gboolean forced) sgen_gray_object_queue_dispose (&gc_thread_gray_queue); TV_GETTIME (time_end); - InterlockedAdd64 (&gc_stats.major_gc_time, TV_ELAPSED (time_start, time_end)); + UnlockedAdd64 (&gc_stats.major_gc_time, TV_ELAPSED (time_start, time_end)); /* FIXME: also report this to the user, preferably in gc-end. */ if (major_collector.get_and_reset_num_major_objects_marked) @@ -2385,7 +2386,7 @@ major_start_concurrent_collection (const char *reason) num_objects_marked = major_collector.get_and_reset_num_major_objects_marked (); TV_GETTIME (time_end); - InterlockedAdd64 (&gc_stats.major_gc_time, TV_ELAPSED (time_start, time_end)); + UnlockedAdd64 (&gc_stats.major_gc_time, TV_ELAPSED (time_start, time_end)); current_collection_generation = -1; } @@ -2413,7 +2414,7 @@ major_update_concurrent_collection (void) sgen_los_update_cardtable_mod_union (); TV_GETTIME (total_end); - InterlockedAdd64 (&gc_stats.major_gc_time, TV_ELAPSED (total_start, total_end)); + UnlockedAdd64 (&gc_stats.major_gc_time, TV_ELAPSED (total_start, total_end)); } static void @@ -2435,7 +2436,7 @@ major_finish_concurrent_collection (gboolean forced) sgen_workers_stop_all_workers (GENERATION_OLD); SGEN_TV_GETTIME (time_major_conc_collection_end); - InterlockedAdd64 (&gc_stats.major_gc_time_concurrent, SGEN_TV_ELAPSED (time_major_conc_collection_start, time_major_conc_collection_end)); + UnlockedAdd64 (&gc_stats.major_gc_time_concurrent, SGEN_TV_ELAPSED (time_major_conc_collection_start, time_major_conc_collection_end)); major_collector.update_cardtable_mod_union (); sgen_los_update_cardtable_mod_union (); @@ -2450,7 +2451,7 @@ major_finish_concurrent_collection (gboolean forced) sgen_gray_object_queue_dispose (&gc_thread_gray_queue); TV_GETTIME (total_end); - InterlockedAdd64 (&gc_stats.major_gc_time, TV_ELAPSED (total_start, total_end)); + UnlockedAdd64 (&gc_stats.major_gc_time, TV_ELAPSED (total_start, total_end)); current_collection_generation = -1; }