mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-21 03:24:38 +02:00
6797870: Add -XX:+{HeapDump,PrintClassHistogram}{Before,After}FullGC
Call newly created CollectedHeap::dump_{pre,post}_full_gc before and after every stop-world full collection cycle on GenCollectedHeap and ParallelScavengeHeap. (Support for G1CollectedHeap forthcoming under CR 6810861.) Small modifications to existing heap dumping and class histogram implementation, especially to allow multiple on-the-fly histos/dumps by the VM thread during a single safepoint. Reviewed-by: jmasa, alanb, mchung
This commit is contained in:
parent
dd4aaeadd4
commit
72bfacbd95
15 changed files with 170 additions and 62 deletions
|
@ -662,6 +662,12 @@ class CommandLineFlags {
|
|||
product(ccstrlist, OnOutOfMemoryError, "", \
|
||||
"Run user-defined commands on first java.lang.OutOfMemoryError") \
|
||||
\
|
||||
manageable(bool, HeapDumpBeforeFullGC, false, \
|
||||
"Dump heap to file before any major stop-world GC") \
|
||||
\
|
||||
manageable(bool, HeapDumpAfterFullGC, false, \
|
||||
"Dump heap to file after any major stop-world GC") \
|
||||
\
|
||||
manageable(bool, HeapDumpOnOutOfMemoryError, false, \
|
||||
"Dump heap to file when java.lang.OutOfMemoryError is thrown") \
|
||||
\
|
||||
|
@ -1971,6 +1977,12 @@ class CommandLineFlags {
|
|||
product(bool, PrintHeapAtSIGBREAK, true, \
|
||||
"Print heap layout in response to SIGBREAK") \
|
||||
\
|
||||
manageable(bool, PrintClassHistogramBeforeFullGC, false, \
|
||||
"Print a class histogram before any major stop-world GC") \
|
||||
\
|
||||
manageable(bool, PrintClassHistogramAfterFullGC, false, \
|
||||
"Print a class histogram after any major stop-world GC") \
|
||||
\
|
||||
manageable(bool, PrintClassHistogram, false, \
|
||||
"Print a histogram of class instances") \
|
||||
\
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue