< prev index next >

test/compiler/codecache/jmx/GetUsageTest.java

Print this page




  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 import com.oracle.java.testlibrary.Asserts;
  25 import java.lang.management.MemoryPoolMXBean;
  26 import java.util.HashMap;
  27 import java.util.Map;
  28 import sun.hotspot.code.BlobType;
  29 
  30 /*
  31  * @test GetUsageTest
  32  * @library /testlibrary /../../test/lib
  33  * @build GetUsageTest
  34  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  35  *     sun.hotspot.WhiteBox$WhiteBoxPermission
  36  * @run main/othervm -Xbootclasspath/a:. -XX:CompileCommand=compileonly,null::*
  37  *     -XX:-UseCodeCacheFlushing -XX:-MethodFlushing -XX:+SegmentedCodeCache
  38  *     -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI GetUsageTest
  39  * @summary testing of getUsage() for segmented code cache
  40  */
  41 public class GetUsageTest {
  42 
  43     private final BlobType btype;
  44     private final int allocateSize;
  45 
  46     public GetUsageTest(BlobType btype, int allocSize) {
  47         this.btype = btype;
  48         this.allocateSize = allocSize;
  49     }
  50 
  51     public static void main(String[] args) throws Exception {
  52         for (BlobType btype : BlobType.getAvailable()) {
  53             if (CodeCacheUtils.isCodeHeapPredictable(btype)) {




  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 import com.oracle.java.testlibrary.Asserts;
  25 import java.lang.management.MemoryPoolMXBean;
  26 import java.util.HashMap;
  27 import java.util.Map;
  28 import sun.hotspot.code.BlobType;
  29 
  30 /*
  31  * @test GetUsageTest
  32  * @library /testlibrary /../../test/lib
  33  * @build com.oracle.java.testlibrary.* GetUsageTest
  34  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  35  *     sun.hotspot.WhiteBox$WhiteBoxPermission
  36  * @run main/othervm -Xbootclasspath/a:. -XX:CompileCommand=compileonly,null::*
  37  *     -XX:-UseCodeCacheFlushing -XX:-MethodFlushing -XX:+SegmentedCodeCache
  38  *     -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI GetUsageTest
  39  * @summary testing of getUsage() for segmented code cache
  40  */
  41 public class GetUsageTest {
  42 
  43     private final BlobType btype;
  44     private final int allocateSize;
  45 
  46     public GetUsageTest(BlobType btype, int allocSize) {
  47         this.btype = btype;
  48         this.allocateSize = allocSize;
  49     }
  50 
  51     public static void main(String[] args) throws Exception {
  52         for (BlobType btype : BlobType.getAvailable()) {
  53             if (CodeCacheUtils.isCodeHeapPredictable(btype)) {


< prev index next >