changeset 2908:4502fd5c7698

Merge
author phh
date Mon, 19 Dec 2011 21:38:51 -0800
parents 6c995c08526c 96ce4c27112f
children 11c26bfcf8c7 c01e115b095e
files
diffstat 5 files changed, 29 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/.hgtags	Mon Dec 19 15:50:47 2011 -0500
+++ b/.hgtags	Mon Dec 19 21:38:51 2011 -0800
@@ -201,4 +201,7 @@
 088d09a130ff02d8f5f05e92256baabe412f0439 jdk8-b14
 6c2a55d4902f202e1c2de1df17b7da083a2c31e8 hs23-b06
 fde2a39ed7f39233b287fbc278f437aac06c275b jdk8-b15
+d1f29d4e0bc60e8bd7ae961f1306d8ab33290212 jdk8-b17
+d1f29d4e0bc60e8bd7ae961f1306d8ab33290212 jdk8-b16
 6de8c9ba5907e4c5ca05ac4b8d84a8e2cbd92399 hs23-b07
+a2fef924d8e6f37dac2a887315e3502876cc8e24 hs23-b08
--- a/make/hotspot_version	Mon Dec 19 15:50:47 2011 -0500
+++ b/make/hotspot_version	Mon Dec 19 21:38:51 2011 -0800
@@ -35,7 +35,7 @@
 
 HS_MAJOR_VER=23
 HS_MINOR_VER=0
-HS_BUILD_NUMBER=08
+HS_BUILD_NUMBER=09
 
 JDK_MAJOR_VER=1
 JDK_MINOR_VER=8
--- a/src/cpu/x86/vm/assembler_x86.cpp	Mon Dec 19 15:50:47 2011 -0500
+++ b/src/cpu/x86/vm/assembler_x86.cpp	Mon Dec 19 21:38:51 2011 -0800
@@ -5968,7 +5968,9 @@
   assert(number_of_arguments >= 0   , "cannot have negative number of arguments");
   LP64_ONLY(assert(java_thread == r15_thread, "unexpected register"));
 #ifdef ASSERT
-  LP64_ONLY(if (UseCompressedOops) verify_heapbase("call_VM_base");)
+  // TraceBytecodes does not use r12 but saves it over the call, so don't verify
+  // r12 is the heapbase.
+  LP64_ONLY(if (UseCompressedOops && !TraceBytecodes) verify_heapbase("call_VM_base");)
 #endif // ASSERT
 
   assert(java_thread != oop_result  , "cannot use the same register for java_thread & oop_result");
--- a/src/share/vm/gc_implementation/parallelScavenge/gcTaskManager.cpp	Mon Dec 19 15:50:47 2011 -0500
+++ b/src/share/vm/gc_implementation/parallelScavenge/gcTaskManager.cpp	Mon Dec 19 21:38:51 2011 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2011, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -53,6 +53,9 @@
   case noop_task:
     result = "noop task";
     break;
+  case idle_task:
+    result = "idle task";
+    break;
   }
   return result;
 };
@@ -782,6 +785,12 @@
 void GCTaskManager::execute_and_wait(GCTaskQueue* list) {
   WaitForBarrierGCTask* fin = WaitForBarrierGCTask::create();
   list->enqueue(fin);
+  // The barrier task will be read by one of the GC
+  // workers once it is added to the list of tasks.
+  // Be sure that is globally visible before the
+  // GC worker reads it (which is after the task is added
+  // to the list of tasks below).
+  OrderAccess::storestore();
   add_list(list);
   fin->wait_for(true /* reset */);
   // We have to release the barrier tasks!
@@ -833,11 +842,15 @@
 
 IdleGCTask* IdleGCTask::create() {
   IdleGCTask* result = new IdleGCTask(false);
+  assert(UseDynamicNumberOfGCThreads,
+    "Should only be used with dynamic GC thread");
   return result;
 }
 
 IdleGCTask* IdleGCTask::create_on_c_heap() {
   IdleGCTask* result = new(ResourceObj::C_HEAP) IdleGCTask(true);
+  assert(UseDynamicNumberOfGCThreads,
+    "Should only be used with dynamic GC thread");
   return result;
 }
 
--- a/src/share/vm/gc_implementation/parallelScavenge/gcTaskThread.cpp	Mon Dec 19 15:50:47 2011 -0500
+++ b/src/share/vm/gc_implementation/parallelScavenge/gcTaskThread.cpp	Mon Dec 19 21:38:51 2011 -0800
@@ -1,6 +1,6 @@
 
 /*
- * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2011, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -129,6 +129,8 @@
     for (; /* break */; ) {
       // This will block until there is a task to be gotten.
       GCTask* task = manager()->get_task(which());
+      // Record if this is an idle task for later use.
+      bool is_idle_task = task->is_idle_task();
       // In case the update is costly
       if (PrintGCTaskTimeStamps) {
         timer.update();
@@ -137,9 +139,13 @@
       jlong entry_time = timer.ticks();
       char* name = task->name();
 
+      // If this is the barrier task, it can be destroyed
+      // by the GC task manager once the do_it() executes.
       task->do_it(manager(), which());
 
-      if (!task->is_idle_task()) {
+      // Use the saved value of is_idle_task because references
+      // using "task" are not reliable for the barrier task.
+      if (!is_idle_task) {
         manager()->note_completion(which());
 
         if (PrintGCTaskTimeStamps) {