Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
Automatic merge of jdk:master into master
  • Loading branch information
duke committed Mar 7, 2021
2 parents 587d6c0 + 18fc350 commit 42387eb46466c4462085e898ea8a178c5d149d2b
Showing with 549 additions and 100 deletions.
  1. +2 −0 make/test/BuildMicrobenchmark.gmk
  2. +30 −0 src/hotspot/share/opto/addnode.cpp
  3. +3 −1 src/hotspot/share/opto/addnode.hpp
  4. +0 −1 src/java.base/share/classes/javax/crypto/CryptoAllPermission.java
  5. +1 −1 src/java.base/share/classes/javax/crypto/CryptoPermission.java
  6. +20 −1 src/java.base/share/classes/sun/security/util/Cache.java
  7. +1 −2 src/java.management/share/classes/javax/management/loading/package.html
  8. +1 −2 src/java.management/share/classes/javax/management/monitor/package.html
  9. +1 −2 src/java.management/share/classes/javax/management/package.html
  10. +3 −1 src/jdk.jpackage/windows/classes/jdk/jpackage/internal/WinExeBundler.java
  11. +4 −1 test/hotspot/jtreg/compiler/whitebox/BlockingCompilation.java
  12. +3 −0 test/hotspot/jtreg/compiler/whitebox/ClearMethodStateTest.java
  13. +4 −1 test/hotspot/jtreg/compiler/whitebox/DeoptimizeAllTest.java
  14. +4 −1 test/hotspot/jtreg/compiler/whitebox/DeoptimizeFramesTest.java
  15. +4 −1 test/hotspot/jtreg/compiler/whitebox/DeoptimizeMultipleOSRTest.java
  16. +4 −1 test/hotspot/jtreg/compiler/whitebox/EnqueueMethodForCompilationTest.java
  17. +4 −1 test/hotspot/jtreg/compiler/whitebox/ForceNMethodSweepTest.java
  18. +4 −1 test/hotspot/jtreg/compiler/whitebox/GetNMethodTest.java
  19. +5 −3 test/hotspot/jtreg/compiler/whitebox/IsMethodCompilableTest.java
  20. +4 −1 test/hotspot/jtreg/compiler/whitebox/MakeMethodNotCompilableTest.java
  21. +2 −1 test/hotspot/jtreg/compiler/whitebox/OSRFailureLevel4Test.java
  22. +46 −56 test/hotspot/jtreg/runtime/cds/appcds/SharedArchiveConsistency.java
  23. +0 −1 test/jdk/ProblemList.txt
  24. +17 −12 test/jdk/java/awt/image/multiresolution/MultiResolutionIcon/IconTest.java
  25. +25 −8 test/jdk/javax/swing/JComponent/7154030/bug7154030.java
  26. +229 −0 test/langtools/jdk/javadoc/doclet/testTagOrder/TestTagOrder.java
  27. +128 −0 test/micro/org/openjdk/bench/java/security/CacheBench.java
@@ -84,6 +84,7 @@ $(eval $(call SetupJavaCompilation, BUILD_INDIFY, \
#### Compile Targets

# Building microbenchmark requires the jdk.unsupported and java.management modules.
# sun.security.util is required to compile Cache benchmark

# Build microbenchmark suite for the current JDK
$(eval $(call SetupJavaCompilation, BUILD_JDK_MICROBENCHMARK, \
@@ -93,6 +94,7 @@ $(eval $(call SetupJavaCompilation, BUILD_JDK_MICROBENCHMARK, \
DISABLED_WARNINGS := processing rawtypes cast serial, \
SRC := $(MICROBENCHMARK_SRC), \
BIN := $(MICROBENCHMARK_CLASSES), \
JAVAC_FLAGS := --add-exports java.base/sun.security.util=ALL-UNNAMED, \
JAVA_FLAGS := --add-modules jdk.unsupported --limit-modules java.management, \
))

@@ -913,6 +913,22 @@ const Type *OrLNode::add_ring( const Type *t0, const Type *t1 ) const {
}

//=============================================================================

const Type* XorINode::Value(PhaseGVN* phase) const {
Node* in1 = in(1);
Node* in2 = in(2);
const Type* t1 = phase->type(in1);
const Type* t2 = phase->type(in2);
if (t1 == Type::TOP || t2 == Type::TOP) {
return Type::TOP;
}
// x ^ x ==> 0
if (in1->eqv_uncast(in2)) {
return add_id();
}
return AddNode::Value(phase);
}

//------------------------------add_ring---------------------------------------
// Supplied function returns the sum of the inputs IN THE CURRENT RING. For
// the logical operations the ring's ADD is really a logical OR function.
@@ -948,6 +964,20 @@ const Type *XorLNode::add_ring( const Type *t0, const Type *t1 ) const {
return TypeLong::make( r0->get_con() ^ r1->get_con() );
}

const Type* XorLNode::Value(PhaseGVN* phase) const {
Node* in1 = in(1);
Node* in2 = in(2);
const Type* t1 = phase->type(in1);
const Type* t2 = phase->type(in2);
if (t1 == Type::TOP || t2 == Type::TOP) {
return Type::TOP;
}
// x ^ x ==> 0
if (in1->eqv_uncast(in2)) {
return add_id();
}
return AddNode::Value(phase);
}

Node* MaxNode::build_min_max(Node* a, Node* b, bool is_max, bool is_unsigned, const Type* t, PhaseGVN& gvn) {
bool is_int = gvn.type(a)->isa_int();
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 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
@@ -212,6 +212,7 @@ class XorINode : public AddNode {
virtual const Type *add_ring( const Type *, const Type * ) const;
virtual const Type *add_id() const { return TypeInt::ZERO; }
virtual const Type *bottom_type() const { return TypeInt::INT; }
virtual const Type *Value(PhaseGVN *phase) const;
virtual uint ideal_reg() const { return Op_RegI; }
};

@@ -224,6 +225,7 @@ class XorLNode : public AddNode {
virtual const Type *add_ring( const Type *, const Type * ) const;
virtual const Type *add_id() const { return TypeLong::ZERO; }
virtual const Type *bottom_type() const { return TypeLong::LONG; }
virtual const Type *Value(PhaseGVN *phase) const;
virtual uint ideal_reg() const { return Op_RegL; }
};

@@ -32,7 +32,6 @@
/**
* The CryptoAllPermission is a permission that implies
* any other crypto permissions.
* <p>
*
* @see java.security.Permission
* @see java.security.AllPermission
@@ -39,7 +39,7 @@
* CryptoPermission object is used to represent
* the ability of an application/applet to use certain
* algorithms with certain key sizes and other
* restrictions in certain environments. <p>
* restrictions in certain environments.
*
* @see java.security.Permission
*
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2002, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2002, 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
@@ -248,6 +248,7 @@ public void accept(CacheVisitor<K,V> visitor) {
private final Map<K, CacheEntry<K,V>> cacheMap;
private int maxSize;
private long lifetime;
private long nextExpirationTime = Long.MAX_VALUE;

// ReferenceQueue is of type V instead of Cache<K,V>
// to allow SoftCacheEntry to extend SoftReference<V>
@@ -317,12 +318,18 @@ private void expungeExpiredEntries() {
}
int cnt = 0;
long time = System.currentTimeMillis();
if (nextExpirationTime > time) {
return;
}
nextExpirationTime = Long.MAX_VALUE;
for (Iterator<CacheEntry<K,V>> t = cacheMap.values().iterator();
t.hasNext(); ) {
CacheEntry<K,V> entry = t.next();
if (entry.isValid(time) == false) {
t.remove();
cnt++;
} else if (nextExpirationTime > entry.getExpirationTime()) {
nextExpirationTime = entry.getExpirationTime();
}
}
if (DEBUG) {
@@ -356,6 +363,9 @@ public synchronized void put(K key, V value) {
emptyQueue();
long expirationTime = (lifetime == 0) ? 0 :
System.currentTimeMillis() + lifetime;
if (expirationTime < nextExpirationTime) {
nextExpirationTime = expirationTime;
}
CacheEntry<K,V> newEntry = newEntry(key, value, expirationTime, queue);
CacheEntry<K,V> oldEntry = cacheMap.put(key, newEntry);
if (oldEntry != null) {
@@ -470,6 +480,7 @@ protected CacheEntry<K,V> newEntry(K key, V value,

V getValue();

long getExpirationTime();
}

private static class HardCacheEntry<K,V> implements CacheEntry<K,V> {
@@ -492,6 +503,10 @@ public V getValue() {
return value;
}

public long getExpirationTime() {
return expirationTime;
}

public boolean isValid(long currentTime) {
boolean valid = (currentTime <= expirationTime);
if (valid == false) {
@@ -529,6 +544,10 @@ public V getValue() {
return get();
}

public long getExpirationTime() {
return expirationTime;
}

public boolean isValid(long currentTime) {
boolean valid = (currentTime <= expirationTime) && (get() != null);
if (valid == false) {
@@ -66,8 +66,7 @@
subclass of <code>MLet</code> that implements
<code>PrivateClassLoader</code>.</p>

<p id="spec">
@see <a href="https://jcp.org/aboutJava/communityprocess/mrel/jsr160/index2.html">
@see <a id="spec" href="https://jcp.org/aboutJava/communityprocess/mrel/jsr160/index2.html">
JMX Specification, version 1.4</a>

@since 1.5
@@ -183,8 +183,7 @@

</li>
</ul>
<p id="spec">
@see <a href="https://jcp.org/aboutJava/communityprocess/mrel/jsr160/index2.html">
@see <a id="spec" href="https://jcp.org/aboutJava/communityprocess/mrel/jsr160/index2.html">
JMX Specification, version 1.4</a>
@since 1.5

@@ -388,8 +388,7 @@ <h4 id="interop-1.2">If the remote MBean Server is 1.2</h4>

</ul>

<p id="spec">
@see <a href="https://jcp.org/aboutJava/communityprocess/mrel/jsr160/index2.html">
@see <a id="spec" href="https://jcp.org/aboutJava/communityprocess/mrel/jsr160/index2.html">
JMX Specification, version 1.4</a>

@since 1.5
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2017, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2017, 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
@@ -141,6 +141,8 @@ private Path buildEXE(Map<String, ? super Object> params, Path msi,

Files.copy(exePath, dstExePath);

dstExePath.toFile().setWritable(true, true);

Log.verbose(MessageFormat.format(
I18N.getString("message.output-location"),
outdir.toAbsolutePath().toString()));
@@ -25,9 +25,12 @@
* @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 /
*
* @requires vm.compiler1.enabled | !vm.graal.enabled
* @requires vm.opt.DeoptimizeALot != true
*
* @build sun.hotspot.WhiteBox
* @run driver ClassFileInstaller sun.hotspot.WhiteBox
* @run main/othervm
@@ -28,6 +28,9 @@
* @library /test/lib /
* @modules java.base/jdk.internal.misc
* java.management
*
* @requires vm.opt.DeoptimizeALot != true
*
* @build sun.hotspot.WhiteBox
* @run driver ClassFileInstaller sun.hotspot.WhiteBox
* @run main/othervm -Xbootclasspath/a:. -Xmixed -XX:+UnlockDiagnosticVMOptions
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2013, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2013, 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
@@ -28,6 +28,9 @@
* @library /test/lib /
* @modules java.base/jdk.internal.misc
* java.management
*
* @requires vm.opt.DeoptimizeALot != true
*
* @build sun.hotspot.WhiteBox
* @run driver ClassFileInstaller sun.hotspot.WhiteBox
* @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2014, 2020, 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
@@ -28,6 +28,9 @@
* @library /test/lib /
* @modules java.base/jdk.internal.misc
* java.management
*
* @requires vm.opt.DeoptimizeALot != true
*
* @build sun.hotspot.WhiteBox
* @run driver ClassFileInstaller sun.hotspot.WhiteBox
* @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2013, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2013, 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
@@ -29,6 +29,9 @@
* @library /test/lib /
* @modules java.base/jdk.internal.misc
* java.management
*
* @requires vm.opt.DeoptimizeALot != true
*
* @build sun.hotspot.WhiteBox
* @run driver ClassFileInstaller sun.hotspot.WhiteBox
* @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2013, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2013, 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
@@ -28,6 +28,9 @@
* @library /test/lib /
* @modules java.base/jdk.internal.misc
* java.management
*
* @requires vm.opt.DeoptimizeALot != true
*
* @build sun.hotspot.WhiteBox
* @run driver ClassFileInstaller sun.hotspot.WhiteBox
* @run main/othervm -Xbootclasspath/a:. -Xmixed -XX:+UnlockDiagnosticVMOptions
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2014, 2020, 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
@@ -28,6 +28,9 @@
* @library /test/lib /
* @modules java.base/jdk.internal.misc
* java.management
*
* @requires vm.opt.DeoptimizeALot != true
*
* @build sun.hotspot.WhiteBox
* @run driver ClassFileInstaller sun.hotspot.WhiteBox
* @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2014, 2020, 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
@@ -28,6 +28,9 @@
* @library /test/lib /
* @modules java.base/jdk.internal.misc
* java.management
*
* @requires vm.opt.DeoptimizeALot != true
*
* @build sun.hotspot.WhiteBox
* @run driver ClassFileInstaller sun.hotspot.WhiteBox
* @run main/othervm -Xbootclasspath/a:. -Xmixed -XX:+UnlockDiagnosticVMOptions
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2013, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2013, 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
@@ -25,12 +25,14 @@
* @test IsMethodCompilableTest
* @bug 8007270 8006683 8007288 8022832
* @summary testing of WB::isMethodCompilable()
* @requires vm.flavor == "server" & (vm.opt.TieredStopAtLevel == null | vm.opt.TieredStopAtLevel == 4)
* @requires !vm.emulatedClient
* @library /test/lib /
* @modules java.base/jdk.internal.misc
* java.management
*
* @requires vm.opt.DeoptimizeALot != true
* @requires vm.flavor == "server" & (vm.opt.TieredStopAtLevel == null | vm.opt.TieredStopAtLevel == 4)
* @requires !vm.emulatedClient
*
* @build sun.hotspot.WhiteBox
* @run driver ClassFileInstaller sun.hotspot.WhiteBox
* @run main/othervm/timeout=2400 -XX:-TieredCompilation -Xmixed
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2013, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2013, 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
@@ -28,6 +28,9 @@
* @library /test/lib /
* @modules java.base/jdk.internal.misc
* java.management
*
* @requires vm.opt.DeoptimizeALot != true
*
* @build sun.hotspot.WhiteBox
* @run driver ClassFileInstaller sun.hotspot.WhiteBox
* @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions

0 comments on commit 42387eb

Please sign in to comment.