comparison src/share/vm/runtime/vmStructs.cpp @ 7171:7c15faa95ce7

8003879: Duplicate definitions in vmStructs Summary: Removed duplicate entries Reviewed-by: dholmes, sspitsyn
author mikael
date Tue, 27 Nov 2012 07:57:57 -0800
parents bd7a7ce2e264
children c24f778e9401
comparison
equal deleted inserted replaced
7170:ca1be5fbe6ff 7171:7c15faa95ce7
2105 declare_toplevel_type(FreeList<FreeChunk>) \ 2105 declare_toplevel_type(FreeList<FreeChunk>) \
2106 declare_toplevel_type(FreeBlockDictionary<Metablock>*) \ 2106 declare_toplevel_type(FreeBlockDictionary<Metablock>*) \
2107 declare_toplevel_type(FreeList<Metablock>*) \ 2107 declare_toplevel_type(FreeList<Metablock>*) \
2108 declare_toplevel_type(FreeList<Metablock>) \ 2108 declare_toplevel_type(FreeList<Metablock>) \
2109 declare_toplevel_type(MetablockTreeDictionary*) \ 2109 declare_toplevel_type(MetablockTreeDictionary*) \
2110 declare_type(MetablockTreeDictionary, FreeBlockDictionary<Metablock>) \ 2110 declare_type(MetablockTreeDictionary, FreeBlockDictionary<Metablock>)
2111 declare_type(MetablockTreeDictionary, FreeBlockDictionary<Metablock>)
2112 2111
2113 2112
2114 /* NOTE that we do not use the last_entry() macro here; it is used */ 2113 /* NOTE that we do not use the last_entry() macro here; it is used */
2115 /* in vmStructs_<os>_<cpu>.hpp's VM_TYPES_OS_CPU macro (and must be */ 2114 /* in vmStructs_<os>_<cpu>.hpp's VM_TYPES_OS_CPU macro (and must be */
2116 /* present there) */ 2115 /* present there) */
3213 #endif 3212 #endif
3214 3213
3215 void vmStructs_init() { 3214 void vmStructs_init() {
3216 debug_only(VMStructs::init()); 3215 debug_only(VMStructs::init());
3217 } 3216 }
3217
3218 #ifndef PRODUCT
3219 void VMStructs::test() {
3220 // Check for duplicate entries in type array
3221 for (int i = 0; localHotSpotVMTypes[i].typeName != NULL; i++) {
3222 for (int j = i + 1; localHotSpotVMTypes[j].typeName != NULL; j++) {
3223 if (strcmp(localHotSpotVMTypes[i].typeName, localHotSpotVMTypes[j].typeName) == 0) {
3224 tty->print_cr("Duplicate entries for '%s'", localHotSpotVMTypes[i].typeName);
3225 assert(false, "Duplicate types in localHotSpotVMTypes array");
3226 }
3227 }
3228 }
3229 }
3230 #endif