comparison src/share/vm/interpreter/rewriter.cpp @ 8712:3efdfd6ddbf2

8003553: NPG: metaspace objects should be zeroed in constructors Summary: Zero metadata in constructors, not in allocation (and some in constructors) Reviewed-by: jmasa, sspitsyn
author coleenp
date Fri, 08 Mar 2013 11:47:57 -0500
parents f16e75e0cf11
children b9a918201d47 41cb10cbfb3c
comparison
equal deleted inserted replaced
8711:6b803ba47588 8712:3efdfd6ddbf2
82 // Creates a constant pool cache given a CPC map 82 // Creates a constant pool cache given a CPC map
83 void Rewriter::make_constant_pool_cache(TRAPS) { 83 void Rewriter::make_constant_pool_cache(TRAPS) {
84 const int length = _cp_cache_map.length(); 84 const int length = _cp_cache_map.length();
85 ClassLoaderData* loader_data = _pool->pool_holder()->class_loader_data(); 85 ClassLoaderData* loader_data = _pool->pool_holder()->class_loader_data();
86 ConstantPoolCache* cache = 86 ConstantPoolCache* cache =
87 ConstantPoolCache::allocate(loader_data, length, CHECK); 87 ConstantPoolCache::allocate(loader_data, length, _cp_cache_map,
88 _invokedynamic_references_map, CHECK);
88 89
89 // initialize object cache in constant pool 90 // initialize object cache in constant pool
90 _pool->initialize_resolved_references(loader_data, _resolved_references_map, 91 _pool->initialize_resolved_references(loader_data, _resolved_references_map,
91 _resolved_reference_limit, 92 _resolved_reference_limit,
92 CHECK); 93 CHECK);
93
94 No_Safepoint_Verifier nsv;
95 cache->initialize(_cp_cache_map, _invokedynamic_references_map);
96 _pool->set_cache(cache); 94 _pool->set_cache(cache);
97 cache->set_constant_pool(_pool()); 95 cache->set_constant_pool(_pool());
98 } 96 }
99 97
100 98