Thanks for making the changes, Aleksey. The changes look good.
Thanks,
Jini.
On 6/5/2018 9:16 PM, Aleksey Shipilev wrote:
Hi Jini,
Thanks for taking a look, see comments inline.
On 06/01/2018 10:13 AM, Jini George wrote:
==> share/classes/sun/jvm/hotspot/oops/ObjectHeap.java
444 liveRegions.add(eh.space());
We would need to add an object of type 'Address' to the liveRegions list,
instead of type
VirtualSpace. Not doing so results in exceptions of the following form from the
compare() method for
various clhsdb commands like 'jhisto':
Exception in thread "main" java.lang.ClassCastException:
jdk.hotspot.agent/sun.jvm.hotspot.memory.VirtualSpace cannot be cast to
jdk.hotspot.agent/sun.jvm.hotspot.debugger.Address
Oh, I see! Fixed:
http://hg.openjdk.java.net/jdk/sandbox/rev/d999bdb8173c
==> share/classes/sun/jvm/hotspot/oops/ObjectHeap.java
445 } else {
446 if (Assert.ASSERTS_ENABLED) {
447 Assert.that(false, "Expecting GenCollectedHeap, G1CollectedHeap,
" +
448 "or ParallelScavengeHeap, but got " +
449 heap.getClass().getName());
450 }
451 }
* Please add EpsilonGC also to the assertion statement.
I prefer to change it to non-GC-specific message as Per suggested:
http://hg.openjdk.java.net/jdk/sandbox/rev/5cd17d3d3f83
==> share/classes/sun/jvm/hotspot/tools/HeapSummary.java
The run() method would need to handle Epsilon GC here to avoid the Unknown
CollectedHeap type error
with jhsdb jmap --heap.
Right, implemented in both places, run() and detectGCAlgo():
http://hg.openjdk.java.net/jdk/sandbox/rev/b20a56352d78
==> share/classes/sun/jvm/hotspot/HSDB.java
In showThreadStackMemory(), we have:
1101 }
1102 } else if (collHeap instanceof
ParallelScavengeHeap) {
1103 ParallelScavengeHeap heap =
(ParallelScavengeHeap) collHeap;
1104 if (heap.youngGen().isIn(handle)) {
1105 anno = "PSYoungGen ";
1106 bad = false;
1107 } else if (heap.oldGen().isIn(handle)) {
1108 anno = "PSOldGen ";
1109 bad = false;
1110 }
1111 } else {
1112 // Optimistically assume the oop isn't bad
1113 anno = "[Unknown generation] ";
1114 bad = false;
1115 }
1116
We would need to add the case of collHeap being an instanceof EpsilonHeap too.
It would display
"Unknown generation" while viewing the stack memory for the Java threads
otherwise.
Right, fixed:
http://hg.openjdk.java.net/jdk/sandbox/rev/f26c4a196a15
==> It would be great if test/hotspot/jtreg/serviceability/sa/TestUniverse.java
is enhanced to add
the minimalistic test for EpsilonGC.
Right:
http://hg.openjdk.java.net/jdk/sandbox/rev/c559de946c7d
This still passes gc/epsilon and serviceability/sa tests.
-Aleksey