hotspot/src/share/vm/gc/cms/yieldingWorkgroup.cpp
changeset 33107 77bf0d2069a3
parent 32360 86790204fc23
equal deleted inserted replaced
33106:20c533b9e167 33107:77bf0d2069a3
    22  *
    22  *
    23  */
    23  */
    24 
    24 
    25 #include "precompiled.hpp"
    25 #include "precompiled.hpp"
    26 #include "gc/cms/yieldingWorkgroup.hpp"
    26 #include "gc/cms/yieldingWorkgroup.hpp"
       
    27 #include "gc/shared/gcId.hpp"
    27 #include "utilities/macros.hpp"
    28 #include "utilities/macros.hpp"
    28 
    29 
    29 YieldingFlexibleGangWorker::YieldingFlexibleGangWorker(YieldingFlexibleWorkGang* gang, int id)
    30 YieldingFlexibleGangWorker::YieldingFlexibleGangWorker(YieldingFlexibleWorkGang* gang, int id)
    30     : AbstractGangWorker(gang, id) {}
    31     : AbstractGangWorker(gang, id) {}
    31 
    32 
   338         id = yf_gang()->started_workers();
   339         id = yf_gang()->started_workers();
   339         yf_gang()->internal_note_start();
   340         yf_gang()->internal_note_start();
   340         // Now, release the gang mutex and do the work.
   341         // Now, release the gang mutex and do the work.
   341         {
   342         {
   342           MutexUnlockerEx mul(gang_monitor, Mutex::_no_safepoint_check_flag);
   343           MutexUnlockerEx mul(gang_monitor, Mutex::_no_safepoint_check_flag);
       
   344           GCIdMark gc_id_mark(data.task()->gc_id());
   343           data.task()->work(id);   // This might include yielding
   345           data.task()->work(id);   // This might include yielding
   344         }
   346         }
   345         // Reacquire monitor and note completion of this worker
   347         // Reacquire monitor and note completion of this worker
   346         yf_gang()->internal_note_finish();
   348         yf_gang()->internal_note_finish();
   347         // Update status of task based on whether all workers have
   349         // Update status of task based on whether all workers have