Mercurial > hg > graal-compiler
diff src/share/vm/utilities/globalDefinitions.hpp @ 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 | e4f764ddb06a |
children | 291ffc492eb6 203f64878aab |
line wrap: on
line diff
--- a/src/share/vm/utilities/globalDefinitions.hpp Wed Nov 28 08:43:26 2012 -0800 +++ b/src/share/vm/utilities/globalDefinitions.hpp Wed Nov 28 17:50:21 2012 -0500 @@ -1280,4 +1280,12 @@ #define ARRAY_SIZE(array) (sizeof(array)/sizeof((array)[0])) +// Dereference vptr +// All C++ compilers that we know of have the vtbl pointer in the first +// word. If there are exceptions, this function needs to be made compiler +// specific. +static inline void* dereference_vptr(void* addr) { + return *(void**)addr; +} + #endif // SHARE_VM_UTILITIES_GLOBALDEFINITIONS_HPP