Skip to content

Commit

Permalink
Merge
Browse files Browse the repository at this point in the history
  • Loading branch information
slowhog committed Jul 13, 2020
2 parents b852688 + 77c83d9 commit 92be493
Show file tree
Hide file tree
Showing 813 changed files with 1,757 additions and 2,068 deletions.
1 change: 1 addition & 0 deletions .hgtags
Original file line number Diff line number Diff line change
Expand Up @@ -645,3 +645,4 @@ f143729ca00ec14a98ea5c7f73acba88da97746e jdk-15+23
06c9f89459daba98395fad726100feb44f89ba71 jdk-15+28
b58fc60580550a4a587cab729d8fd87223ad6932 jdk-15+29
6909e4a1f25bfe9a2727026f5845fc1fc44a36aa jdk-15+30
a32f58c6b8be81877411767de7ba9c4cf087c1b5 jdk-15+31
4 changes: 2 additions & 2 deletions src/demo/share/jfc/SwingSet2/resources/swingset_ja.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2010, 2019, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2010, 2020, Oracle and/or its affiliates. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
Expand Down Expand Up @@ -388,7 +388,7 @@ OptionPaneDemo.confirmbutton=\u78BA\u8A8D\u30C0\u30A4\u30A2\u30ED\u30B0\u306E\u8
OptionPaneDemo.messagebutton=\u30E1\u30C3\u30BB\u30FC\u30B8\u30FB\u30C0\u30A4\u30A2\u30ED\u30B0\u306E\u8868\u793A

OptionPaneDemo.warningtitle=\u8B66\u544A\u30C0\u30A4\u30A2\u30ED\u30B0\u306E\u4F8B
OptionPaneDemo.warningtext=<html><P><font color=black>\u3053\u308C\u306F<font color=red><b>\u7DCA\u6025\u653E\u9001\u30B7\u30B9\u30C6\u30E0</b></font>\u306E\u30C6\u30B9\u30C8\u3067\u3059\u3002<i><b>\u3053\u308C\u306F\u5358\u306A\u308B<br>\u30C6\u30B9\u30C8\u3067\u3059</b></i>\u3002\u30ED\u30FC\u30AB\u30EB\u30FB\u30A4\u30F3\u30C8\u30E9\u30CD\u30C3\u30C8\u306EWeb\u30DE\u30B9\u30BF\u30FC\u304C<br><font color=blue><b>\u9023\u90A6\u653F\u5E9C</b></font>\u304A\u3088\u3073<font color=blue><b>\u5DDE</b></font>\u5F53\u5C40\u3068\u81EA\u4E3B\u7684\u306B\u5354\u529B\u3057\u3001\u7DCA\u6025\u4E8B\u614B\u306E<br>\u767A\u751F\u6642\u306B\u901A\u5831\u3092\u884C\u3046\u305F\u3081\u306B\u3053\u306E\u30B7\u30B9\u30C6\u30E0\u3092\u958B\u767A\u3057\u307E\u3057\u305F\u3002<br>\u5B9F\u969B\u306E\u7DCA\u6025\u6642\u306B\u306F\u3001\u304A\u805E\u304D\u306B\u306A\u3063\u305F\u4FE1\u53F7\u306B\u7D9A\u3044\u3066\u5F53\u5C40\u304B\u3089\u306E<br>\u60C5\u5831\u3001\u30CB\u30E5\u30FC\u30B9\u307E\u305F\u306F\u6307\u793A\u304C\u901A\u77E5\u3055\u308C\u307E\u3059\u3002\u3053\u308C\u3067\u3001<br><font color=red><b>\u7DCA\u6025\u653E\u9001\u30B7\u30B9\u30C6\u30E0</b></font></font>\u306E\u30C6\u30B9\u30C8\u3092<br>\u7D42\u4E86\u3057\u307E\u3059\u3002</P><P><br>\u958B\u767A\u8005\u5411\u3051\u306E\u6CE8\u610F: \u3053\u306E\u30C0\u30A4\u30A2\u30ED\u30B0\u306E\u30C7\u30E2\u3067\u306F\u3001\u30C6\u30AD\u30B9\u30C8\u306E\u30D5\u30A9\u30FC\u30DE\u30C3\u30C8\u306BHTML\u304C\u4F7F\u7528\u3055\u308C\u3066\u3044\u307E\u3059\u3002</P></html>
OptionPaneDemo.warningtext=<html><P><font color=black>\u3053\u308C\u306F<font color=red><b>\u7DCA\u6025\u653E\u9001\u30B7\u30B9\u30C6\u30E0</b></font>\u306E\u30C6\u30B9\u30C8\u3067\u3059\u3002<i><b>\u3053\u308C\u306F\u5358\u306A\u308B<br>\u30C6\u30B9\u30C8\u3067\u3059</b></i>\u3002\u30ED\u30FC\u30AB\u30EB\u30FB\u30A4\u30F3\u30C8\u30E9\u30CD\u30C3\u30C8\u306EWeb\u30DE\u30B9\u30BF\u30FC\u304C<br><font color=blue><b>\u9023\u90A6\u653F\u5E9C</b></font>\u304A\u3088\u3073<font color=blue><b>\u5DDE</b></font>\u5F53\u5C40\u3068\u81EA\u4E3B\u7684\u306B\u5354\u529B\u3057\u3001\u7DCA\u6025\u4E8B\u614B\u306E<br>\u767A\u751F\u6642\u306B\u901A\u5831\u3092\u884C\u3046\u305F\u3081\u306B\u3053\u306E\u30B7\u30B9\u30C6\u30E0\u3092\u958B\u767A\u3057\u307E\u3057\u305F\u3002<br>\u5B9F\u969B\u306E\u7DCA\u6025\u6642\u306B\u306F\u3001\u304A\u805E\u304D\u306B\u306A\u3063\u305F\u4FE1\u53F7\u306B\u7D9A\u3044\u3066\u5F53\u5C40\u304B\u3089\u306E<br>\u60C5\u5831\u3001\u30CB\u30E5\u30FC\u30B9\u307E\u305F\u306F\u6307\u793A\u304C\u901A\u77E5\u3055\u308C\u307E\u3059\u3002\u3053\u308C\u3067\u3001<br><font color=red><b>\u7DCA\u6025\u653E\u9001\u30B7\u30B9\u30C6\u30E0</b></font></font>\u306E\u30C6\u30B9\u30C8\u3092<br>\u7D42\u4E86\u3057\u307E\u3059\u3002</P><P><br>\u958B\u767A\u8005\u5411\u3051\u306E\u30CE\u30FC\u30C8: \u3053\u306E\u30C0\u30A4\u30A2\u30ED\u30B0\u306E\u30C7\u30E2\u3067\u306F\u3001\u30C6\u30AD\u30B9\u30C8\u306E\u30D5\u30A9\u30FC\u30DE\u30C3\u30C8\u306BHTML\u304C\u4F7F\u7528\u3055\u308C\u3066\u3044\u307E\u3059\u3002</P></html>

OptionPaneDemo.messagetext=\u74F6\u306B\u5165\u308C\u305F\u30E1\u30C3\u30BB\u30FC\u30B8

Expand Down
60 changes: 44 additions & 16 deletions src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2133,20 +2133,34 @@ int MacroAssembler::push_fp(unsigned int bitset, Register stack) {
regs[count++] = reg;
bitset >>= 1;
}
regs[count++] = zr->encoding_nocheck();
count &= ~1; // Only push an even number of regs

// Always pushing full 128 bit registers.
if (count) {
stpq(as_FloatRegister(regs[0]), as_FloatRegister(regs[1]), Address(pre(stack, -count * wordSize * 2)));
words_pushed += 2;
if (count == 0) {
return 0;
}
for (int i = 2; i < count; i += 2) {

if (count == 1) {
strq(as_FloatRegister(regs[0]), Address(pre(stack, -wordSize * 2)));
return 1;
}

bool odd = (count & 1) == 1;
int push_slots = count + (odd ? 1 : 0);

// Always pushing full 128 bit registers.
stpq(as_FloatRegister(regs[0]), as_FloatRegister(regs[1]), Address(pre(stack, -push_slots * wordSize * 2)));
words_pushed += 2;

for (int i = 2; i + 1 < count; i += 2) {
stpq(as_FloatRegister(regs[i]), as_FloatRegister(regs[i+1]), Address(stack, i * wordSize * 2));
words_pushed += 2;
}

assert(words_pushed == count, "oops, pushed != count");
if (odd) {
strq(as_FloatRegister(regs[count - 1]), Address(stack, (count - 1) * wordSize * 2));
words_pushed++;
}

assert(words_pushed == count, "oops, pushed(%d) != count(%d)", words_pushed, count);
return count;
}

Expand All @@ -2161,19 +2175,33 @@ int MacroAssembler::pop_fp(unsigned int bitset, Register stack) {
regs[count++] = reg;
bitset >>= 1;
}
regs[count++] = zr->encoding_nocheck();
count &= ~1;

for (int i = 2; i < count; i += 2) {
ldpq(as_FloatRegister(regs[i]), as_FloatRegister(regs[i+1]), Address(stack, i * wordSize * 2));
words_pushed += 2;
if (count == 0) {
return 0;
}
if (count) {
ldpq(as_FloatRegister(regs[0]), as_FloatRegister(regs[1]), Address(post(stack, count * wordSize * 2)));

if (count == 1) {
ldrq(as_FloatRegister(regs[0]), Address(post(stack, wordSize * 2)));
return 1;
}

bool odd = (count & 1) == 1;
int push_slots = count + (odd ? 1 : 0);

if (odd) {
ldrq(as_FloatRegister(regs[count - 1]), Address(stack, (count - 1) * wordSize * 2));
words_pushed++;
}

for (int i = 2; i + 1 < count; i += 2) {
ldpq(as_FloatRegister(regs[i]), as_FloatRegister(regs[i+1]), Address(stack, i * wordSize * 2));
words_pushed += 2;
}

assert(words_pushed == count, "oops, pushed != count");
ldpq(as_FloatRegister(regs[0]), as_FloatRegister(regs[1]), Address(post(stack, push_slots * wordSize * 2)));
words_pushed += 2;

assert(words_pushed == count, "oops, pushed(%d) != count(%d)", words_pushed, count);

return count;
}
Expand Down
7 changes: 7 additions & 0 deletions src/hotspot/cpu/aarch64/templateTable_aarch64.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2975,6 +2975,9 @@ void TemplateTable::fast_storefield(TosState state)
// access constant pool cache
__ get_cache_and_index_at_bcp(r2, r1, 1);

// Must prevent reordering of the following cp cache loads with bytecode load
__ membar(MacroAssembler::LoadLoad);

// test for volatile with r3
__ ldrw(r3, Address(r2, in_bytes(base +
ConstantPoolCacheEntry::flags_offset())));
Expand Down Expand Up @@ -3067,6 +3070,10 @@ void TemplateTable::fast_accessfield(TosState state)

// access constant pool cache
__ get_cache_and_index_at_bcp(r2, r1, 1);

// Must prevent reordering of the following cp cache loads with bytecode load
__ membar(MacroAssembler::LoadLoad);

__ ldr(r1, Address(r2, in_bytes(ConstantPoolCache::base_offset() +
ConstantPoolCacheEntry::f2_offset())));
__ ldrw(r3, Address(r2, in_bytes(ConstantPoolCache::base_offset() +
Expand Down
2 changes: 1 addition & 1 deletion src/hotspot/share/gc/shenandoah/shenandoahCodeRoots.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,7 @@ class ShenandoahNMethodUnlinkClosure : public NMethodClosure {

// Heal oops and disarm
if (_bs->is_armed(nm)) {
ShenandoahEvacOOMScope oom_evac_scope;
ShenandoahNMethod::heal_nmethod_metadata(nm_data);
_bs->disarm(nm);
}
Expand Down Expand Up @@ -311,7 +312,6 @@ class ShenandoahUnlinkTask : public AbstractGangTask {

virtual void work(uint worker_id) {
ICRefillVerifierMark mark(_verifier);
ShenandoahEvacOOMScope evac_scope;
_iterator.nmethods_do(&_cl);
}

Expand Down
17 changes: 15 additions & 2 deletions src/hotspot/share/jfr/periodic/jfrPeriodic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
#include "runtime/arguments.hpp"
#include "runtime/flags/jvmFlag.hpp"
#include "runtime/globals.hpp"
#include "runtime/interfaceSupport.inline.hpp"
#include "runtime/os.hpp"
#include "runtime/os_perf.hpp"
#include "runtime/thread.inline.hpp"
Expand Down Expand Up @@ -174,7 +175,13 @@ TRACE_REQUEST_FUNC(CPULoad) {
double u = 0; // user time
double s = 0; // kernel time
double t = 0; // total time
int ret_val = JfrOSInterface::cpu_loads_process(&u, &s, &t);
int ret_val = OS_ERR;
{
// Can take some time on certain platforms, especially under heavy load.
// Transition to native to avoid unnecessary stalls for pending safepoint synchronizations.
ThreadToNativeFromVM transition((JavaThread*)Thread::current());
ret_val = JfrOSInterface::cpu_loads_process(&u, &s, &t);
}
if (ret_val == OS_ERR) {
log_debug(jfr, system)( "Unable to generate requestable event CPULoad");
return;
Expand Down Expand Up @@ -248,7 +255,13 @@ TRACE_REQUEST_FUNC(SystemProcess) {

TRACE_REQUEST_FUNC(ThreadContextSwitchRate) {
double rate = 0.0;
int ret_val = JfrOSInterface::context_switch_rate(&rate);
int ret_val = OS_ERR;
{
// Can take some time on certain platforms, especially under heavy load.
// Transition to native to avoid unnecessary stalls for pending safepoint synchronizations.
ThreadToNativeFromVM transition((JavaThread*)Thread::current());
ret_val = JfrOSInterface::context_switch_rate(&rate);
}
if (ret_val == OS_ERR) {
log_debug(jfr, system)( "Unable to generate requestable event ThreadContextSwitchRate");
return;
Expand Down
11 changes: 11 additions & 0 deletions src/hotspot/share/memory/filemap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -714,6 +714,11 @@ bool FileMapInfo::validate_boot_class_paths() {
num = rp_len;
}
mismatch = check_paths(1, num, rp_array);
} else {
// create_path_array() ignores non-existing paths. Although the dump time and runtime boot classpath lengths
// are the same initially, after the call to create_path_array(), the runtime boot classpath length could become
// shorter. We consider boot classpath mismatch in this case.
mismatch = true;
}
}

Expand All @@ -740,6 +745,12 @@ bool FileMapInfo::validate_app_class_paths(int shared_app_paths_len) {
// None of the jar file specified in the runtime -cp exists.
return classpath_failure("None of the jar file specified in the runtime -cp exists: -Djava.class.path=", appcp);
}
if (rp_array->length() < shared_app_paths_len) {
// create_path_array() ignores non-existing paths. Although the dump time and runtime app classpath lengths
// are the same initially, after the call to create_path_array(), the runtime app classpath length could become
// shorter. We consider app classpath mismatch in this case.
return classpath_failure("[APP classpath mismatch, actual: -Djava.class.path=", appcp);
}

// Handling of non-existent entries in the classpath: we eliminate all the non-existent
// entries from both the dump time classpath (ClassLoader::update_class_path_entry_list)
Expand Down
4 changes: 2 additions & 2 deletions src/hotspot/share/opto/output.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2021,8 +2021,8 @@ void PhaseOutput::ScheduleAndBundle() {
if (!C->do_scheduling())
return;

// Scheduling code works only with pairs (16 bytes) maximum.
if (C->max_vector_size() > 16)
// Scheduling code works only with pairs (8 bytes) maximum.
if (C->max_vector_size() > 8)
return;

Compile::TracePhase tp("isched", &timers[_t_instrSched]);
Expand Down
6 changes: 5 additions & 1 deletion src/java.base/share/classes/java/lang/ProcessHandleImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,12 @@ final class ProcessHandleImpl implements ProcessHandle {
ThreadGroup tg = Thread.currentThread().getThreadGroup();
while (tg.getParent() != null) tg = tg.getParent();
ThreadGroup systemThreadGroup = tg;

// For a debug build, the stack shadow zone is larger;
// Increase the total stack size to avoid potential stack overflow.
int debugDelta = "release".equals(System.getProperty("jdk.debug")) ? 0 : (4*4096);
final long stackSize = Boolean.getBoolean("jdk.lang.processReaperUseDefaultStackSize")
? 0 : REAPER_DEFAULT_STACKSIZE;
? 0 : REAPER_DEFAULT_STACKSIZE + debugDelta;

ThreadFactory threadFactory = grimReaper -> {
Thread t = new Thread(systemThreadGroup, grimReaper,
Expand Down
33 changes: 18 additions & 15 deletions src/java.base/share/classes/java/security/Provider.java
Original file line number Diff line number Diff line change
Expand Up @@ -868,7 +868,7 @@ private void check(String directive) {
// For backward compatibility, the registration ordering of
// SecureRandom (RNG) algorithms needs to be preserved for
// "new SecureRandom()" calls when this provider is used
private transient Set<Service> prngServices;
private transient Set<String> prngAlgos;

// Map<ServiceKey,Service>
// used for services added via legacy methods, init on demand
Expand Down Expand Up @@ -1089,7 +1089,7 @@ private void implClear() {
legacyChanged = false;
servicesChanged = false;
serviceSet = null;
prngServices = null;
prngAlgos = null;
super.clear();
putId();
}
Expand Down Expand Up @@ -1221,7 +1221,7 @@ private void parseLegacyPut(String name, String value) {
s.className = className;

if (type.equals("SecureRandom")) {
updateSecureRandomEntries(true, s);
updateSecureRandomEntries(true, s.algorithm);
}
} else { // attribute
// e.g. put("MessageDigest.SHA-1 ImplementedIn", "Software");
Expand Down Expand Up @@ -1383,25 +1383,25 @@ protected void putService(Service s) {
synchronized (this) {
putPropertyStrings(s);
if (type.equals("SecureRandom")) {
updateSecureRandomEntries(true, s);
updateSecureRandomEntries(true, s.algorithm);
}
}
}

private void updateSecureRandomEntries(boolean doAdd, Service s) {
// keep tracks of the registered secure random algos and store them in order
private void updateSecureRandomEntries(boolean doAdd, String s) {
Objects.requireNonNull(s);
if (doAdd) {
if (prngServices == null) {
prngServices = new LinkedHashSet<Service>();
if (prngAlgos == null) {
prngAlgos = new LinkedHashSet<String>();
}
prngServices.add(s);
prngAlgos.add(s);
} else {
prngServices.remove(s);
prngAlgos.remove(s);
}

if (debug != null) {
debug.println((doAdd? "Add":"Remove") + " SecureRandom algo " +
s.getAlgorithm());
debug.println((doAdd? "Add":"Remove") + " SecureRandom algo " + s);
}
}

Expand All @@ -1411,12 +1411,15 @@ synchronized Service getDefaultSecureRandomService() {
checkInitialized();

if (legacyChanged) {
prngServices = null;
prngAlgos = null;
ensureLegacyParsed();
}

if (prngServices != null && !prngServices.isEmpty()) {
return prngServices.iterator().next();
if (prngAlgos != null && !prngAlgos.isEmpty()) {
// IMPORTANT: use the Service obj returned by getService(...) call
// as providers may override putService(...)/getService(...) and
// return their own Service objects
return getService("SecureRandom", prngAlgos.iterator().next());
}

return null;
Expand Down Expand Up @@ -1516,7 +1519,7 @@ private void implRemoveService(Service s) {
synchronized (this) {
removePropertyStrings(s);
if (type.equals("SecureRandom")) {
updateSecureRandomEntries(false, s);
updateSecureRandomEntries(false, s.algorithm);
}
}
}
Expand Down
Loading

0 comments on commit 92be493

Please sign in to comment.