mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 14:54:52 +02:00
8043070: nmethod::verify_interrupt_point() shouldn't enter safepoint
Introduce not_installed state for nmethods Reviewed-by: dlong
This commit is contained in:
parent
61a6cba43c
commit
2811fa2e82
8 changed files with 24 additions and 17 deletions
|
@ -386,7 +386,7 @@ const char* nmethod::compile_kind() const {
|
|||
|
||||
// Fill in default values for various flag fields
|
||||
void nmethod::init_defaults() {
|
||||
_state = in_use;
|
||||
_state = not_installed;
|
||||
_has_flushed_dependencies = 0;
|
||||
_lock_count = 0;
|
||||
_stack_traversal_mark = 0;
|
||||
|
@ -445,6 +445,7 @@ nmethod* nmethod::new_native_nmethod(const methodHandle& method,
|
|||
nm->log_new_nmethod();
|
||||
}
|
||||
|
||||
nm->make_in_use();
|
||||
return nm;
|
||||
}
|
||||
|
||||
|
@ -1129,7 +1130,7 @@ void nmethod::log_state_change() const {
|
|||
/**
|
||||
* Common functionality for both make_not_entrant and make_zombie
|
||||
*/
|
||||
bool nmethod::make_not_entrant_or_zombie(unsigned int state) {
|
||||
bool nmethod::make_not_entrant_or_zombie(int state) {
|
||||
assert(state == zombie || state == not_entrant, "must be zombie or not_entrant");
|
||||
assert(!is_zombie(), "should not already be a zombie");
|
||||
|
||||
|
@ -2097,9 +2098,7 @@ void nmethod::verify() {
|
|||
|
||||
void nmethod::verify_interrupt_point(address call_site) {
|
||||
// Verify IC only when nmethod installation is finished.
|
||||
bool is_installed = (method()->code() == this) // nmethod is in state 'in_use' and installed
|
||||
|| !this->is_in_use(); // nmethod is installed, but not in 'in_use' state
|
||||
if (is_installed) {
|
||||
if (!is_not_installed()) {
|
||||
Thread *cur = Thread::current();
|
||||
if (CompiledIC_lock->owner() == cur ||
|
||||
((cur->is_VM_thread() || cur->is_ConcurrentGC_thread()) &&
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue