hotspot/test/compiler/whitebox/AllocationCodeBlobTest.java
author iignatyev
Mon, 22 May 2017 15:27:20 -0700
changeset 45245 48fed68b35c1
parent 41705 332239c052cc
permissions -rw-r--r--
8180793: move jdk.test.lib.wrappers.* to jdk.test.lib package Reviewed-by: mchung
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
27642
8c9eff693145 8059624: Test task: WhiteBox API for testing segmented codecache feature
iignatyev
parents:
diff changeset
     1
/*
40631
ed82623d7831 8157957: ClassNotFoundException: jdk.test.lib.JDKToolFinder
ctornqvi
parents: 40059
diff changeset
     2
 * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
27642
8c9eff693145 8059624: Test task: WhiteBox API for testing segmented codecache feature
iignatyev
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
8c9eff693145 8059624: Test task: WhiteBox API for testing segmented codecache feature
iignatyev
parents:
diff changeset
     4
 *
8c9eff693145 8059624: Test task: WhiteBox API for testing segmented codecache feature
iignatyev
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
8c9eff693145 8059624: Test task: WhiteBox API for testing segmented codecache feature
iignatyev
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
8c9eff693145 8059624: Test task: WhiteBox API for testing segmented codecache feature
iignatyev
parents:
diff changeset
     7
 * published by the Free Software Foundation.
8c9eff693145 8059624: Test task: WhiteBox API for testing segmented codecache feature
iignatyev
parents:
diff changeset
     8
 *
8c9eff693145 8059624: Test task: WhiteBox API for testing segmented codecache feature
iignatyev
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
8c9eff693145 8059624: Test task: WhiteBox API for testing segmented codecache feature
iignatyev
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
8c9eff693145 8059624: Test task: WhiteBox API for testing segmented codecache feature
iignatyev
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
8c9eff693145 8059624: Test task: WhiteBox API for testing segmented codecache feature
iignatyev
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
8c9eff693145 8059624: Test task: WhiteBox API for testing segmented codecache feature
iignatyev
parents:
diff changeset
    13
 * accompanied this code).
8c9eff693145 8059624: Test task: WhiteBox API for testing segmented codecache feature
iignatyev
parents:
diff changeset
    14
 *
8c9eff693145 8059624: Test task: WhiteBox API for testing segmented codecache feature
iignatyev
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
8c9eff693145 8059624: Test task: WhiteBox API for testing segmented codecache feature
iignatyev
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
8c9eff693145 8059624: Test task: WhiteBox API for testing segmented codecache feature
iignatyev
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
8c9eff693145 8059624: Test task: WhiteBox API for testing segmented codecache feature
iignatyev
parents:
diff changeset
    18
 *
8c9eff693145 8059624: Test task: WhiteBox API for testing segmented codecache feature
iignatyev
parents:
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
8c9eff693145 8059624: Test task: WhiteBox API for testing segmented codecache feature
iignatyev
parents:
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
8c9eff693145 8059624: Test task: WhiteBox API for testing segmented codecache feature
iignatyev
parents:
diff changeset
    21
 * questions.
8c9eff693145 8059624: Test task: WhiteBox API for testing segmented codecache feature
iignatyev
parents:
diff changeset
    22
 */
8c9eff693145 8059624: Test task: WhiteBox API for testing segmented codecache feature
iignatyev
parents:
diff changeset
    23
8c9eff693145 8059624: Test task: WhiteBox API for testing segmented codecache feature
iignatyev
parents:
diff changeset
    24
/*
8c9eff693145 8059624: Test task: WhiteBox API for testing segmented codecache feature
iignatyev
parents:
diff changeset
    25
 * @test AllocationCodeBlobTest
40059
c2304140ed64 8132919: Put compiler tests in packages
tpivovarova
parents: 38152
diff changeset
    26
 * @summary testing of WB::allocate/freeCodeBlob()
27917
c5937f7b4e8b 8064669: compiler/whitebox/AllocationCodeBlobTest.java crashes / asserts
iignatyev
parents: 27642
diff changeset
    27
 * @bug 8059624 8064669
40631
ed82623d7831 8157957: ClassNotFoundException: jdk.test.lib.JDKToolFinder
ctornqvi
parents: 40059
diff changeset
    28
 * @library /test/lib /
38152
80e5da81fb2c 8154258: [TESTBUG] Various serviceability tests fail compilation
dsamersoff
parents: 35761
diff changeset
    29
 * @modules java.base/jdk.internal.misc
40059
c2304140ed64 8132919: Put compiler tests in packages
tpivovarova
parents: 38152
diff changeset
    30
 *          java.management
40631
ed82623d7831 8157957: ClassNotFoundException: jdk.test.lib.JDKToolFinder
ctornqvi
parents: 40059
diff changeset
    31
 * @build sun.hotspot.WhiteBox
40059
c2304140ed64 8132919: Put compiler tests in packages
tpivovarova
parents: 38152
diff changeset
    32
 * @run driver ClassFileInstaller sun.hotspot.WhiteBox
c2304140ed64 8132919: Put compiler tests in packages
tpivovarova
parents: 38152
diff changeset
    33
 *                                sun.hotspot.WhiteBox$WhiteBoxPermission
c2304140ed64 8132919: Put compiler tests in packages
tpivovarova
parents: 38152
diff changeset
    34
 * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
c2304140ed64 8132919: Put compiler tests in packages
tpivovarova
parents: 38152
diff changeset
    35
 *                   -XX:+WhiteBoxAPI -XX:CompileCommand=compileonly,null::*
c2304140ed64 8132919: Put compiler tests in packages
tpivovarova
parents: 38152
diff changeset
    36
 *                   -XX:-SegmentedCodeCache
c2304140ed64 8132919: Put compiler tests in packages
tpivovarova
parents: 38152
diff changeset
    37
 *                   compiler.whitebox.AllocationCodeBlobTest
27642
8c9eff693145 8059624: Test task: WhiteBox API for testing segmented codecache feature
iignatyev
parents:
diff changeset
    38
 * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
8c9eff693145 8059624: Test task: WhiteBox API for testing segmented codecache feature
iignatyev
parents:
diff changeset
    39
 *                   -XX:+WhiteBoxAPI -XX:CompileCommand=compileonly,null::*
40059
c2304140ed64 8132919: Put compiler tests in packages
tpivovarova
parents: 38152
diff changeset
    40
 *                   -XX:+SegmentedCodeCache
c2304140ed64 8132919: Put compiler tests in packages
tpivovarova
parents: 38152
diff changeset
    41
 *                   compiler.whitebox.AllocationCodeBlobTest
27642
8c9eff693145 8059624: Test task: WhiteBox API for testing segmented codecache feature
iignatyev
parents:
diff changeset
    42
 */
40059
c2304140ed64 8132919: Put compiler tests in packages
tpivovarova
parents: 38152
diff changeset
    43
c2304140ed64 8132919: Put compiler tests in packages
tpivovarova
parents: 38152
diff changeset
    44
package compiler.whitebox;
c2304140ed64 8132919: Put compiler tests in packages
tpivovarova
parents: 38152
diff changeset
    45
c2304140ed64 8132919: Put compiler tests in packages
tpivovarova
parents: 38152
diff changeset
    46
import jdk.test.lib.Asserts;
45245
48fed68b35c1 8180793: move jdk.test.lib.wrappers.* to jdk.test.lib package
iignatyev
parents: 41705
diff changeset
    47
import jdk.test.lib.InfiniteLoop;
40059
c2304140ed64 8132919: Put compiler tests in packages
tpivovarova
parents: 38152
diff changeset
    48
import sun.hotspot.WhiteBox;
c2304140ed64 8132919: Put compiler tests in packages
tpivovarova
parents: 38152
diff changeset
    49
import sun.hotspot.code.BlobType;
c2304140ed64 8132919: Put compiler tests in packages
tpivovarova
parents: 38152
diff changeset
    50
c2304140ed64 8132919: Put compiler tests in packages
tpivovarova
parents: 38152
diff changeset
    51
import java.lang.management.MemoryPoolMXBean;
c2304140ed64 8132919: Put compiler tests in packages
tpivovarova
parents: 38152
diff changeset
    52
import java.util.ArrayList;
c2304140ed64 8132919: Put compiler tests in packages
tpivovarova
parents: 38152
diff changeset
    53
import java.util.EnumSet;
c2304140ed64 8132919: Put compiler tests in packages
tpivovarova
parents: 38152
diff changeset
    54
27642
8c9eff693145 8059624: Test task: WhiteBox API for testing segmented codecache feature
iignatyev
parents:
diff changeset
    55
public class AllocationCodeBlobTest {
8c9eff693145 8059624: Test task: WhiteBox API for testing segmented codecache feature
iignatyev
parents:
diff changeset
    56
    private static final WhiteBox WHITE_BOX = WhiteBox.getWhiteBox();
8c9eff693145 8059624: Test task: WhiteBox API for testing segmented codecache feature
iignatyev
parents:
diff changeset
    57
    private static final long CODE_CACHE_SIZE
8c9eff693145 8059624: Test task: WhiteBox API for testing segmented codecache feature
iignatyev
parents:
diff changeset
    58
            = WHITE_BOX.getUintxVMFlag("ReservedCodeCacheSize");
8c9eff693145 8059624: Test task: WhiteBox API for testing segmented codecache feature
iignatyev
parents:
diff changeset
    59
    private static final int SIZE = 1;
8c9eff693145 8059624: Test task: WhiteBox API for testing segmented codecache feature
iignatyev
parents:
diff changeset
    60
8c9eff693145 8059624: Test task: WhiteBox API for testing segmented codecache feature
iignatyev
parents:
diff changeset
    61
    public static void main(String[] args) {
8c9eff693145 8059624: Test task: WhiteBox API for testing segmented codecache feature
iignatyev
parents:
diff changeset
    62
        // check that Sweeper handels dummy blobs correctly
27917
c5937f7b4e8b 8064669: compiler/whitebox/AllocationCodeBlobTest.java crashes / asserts
iignatyev
parents: 27642
diff changeset
    63
        Thread t = new Thread(
c5937f7b4e8b 8064669: compiler/whitebox/AllocationCodeBlobTest.java crashes / asserts
iignatyev
parents: 27642
diff changeset
    64
                new InfiniteLoop(WHITE_BOX::forceNMethodSweep, 1L),
c5937f7b4e8b 8064669: compiler/whitebox/AllocationCodeBlobTest.java crashes / asserts
iignatyev
parents: 27642
diff changeset
    65
                "ForcedSweeper");
c5937f7b4e8b 8064669: compiler/whitebox/AllocationCodeBlobTest.java crashes / asserts
iignatyev
parents: 27642
diff changeset
    66
        t.setDaemon(true);
c5937f7b4e8b 8064669: compiler/whitebox/AllocationCodeBlobTest.java crashes / asserts
iignatyev
parents: 27642
diff changeset
    67
        System.out.println("Starting " + t.getName());
c5937f7b4e8b 8064669: compiler/whitebox/AllocationCodeBlobTest.java crashes / asserts
iignatyev
parents: 27642
diff changeset
    68
        t.start();
c5937f7b4e8b 8064669: compiler/whitebox/AllocationCodeBlobTest.java crashes / asserts
iignatyev
parents: 27642
diff changeset
    69
27642
8c9eff693145 8059624: Test task: WhiteBox API for testing segmented codecache feature
iignatyev
parents:
diff changeset
    70
        EnumSet<BlobType> blobTypes = BlobType.getAvailable();
8c9eff693145 8059624: Test task: WhiteBox API for testing segmented codecache feature
iignatyev
parents:
diff changeset
    71
        for (BlobType type : blobTypes) {
8c9eff693145 8059624: Test task: WhiteBox API for testing segmented codecache feature
iignatyev
parents:
diff changeset
    72
            new AllocationCodeBlobTest(type).test();
8c9eff693145 8059624: Test task: WhiteBox API for testing segmented codecache feature
iignatyev
parents:
diff changeset
    73
        }
27917
c5937f7b4e8b 8064669: compiler/whitebox/AllocationCodeBlobTest.java crashes / asserts
iignatyev
parents: 27642
diff changeset
    74
c5937f7b4e8b 8064669: compiler/whitebox/AllocationCodeBlobTest.java crashes / asserts
iignatyev
parents: 27642
diff changeset
    75
        // check that deoptimization works well w/ dummy blobs
c5937f7b4e8b 8064669: compiler/whitebox/AllocationCodeBlobTest.java crashes / asserts
iignatyev
parents: 27642
diff changeset
    76
        t = new Thread(
c5937f7b4e8b 8064669: compiler/whitebox/AllocationCodeBlobTest.java crashes / asserts
iignatyev
parents: 27642
diff changeset
    77
                new InfiniteLoop(WHITE_BOX::deoptimizeAll, 1L),
c5937f7b4e8b 8064669: compiler/whitebox/AllocationCodeBlobTest.java crashes / asserts
iignatyev
parents: 27642
diff changeset
    78
                "Deoptimize Thread");
c5937f7b4e8b 8064669: compiler/whitebox/AllocationCodeBlobTest.java crashes / asserts
iignatyev
parents: 27642
diff changeset
    79
        t.setDaemon(true);
c5937f7b4e8b 8064669: compiler/whitebox/AllocationCodeBlobTest.java crashes / asserts
iignatyev
parents: 27642
diff changeset
    80
        System.out.println("Starting " + t.getName());
c5937f7b4e8b 8064669: compiler/whitebox/AllocationCodeBlobTest.java crashes / asserts
iignatyev
parents: 27642
diff changeset
    81
        t.start();
c5937f7b4e8b 8064669: compiler/whitebox/AllocationCodeBlobTest.java crashes / asserts
iignatyev
parents: 27642
diff changeset
    82
c5937f7b4e8b 8064669: compiler/whitebox/AllocationCodeBlobTest.java crashes / asserts
iignatyev
parents: 27642
diff changeset
    83
        for (int i = 0; i < 10_000; ++i) {
c5937f7b4e8b 8064669: compiler/whitebox/AllocationCodeBlobTest.java crashes / asserts
iignatyev
parents: 27642
diff changeset
    84
            for (BlobType type : blobTypes) {
c5937f7b4e8b 8064669: compiler/whitebox/AllocationCodeBlobTest.java crashes / asserts
iignatyev
parents: 27642
diff changeset
    85
                long addr = WHITE_BOX.allocateCodeBlob(SIZE, type.id);
c5937f7b4e8b 8064669: compiler/whitebox/AllocationCodeBlobTest.java crashes / asserts
iignatyev
parents: 27642
diff changeset
    86
            }
c5937f7b4e8b 8064669: compiler/whitebox/AllocationCodeBlobTest.java crashes / asserts
iignatyev
parents: 27642
diff changeset
    87
        }
c5937f7b4e8b 8064669: compiler/whitebox/AllocationCodeBlobTest.java crashes / asserts
iignatyev
parents: 27642
diff changeset
    88
27642
8c9eff693145 8059624: Test task: WhiteBox API for testing segmented codecache feature
iignatyev
parents:
diff changeset
    89
    }
8c9eff693145 8059624: Test task: WhiteBox API for testing segmented codecache feature
iignatyev
parents:
diff changeset
    90
8c9eff693145 8059624: Test task: WhiteBox API for testing segmented codecache feature
iignatyev
parents:
diff changeset
    91
    private final BlobType type;
8c9eff693145 8059624: Test task: WhiteBox API for testing segmented codecache feature
iignatyev
parents:
diff changeset
    92
    private final MemoryPoolMXBean bean;
8c9eff693145 8059624: Test task: WhiteBox API for testing segmented codecache feature
iignatyev
parents:
diff changeset
    93
    private AllocationCodeBlobTest(BlobType type) {
8c9eff693145 8059624: Test task: WhiteBox API for testing segmented codecache feature
iignatyev
parents:
diff changeset
    94
        this.type = type;
8c9eff693145 8059624: Test task: WhiteBox API for testing segmented codecache feature
iignatyev
parents:
diff changeset
    95
        bean = type.getMemoryPool();
8c9eff693145 8059624: Test task: WhiteBox API for testing segmented codecache feature
iignatyev
parents:
diff changeset
    96
    }
8c9eff693145 8059624: Test task: WhiteBox API for testing segmented codecache feature
iignatyev
parents:
diff changeset
    97
8c9eff693145 8059624: Test task: WhiteBox API for testing segmented codecache feature
iignatyev
parents:
diff changeset
    98
    private void test() {
8c9eff693145 8059624: Test task: WhiteBox API for testing segmented codecache feature
iignatyev
parents:
diff changeset
    99
        System.out.printf("type %s%n", type);
35761
a900c9e65458 8148751: [TESTBUG] compiler/whitebox/AllocationCodeBlobTest.java fails due to unexpected code cache allocation
thartmann
parents: 33730
diff changeset
   100
a900c9e65458 8148751: [TESTBUG] compiler/whitebox/AllocationCodeBlobTest.java fails due to unexpected code cache allocation
thartmann
parents: 33730
diff changeset
   101
        // Measure the code cache usage after allocate/free.
27642
8c9eff693145 8059624: Test task: WhiteBox API for testing segmented codecache feature
iignatyev
parents:
diff changeset
   102
        long start = getUsage();
35761
a900c9e65458 8148751: [TESTBUG] compiler/whitebox/AllocationCodeBlobTest.java fails due to unexpected code cache allocation
thartmann
parents: 33730
diff changeset
   103
        long addr1 = WHITE_BOX.allocateCodeBlob(SIZE, type.id);
a900c9e65458 8148751: [TESTBUG] compiler/whitebox/AllocationCodeBlobTest.java fails due to unexpected code cache allocation
thartmann
parents: 33730
diff changeset
   104
        long firstAllocation = getUsage();
a900c9e65458 8148751: [TESTBUG] compiler/whitebox/AllocationCodeBlobTest.java fails due to unexpected code cache allocation
thartmann
parents: 33730
diff changeset
   105
        WHITE_BOX.freeCodeBlob(addr1);
a900c9e65458 8148751: [TESTBUG] compiler/whitebox/AllocationCodeBlobTest.java fails due to unexpected code cache allocation
thartmann
parents: 33730
diff changeset
   106
        long firstFree = getUsage();
a900c9e65458 8148751: [TESTBUG] compiler/whitebox/AllocationCodeBlobTest.java fails due to unexpected code cache allocation
thartmann
parents: 33730
diff changeset
   107
        long addr2 = WHITE_BOX.allocateCodeBlob(SIZE, type.id);
a900c9e65458 8148751: [TESTBUG] compiler/whitebox/AllocationCodeBlobTest.java fails due to unexpected code cache allocation
thartmann
parents: 33730
diff changeset
   108
        long secondAllocation = getUsage();
a900c9e65458 8148751: [TESTBUG] compiler/whitebox/AllocationCodeBlobTest.java fails due to unexpected code cache allocation
thartmann
parents: 33730
diff changeset
   109
        WHITE_BOX.freeCodeBlob(addr2);
27642
8c9eff693145 8059624: Test task: WhiteBox API for testing segmented codecache feature
iignatyev
parents:
diff changeset
   110
35761
a900c9e65458 8148751: [TESTBUG] compiler/whitebox/AllocationCodeBlobTest.java fails due to unexpected code cache allocation
thartmann
parents: 33730
diff changeset
   111
        // The following code may trigger resolving of invokedynamic
a900c9e65458 8148751: [TESTBUG] compiler/whitebox/AllocationCodeBlobTest.java fails due to unexpected code cache allocation
thartmann
parents: 33730
diff changeset
   112
        // instructions and therefore method handle intrinsic creation
a900c9e65458 8148751: [TESTBUG] compiler/whitebox/AllocationCodeBlobTest.java fails due to unexpected code cache allocation
thartmann
parents: 33730
diff changeset
   113
        // in the code cache. Make sure this is executed after measuring
a900c9e65458 8148751: [TESTBUG] compiler/whitebox/AllocationCodeBlobTest.java fails due to unexpected code cache allocation
thartmann
parents: 33730
diff changeset
   114
        // the code cache usage.
a900c9e65458 8148751: [TESTBUG] compiler/whitebox/AllocationCodeBlobTest.java fails due to unexpected code cache allocation
thartmann
parents: 33730
diff changeset
   115
        Asserts.assertNE(0, addr1, "first allocation failed");
a900c9e65458 8148751: [TESTBUG] compiler/whitebox/AllocationCodeBlobTest.java fails due to unexpected code cache allocation
thartmann
parents: 33730
diff changeset
   116
        Asserts.assertNE(0, addr2, "second allocation failed");
27642
8c9eff693145 8059624: Test task: WhiteBox API for testing segmented codecache feature
iignatyev
parents:
diff changeset
   117
        Asserts.assertLTE(start + SIZE, firstAllocation,
8c9eff693145 8059624: Test task: WhiteBox API for testing segmented codecache feature
iignatyev
parents:
diff changeset
   118
                "allocation should increase memory usage: "
8c9eff693145 8059624: Test task: WhiteBox API for testing segmented codecache feature
iignatyev
parents:
diff changeset
   119
                + start + " + " + SIZE + " <= " + firstAllocation);
8c9eff693145 8059624: Test task: WhiteBox API for testing segmented codecache feature
iignatyev
parents:
diff changeset
   120
        Asserts.assertLTE(firstFree, firstAllocation,
8c9eff693145 8059624: Test task: WhiteBox API for testing segmented codecache feature
iignatyev
parents:
diff changeset
   121
                "free shouldn't increase memory usage: "
8c9eff693145 8059624: Test task: WhiteBox API for testing segmented codecache feature
iignatyev
parents:
diff changeset
   122
                + firstFree + " <= " + firstAllocation);
8c9eff693145 8059624: Test task: WhiteBox API for testing segmented codecache feature
iignatyev
parents:
diff changeset
   123
        Asserts.assertEQ(firstAllocation, secondAllocation);
8c9eff693145 8059624: Test task: WhiteBox API for testing segmented codecache feature
iignatyev
parents:
diff changeset
   124
8c9eff693145 8059624: Test task: WhiteBox API for testing segmented codecache feature
iignatyev
parents:
diff changeset
   125
        System.out.println("allocating till possible...");
8c9eff693145 8059624: Test task: WhiteBox API for testing segmented codecache feature
iignatyev
parents:
diff changeset
   126
        ArrayList<Long> blobs = new ArrayList<>();
8c9eff693145 8059624: Test task: WhiteBox API for testing segmented codecache feature
iignatyev
parents:
diff changeset
   127
        int size = (int) (CODE_CACHE_SIZE >> 7);
35761
a900c9e65458 8148751: [TESTBUG] compiler/whitebox/AllocationCodeBlobTest.java fails due to unexpected code cache allocation
thartmann
parents: 33730
diff changeset
   128
        while ((addr1 = WHITE_BOX.allocateCodeBlob(size, type.id)) != 0) {
a900c9e65458 8148751: [TESTBUG] compiler/whitebox/AllocationCodeBlobTest.java fails due to unexpected code cache allocation
thartmann
parents: 33730
diff changeset
   129
            blobs.add(addr1);
27642
8c9eff693145 8059624: Test task: WhiteBox API for testing segmented codecache feature
iignatyev
parents:
diff changeset
   130
        }
8c9eff693145 8059624: Test task: WhiteBox API for testing segmented codecache feature
iignatyev
parents:
diff changeset
   131
        for (Long blob : blobs) {
8c9eff693145 8059624: Test task: WhiteBox API for testing segmented codecache feature
iignatyev
parents:
diff changeset
   132
            WHITE_BOX.freeCodeBlob(blob);
8c9eff693145 8059624: Test task: WhiteBox API for testing segmented codecache feature
iignatyev
parents:
diff changeset
   133
        }
8c9eff693145 8059624: Test task: WhiteBox API for testing segmented codecache feature
iignatyev
parents:
diff changeset
   134
    }
8c9eff693145 8059624: Test task: WhiteBox API for testing segmented codecache feature
iignatyev
parents:
diff changeset
   135
8c9eff693145 8059624: Test task: WhiteBox API for testing segmented codecache feature
iignatyev
parents:
diff changeset
   136
    private long getUsage() {
8c9eff693145 8059624: Test task: WhiteBox API for testing segmented codecache feature
iignatyev
parents:
diff changeset
   137
        return bean.getUsage().getUsed();
8c9eff693145 8059624: Test task: WhiteBox API for testing segmented codecache feature
iignatyev
parents:
diff changeset
   138
    }
8c9eff693145 8059624: Test task: WhiteBox API for testing segmented codecache feature
iignatyev
parents:
diff changeset
   139
}