Mercurial > hg > graal-jvmci-8
diff src/share/vm/memory/genCollectedHeap.cpp @ 20357:4bfc44ba0d19
8055098: WB API should be extended to provide information about size and age of object.
Summary: Extend the WhiteBox API to provide information about the size and age of objects. Further add a mechanism to trigger a young GC.
Reviewed-by: tschatzl, sjohanss
Contributed-by: Leonid Mesnik <leonid.mesnik@oracle.com>
author | tschatzl |
---|---|
date | Thu, 21 Aug 2014 16:44:41 +0200 |
parents | 3f2894c5052e |
children | 4d3a43351904 |
line wrap: on
line diff
--- a/src/share/vm/memory/genCollectedHeap.cpp Mon Aug 25 17:05:18 2014 -0400 +++ b/src/share/vm/memory/genCollectedHeap.cpp Thu Aug 21 16:44:41 2014 +0200 @@ -718,15 +718,18 @@ #else // INCLUDE_ALL_GCS ShouldNotReachHere(); #endif // INCLUDE_ALL_GCS + } else if (cause == GCCause::_wb_young_gc) { + // minor collection for WhiteBox API + collect(cause, 0); } else { #ifdef ASSERT - if (cause == GCCause::_scavenge_alot) { - // minor collection only - collect(cause, 0); - } else { - // Stop-the-world full collection - collect(cause, n_gens() - 1); - } + if (cause == GCCause::_scavenge_alot) { + // minor collection only + collect(cause, 0); + } else { + // Stop-the-world full collection + collect(cause, n_gens() - 1); + } #else // Stop-the-world full collection collect(cause, n_gens() - 1);