X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mono%2Fsgen%2Fsgen-gc.c;h=bafb50b0f6a6697e4906630a01c14faf6466ee53;hb=7692bfc5a9184fb5cafc296ca2167ec3fc7148eb;hp=ea67897afca98cbae0e5ec460916cdab92894ee1;hpb=58a947d9c5dd9f81a5a08e117985f29dc18dbf2d;p=mono.git diff --git a/mono/sgen/sgen-gc.c b/mono/sgen/sgen-gc.c index ea67897afca..bafb50b0f6a 100644 --- a/mono/sgen/sgen-gc.c +++ b/mono/sgen/sgen-gc.c @@ -2037,10 +2037,13 @@ major_copy_or_mark_from_roots (SgenGrayQueue *gc_thread_gray_queue, size_t *old_ if (mode == COPY_OR_MARK_FROM_ROOTS_FINISH_CONCURRENT) { if (object_ops_par != NULL) sgen_workers_set_num_active_workers (GENERATION_OLD, 0); - if (sgen_workers_have_idle_work (GENERATION_OLD)) { + if (object_ops_par == NULL && sgen_workers_have_idle_work (GENERATION_OLD)) { /* * We force the finish of the worker with the new object ops context - * which can also do copying. We need to have finished pinning. + * which can also do copying. We need to have finished pinning. On the + * parallel collector, there is no need to drain the private queues + * here, since we can do it as part of the finishing work, achieving + * better work distribution. */ sgen_workers_start_all_workers (GENERATION_OLD, object_ops_nopar, object_ops_par, NULL);