Skip to content
Permalink
Browse files
8252196: ZGC: TestUncommit.java fails due to "Exception: Uncommitted …
…too fast" again(2)

Reviewed-by: stefank, eosterlund
  • Loading branch information
pliden committed Sep 17, 2020
1 parent a9993f9 commit f972155d63a521a2655a4cd5cfff6af97ec6a97c
Showing with 2 additions and 2 deletions.
  1. +2 −2 test/hotspot/jtreg/gc/z/TestUncommit.java
@@ -68,12 +68,12 @@ private static void reclaim() {

private static void test(int objectSize) throws Exception {
final var beforeAlloc = capacity();
final var timeBeforeAlloc = System.nanoTime();

// Allocate memory
log("Allocating");
allocate(objectSize);

final var timeAfterAlloc = System.nanoTime();
final var afterAlloc = capacity();

// Reclaim memory
@@ -87,7 +87,7 @@ private static void test(int objectSize) throws Exception {

log("Uncommit started");
final var timeUncommitStart = System.nanoTime();
final var actualDelay = (timeUncommitStart - timeAfterAlloc) / 1_000_000;
final var actualDelay = (timeUncommitStart - timeBeforeAlloc) / 1_000_000;

log("Waiting for uncommit to complete");
while (capacity() > beforeAlloc) {

1 comment on commit f972155

@bridgekeeper

This comment has been minimized.

Copy link

@bridgekeeper bridgekeeper bot commented on f972155 Sep 17, 2020

Please sign in to comment.