Mercurial > hg > graal-jvmci-8
comparison src/share/vm/runtime/thread.hpp @ 1843:0715f0cf171d
Merge
author | jcoomes |
---|---|
date | Fri, 08 Oct 2010 09:29:09 -0700 |
parents | fd5d4527cdf5 6e0aac35bfa9 |
children | fa83ab460c54 |
comparison
equal
deleted
inserted
replaced
1832:22e4420d19f7 | 1843:0715f0cf171d |
---|---|
1488 static DirtyCardQueueSet& dirty_card_queue_set() { | 1488 static DirtyCardQueueSet& dirty_card_queue_set() { |
1489 return _dirty_card_queue_set; | 1489 return _dirty_card_queue_set; |
1490 } | 1490 } |
1491 #endif // !SERIALGC | 1491 #endif // !SERIALGC |
1492 | 1492 |
1493 // This method initializes the SATB and dirty card queues before a | |
1494 // JavaThread is added to the Java thread list. Right now, we don't | |
1495 // have to do anything to the dirty card queue (it should have been | |
1496 // activated when the thread was created), but we have to activate | |
1497 // the SATB queue if the thread is created while a marking cycle is | |
1498 // in progress. The activation / de-activation of the SATB queues at | |
1499 // the beginning / end of a marking cycle is done during safepoints | |
1500 // so we have to make sure this method is called outside one to be | |
1501 // able to safely read the active field of the SATB queue set. Right | |
1502 // now, it is called just before the thread is added to the Java | |
1503 // thread list in the Threads::add() method. That method is holding | |
1504 // the Threads_lock which ensures we are outside a safepoint. We | |
1505 // cannot do the obvious and set the active field of the SATB queue | |
1506 // when the thread is created given that, in some cases, safepoints | |
1507 // might happen between the JavaThread constructor being called and the | |
1508 // thread being added to the Java thread list (an example of this is | |
1509 // when the structure for the DestroyJavaVM thread is created). | |
1510 #ifndef SERIALGC | |
1511 void initialize_queues(); | |
1512 #else // !SERIALGC | |
1513 void initialize_queues() { } | |
1514 #endif // !SERIALGC | |
1515 | |
1493 // Machine dependent stuff | 1516 // Machine dependent stuff |
1494 #include "incls/_thread_pd.hpp.incl" | 1517 #include "incls/_thread_pd.hpp.incl" |
1495 | 1518 |
1496 public: | 1519 public: |
1497 void set_blocked_on_compilation(bool value) { | 1520 void set_blocked_on_compilation(bool value) { |