Skip to content

Commit

Permalink
Merge master jdk-17.0.12+3 into openj9-staging
Browse files Browse the repository at this point in the history
Signed-off-by: J9 Build <j9build@ca.ibm.com>
  • Loading branch information
j9build committed May 16, 2024
2 parents d9d4bd4 + cff106e commit d131ada
Show file tree
Hide file tree
Showing 53 changed files with 349 additions and 962 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2021, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2023, 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
Expand Down Expand Up @@ -547,7 +547,7 @@ public SocketAddress receive(ByteBuffer dst) throws IOException {
n = receive(dst, connected);
}
}
if (n >= 0) {
if (n > 0 || (n == 0 && isOpen())) {
// sender address is in socket address buffer
sender = sourceSocketAddress();
}
Expand Down Expand Up @@ -668,7 +668,7 @@ private SocketAddress trustedBlockingReceive(ByteBuffer dst)
park(Net.POLLIN);
n = receive(dst, connected);
}
if (n >= 0) {
if (n > 0 || (n == 0 && isOpen())) {
// sender address is in socket address buffer
sender = sourceSocketAddress();
}
Expand Down Expand Up @@ -705,7 +705,7 @@ private SocketAddress trustedBlockingReceive(ByteBuffer dst, long nanos)
park(Net.POLLIN, remainingNanos);
n = receive(dst, connected);
}
if (n >= 0) {
if (n > 0 || (n == 0 && isOpen())) {
// sender address is in socket address buffer
sender = sourceSocketAddress();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
* @summary ArrayFill: if store is on backedge, last iteration is not to be executed.
* @library /test/lib
* @compile TestBackedgeLoadArrayFill.jasm
* @requires vm.compiler2.enabled
* @run main/othervm
* -XX:CompileCommand=compileonly,TestBackedgeLoadArrayFill*::test*
* -XX:-TieredCompilation -Xcomp -XX:+OptimizeFill
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
* @bug 8296412
* @compile TestInfiniteLoopWithUnmergedBackedges.jasm
* @summary Infinite loops may not have the backedges merged, before we call IdealLoopTree::check_safepts
* @requires vm.compiler2.enabled
* @run main/othervm -Xcomp -XX:-TieredCompilation -XX:-LoopUnswitching
* -XX:CompileCommand=compileonly,TestInfiniteLoopWithUnmergedBackedges::test*
* TestInfiniteLoopWithUnmergedBackedgesMain
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
* @test
* @bug 8299959
* @summary In CmpU::Value, the sub computation may be narrower than the overflow computation.
* @requires vm.compiler2.enabled
*
* @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+StressCCP -Xcomp -XX:-TieredCompilation
* -XX:CompileCommand=compileonly,compiler.rangechecks.TestRangeCheckCmpUOverflowVsSub::test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -377,10 +377,8 @@ public static void main(String[] args) {

forceDeduplication(ageThreshold, FullGC);

if (!waitForDeduplication(dupString3, baseString)) {
if (getValue(dupString3) != getValue(internedString)) {
throw new RuntimeException("String 3 doesn't match either");
}
if (!waitForDeduplication(dupString3, internedString)) {
throw new RuntimeException("Deduplication has not occurred for string 3");
}

if (afterInternedValue != getValue(dupString2)) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2004, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2004, 2022, 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
Expand All @@ -24,6 +24,7 @@
package nsk.jvmti.scenarios.hotswap.HS201;

import java.io.PrintStream;
import java.util.concurrent.CountDownLatch;

import nsk.share.*;
import nsk.share.jvmti.*;
Expand Down Expand Up @@ -73,14 +74,23 @@ public int runIt(String args[], PrintStream out) {
timeout = argHandler.getWaitTime() * 60 * 1000; // milliseconds

log.display(">>> starting tested thread");
Thread thread = new hs201t002Thread();
hs201t002Thread thread = new hs201t002Thread();

// testing sync
status = checkStatus(status);

setThread(thread);
thread.start();

// setThread(thread) enables JVMTI events, and that can only be done on a live thread,
// so wait until the thread has started.
try {
thread.ready.await();
} catch (InterruptedException e) {
}
setThread(thread);

thread.go.countDown();

while (currentStep != 4) {
try {
Thread.sleep(100);
Expand Down Expand Up @@ -114,6 +124,10 @@ public int runIt(String args[], PrintStream out) {
}

log.display("Thread suspended in a wrong moment. Retrying...");
for (int i = 0; i < stackTrace.length; i++) {
log.display("\t" + i + ". " + stackTrace[i]);
}
log.display("Retrying...");
resumeThread(thread);
suspendTry++;
// Test thread will be suspended at the top of the loop. Let it run for a while.
Expand All @@ -136,12 +150,20 @@ public int runIt(String args[], PrintStream out) {

class hs201t002Thread extends Thread {

CountDownLatch ready = new CountDownLatch(1);
CountDownLatch go = new CountDownLatch(1);

hs201t002Thread() {
setName("hs201t002Thread");
}

public void run() {
// run method
ready.countDown();
try {
go.await();
} catch (InterruptedException e) {
}
try {
throwException();
} catch (Exception e) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2018, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2018, 2022, 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
Expand Down Expand Up @@ -71,7 +71,7 @@
* newclass
*
* @run main/othervm/native
* -agentlib:hs201t002=pathToNewByteCode=./bin,-waittime=5
* nsk.jvmti.scenarios.hotswap.HS201.hs201t002
* -agentlib:hs201t002=pathToNewByteCode=./bin,-waittime=5,-verbose
* nsk.jvmti.scenarios.hotswap.HS201.hs201t002 -verbose
*/

Loading

0 comments on commit d131ada

Please sign in to comment.