8207965: C2-only debug build fails
Reviewed-by: kvn, iignatyev
This commit is contained in:
parent
626a614146
commit
e5f3e1b60c
@ -40,6 +40,7 @@
|
||||
|
||||
#include <proc_service.h>
|
||||
#include "gc/shared/collectedHeap.hpp"
|
||||
#include "memory/heap.hpp"
|
||||
#include "runtime/vmStructs.hpp"
|
||||
|
||||
typedef enum GEN_variant {
|
||||
|
@ -714,7 +714,7 @@ void AOTCodeHeap::sweep_dependent_methods(InstanceKlass* ik) {
|
||||
void AOTCodeHeap::sweep_method(AOTCompiledMethod *aot) {
|
||||
int indexes[] = {aot->method_index()};
|
||||
sweep_dependent_methods(indexes, 1);
|
||||
vmassert(aot->method()->code() != aot && aot->method()->aot_code() == NULL, "method still active");
|
||||
vmassert(aot->method()->code() != aot TIERED_ONLY( && aot->method()->aot_code() == NULL), "method still active");
|
||||
}
|
||||
|
||||
|
||||
|
@ -206,6 +206,7 @@ bool AOTCompiledMethod::make_not_entrant_helper(int new_state) {
|
||||
return true;
|
||||
}
|
||||
|
||||
#ifdef TIERED
|
||||
bool AOTCompiledMethod::make_entrant() {
|
||||
assert(!method()->is_old(), "reviving evolved method!");
|
||||
assert(*_state_adr != not_entrant, "%s", method()->has_aot_code() ? "has_aot_code() not cleared" : "caller didn't check has_aot_code()");
|
||||
@ -240,6 +241,7 @@ bool AOTCompiledMethod::make_entrant() {
|
||||
|
||||
return true;
|
||||
}
|
||||
#endif // TIERED
|
||||
|
||||
// We don't have full dependencies for AOT methods, so flushing is
|
||||
// more conservative than for nmethods.
|
||||
|
@ -194,7 +194,7 @@ private:
|
||||
virtual address verified_entry_point() const { return _code + _meta->verified_entry_offset(); }
|
||||
virtual void log_identity(xmlStream* stream) const;
|
||||
virtual void log_state_change() const;
|
||||
virtual bool make_entrant();
|
||||
virtual bool make_entrant() NOT_TIERED({ ShouldNotReachHere(); return false; });
|
||||
virtual bool make_not_entrant() { return make_not_entrant_helper(not_entrant); }
|
||||
virtual bool make_not_used() { return make_not_entrant_helper(not_used); }
|
||||
virtual address entry_point() const { return _code + _meta->entry_offset(); }
|
||||
|
@ -442,7 +442,7 @@ void DirectivesStack::init() {
|
||||
char str[] = "*.*";
|
||||
const char* error_msg = NULL;
|
||||
_default_directives->add_match(str, error_msg);
|
||||
#ifdef COMPILER1
|
||||
#if defined(COMPILER1) || INCLUDE_JVMCI
|
||||
_default_directives->_c1_store->EnableOption = true;
|
||||
#endif
|
||||
#ifdef COMPILER2
|
||||
|
@ -22,8 +22,12 @@
|
||||
*/
|
||||
|
||||
#include "precompiled.hpp"
|
||||
#ifdef COMPILER1
|
||||
#include "gc/z/c1/zBarrierSetC1.hpp"
|
||||
#endif
|
||||
#ifdef COMPILER2
|
||||
#include "gc/z/c2/zBarrierSetC2.hpp"
|
||||
#endif
|
||||
#include "gc/z/zBarrierSet.hpp"
|
||||
#include "gc/z/zBarrierSetAssembler.hpp"
|
||||
#include "gc/z/zGlobals.hpp"
|
||||
@ -33,8 +37,8 @@
|
||||
|
||||
ZBarrierSet::ZBarrierSet() :
|
||||
BarrierSet(make_barrier_set_assembler<ZBarrierSetAssembler>(),
|
||||
make_barrier_set_c1<ZBarrierSetC1>(),
|
||||
make_barrier_set_c2<ZBarrierSetC2>(),
|
||||
COMPILER1_PRESENT( make_barrier_set_c1<ZBarrierSetC1>() ) NOT_COMPILER1(NULL),
|
||||
COMPILER2_PRESENT( make_barrier_set_c2<ZBarrierSetC2>() ) NOT_COMPILER2(NULL),
|
||||
BarrierSet::FakeRtti(BarrierSet::ZBarrierSet)) {}
|
||||
|
||||
ZBarrierSetAssembler* ZBarrierSet::assembler() {
|
||||
|
@ -62,6 +62,8 @@ requires.properties= \
|
||||
vm.cds.custom.loaders \
|
||||
vm.cds.archived.java.heap \
|
||||
vm.graal.enabled \
|
||||
vm.compiler1.enabled \
|
||||
vm.compiler2.enabled \
|
||||
docker.support
|
||||
|
||||
# Minimum jtreg version
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2015, 2018, 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
|
||||
@ -29,6 +29,7 @@
|
||||
*
|
||||
* @build sun.hotspot.WhiteBox
|
||||
* @requires !(vm.cpu.features ~= ".*aes.*")
|
||||
* @requires vm.compiler1.enabled | !vm.graal.enabled
|
||||
* @run driver ClassFileInstaller sun.hotspot.WhiteBox
|
||||
* sun.hotspot.WhiteBox$WhiteBoxPermission
|
||||
* @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright 2016 Azul Systems, Inc. All Rights Reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
@ -40,29 +40,14 @@ import jdk.test.lib.process.ProcessTools;
|
||||
public class TestOnSpinWait {
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
|
||||
// Test C1 compiler
|
||||
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
|
||||
"-XX:+IgnoreUnrecognizedVMOptions", "-showversion",
|
||||
"-XX:+TieredCompilation", "-XX:TieredStopAtLevel=1", "-Xbatch",
|
||||
"-XX:+PrintCompilation", "-XX:+UnlockDiagnosticVMOptions",
|
||||
"-XX:+PrintInlining", Launcher.class.getName());
|
||||
|
||||
OutputAnalyzer analyzer = new OutputAnalyzer(pb.start());
|
||||
|
||||
analyzer.shouldHaveExitValue(0);
|
||||
|
||||
// The test is applicable only to C1 (present in Server VM).
|
||||
analyzer.shouldContain("java.lang.Thread::onSpinWait (1 bytes) intrinsic");
|
||||
|
||||
// Test C2 compiler
|
||||
pb = ProcessTools.createJavaProcessBuilder(
|
||||
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
|
||||
"-XX:+IgnoreUnrecognizedVMOptions", "-showversion",
|
||||
"-XX:-TieredCompilation", "-Xbatch",
|
||||
"-XX:+PrintCompilation", "-XX:+UnlockDiagnosticVMOptions",
|
||||
"-XX:+PrintInlining", Launcher.class.getName());
|
||||
|
||||
analyzer = new OutputAnalyzer(pb.start());
|
||||
OutputAnalyzer analyzer = new OutputAnalyzer(pb.start());
|
||||
|
||||
analyzer.shouldHaveExitValue(0);
|
||||
|
||||
|
71
test/hotspot/jtreg/compiler/onSpinWait/TestOnSpinWaitC1.java
Normal file
71
test/hotspot/jtreg/compiler/onSpinWait/TestOnSpinWaitC1.java
Normal file
@ -0,0 +1,71 @@
|
||||
/*
|
||||
* Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright 2016 Azul Systems, Inc. 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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @test TestOnSpinWaitC1
|
||||
* @summary (x86 only) checks that java.lang.Thread.onSpinWait is intrinsified
|
||||
* @bug 8147844
|
||||
* @library /test/lib
|
||||
* @modules java.base/jdk.internal.misc
|
||||
* @requires os.arch=="x86" | os.arch=="amd64" | os.arch=="x86_64"
|
||||
* @requires vm.compiler1.enabled
|
||||
* @run driver compiler.onSpinWait.TestOnSpinWait
|
||||
*/
|
||||
|
||||
package compiler.onSpinWait;
|
||||
|
||||
import jdk.test.lib.process.OutputAnalyzer;
|
||||
import jdk.test.lib.process.ProcessTools;
|
||||
|
||||
public class TestOnSpinWaitC1 {
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
|
||||
// Test C1 compiler
|
||||
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
|
||||
"-XX:+IgnoreUnrecognizedVMOptions", "-showversion",
|
||||
"-XX:+TieredCompilation", "-XX:TieredStopAtLevel=1", "-Xbatch",
|
||||
"-XX:+PrintCompilation", "-XX:+UnlockDiagnosticVMOptions",
|
||||
"-XX:+PrintInlining", Launcher.class.getName());
|
||||
|
||||
OutputAnalyzer analyzer = new OutputAnalyzer(pb.start());
|
||||
|
||||
analyzer.shouldHaveExitValue(0);
|
||||
analyzer.shouldContain("java.lang.Thread::onSpinWait (1 bytes) intrinsic");
|
||||
}
|
||||
|
||||
static class Launcher {
|
||||
|
||||
public static void main(final String[] args) throws Exception {
|
||||
int end = 20_000;
|
||||
|
||||
for (int i=0; i < end; i++) {
|
||||
test();
|
||||
}
|
||||
}
|
||||
static void test() {
|
||||
java.lang.Thread.onSpinWait();
|
||||
}
|
||||
}
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2009, 2018, 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
|
||||
@ -26,6 +26,7 @@
|
||||
* @bug 6859338
|
||||
* @summary Assertion failure in sharedRuntime.cpp
|
||||
*
|
||||
* @requires vm.compiler1.enabled | !vm.graal.enabled
|
||||
* @run main/othervm -Xcomp -XX:+IgnoreUnrecognizedVMOptions -XX:+UnlockDiagnosticVMOptions
|
||||
* -XX:-InlineObjectHash -Xbatch -XX:-ProfileInterpreter
|
||||
* compiler.runtime.Test6859338
|
||||
|
@ -362,6 +362,12 @@ public class TestMeetIncompatibleInterfaceArrays extends ClassLoader {
|
||||
System.out.println((j + 1) + ". invokation of " + baseClassName + i + "ASM.test() [::" +
|
||||
r.getName() + "() should be '" + tier[pass][j] + "' compiled]");
|
||||
|
||||
// Skip Profiling compilation (C1) when Tiered is disabled.
|
||||
boolean profile = (level[pass][j] == CompilerWhiteBoxTest.COMP_LEVEL_FULL_PROFILE);
|
||||
if (profile && CompilerWhiteBoxTest.skipOnTieredCompilation(false)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
WB.enqueueMethodForCompilation(r, level[pass][j]);
|
||||
|
||||
try {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2016 SAP SE. All rights reserved.
|
||||
* Copyright (c) 2016, 2018, SAP SE. 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
|
||||
@ -25,6 +25,7 @@
|
||||
* @test
|
||||
* @bug 8150646 8153013
|
||||
* @summary Add support for blocking compiles through whitebox API
|
||||
* @requires vm.compiler1.enabled | !vm.graal.enabled
|
||||
* @modules java.base/jdk.internal.misc
|
||||
* @library /test/lib /
|
||||
* @build sun.hotspot.WhiteBox
|
||||
|
@ -27,12 +27,12 @@ import java.util.Map;
|
||||
import java.util.ArrayList;
|
||||
|
||||
import jdk.test.lib.apps.LingeredApp;
|
||||
|
||||
/**
|
||||
* @test
|
||||
* @bug 8193124
|
||||
* @summary Test the clhsdb 'findpc' command
|
||||
* @requires vm.hasSA
|
||||
* @requires vm.compiler1.enabled
|
||||
* @library /test/lib
|
||||
* @run main/othervm ClhsdbFindPC
|
||||
*/
|
||||
|
@ -46,6 +46,11 @@ if grep "Client VM" $log; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if grep "TieredCompilation not supported in this VM" $log; then
|
||||
echo "TEST PASSED: Non-tiered Server VM. The test is useless"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if ! egrep '^[0-9.]+: \[compile level=[0-9]' $log; then
|
||||
if [ "${tiered}" == "on" ]; then
|
||||
echo "TEST FAILED: No PrintTieredEvents output"
|
||||
|
@ -39,6 +39,8 @@ requires.properties= \
|
||||
java.runtime.name \
|
||||
vm.gc.Z \
|
||||
vm.graal.enabled \
|
||||
vm.compiler1.enabled \
|
||||
vm.compiler2.enabled \
|
||||
vm.cds \
|
||||
vm.hasSA \
|
||||
vm.hasSAandCanAttach \
|
||||
|
@ -92,6 +92,8 @@ public class VMProps implements Callable<Map<String, String>> {
|
||||
map.put("vm.cds.archived.java.heap", vmCDSForArchivedJavaHeap());
|
||||
// vm.graal.enabled is true if Graal is used as JIT
|
||||
map.put("vm.graal.enabled", isGraalEnabled());
|
||||
map.put("vm.compiler1.enabled", isCompiler1Enabled());
|
||||
map.put("vm.compiler2.enabled", isCompiler2Enabled());
|
||||
map.put("docker.support", dockerSupport());
|
||||
map.put("release.implementor", implementor());
|
||||
vmGC(map); // vm.gc.X = true/false
|
||||
@ -390,6 +392,23 @@ public class VMProps implements Callable<Map<String, String>> {
|
||||
return Compiler.isGraalEnabled() ? "true" : "false";
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if Compiler1 is present.
|
||||
*
|
||||
* @return true if Compiler1 is used as JIT compiler, either alone or as part of the tiered system.
|
||||
*/
|
||||
protected String isCompiler1Enabled() {
|
||||
return Compiler.isC1Enabled() ? "true" : "false";
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if Compiler2 is present.
|
||||
*
|
||||
* @return true if Compiler2 is used as JIT compiler, either alone or as part of the tiered system.
|
||||
*/
|
||||
protected String isCompiler2Enabled() {
|
||||
return Compiler.isC2Enabled() ? "true" : "false";
|
||||
}
|
||||
|
||||
/**
|
||||
* A simple check for docker support
|
||||
|
Loading…
Reference in New Issue
Block a user