Mercurial > hg > truffle
comparison src/share/vm/memory/allocation.cpp @ 7176:59c790074993
8003635: NPG: AsynchGetCallTrace broken by Method* virtual call
Summary: 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
author | coleenp |
---|---|
date | Wed, 28 Nov 2012 17:50:21 -0500 |
parents | 716c64bda5ba |
children | 6f817ce50129 f75faf51e8c4 |
comparison
equal
deleted
inserted
replaced
7175:b51dc8df86e5 | 7176:59c790074993 |
---|---|
64 bool MetaspaceObj::is_shared() const { | 64 bool MetaspaceObj::is_shared() const { |
65 return MetaspaceShared::is_in_shared_space(this); | 65 return MetaspaceShared::is_in_shared_space(this); |
66 } | 66 } |
67 | 67 |
68 bool MetaspaceObj::is_metadata() const { | 68 bool MetaspaceObj::is_metadata() const { |
69 // ClassLoaderDataGraph::contains((address)this); has lock inversion problems | 69 // GC Verify checks use this in guarantees. |
70 // TODO: either replace them with is_metaspace_object() or remove them. | |
71 // is_metaspace_object() is slower than this test. This test doesn't | |
72 // seem very useful for metaspace objects anymore though. | |
70 return !Universe::heap()->is_in_reserved(this); | 73 return !Universe::heap()->is_in_reserved(this); |
74 } | |
75 | |
76 bool MetaspaceObj::is_metaspace_object() const { | |
77 return Metaspace::contains((void*)this); | |
71 } | 78 } |
72 | 79 |
73 void MetaspaceObj::print_address_on(outputStream* st) const { | 80 void MetaspaceObj::print_address_on(outputStream* st) const { |
74 st->print(" {"INTPTR_FORMAT"}", this); | 81 st->print(" {"INTPTR_FORMAT"}", this); |
75 } | 82 } |