--- old/src/share/vm/oops/constantPool.hpp 2017-06-29 15:57:41.904596067 -0700 +++ new/src/share/vm/oops/constantPool.hpp 2017-06-29 15:57:41.720588993 -0700 @@ -211,6 +211,9 @@ ConstantPoolCache* cache() const { return _cache; } void set_cache(ConstantPoolCache* cache){ _cache = cache; } + virtual void metaspace_pointers_do(MetaspaceClosure* iter); + virtual MetaspaceObj::Type type() const { return ConstantPoolType; } + // Create object cache in the constant pool void initialize_resolved_references(ClassLoaderData* loader_data, const intStack& reference_map, @@ -764,6 +767,9 @@ void collect_statistics(KlassSizeStats *sz) const; #endif + // ConstantPools should be stored in the read-only region of CDS archive. + static bool is_read_only_by_default() { return true; } + friend class ClassFileParser; friend class SystemDictionary;