mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-19 18:44:38 +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
|
@ -425,14 +425,10 @@ void Universe::genesis(TRAPS) {
|
|||
// from MetaspaceObj, because the latter does not have virtual functions.
|
||||
// If the metadata type has a vtable, it cannot be shared in the read-only
|
||||
// section of the CDS archive, because the vtable pointer is patched.
|
||||
static inline void* dereference(void* addr) {
|
||||
return *(void**)addr;
|
||||
}
|
||||
|
||||
static inline void add_vtable(void** list, int* n, void* o, int count) {
|
||||
guarantee((*n) < count, "vtable list too small");
|
||||
void* vtable = dereference(o);
|
||||
assert(dereference(vtable) != NULL, "invalid vtable");
|
||||
void* vtable = dereference_vptr(o);
|
||||
assert(*(void**)(vtable) != NULL, "invalid vtable");
|
||||
list[(*n)++] = vtable;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue