mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 23:04:50 +02:00
8003635: NPG: AsynchGetCallTrace broken by Method* virtual call
Make metaspace::contains be lock free and used to see if something is in metaspace, also compare Method* with vtbl pointer. Reviewed-by: dholmes, sspitsyn, dcubed, jmasa
This commit is contained in:
parent
696ef20cb4
commit
6538c5134b
14 changed files with 60 additions and 80 deletions
|
@ -66,10 +66,17 @@ bool MetaspaceObj::is_shared() const {
|
|||
}
|
||||
|
||||
bool MetaspaceObj::is_metadata() const {
|
||||
// ClassLoaderDataGraph::contains((address)this); has lock inversion problems
|
||||
// GC Verify checks use this in guarantees.
|
||||
// TODO: either replace them with is_metaspace_object() or remove them.
|
||||
// is_metaspace_object() is slower than this test. This test doesn't
|
||||
// seem very useful for metaspace objects anymore though.
|
||||
return !Universe::heap()->is_in_reserved(this);
|
||||
}
|
||||
|
||||
bool MetaspaceObj::is_metaspace_object() const {
|
||||
return Metaspace::contains((void*)this);
|
||||
}
|
||||
|
||||
void MetaspaceObj::print_address_on(outputStream* st) const {
|
||||
st->print(" {"INTPTR_FORMAT"}", this);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue