# HG changeset patch # User dpochepk # Date 1472753527 -10800 # Node ID 7eecf643e9f3ef0495f63ff11ae3c0301cf1e014 # Parent c72f3248ea0c1299720d7f67902ad98a1a44558d 8157956: OverflowCodeCacheTest.java fails with Out of space in CodeCache for method handle intrinsic Reviewed-by: kvn diff -r c72f3248ea0c -r 7eecf643e9f3 hotspot/test/compiler/codecache/OverflowCodeCacheTest.java --- a/hotspot/test/compiler/codecache/OverflowCodeCacheTest.java Wed Aug 31 12:10:40 2016 -0700 +++ b/hotspot/test/compiler/codecache/OverflowCodeCacheTest.java Thu Sep 01 21:12:07 2016 +0300 @@ -75,6 +75,7 @@ System.out.printf("type %s%n", type); System.out.println("allocating till possible..."); ArrayList blobs = new ArrayList<>(); + int compilationActivityMode = -1; try { long addr; int size = (int) (getHeapSize() >> 7); @@ -88,13 +89,16 @@ type + " doesn't allow using " + actualType + " when overflow"); } } - Asserts.assertNotEquals(WHITE_BOX.getCompilationActivityMode(), 1 /* run_compilation*/, - "Compilation must be disabled when CodeCache(CodeHeap) overflows"); + /* now, remember compilationActivityMode to check it later, after freeing, since we + possibly have no free cache for futher work */ + compilationActivityMode = WHITE_BOX.getCompilationActivityMode(); } finally { for (Long blob : blobs) { WHITE_BOX.freeCodeBlob(blob); } } + Asserts.assertNotEquals(compilationActivityMode, 1 /* run_compilation*/, + "Compilation must be disabled when CodeCache(CodeHeap) overflows"); } private long getHeapSize() {