Mercurial > hg > release > heapstats-1.0
changeset 51:a4398da82c5b
Bug 2366: Change the calculation of g1StartAddr to create the bitmap for G1GC
reviewed-by: yasuenag
author | KUBOTA Yuji <kubota.yuji@lab.ntt.co.jp> |
---|---|
date | Mon, 18 May 2015 00:47:53 +0900 |
parents | 6fee1594fa18 |
children | 6075e5707a9b |
files | agent/ChangeLog agent/src/oopUtil.cpp |
diffstat | 2 files changed, 13 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/agent/ChangeLog Mon May 18 00:45:30 2015 +0900 +++ b/agent/ChangeLog Mon May 18 00:47:53 2015 +0900 @@ -1,3 +1,7 @@ +2015-05-18 KUBOTA Yuji <kubota.yuji@lab.ntt.co.jp> + + * Bug 2366: Change the calculation of g1StartAddr to create the bitmap for G1GC + 2015-05-18 KUBOTA Yuji <kubota.yuji@lab.ntt.co.jp> * Bug 2365: Adapt to G1GC hook points of JDK-8049421
--- a/agent/src/oopUtil.cpp Mon May 18 00:45:30 2015 +0900 +++ b/agent/src/oopUtil.cpp Mon May 18 00:47:53 2015 +0900 @@ -2141,13 +2141,13 @@ */ bool setupForG1GC(size_t maxMemSize) { - off_t offsetG1Committed = -1; + off_t offsetReserved = -1; off_t offsetMemRegionStart = -1; TOffsetNameMap ofsMap[] = { - {"G1CollectedHeap", "_g1_committed", - &offsetG1Committed, NULL}, - {"MemRegion", "_start", - &offsetMemRegionStart, NULL}, + {"CollectedHeap", "_reserved", + &offsetReserved, NULL}, + {"MemRegion", "_start", + &offsetMemRegionStart, NULL}, /* End flag. */ {NULL, NULL, NULL, NULL} }; @@ -2155,7 +2155,7 @@ vmScanner->GetDataFromVMStructs(ofsMap); /* If failure getting offset. */ - if (unlikely(offsetG1Committed == -1 || offsetMemRegionStart == -1 + if (unlikely(offsetReserved == -1 || offsetMemRegionStart == -1 || collectedHeap == NULL)) { PRINT_WARN_MSG("Failure getting information form JVM." @@ -2164,9 +2164,9 @@ } /* Calculate about G1GC memory information. */ - void *g1Committed = *(void**)incAddress(collectedHeap, offsetG1Committed); - void *g1StartAddr = incAddress(g1Committed, offsetMemRegionStart); - if (unlikely(g1Committed == NULL || g1StartAddr == NULL)) { + void *reservedRegion = *(void**)incAddress(collectedHeap, offsetReserved); + void *g1StartAddr = incAddress(reservedRegion, offsetMemRegionStart); + if (unlikely(reservedRegion == NULL || g1StartAddr == NULL)) { PRINT_WARN_MSG("Failure getting information form JVM." " info:G1 from:calculate");