--- a/.hgtags Wed Mar 31 16:51:18 2010 -0700
+++ b/.hgtags Fri Apr 02 17:04:09 2010 -0700
@@ -60,3 +60,5 @@
34c8199936a1682aa8587857f44cfaf37c2b6381 jdk7-b83
b1e55627a6980b9508854ed0c0f21d4f981b4494 jdk7-b84
b6f633a93ae0ec4555ff4bf756f5e2150c9bdede jdk7-b85
+c94d9cc81f495d97817eba9d71b84fc45f7661a5 jdk7-b86
+b7456c473862048fa70ed8092313a4ef0a55d403 jdk7-b87
--- a/.hgtags-top-repo Wed Mar 31 16:51:18 2010 -0700
+++ b/.hgtags-top-repo Fri Apr 02 17:04:09 2010 -0700
@@ -60,3 +60,5 @@
6880a3af9addb41541e80ebe8cde6f79ec402a58 jdk7-b83
2f3ea057d1ad56cf3b269cdc4de2741411151982 jdk7-b84
cf26288a114be67c39f2758959ce50b60f5ae330 jdk7-b85
+433a60a9c0bf1b26ee7e65cebaa89c541f497aed jdk7-b86
+6b1069f53fbc30663ccef49d78c31bb7d6967bde jdk7-b87
--- a/corba/.hgtags Wed Mar 31 16:51:18 2010 -0700
+++ b/corba/.hgtags Fri Apr 02 17:04:09 2010 -0700
@@ -60,3 +60,5 @@
fde0df7a2384f7fe33204a79678989807d9c2b98 jdk7-b83
68c8961a82e4a3ad2a67991e5d834192a81eb4cd jdk7-b84
c67a9df7bc0ca291f08f9a9cc05cb78ea15d25e6 jdk7-b85
+6253e28826d16cf1aecc39ce04c8de1f6bf2df5f jdk7-b86
+09a41111a401d327f65e453384d976a10154d9ea jdk7-b87
--- a/hotspot/.hgtags Wed Mar 31 16:51:18 2010 -0700
+++ b/hotspot/.hgtags Fri Apr 02 17:04:09 2010 -0700
@@ -83,3 +83,6 @@
ffc8d176b84bcfb5ac21302b4feb3b0c0d69b97c jdk7-b84
6c9796468b91dcbb39e09dfa1baf9779ac45eb66 jdk7-b85
418bc80ce13995149eadc9eecbba21d7a9fa02ae hs17-b10
+bf823ef06b4f211e66988d76a2e2669be5c0820e jdk7-b86
+07226e9eab8f74b37346b32715f829a2ef2c3188 hs18-b01
+e7e7e36ccdb5d56edd47e5744351202d38f3b7ad jdk7-b87
--- a/hotspot/make/hotspot_version Wed Mar 31 16:51:18 2010 -0700
+++ b/hotspot/make/hotspot_version Fri Apr 02 17:04:09 2010 -0700
@@ -31,11 +31,11 @@
#
# Don't put quotes (fail windows build).
-HOTSPOT_VM_COPYRIGHT=Copyright 2009
+HOTSPOT_VM_COPYRIGHT=Copyright 2010
-HS_MAJOR_VER=17
+HS_MAJOR_VER=18
HS_MINOR_VER=0
-HS_BUILD_NUMBER=10
+HS_BUILD_NUMBER=02
JDK_MAJOR_VER=1
JDK_MINOR_VER=7
--- a/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp Wed Mar 31 16:51:18 2010 -0700
+++ b/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp Fri Apr 02 17:04:09 2010 -0700
@@ -760,7 +760,10 @@
rp->setup_policy(false); // snapshot the soft ref policy to be used in this cycle
SATBMarkQueueSet& satb_mq_set = JavaThread::satb_mark_queue_set();
- satb_mq_set.set_active_all_threads(true);
+ // This is the start of the marking cycle, we're expected all
+ // threads to have SATB queues with active set to false.
+ satb_mq_set.set_active_all_threads(true, /* new active value */
+ false /* expected_active */);
// update_g1_committed() will be called at the end of an evac pause
// when marking is on. So, it's also called at the end of the
@@ -1079,7 +1082,11 @@
gclog_or_tty->print_cr("\nRemark led to restart for overflow.");
} else {
// We're done with marking.
- JavaThread::satb_mark_queue_set().set_active_all_threads(false);
+ // This is the end of the marking cycle, we're expected all
+ // threads to have SATB queues with active set to true.
+ JavaThread::satb_mark_queue_set().set_active_all_threads(
+ false, /* new active value */
+ true /* expected_active */);
if (VerifyDuringGC) {
HandleMark hm; // handle scope
@@ -2586,7 +2593,11 @@
SATBMarkQueueSet& satb_mq_set = JavaThread::satb_mark_queue_set();
satb_mq_set.abandon_partial_marking();
- satb_mq_set.set_active_all_threads(false);
+ // This can be called either during or outside marking, we'll read
+ // the expected_active value from the SATB queue set.
+ satb_mq_set.set_active_all_threads(
+ false, /* new active value */
+ satb_mq_set.is_active() /* expected_active */);
}
static void print_ms_time_info(const char* prefix, const char* name,
--- a/hotspot/src/share/vm/gc_implementation/g1/g1SATBCardTableModRefBS.cpp Wed Mar 31 16:51:18 2010 -0700
+++ b/hotspot/src/share/vm/gc_implementation/g1/g1SATBCardTableModRefBS.cpp Fri Apr 02 17:04:09 2010 -0700
@@ -35,7 +35,7 @@
void G1SATBCardTableModRefBS::enqueue(oop pre_val) {
assert(pre_val->is_oop_or_null(true), "Error");
- if (!JavaThread::satb_mark_queue_set().active()) return;
+ if (!JavaThread::satb_mark_queue_set().is_active()) return;
Thread* thr = Thread::current();
if (thr->is_Java_thread()) {
JavaThread* jt = (JavaThread*)thr;
@@ -51,7 +51,7 @@
G1SATBCardTableModRefBS::write_ref_field_pre_static(T* field,
oop new_val,
JavaThread* jt) {
- if (!JavaThread::satb_mark_queue_set().active()) return;
+ if (!JavaThread::satb_mark_queue_set().is_active()) return;
T heap_oop = oopDesc::load_heap_oop(field);
if (!oopDesc::is_null(heap_oop)) {
oop pre_val = oopDesc::decode_heap_oop_not_null(heap_oop);
@@ -62,7 +62,7 @@
template <class T> void
G1SATBCardTableModRefBS::write_ref_array_pre_work(T* dst, int count) {
- if (!JavaThread::satb_mark_queue_set().active()) return;
+ if (!JavaThread::satb_mark_queue_set().is_active()) return;
T* elem_ptr = dst;
for (int i = 0; i < count; i++, elem_ptr++) {
T heap_oop = oopDesc::load_heap_oop(elem_ptr);
--- a/hotspot/src/share/vm/gc_implementation/g1/ptrQueue.cpp Wed Mar 31 16:51:18 2010 -0700
+++ b/hotspot/src/share/vm/gc_implementation/g1/ptrQueue.cpp Fri Apr 02 17:04:09 2010 -0700
@@ -25,8 +25,8 @@
# include "incls/_precompiled.incl"
# include "incls/_ptrQueue.cpp.incl"
-PtrQueue::PtrQueue(PtrQueueSet* qset_, bool perm) :
- _qset(qset_), _buf(NULL), _index(0), _active(false),
+PtrQueue::PtrQueue(PtrQueueSet* qset_, bool perm, bool active) :
+ _qset(qset_), _buf(NULL), _index(0), _active(active),
_perm(perm), _lock(NULL)
{}
--- a/hotspot/src/share/vm/gc_implementation/g1/ptrQueue.hpp Wed Mar 31 16:51:18 2010 -0700
+++ b/hotspot/src/share/vm/gc_implementation/g1/ptrQueue.hpp Fri Apr 02 17:04:09 2010 -0700
@@ -62,7 +62,7 @@
public:
// Initialize this queue to contain a null buffer, and be part of the
// given PtrQueueSet.
- PtrQueue(PtrQueueSet*, bool perm = false);
+ PtrQueue(PtrQueueSet*, bool perm = false, bool active = false);
// Release any contained resources.
void flush();
// Calls flush() when destroyed.
@@ -101,6 +101,8 @@
}
}
+ bool is_active() { return _active; }
+
static int byte_index_to_index(int ind) {
assert((ind % oopSize) == 0, "Invariant.");
return ind / oopSize;
@@ -257,7 +259,7 @@
bool process_completed_buffers() { return _process_completed; }
void set_process_completed(bool x) { _process_completed = x; }
- bool active() { return _all_active; }
+ bool is_active() { return _all_active; }
// Set the buffer size. Should be called before any "enqueue" operation
// can be called. And should only be called once.
--- a/hotspot/src/share/vm/gc_implementation/g1/satbQueue.cpp Wed Mar 31 16:51:18 2010 -0700
+++ b/hotspot/src/share/vm/gc_implementation/g1/satbQueue.cpp Fri Apr 02 17:04:09 2010 -0700
@@ -82,9 +82,57 @@
t->satb_mark_queue().handle_zero_index();
}
-void SATBMarkQueueSet::set_active_all_threads(bool b) {
+#ifdef ASSERT
+void SATBMarkQueueSet::dump_active_values(JavaThread* first,
+ bool expected_active) {
+ gclog_or_tty->print_cr("SATB queue active values for Java Threads");
+ gclog_or_tty->print_cr(" SATB queue set: active is %s",
+ (is_active()) ? "TRUE" : "FALSE");
+ gclog_or_tty->print_cr(" expected_active is %s",
+ (expected_active) ? "TRUE" : "FALSE");
+ for (JavaThread* t = first; t; t = t->next()) {
+ bool active = t->satb_mark_queue().is_active();
+ gclog_or_tty->print_cr(" thread %s, active is %s",
+ t->name(), (active) ? "TRUE" : "FALSE");
+ }
+}
+#endif // ASSERT
+
+void SATBMarkQueueSet::set_active_all_threads(bool b,
+ bool expected_active) {
+ assert(SafepointSynchronize::is_at_safepoint(), "Must be at safepoint.");
+ JavaThread* first = Threads::first();
+
+#ifdef ASSERT
+ if (_all_active != expected_active) {
+ dump_active_values(first, expected_active);
+
+ // I leave this here as a guarantee, instead of an assert, so
+ // that it will still be compiled in if we choose to uncomment
+ // the #ifdef ASSERT in a product build. The whole block is
+ // within an #ifdef ASSERT so the guarantee will not be compiled
+ // in a product build anyway.
+ guarantee(false,
+ "SATB queue set has an unexpected active value");
+ }
+#endif // ASSERT
_all_active = b;
- for(JavaThread* t = Threads::first(); t; t = t->next()) {
+
+ for (JavaThread* t = first; t; t = t->next()) {
+#ifdef ASSERT
+ bool active = t->satb_mark_queue().is_active();
+ if (active != expected_active) {
+ dump_active_values(first, expected_active);
+
+ // I leave this here as a guarantee, instead of an assert, so
+ // that it will still be compiled in if we choose to uncomment
+ // the #ifdef ASSERT in a product build. The whole block is
+ // within an #ifdef ASSERT so the guarantee will not be compiled
+ // in a product build anyway.
+ guarantee(false,
+ "thread has an unexpected active value in its SATB queue");
+ }
+#endif // ASSERT
t->satb_mark_queue().set_active(b);
}
}
--- a/hotspot/src/share/vm/gc_implementation/g1/satbQueue.hpp Wed Mar 31 16:51:18 2010 -0700
+++ b/hotspot/src/share/vm/gc_implementation/g1/satbQueue.hpp Fri Apr 02 17:04:09 2010 -0700
@@ -29,8 +29,7 @@
class ObjPtrQueue: public PtrQueue {
public:
ObjPtrQueue(PtrQueueSet* qset_, bool perm = false) :
- PtrQueue(qset_, perm)
- {}
+ PtrQueue(qset_, perm, qset_->is_active()) { }
// Apply the closure to all elements, and reset the index to make the
// buffer empty.
void apply_closure(ObjectClosure* cl);
@@ -55,6 +54,9 @@
// is ignored.
bool apply_closure_to_completed_buffer_work(bool par, int worker);
+#ifdef ASSERT
+ void dump_active_values(JavaThread* first, bool expected_active);
+#endif // ASSERT
public:
SATBMarkQueueSet();
@@ -65,9 +67,11 @@
static void handle_zero_index_for_thread(JavaThread* t);
- // Apply "set_active(b)" to all thread tloq's. Should be called only
- // with the world stopped.
- void set_active_all_threads(bool b);
+ // Apply "set_active(b)" to all Java threads' SATB queues. It should be
+ // called only with the world stopped. The method will assert that the
+ // SATB queues of all threads it visits, as well as the SATB queue
+ // set itself, has an active value same as expected_active.
+ void set_active_all_threads(bool b, bool expected_active);
// Register "blk" as "the closure" for all queues. Only one such closure
// is allowed. The "apply_closure_to_completed_buffer" method will apply
--- a/jaxp/.hgtags Wed Mar 31 16:51:18 2010 -0700
+++ b/jaxp/.hgtags Fri Apr 02 17:04:09 2010 -0700
@@ -60,3 +60,5 @@
309a0a7fc6ceb1c9fc3a85b3608e97ef8f7b0dfd jdk7-b83
32c0cf01d555747918529a6ff9e06b0090c7a474 jdk7-b84
6c0ccabb430dacdcd4479f8b197980d5da4eeb66 jdk7-b85
+81c0f115bbe5d3bcf59864465b5eca5538567c79 jdk7-b86
+8b493f1aa136d86de0885fcba15262c4fa2b1412 jdk7-b87
--- a/jaxws/.hgtags Wed Mar 31 16:51:18 2010 -0700
+++ b/jaxws/.hgtags Fri Apr 02 17:04:09 2010 -0700
@@ -60,3 +60,5 @@
371e3ded591d09112a9f231e37cb072781c486ac jdk7-b83
8bc02839eee4ef02cd1b50e87638874368a26535 jdk7-b84
8424512588ff95362c1f1e5f11c6efd4e7f7db6e jdk7-b85
+512b0e924a5ae0c0b7ad326182cae0dc0e4d1aa8 jdk7-b86
+3febd6fab2ac8ffddbaf7bed00d11290262af153 jdk7-b87
--- a/jdk/.hgtags Wed Mar 31 16:51:18 2010 -0700
+++ b/jdk/.hgtags Fri Apr 02 17:04:09 2010 -0700
@@ -60,3 +60,5 @@
9027c6b9d7e2c9ca04a1add691b5b50d0f22b1aa jdk7-b83
7cb9388bb1a16365fa5118c5efa38b1cd58be40d jdk7-b84
b396584a3e64988839cca21ea1f7fbdcc9248783 jdk7-b85
+eae6e9ab26064d9ba0e7665dd646a1fd2506fcc1 jdk7-b86
+2cafbbe9825e911a6ca6c17d9a18eb1f0bf0873c jdk7-b87
--- a/langtools/.hgtags Wed Mar 31 16:51:18 2010 -0700
+++ b/langtools/.hgtags Fri Apr 02 17:04:09 2010 -0700
@@ -60,3 +60,5 @@
c9f4ae1f1480e89aaf7e72173184089d9cea397a jdk7-b83
d9cd5b8286e44f3baf90da290cd295433e21c05a jdk7-b84
136bfc67946219fb02ee223984540a4a9c5b209f jdk7-b85
+ef07347428f2198ae6b8144ac0b9086bbe39fd16 jdk7-b86
+409db93d19c002333980df5b797c6b965150c7a0 jdk7-b87