File tree Expand file tree Collapse file tree 3 files changed +182
-344
lines changed
src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/utilities Expand file tree Collapse file tree 3 files changed +182
-344
lines changed Original file line number Diff line number Diff line change @@ -59,7 +59,7 @@ public void prologue(long usedSize) {
5959
6060 public boolean doObj (Oop oop ) {
6161 try {
62- writeHeapRecordPrologue ();
62+ writeHeapRecordPrologue (calculateOopDumpRecordSize ( oop ) );
6363 if (oop instanceof TypeArray ) {
6464 writePrimitiveArray ((TypeArray )oop );
6565 } else if (oop instanceof ObjArray ) {
@@ -127,6 +127,8 @@ public void epilogue() {
127127 }
128128 }
129129
130+ abstract protected int calculateOopDumpRecordSize (Oop oop ) throws IOException ;
131+
130132 protected void writeJavaThreads () throws IOException {
131133 Threads threads = VM .getVM ().getThreads ();
132134 for (int i = 0 ; i < threads .getNumberOfThreads (); i ++) {
@@ -420,6 +422,9 @@ protected void writeHeapFooter() throws IOException {
420422 protected void writeHeapRecordPrologue () throws IOException {
421423 }
422424
425+ protected void writeHeapRecordPrologue (int size ) throws IOException {
426+ }
427+
423428 protected void writeHeapRecordEpilogue () throws IOException {
424429 }
425430
Original file line number Diff line number Diff line change @@ -275,6 +275,11 @@ protected void writeHeapFooter() throws IOException {
275275 out .println ("</gxl>" );
276276 }
277277
278+ @ Override
279+ protected int calculateOopDumpRecordSize (Oop oop ) throws IOException {
280+ return 0 ;
281+ }
282+
278283 //-- Internals only below this point
279284
280285 // Java identifier to XML NMTOKEN type string
You can’t perform that action at this time.
0 commit comments