src/share/vm/runtime/vmStructs.cpp

changeset 4290
7c15faa95ce7
parent 4267
bd7a7ce2e264
child 4301
c24f778e9401
     1.1 --- a/src/share/vm/runtime/vmStructs.cpp	Wed Nov 21 21:26:12 2012 -0500
     1.2 +++ b/src/share/vm/runtime/vmStructs.cpp	Tue Nov 27 07:57:57 2012 -0800
     1.3 @@ -2107,8 +2107,7 @@
     1.4    declare_toplevel_type(FreeList<Metablock>*)                             \
     1.5    declare_toplevel_type(FreeList<Metablock>)                              \
     1.6    declare_toplevel_type(MetablockTreeDictionary*)                         \
     1.7 -  declare_type(MetablockTreeDictionary, FreeBlockDictionary<Metablock>)   \
     1.8 -              declare_type(MetablockTreeDictionary, FreeBlockDictionary<Metablock>)
     1.9 +           declare_type(MetablockTreeDictionary, FreeBlockDictionary<Metablock>)
    1.10  
    1.11  
    1.12    /* NOTE that we do not use the last_entry() macro here; it is used  */
    1.13 @@ -3215,3 +3214,17 @@
    1.14  void vmStructs_init() {
    1.15    debug_only(VMStructs::init());
    1.16  }
    1.17 +
    1.18 +#ifndef PRODUCT
    1.19 +void VMStructs::test() {
    1.20 +  // Check for duplicate entries in type array
    1.21 +  for (int i = 0; localHotSpotVMTypes[i].typeName != NULL; i++) {
    1.22 +    for (int j = i + 1; localHotSpotVMTypes[j].typeName != NULL; j++) {
    1.23 +      if (strcmp(localHotSpotVMTypes[i].typeName, localHotSpotVMTypes[j].typeName) == 0) {
    1.24 +        tty->print_cr("Duplicate entries for '%s'", localHotSpotVMTypes[i].typeName);
    1.25 +        assert(false, "Duplicate types in localHotSpotVMTypes array");
    1.26 +      }
    1.27 +    }
    1.28 +  }
    1.29 +}
    1.30 +#endif

mercurial