10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 12 * version 2 for more details (a copy is included in the LICENSE file that 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 /** 25 * @test 26 * @bug 8076987 27 * @bug 8078438 28 * @summary Verify UseCondCardMark works 29 * @modules java.base/jdk.internal.misc 30 * @library /testlibrary /test/lib 31 * @build Basic 32 * @run main/othervm -Xint Basic 33 * @run main/othervm -Xint -XX:+UseCondCardMark Basic 34 * @run main/othervm -XX:TieredStopAtLevel=1 Basic 35 * @run main/othervm -XX:TieredStopAtLevel=1 -XX:+UseCondCardMark Basic 36 * @run main/othervm -XX:TieredStopAtLevel=4 Basic 37 * @run main/othervm -XX:TieredStopAtLevel=4 -XX:+UseCondCardMark Basic 38 * @run main/othervm -XX:-TieredCompilation Basic 39 * @run main/othervm -XX:-TieredCompilation -XX:+UseCondCardMark Basic 40 */ 41 public class Basic { 42 43 static volatile MyObject sink; 44 45 public static void main(String args[]) { 46 final int COUNT = 10000000; 47 for (int c = 0; c < COUNT; c++) { 48 MyObject o = new MyObject(); 49 o.x = c; 50 doStore(o); 51 } | 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 12 * version 2 for more details (a copy is included in the LICENSE file that 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 /** 25 * @test 26 * @bug 8076987 27 * @bug 8078438 28 * @summary Verify UseCondCardMark works 29 * @modules java.base/jdk.internal.misc 30 * @run main/othervm -Xint Basic 31 * @run main/othervm -Xint -XX:+UseCondCardMark Basic 32 * @run main/othervm -XX:TieredStopAtLevel=1 Basic 33 * @run main/othervm -XX:TieredStopAtLevel=1 -XX:+UseCondCardMark Basic 34 * @run main/othervm -XX:TieredStopAtLevel=4 Basic 35 * @run main/othervm -XX:TieredStopAtLevel=4 -XX:+UseCondCardMark Basic 36 * @run main/othervm -XX:-TieredCompilation Basic 37 * @run main/othervm -XX:-TieredCompilation -XX:+UseCondCardMark Basic 38 */ 39 public class Basic { 40 41 static volatile MyObject sink; 42 43 public static void main(String args[]) { 44 final int COUNT = 10000000; 45 for (int c = 0; c < COUNT; c++) { 46 MyObject o = new MyObject(); 47 o.x = c; 48 doStore(o); 49 } |