- 
    Sub-task 
- 
    Resolution: Fixed
- 
     P4 P4
- 
    None
- 
        b12
                    Both static and dynamic archive dumping use MetaspaceClosure for copying MetaspaceObjs into an output buffer:
http://hg.openjdk.java.net/jdk/jdk/file/4d36e29a5410/src/hotspot/share/memory/metaspaceShared.cpp#l1351
http://hg.openjdk.java.net/jdk/jdk/file/4d36e29a5410/src/hotspot/share/memory/dynamicArchive.cpp#l168
There's a lot of duplication between the two variants. They should be consolidated.
http://hg.openjdk.java.net/jdk/jdk/file/4d36e29a5410/src/hotspot/share/memory/metaspaceShared.cpp#l1351
http://hg.openjdk.java.net/jdk/jdk/file/4d36e29a5410/src/hotspot/share/memory/dynamicArchive.cpp#l168
There's a lot of duplication between the two variants. They should be consolidated.
- duplicates
- 
                    JDK-8245597 Avoid using ClassLoaderDataGraph::loaded_classes_do during -Xshare:dump -           
- Closed
 
-         
- relates to
- 
                    JDK-8251557 Avoid dumping unused symbols/strings into the CDS archive -           
- Resolved
 
-         
- 
                    JDK-8250989 Consolidate buffer allocation code for CDS static/dynamic dumping -           
- Resolved
 
-