提交 3373e467 编写于 作者: D dcubed

8004903: VMThread::execute() calls Thread::check_for_valid_safepoint_state() on concurrent VM ops

Summary: check_for_valid_safepoint_state() only applies to blocking VM ops
Reviewed-by: acorn, dholmes, dice, sspitsyn
Contributed-by: karen.kinnear@oracle.com
上级 01c35675
/* /*
* Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 1998, 2013, 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
...@@ -570,7 +570,11 @@ void VMThread::execute(VM_Operation* op) { ...@@ -570,7 +570,11 @@ void VMThread::execute(VM_Operation* op) {
if (!t->is_VM_thread()) { if (!t->is_VM_thread()) {
SkipGCALot sgcalot(t); // avoid re-entrant attempts to gc-a-lot SkipGCALot sgcalot(t); // avoid re-entrant attempts to gc-a-lot
// JavaThread or WatcherThread // JavaThread or WatcherThread
bool concurrent = op->evaluate_concurrently();
// only blocking VM operations need to verify the caller's safepoint state:
if (!concurrent) {
t->check_for_valid_safepoint_state(true); t->check_for_valid_safepoint_state(true);
}
// New request from Java thread, evaluate prologue // New request from Java thread, evaluate prologue
if (!op->doit_prologue()) { if (!op->doit_prologue()) {
...@@ -582,7 +586,6 @@ void VMThread::execute(VM_Operation* op) { ...@@ -582,7 +586,6 @@ void VMThread::execute(VM_Operation* op) {
// It does not make sense to execute the epilogue, if the VM operation object is getting // It does not make sense to execute the epilogue, if the VM operation object is getting
// deallocated by the VM thread. // deallocated by the VM thread.
bool concurrent = op->evaluate_concurrently();
bool execute_epilog = !op->is_cheap_allocated(); bool execute_epilog = !op->is_cheap_allocated();
assert(!concurrent || op->is_cheap_allocated(), "concurrent => cheap_allocated"); assert(!concurrent || op->is_cheap_allocated(), "concurrent => cheap_allocated");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册