comparison src/share/vm/utilities/globalDefinitions.hpp @ 3860: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 203f64878aab
comparison
equal deleted inserted replaced
38:11b1dbe27aba 39:02836b330341
1278 #endif /* COMPILER2 */ 1278 #endif /* COMPILER2 */
1279 # endif /* ASSERT */ 1279 # endif /* ASSERT */
1280 1280
1281 #define ARRAY_SIZE(array) (sizeof(array)/sizeof((array)[0])) 1281 #define ARRAY_SIZE(array) (sizeof(array)/sizeof((array)[0]))
1282 1282
1283 // Dereference vptr
1284 // All C++ compilers that we know of have the vtbl pointer in the first
1285 // word. If there are exceptions, this function needs to be made compiler
1286 // specific.
1287 static inline void* dereference_vptr(void* addr) {
1288 return *(void**)addr;
1289 }
1290
1283 #endif // SHARE_VM_UTILITIES_GLOBALDEFINITIONS_HPP 1291 #endif // SHARE_VM_UTILITIES_GLOBALDEFINITIONS_HPP