hotspot/test/compiler/codecache/jmx/InitialAndMaxUsageTest.java
changeset 38133 78b95467b9f1
parent 36851 03e2f4d0a421
child 40059 c2304140ed64
equal deleted inserted replaced
38132:ba888a4f352a 38133:78b95467b9f1
     1 /*
     1 /*
     2  * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
    82                 "Initial usage is close to total size for " + bean.getName());
    82                 "Initial usage is close to total size for " + bean.getName());
    83         if (lowerBoundIsZero) {
    83         if (lowerBoundIsZero) {
    84             Asserts.assertEQ(initialUsage, 0L, "Unexpected initial usage");
    84             Asserts.assertEQ(initialUsage, 0L, "Unexpected initial usage");
    85         }
    85         }
    86         ArrayList<Long> blobs = new ArrayList<>();
    86         ArrayList<Long> blobs = new ArrayList<>();
    87         long minAllocationUnit = CodeCacheUtils.MIN_ALLOCATION - headerSize;
    87         long minAllocationUnit = Math.max(0, CodeCacheUtils.MIN_ALLOCATION - headerSize);
    88         /* now filling code cache with large-sized allocation first, since
    88         /* now filling code cache with large-sized allocation first, since
    89          lots of small allocations takes too much time, so, just a small
    89          lots of small allocations takes too much time, so, just a small
    90          optimization */
    90          optimization */
    91         try {
    91         try {
    92             for (int coef = 1000000; coef > 0; coef /= 10) {
    92             for (int coef = 1000000; coef > 0; coef /= 10) {