src/share/vm/gc_implementation/parNew/parCardTableModRefBS.cpp

changeset 3294
bca17e38de00
parent 3058
3be7439273c5
child 3357
441e946dc1af
     1.1 --- a/src/share/vm/gc_implementation/parNew/parCardTableModRefBS.cpp	Tue Nov 22 04:47:10 2011 -0500
     1.2 +++ b/src/share/vm/gc_implementation/parNew/parCardTableModRefBS.cpp	Tue Aug 09 10:16:01 2011 -0700
     1.3 @@ -33,6 +33,7 @@
     1.4  #include "runtime/java.hpp"
     1.5  #include "runtime/mutexLocker.hpp"
     1.6  #include "runtime/virtualspace.hpp"
     1.7 +#include "runtime/vmThread.hpp"
     1.8  
     1.9  void CardTableModRefBS::non_clean_card_iterate_parallel_work(Space* sp, MemRegion mr,
    1.10                                                               OopsInGenClosure* cl,
    1.11 @@ -42,6 +43,11 @@
    1.12    assert((n_threads == 1 && ParallelGCThreads == 0) ||
    1.13           n_threads <= (int)ParallelGCThreads,
    1.14           "# worker threads != # requested!");
    1.15 +  assert(!Thread::current()->is_VM_thread() || (n_threads == 1), "There is only 1 VM thread");
    1.16 +  assert(UseDynamicNumberOfGCThreads ||
    1.17 +         !FLAG_IS_DEFAULT(ParallelGCThreads) ||
    1.18 +         n_threads == (int)ParallelGCThreads,
    1.19 +         "# worker threads != # requested!");
    1.20    // Make sure the LNC array is valid for the space.
    1.21    jbyte**   lowest_non_clean;
    1.22    uintptr_t lowest_non_clean_base_chunk_index;
    1.23 @@ -52,6 +58,8 @@
    1.24  
    1.25    int n_strides = n_threads * ParGCStridesPerThread;
    1.26    SequentialSubTasksDone* pst = sp->par_seq_tasks();
    1.27 +  // Sets the condition for completion of the subtask (how many threads
    1.28 +  // need to finish in order to be done).
    1.29    pst->set_n_threads(n_threads);
    1.30    pst->set_n_tasks(n_strides);
    1.31  

mercurial