This commit is contained in:
Jesper Wilhelmsson 2021-07-29 01:07:57 +00:00
commit a0504cff9f
10 changed files with 36 additions and 15 deletions

@ -1789,6 +1789,10 @@ bool VM_Version::compute_has_intel_jcc_erratum() {
// 06_9EH | D | 9th Generation Intel® Core™ Processor Family based on microarchitecturecode name Coffee Lake H (8+2)
// 06_9EH | D | 9th Generation Intel® Core™ Processor Family based on microarchitecture code name Coffee Lake S (8+2)
return _stepping == 0x9 || _stepping == 0xA || _stepping == 0xB || _stepping == 0xD;
case 0xA5:
// Not in Intel documentation.
// 06_A5H | | 10th Generation Intel® Core™ Processor Family based on microarchitecture code name Comet Lake S/H
return true;
case 0xA6:
// 06_A6H | 0 | 10th Generation Intel® Core™ Processor Family based on microarchitecture code name Comet Lake U62
return _stepping == 0x0;

@ -612,14 +612,12 @@ void HandshakeState::do_self_suspend() {
assert(Thread::current() == _handshakee, "should call from _handshakee");
assert(_lock.owned_by_self(), "Lock must be held");
assert(!_handshakee->has_last_Java_frame() || _handshakee->frame_anchor()->walkable(), "should have walkable stack");
JavaThreadState jts = _handshakee->thread_state();
assert(_handshakee->thread_state() == _thread_blocked, "Caller should have transitioned to _thread_blocked");
while (is_suspended()) {
_handshakee->set_thread_state(_thread_blocked);
log_trace(thread, suspend)("JavaThread:" INTPTR_FORMAT " suspended", p2i(_handshakee));
_lock.wait_without_safepoint_check();
}
_handshakee->set_thread_state(jts);
set_async_suspend_handshake(false);
log_trace(thread, suspend)("JavaThread:" INTPTR_FORMAT " resumed", p2i(_handshakee));
}
@ -631,7 +629,12 @@ class ThreadSelfSuspensionHandshake : public AsyncHandshakeClosure {
void do_thread(Thread* thr) {
JavaThread* current = JavaThread::cast(thr);
assert(current == Thread::current(), "Must be self executed.");
JavaThreadState jts = current->thread_state();
current->set_thread_state(_thread_blocked);
current->handshake_state()->do_self_suspend();
current->set_thread_state(jts);
current->handshake_state()->set_async_suspend_handshake(false);
}
virtual bool is_suspend() { return true; }
};
@ -681,15 +684,19 @@ public:
bool HandshakeState::suspend() {
JavaThread* self = JavaThread::current();
SuspendThreadHandshake st;
Handshake::execute(&st, _handshakee);
if (_handshakee == self) {
// If target is the current thread we need to call this to do the
// actual suspend since Handshake::execute() above only installed
// the asynchronous handshake.
SafepointMechanism::process_if_requested(self);
// If target is the current thread we can bypass the handshake machinery
// and just suspend directly
ThreadBlockInVM tbivm(self);
MutexLocker ml(&_lock, Mutex::_no_safepoint_check_flag);
set_suspended(true);
do_self_suspend();
return true;
} else {
SuspendThreadHandshake st;
Handshake::execute(&st, _handshakee);
return st.did_suspend();
}
return st.did_suspend();
}
bool HandshakeState::resume() {

@ -51,7 +51,9 @@ public class TestParallelRefProc {
}
if (GC.Parallel.isSupported()) {
noneGCSupported = false;
testFlag(new String[] { "-XX:+UseParallelGC" }, true);
testFlag(new String[] { "-XX:+UseParallelGC", "-XX:ParallelGCThreads=1" }, false);
testFlag(new String[] { "-XX:+UseParallelGC", "-XX:ParallelGCThreads=2" }, true);
testFlag(new String[] { "-XX:+UseParallelGC", "-XX:-ParallelRefProcEnabled", "-XX:ParallelGCThreads=2" }, false);
}
if (GC.G1.isSupported()) {
noneGCSupported = false;

@ -1,5 +1,5 @@
/*
* Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014, 2021, 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
@ -27,8 +27,7 @@
* @modules java.base/jdk.internal.org.objectweb.asm
* java.base/jdk.internal.misc
* java.management
* @compile -XDignore.symbol.file UnsupportedClassFileVersion.java
* @run main UnsupportedClassFileVersion
* @run driver UnsupportedClassFileVersion
*/
import java.io.File;

@ -25,6 +25,7 @@
* @summary Tests how large pages are choosen depending on the given large pages flag combinations.
* @requires vm.gc != "Z"
* @requires os.family == "linux"
* @requires vm.flagless
* @library /test/lib
* @modules java.base/jdk.internal.misc
* java.management

@ -26,6 +26,7 @@
* @summary Test that touching noaccess area in class ReservedHeapSpace results in SIGSEGV/ACCESS_VIOLATION
* @library /test/lib
* @requires vm.bits == 64
* @requires vm.flagless
* @modules java.base/jdk.internal.misc
* java.management
* @build sun.hotspot.WhiteBox

@ -26,6 +26,7 @@
* @test
* @bug 8012015
* @requires !(os.family == "aix")
* @requires vm.flagless
* @summary Make sure reserved (but uncommitted) memory is not accessible
* @library /test/lib
* @modules java.base/jdk.internal.misc

@ -26,6 +26,7 @@
* @bug 6515172 8148766
* @summary Check that availableProcessors reports the correct value when running in a cpuset on linux
* @requires os.family == "linux"
* @requires vm.flagless
* @modules java.base/jdk.internal.misc
* @library /test/lib
* @run driver AvailableProcessors

@ -31,6 +31,7 @@ import jdk.test.lib.process.OutputAnalyzer;
* VM was either compiled on a platform which does not define CPU_ALLOC,
* or it is executed on a platform that does not support it.
* @requires os.family == "linux"
* @requires vm.flagless
* @modules java.base/jdk.internal.misc
* @library /test/lib
* @run driver TestUseCpuAllocPath

@ -702,6 +702,7 @@ javax/sound/sampled/Mixers/DisabledAssertionCrash.java 7067310 generic-all
javax/sound/midi/Sequencer/Recording.java 8167580,8265485 linux-all,macosx-aarch64
javax/sound/midi/Sequencer/MetaCallback.java 8178698 linux-all
javax/sound/midi/Sequencer/Looping.java 8136897 generic-all
############################################################################
@ -786,6 +787,9 @@ com/sun/jdi/AfterThreadDeathTest.java 8232839 linux-al
# jdk_util
java/util/Locale/LocaleProvidersRun.java 8268379 macosx-x64
sun/util/locale/provider/CalendarDataRegression.java 8268379 macosx-x64
############################################################################
# jdk_instrument