# HG changeset patch # User amurillo # Date 1474048637 25200 # Node ID 1cff7bfbf52534ade31da603a408a6724e109c1d # Parent 9cb87c88ed851c0575b8ead753ea238ed5b544e9# Parent 232489a7ac10300563a6cd78a11bdeb31c59d6d7 Merge diff -r 9cb87c88ed85 -r 1cff7bfbf525 test/lib/jdk/test/lib/Platform.java --- a/test/lib/jdk/test/lib/Platform.java Wed Jul 05 22:14:30 2017 +0200 +++ b/test/lib/jdk/test/lib/Platform.java Fri Sep 16 10:57:17 2016 -0700 @@ -116,6 +116,14 @@ return (jdkDebug.toLowerCase().contains("debug")); } + public static boolean isSlowDebugBuild() { + return (jdkDebug.toLowerCase().equals("slowdebug")); + } + + public static boolean isFastDebugBuild() { + return (jdkDebug.toLowerCase().equals("fastdebug")); + } + public static String getVMVersion() { return vmVersion; } diff -r 9cb87c88ed85 -r 1cff7bfbf525 test/lib/jdk/test/lib/unsafe/UnsafeHelper.java --- a/test/lib/jdk/test/lib/unsafe/UnsafeHelper.java Wed Jul 05 22:14:30 2017 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,52 +0,0 @@ -/* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -package jdk.test.lib.unsafe; - -import jdk.internal.misc.Unsafe; -import java.lang.reflect.Field; - - -/** - * Helper class for accessing the jdk.internal.misc.Unsafe functionality - */ -public final class UnsafeHelper { - private static Unsafe unsafe = null; - - /** - * @return Unsafe instance. - */ - public static synchronized Unsafe getUnsafe() { - if (unsafe == null) { - try { - Field f = Unsafe.class.getDeclaredField("theUnsafe"); - f.setAccessible(true); - unsafe = (Unsafe) f.get(null); - } catch (NoSuchFieldException | IllegalAccessException e) { - throw new RuntimeException("Unable to get Unsafe instance.", e); - } - } - return unsafe; - } -} -