# HG changeset patch # User phh # Date 1324359531 28800 # Node ID 4502fd5c769820400d54238b193c8a84d88353b1 # Parent 6c995c08526c5f9f448239dd013c427deeb82d7e# Parent 96ce4c27112f212c11d21e36bce9c353ce4f4f05 Merge diff -r 6c995c08526c -r 4502fd5c7698 .hgtags --- 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 diff -r 6c995c08526c -r 4502fd5c7698 make/hotspot_version --- 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 diff -r 6c995c08526c -r 4502fd5c7698 src/cpu/x86/vm/assembler_x86.cpp --- 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"); diff -r 6c995c08526c -r 4502fd5c7698 src/share/vm/gc_implementation/parallelScavenge/gcTaskManager.cpp --- 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; } diff -r 6c995c08526c -r 4502fd5c7698 src/share/vm/gc_implementation/parallelScavenge/gcTaskThread.cpp --- 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) {