OpenJDK / jdk / jdk12
changeset 47663:3e78d37acdde
8189373: jmap -heap exited with error code
Summary: Add CMSHeap related bits to SA code
Reviewed-by: dholmes, jgeorge
author | rkennke |
---|---|
date | Thu, 19 Oct 2017 20:48:31 -0400 |
parents | 92bcf2ab0cb3 |
children | 3f1d3f8c8407 |
files | src/hotspot/share/runtime/vmStructs.cpp src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/gc/cms/CMSHeap.java src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/gc/shared/CollectedHeapName.java src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/memory/Universe.java |
diffstat | 4 files changed, 46 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/hotspot/share/runtime/vmStructs.cpp Thu Oct 19 11:31:52 2017 -0700 +++ b/src/hotspot/share/runtime/vmStructs.cpp Thu Oct 19 20:48:31 2017 -0400 @@ -48,6 +48,7 @@ #include "gc/parallel/mutableSpace.hpp" #include "gc/serial/defNewGeneration.hpp" #include "gc/serial/tenuredGeneration.hpp" +#include "gc/cms/cmsHeap.hpp" #include "gc/shared/cardTableRS.hpp" #include "gc/shared/collectedHeap.hpp" #include "gc/shared/genCollectedHeap.hpp" @@ -1463,6 +1464,7 @@ \ declare_toplevel_type(CollectedHeap) \ declare_type(GenCollectedHeap, CollectedHeap) \ + declare_type(CMSHeap, GenCollectedHeap) \ declare_toplevel_type(Generation) \ declare_type(DefNewGeneration, Generation) \ declare_type(CardGeneration, Generation) \
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/gc/cms/CMSHeap.java Thu Oct 19 20:48:31 2017 -0400 @@ -0,0 +1,40 @@ +/* + * Copyright (c) 2017, Red Hat, Inc. and/or its affiliates. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + * + */ + +package sun.jvm.hotspot.gc.cms; + +import sun.jvm.hotspot.debugger.Address; +import sun.jvm.hotspot.gc.shared.GenCollectedHeap; +import sun.jvm.hotspot.gc.shared.CollectedHeapName; + +public class CMSHeap extends GenCollectedHeap { + + public CMSHeap(Address addr) { + super(addr); + } + + public CollectedHeapName kind() { + return CollectedHeapName.CMS_HEAP; + } +}
--- a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/gc/shared/CollectedHeapName.java Thu Oct 19 11:31:52 2017 -0700 +++ b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/gc/shared/CollectedHeapName.java Thu Oct 19 20:48:31 2017 -0400 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -32,6 +32,7 @@ private CollectedHeapName(String name) { this.name = name; } public static final CollectedHeapName GEN_COLLECTED_HEAP = new CollectedHeapName("GenCollectedHeap"); + public static final CollectedHeapName CMS_HEAP = new CollectedHeapName("CMSHeap"); public static final CollectedHeapName G1_COLLECTED_HEAP = new CollectedHeapName("G1CollectedHeap"); public static final CollectedHeapName PARALLEL_SCAVENGE_HEAP = new CollectedHeapName("ParallelScavengeHeap");
--- a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/memory/Universe.java Thu Oct 19 11:31:52 2017 -0700 +++ b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/memory/Universe.java Thu Oct 19 20:48:31 2017 -0400 @@ -27,6 +27,7 @@ import java.io.*; import java.util.*; import sun.jvm.hotspot.debugger.*; +import sun.jvm.hotspot.gc.cms.CMSHeap; import sun.jvm.hotspot.gc.shared.*; import sun.jvm.hotspot.gc.g1.G1CollectedHeap; import sun.jvm.hotspot.gc.parallel.*; @@ -77,6 +78,7 @@ heapConstructor = new VirtualConstructor(db); heapConstructor.addMapping("GenCollectedHeap", GenCollectedHeap.class); + heapConstructor.addMapping("CMSHeap", CMSHeap.class); heapConstructor.addMapping("ParallelScavengeHeap", ParallelScavengeHeap.class); heapConstructor.addMapping("G1CollectedHeap", G1CollectedHeap.class);