RFR: 8130681: Overlapping commits no longer break NMT.
harold seigel
harold.seigel at oracle.com
Mon Sep 21 20:30:58 UTC 2015
Hi Max,
The change looks good.
Thanks, Harold
On 9/17/2015 3:57 PM, Max Ockner wrote:
> Hello all,
>
> Please review this small(?) change to the way committed memory regions
> are tracked with NMT.
>
> Bug: https://bugs.openjdk.java.net/browse/JDK-8130681
> Webrev: http://cr.openjdk.java.net/~mockner/8130681/
>
> Summary:
>
> Previously it was possible to commit a region which overlapped in
> other regions in a way that was not tracked. If a committed region
> overlapped with, but was not equal or adjacent to an existing
> committed region, an assert would fire. This is what we saw in the
> kitchensink failure. Instead of throwing an error, we would rather
> simply track whatever memory operations occur. If something illegal
> happens, we can assume it will be caught in the system directly in
> charge of memory transactions. We can't expect to catch bad memory
> transactions in NMT, because NMT is not always on.
>
> In this fix, the assert has been replaced with code that ensures the
> target region gets recorded as committed. The region is first
> uncommitted, which uncommits any region which is completely contained
> in the target region, and truncates any region which partially
> overlaps the target region.
> Then the region is added to the linked list of committed memory regions.
>
> Testing:
> rbt with
> platforms: linux-x64,windows-x64
> testlists: noncolo.testlist -atk quick
> hotspot/test/:hotspot_jprt,
> jdk/test/:jdk_lang
> args: -XX:NativeMemoryTracking=detail
>
> A new test has been added for the scenario where two disconnected
> memory regions are committed and a third region, partially overlapping
> each of the other two regions, is committed. The test verifies that
> the total amount of committed memory is correct at each step.
>
> Thanks,
> Max
>
More information about the hotspot-runtime-dev
mailing list