1485 static DirtyCardQueueSet& dirty_card_queue_set() { |
1485 static DirtyCardQueueSet& dirty_card_queue_set() { |
1486 return _dirty_card_queue_set; |
1486 return _dirty_card_queue_set; |
1487 } |
1487 } |
1488 #endif // !SERIALGC |
1488 #endif // !SERIALGC |
1489 |
1489 |
|
1490 // This method initializes the SATB and dirty card queues before a |
|
1491 // JavaThread is added to the Java thread list. Right now, we don't |
|
1492 // have to do anything to the dirty card queue (it should have been |
|
1493 // activated when the thread was created), but we have to activate |
|
1494 // the SATB queue if the thread is created while a marking cycle is |
|
1495 // in progress. The activation / de-activation of the SATB queues at |
|
1496 // the beginning / end of a marking cycle is done during safepoints |
|
1497 // so we have to make sure this method is called outside one to be |
|
1498 // able to safely read the active field of the SATB queue set. Right |
|
1499 // now, it is called just before the thread is added to the Java |
|
1500 // thread list in the Threads::add() method. That method is holding |
|
1501 // the Threads_lock which ensures we are outside a safepoint. We |
|
1502 // cannot do the obvious and set the active field of the SATB queue |
|
1503 // when the thread is created given that, in some cases, safepoints |
|
1504 // might happen between the JavaThread constructor being called and the |
|
1505 // thread being added to the Java thread list (an example of this is |
|
1506 // when the structure for the DestroyJavaVM thread is created). |
|
1507 #ifndef SERIALGC |
|
1508 void initialize_queues(); |
|
1509 #else // !SERIALGC |
|
1510 void initialize_queues() { } |
|
1511 #endif // !SERIALGC |
|
1512 |
1490 // Machine dependent stuff |
1513 // Machine dependent stuff |
1491 #include "incls/_thread_pd.hpp.incl" |
1514 #include "incls/_thread_pd.hpp.incl" |
1492 |
1515 |
1493 public: |
1516 public: |
1494 void set_blocked_on_compilation(bool value) { |
1517 void set_blocked_on_compilation(bool value) { |