8189373: jmap -heap exited with error code

Add CMSHeap related bits to SA code

Reviewed-by: dholmes, jgeorge
This commit is contained in:
Roman Kennke 2017-10-19 20:48:31 -04:00
parent e4cf0cb437
commit 82fcfbfbc4
4 changed files with 46 additions and 1 deletions

View File

@ -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 @@ typedef PaddedEnd<ObjectMonitor> PaddedObjectMonitor;
\
declare_toplevel_type(CollectedHeap) \
declare_type(GenCollectedHeap, CollectedHeap) \
declare_type(CMSHeap, GenCollectedHeap) \
declare_toplevel_type(Generation) \
declare_type(DefNewGeneration, Generation) \
declare_type(CardGeneration, Generation) \

View File

@ -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;
}
}

View File

@ -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 @@ public class CollectedHeapName {
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");

View File

@ -27,6 +27,7 @@ package sun.jvm.hotspot.memory;
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 @@ public class Universe {
heapConstructor = new VirtualConstructor(db);
heapConstructor.addMapping("GenCollectedHeap", GenCollectedHeap.class);
heapConstructor.addMapping("CMSHeap", CMSHeap.class);
heapConstructor.addMapping("ParallelScavengeHeap", ParallelScavengeHeap.class);
heapConstructor.addMapping("G1CollectedHeap", G1CollectedHeap.class);