提交 e3a20f79 编写于 作者: P phh

Merge

...@@ -201,4 +201,7 @@ b92ca8e229d29004f840c67e620833d23a346761 jdk8-b13 ...@@ -201,4 +201,7 @@ b92ca8e229d29004f840c67e620833d23a346761 jdk8-b13
088d09a130ff02d8f5f05e92256baabe412f0439 jdk8-b14 088d09a130ff02d8f5f05e92256baabe412f0439 jdk8-b14
6c2a55d4902f202e1c2de1df17b7da083a2c31e8 hs23-b06 6c2a55d4902f202e1c2de1df17b7da083a2c31e8 hs23-b06
fde2a39ed7f39233b287fbc278f437aac06c275b jdk8-b15 fde2a39ed7f39233b287fbc278f437aac06c275b jdk8-b15
d1f29d4e0bc60e8bd7ae961f1306d8ab33290212 jdk8-b17
d1f29d4e0bc60e8bd7ae961f1306d8ab33290212 jdk8-b16
6de8c9ba5907e4c5ca05ac4b8d84a8e2cbd92399 hs23-b07 6de8c9ba5907e4c5ca05ac4b8d84a8e2cbd92399 hs23-b07
a2fef924d8e6f37dac2a887315e3502876cc8e24 hs23-b08
...@@ -35,7 +35,7 @@ HOTSPOT_VM_COPYRIGHT=Copyright 2011 ...@@ -35,7 +35,7 @@ HOTSPOT_VM_COPYRIGHT=Copyright 2011
HS_MAJOR_VER=23 HS_MAJOR_VER=23
HS_MINOR_VER=0 HS_MINOR_VER=0
HS_BUILD_NUMBER=08 HS_BUILD_NUMBER=09
JDK_MAJOR_VER=1 JDK_MAJOR_VER=1
JDK_MINOR_VER=8 JDK_MINOR_VER=8
......
...@@ -5968,7 +5968,9 @@ void MacroAssembler::call_VM_base(Register oop_result, ...@@ -5968,7 +5968,9 @@ void MacroAssembler::call_VM_base(Register oop_result,
assert(number_of_arguments >= 0 , "cannot have negative number of arguments"); assert(number_of_arguments >= 0 , "cannot have negative number of arguments");
LP64_ONLY(assert(java_thread == r15_thread, "unexpected register")); LP64_ONLY(assert(java_thread == r15_thread, "unexpected register"));
#ifdef ASSERT #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 #endif // ASSERT
assert(java_thread != oop_result , "cannot use the same register for java_thread & oop_result"); assert(java_thread != oop_result , "cannot use the same register for java_thread & oop_result");
......
/* /*
* 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -53,6 +53,9 @@ const char* GCTask::Kind::to_string(kind value) { ...@@ -53,6 +53,9 @@ const char* GCTask::Kind::to_string(kind value) {
case noop_task: case noop_task:
result = "noop task"; result = "noop task";
break; break;
case idle_task:
result = "idle task";
break;
} }
return result; return result;
}; };
...@@ -782,6 +785,12 @@ void GCTaskManager::note_release(uint which) { ...@@ -782,6 +785,12 @@ void GCTaskManager::note_release(uint which) {
void GCTaskManager::execute_and_wait(GCTaskQueue* list) { void GCTaskManager::execute_and_wait(GCTaskQueue* list) {
WaitForBarrierGCTask* fin = WaitForBarrierGCTask::create(); WaitForBarrierGCTask* fin = WaitForBarrierGCTask::create();
list->enqueue(fin); 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); add_list(list);
fin->wait_for(true /* reset */); fin->wait_for(true /* reset */);
// We have to release the barrier tasks! // We have to release the barrier tasks!
...@@ -833,11 +842,15 @@ void NoopGCTask::destruct() { ...@@ -833,11 +842,15 @@ void NoopGCTask::destruct() {
IdleGCTask* IdleGCTask::create() { IdleGCTask* IdleGCTask::create() {
IdleGCTask* result = new IdleGCTask(false); IdleGCTask* result = new IdleGCTask(false);
assert(UseDynamicNumberOfGCThreads,
"Should only be used with dynamic GC thread");
return result; return result;
} }
IdleGCTask* IdleGCTask::create_on_c_heap() { IdleGCTask* IdleGCTask::create_on_c_heap() {
IdleGCTask* result = new(ResourceObj::C_HEAP) IdleGCTask(true); IdleGCTask* result = new(ResourceObj::C_HEAP) IdleGCTask(true);
assert(UseDynamicNumberOfGCThreads,
"Should only be used with dynamic GC thread");
return result; return result;
} }
......
/* /*
* 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -129,6 +129,8 @@ void GCTaskThread::run() { ...@@ -129,6 +129,8 @@ void GCTaskThread::run() {
for (; /* break */; ) { for (; /* break */; ) {
// This will block until there is a task to be gotten. // This will block until there is a task to be gotten.
GCTask* task = manager()->get_task(which()); 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 // In case the update is costly
if (PrintGCTaskTimeStamps) { if (PrintGCTaskTimeStamps) {
timer.update(); timer.update();
...@@ -137,9 +139,13 @@ void GCTaskThread::run() { ...@@ -137,9 +139,13 @@ void GCTaskThread::run() {
jlong entry_time = timer.ticks(); jlong entry_time = timer.ticks();
char* name = task->name(); 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()); 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()); manager()->note_completion(which());
if (PrintGCTaskTimeStamps) { if (PrintGCTaskTimeStamps) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册