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:
Coleen Phillimore 2012-11-28 17:50:21 -05:00
parent 696ef20cb4
commit 6538c5134b
14 changed files with 60 additions and 80 deletions

View file

@ -169,7 +169,8 @@ class Method : public Metadata {
ConstMethod::MethodType method_type,
TRAPS);
Method() { assert(DumpSharedSpaces || UseSharedSpaces, "only for CDS"); }
// CDS and vtbl checking can create an empty Method to get vtbl pointer.
Method(){}
// The Method vtable is restored by this call when the Method is in the
// shared archive. See patch_klass_vtables() in metaspaceShared.cpp for
@ -812,6 +813,9 @@ class Method : public Metadata {
const char* internal_name() const { return "{method}"; }
// Check for valid method pointer
bool is_valid_method() const;
// Verify
void verify() { verify_on(tty); }
void verify_on(outputStream* st);