Projects
openEuler:24.03:SP1:Everything
openjdk-1.8.0
_service:tar_scm:optimize-jmap-F-dump-xxx.patch
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:tar_scm:optimize-jmap-F-dump-xxx.patch of Package openjdk-1.8.0
From 675360f4912dad7eeeac4b6a05b782dca234c008 Mon Sep 17 00:00:00 2001 Date: Fri, 22 Jan 2021 16:16:57 +0800 Subject: optimize jmap -F -dump:xxx Summary: optimize jmap -F -dump:xxx to speed up the dump process LLT: N/A Bug url: N/A --- .../share/classes/sun/jvm/hotspot/oops/Metadata.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/Metadata.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/Metadata.java index 4fc2ed8c6..2e56d2708 100644 --- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/Metadata.java +++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/Metadata.java @@ -45,6 +45,7 @@ abstract public class Metadata extends VMObject { } private static VirtualBaseConstructor<Metadata> metadataConstructor; + private static Map map = new HashMap(); private static synchronized void initialize(TypeDataBase db) throws WrongTypeException { metadataConstructor = new VirtualBaseConstructor<Metadata>(db, db.lookupType("Metadata"), null, null); @@ -65,7 +66,14 @@ abstract public class Metadata extends VMObject { } public static Metadata instantiateWrapperFor(Address addr) { - return metadataConstructor.instantiateWrapperFor(addr); + Metadata metadata; + if (!map.containsKey(addr)) { + metadata = metadataConstructor.instantiateWrapperFor(addr); + map.put(addr, metadata); + } else { + metadata = (Metadata)map.get(addr); + } + return metadata; } public void iterate(MetadataVisitor visitor) { -- 2.19.0
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2