mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-26 22:34:27 +02:00
8178351: Simplify MetaspaceShared::is_in_shared_space and MetaspaceObj::is_shared
Use a single range check with MetaspaceObj::_shared_metaspace_{base,top} Reviewed-by: jiangli, redestad, shade
This commit is contained in:
parent
dcb4e73a38
commit
a3cb6e9204
15 changed files with 93 additions and 90 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2018, 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
|
||||
|
@ -2180,7 +2180,7 @@ bool Method::is_valid_method() const {
|
|||
} else if ((intptr_t(this) & (wordSize-1)) != 0) {
|
||||
// Quick sanity check on pointer.
|
||||
return false;
|
||||
} else if (MetaspaceShared::is_in_shared_space(this)) {
|
||||
} else if (is_shared()) {
|
||||
return MetaspaceShared::is_valid_shared_method(this);
|
||||
} else if (Metaspace::contains_non_shared(this)) {
|
||||
return has_method_vptr((const void*)this);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue