< prev index next >
src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/HSDB.java
Print this page
@@ -1,7 +1,7 @@
/*
- * Copyright (c) 2000, 2016, 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
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
@@ -33,10 +33,11 @@
import sun.jvm.hotspot.code.*;
import sun.jvm.hotspot.compiler.*;
import sun.jvm.hotspot.debugger.*;
import sun.jvm.hotspot.gc.parallel.*;
import sun.jvm.hotspot.gc.shared.*;
+import sun.jvm.hotspot.gc.g1.*;
import sun.jvm.hotspot.interpreter.*;
import sun.jvm.hotspot.memory.*;
import sun.jvm.hotspot.oops.*;
import sun.jvm.hotspot.runtime.*;
import sun.jvm.hotspot.ui.*;
@@ -1076,10 +1077,30 @@
bad = false;
break;
}
}
+ } else if (collHeap instanceof G1CollectedHeap) {
+ G1CollectedHeap heap = (G1CollectedHeap)collHeap;
+ HeapRegion region = heap.hrm().addrToRegion(handle);
+
+ if (region.isFree()) {
+ anno = "Free ";
+ bad = false;
+ } else if (region.isYoung()) {
+ anno = "Young ";
+ bad = false;
+ } else if (region.isHumongous()) {
+ anno = "Humongous ";
+ bad = false;
+ } else if (region.isPinned()) {
+ anno = "Pinned ";
+ bad = false;
+ } else if (region.isOld()) {
+ anno = "Old ";
+ bad = false;
+ }
} else if (collHeap instanceof ParallelScavengeHeap) {
ParallelScavengeHeap heap = (ParallelScavengeHeap) collHeap;
if (heap.youngGen().isIn(handle)) {
anno = "PSYoungGen ";
bad = false;
< prev index next >