src/share/vm/gc_implementation/g1/g1SATBCardTableModRefBS.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File 7089790_headers_only Sdiff src/share/vm/gc_implementation/g1

src/share/vm/gc_implementation/g1/g1SATBCardTableModRefBS.cpp

Print this page
rev 2694 : imported patch headers_only


  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #include "precompiled.hpp"
  26 #include "gc_implementation/g1/g1SATBCardTableModRefBS.hpp"
  27 #include "gc_implementation/g1/heapRegion.hpp"
  28 #include "gc_implementation/g1/satbQueue.hpp"
  29 #include "runtime/mutexLocker.hpp"
  30 #include "runtime/thread.hpp"
  31 #ifdef TARGET_OS_FAMILY_linux
  32 # include "thread_linux.inline.hpp"
  33 #endif
  34 #ifdef TARGET_OS_FAMILY_solaris
  35 # include "thread_solaris.inline.hpp"
  36 #endif
  37 #ifdef TARGET_OS_FAMILY_windows
  38 # include "thread_windows.inline.hpp"
  39 #endif



  40 
  41 G1SATBCardTableModRefBS::G1SATBCardTableModRefBS(MemRegion whole_heap,
  42                                                  int max_covered_regions) :
  43     CardTableModRefBSForCTRS(whole_heap, max_covered_regions)
  44 {
  45   _kind = G1SATBCT;
  46 }
  47 
  48 
  49 void G1SATBCardTableModRefBS::enqueue(oop pre_val) {
  50   // Nulls should have been already filtered.
  51   assert(pre_val->is_oop(true), "Error");
  52 
  53   if (!JavaThread::satb_mark_queue_set().is_active()) return;
  54   Thread* thr = Thread::current();
  55   if (thr->is_Java_thread()) {
  56     JavaThread* jt = (JavaThread*)thr;
  57     jt->satb_mark_queue().enqueue(pre_val);
  58   } else {
  59     MutexLocker x(Shared_SATB_Q_lock);




  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #include "precompiled.hpp"
  26 #include "gc_implementation/g1/g1SATBCardTableModRefBS.hpp"
  27 #include "gc_implementation/g1/heapRegion.hpp"
  28 #include "gc_implementation/g1/satbQueue.hpp"
  29 #include "runtime/mutexLocker.hpp"
  30 #include "runtime/thread.hpp"
  31 #ifdef TARGET_OS_FAMILY_linux
  32 # include "thread_linux.inline.hpp"
  33 #endif
  34 #ifdef TARGET_OS_FAMILY_solaris
  35 # include "thread_solaris.inline.hpp"
  36 #endif
  37 #ifdef TARGET_OS_FAMILY_windows
  38 # include "thread_windows.inline.hpp"
  39 #endif
  40 #ifdef TARGET_OS_FAMILY_bsd
  41 # include "thread_bsd.inline.hpp"
  42 #endif
  43 
  44 G1SATBCardTableModRefBS::G1SATBCardTableModRefBS(MemRegion whole_heap,
  45                                                  int max_covered_regions) :
  46     CardTableModRefBSForCTRS(whole_heap, max_covered_regions)
  47 {
  48   _kind = G1SATBCT;
  49 }
  50 
  51 
  52 void G1SATBCardTableModRefBS::enqueue(oop pre_val) {
  53   // Nulls should have been already filtered.
  54   assert(pre_val->is_oop(true), "Error");
  55 
  56   if (!JavaThread::satb_mark_queue_set().is_active()) return;
  57   Thread* thr = Thread::current();
  58   if (thr->is_Java_thread()) {
  59     JavaThread* jt = (JavaThread*)thr;
  60     jt->satb_mark_queue().enqueue(pre_val);
  61   } else {
  62     MutexLocker x(Shared_SATB_Q_lock);


src/share/vm/gc_implementation/g1/g1SATBCardTableModRefBS.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File