hotspot/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp
changeset 30153 596ed88949ad
parent 29799 3ad47a56094a
child 30155 a3a254791703
equal deleted inserted replaced
30152:5fe1c8494b49 30153:596ed88949ad
    40 #include "memory/genCollectedHeap.hpp"
    40 #include "memory/genCollectedHeap.hpp"
    41 #include "memory/genOopClosures.inline.hpp"
    41 #include "memory/genOopClosures.inline.hpp"
    42 #include "memory/generation.hpp"
    42 #include "memory/generation.hpp"
    43 #include "memory/referencePolicy.hpp"
    43 #include "memory/referencePolicy.hpp"
    44 #include "memory/resourceArea.hpp"
    44 #include "memory/resourceArea.hpp"
    45 #include "memory/sharedHeap.hpp"
    45 #include "memory/strongRootsScope.hpp"
    46 #include "memory/space.hpp"
    46 #include "memory/space.hpp"
    47 #include "oops/objArrayOop.hpp"
    47 #include "oops/objArrayOop.hpp"
    48 #include "oops/oop.inline.hpp"
    48 #include "oops/oop.inline.hpp"
    49 #include "runtime/atomic.inline.hpp"
    49 #include "runtime/atomic.inline.hpp"
    50 #include "runtime/handles.hpp"
    50 #include "runtime/handles.hpp"
   972   // It turns out that even when we're using 1 thread, doing the work in a
   972   // It turns out that even when we're using 1 thread, doing the work in a
   973   // separate thread causes wide variance in run times.  We can't help this
   973   // separate thread causes wide variance in run times.  We can't help this
   974   // in the multi-threaded case, but we special-case n=1 here to get
   974   // in the multi-threaded case, but we special-case n=1 here to get
   975   // repeatable measurements of the 1-thread overhead of the parallel code.
   975   // repeatable measurements of the 1-thread overhead of the parallel code.
   976   if (n_workers > 1) {
   976   if (n_workers > 1) {
   977     GenCollectedHeap::StrongRootsScope srs(gch);
   977     StrongRootsScope srs;
   978     workers->run_task(&tsk);
   978     workers->run_task(&tsk);
   979   } else {
   979   } else {
   980     GenCollectedHeap::StrongRootsScope srs(gch);
   980     StrongRootsScope srs;
   981     tsk.work(0);
   981     tsk.work(0);
   982   }
   982   }
   983   thread_state_set.reset(0 /* Bad value in debug if not reset */,
   983   thread_state_set.reset(0 /* Bad value in debug if not reset */,
   984                          promotion_failed());
   984                          promotion_failed());
   985 
   985