Skip to content

Commit

Permalink
Merge
Browse files Browse the repository at this point in the history
  • Loading branch information
JesperIRL committed Feb 4, 2021
2 parents 8760688 + 1a7040e commit 9b7a8f1
Show file tree
Hide file tree
Showing 56 changed files with 2,576 additions and 148 deletions.
43 changes: 35 additions & 8 deletions src/hotspot/os/linux/os_linux.cpp
Expand Up @@ -4699,19 +4699,46 @@ int os::active_processor_count() {
return active_cpus;
}

static bool should_warn_invalid_processor_id() {
if (os::processor_count() == 1) {
// Don't warn if we only have one processor
return false;
}

static volatile int warn_once = 1;

if (Atomic::load(&warn_once) == 0 ||
Atomic::xchg(&warn_once, 0) == 0) {
// Don't warn more than once
return false;
}

return true;
}

uint os::processor_id() {
const int id = Linux::sched_getcpu();

#ifndef PRODUCT
if (UseDebuggerErgo1 && id >= _processor_count) {
// Some debuggers limit the processor count without limiting
// the returned processor ids. Fake the processor id.
return 0;
if (id < processor_count()) {
return (uint)id;
}

// Some environments (e.g. openvz containers and the rr debugger) incorrectly
// report a processor id that is higher than the number of processors available.
// This is problematic, for example, when implementing CPU-local data structures,
// where the processor id is used to index into an array of length processor_count().
// If this happens we return 0 here. This is is safe since we always have at least
// one processor, but it's not optimal for performance if we're actually executing
// in an environment with more than one processor.
if (should_warn_invalid_processor_id()) {
log_warning(os)("Invalid processor id reported by the operating system "
"(got processor id %d, valid processor id range is 0-%d)",
id, processor_count() - 1);
log_warning(os)("Falling back to assuming processor id is 0. "
"This could have a negative impact on performance.");
}
#endif

assert(id >= 0 && id < _processor_count, "Invalid processor id [%d]", id);
return (uint)id;
return 0;
}

void os::set_native_thread_name(const char *name) {
Expand Down
6 changes: 5 additions & 1 deletion src/hotspot/share/gc/parallel/mutableSpace.cpp
Expand Up @@ -133,7 +133,11 @@ void MutableSpace::initialize(MemRegion mr,
}

set_bottom(mr.start());
set_end(mr.end());
// When expanding concurrently with callers of cas_allocate, setting end
// makes the new space available for allocation by other threads. So this
// assignment must follow all other configuration and initialization that
// might be done for expansion.
Atomic::release_store(end_addr(), mr.end());

if (clear_space) {
clear(mangle_space);
Expand Down
7 changes: 3 additions & 4 deletions src/hotspot/share/gc/parallel/psOldGen.cpp
Expand Up @@ -35,7 +35,6 @@
#include "logging/log.hpp"
#include "oops/oop.inline.hpp"
#include "runtime/java.hpp"
#include "runtime/orderAccess.hpp"
#include "utilities/align.hpp"

PSOldGen::PSOldGen(ReservedSpace rs, size_t initial_size, size_t min_size,
Expand Down Expand Up @@ -354,9 +353,9 @@ void PSOldGen::post_resize() {
WorkGang* workers = Thread::current()->is_VM_thread() ?
&ParallelScavengeHeap::heap()->workers() : NULL;

// Ensure the space bounds are updated and made visible to other
// threads after the other data structures have been resized.
OrderAccess::storestore();
// The update of the space's end is done by this call. As that
// makes the new space available for concurrent allocation, this
// must be the last step when expanding.
object_space()->initialize(new_memregion,
SpaceDecorator::DontClear,
SpaceDecorator::DontMangle,
Expand Down
2 changes: 1 addition & 1 deletion src/hotspot/share/gc/shenandoah/c2/shenandoahSupport.cpp
Expand Up @@ -2285,7 +2285,7 @@ void MemoryGraphFixer::collect_memory_nodes() {
uint last = _phase->C->unique();

#ifdef ASSERT
uint8_t max_depth = 0;
uint16_t max_depth = 0;
for (LoopTreeIterator iter(_phase->ltree_root()); !iter.done(); iter.next()) {
IdealLoopTree* lpt = iter.current();
max_depth = MAX2(max_depth, lpt->_nest);
Expand Down
2 changes: 2 additions & 0 deletions src/hotspot/share/opto/loopnode.cpp
Expand Up @@ -291,6 +291,7 @@ IdealLoopTree* PhaseIdealLoop::insert_outer_loop(IdealLoopTree* loop, LoopNode*
loop->_parent = outer_ilt;
loop->_next = NULL;
loop->_nest++;
assert(loop->_nest <= SHRT_MAX, "sanity");
return outer_ilt;
}

Expand Down Expand Up @@ -2614,6 +2615,7 @@ bool IdealLoopTree::is_member(const IdealLoopTree *l) const {
//------------------------------set_nest---------------------------------------
// Set loop tree nesting depth. Accumulate _has_call bits.
int IdealLoopTree::set_nest( uint depth ) {
assert(depth <= SHRT_MAX, "sanity");
_nest = depth;
int bits = _has_call;
if( _child ) bits |= _child->set_nest(depth+1);
Expand Down
2 changes: 1 addition & 1 deletion src/hotspot/share/opto/loopnode.hpp
Expand Up @@ -611,7 +611,7 @@ class IdealLoopTree : public ResourceObj {

Node_List _body; // Loop body for inner loops

uint8_t _nest; // Nesting depth
uint16_t _nest; // Nesting depth
uint8_t _irreducible:1, // True if irreducible
_has_call:1, // True if has call safepoint
_has_sfpt:1, // True if has non-call safepoint
Expand Down
21 changes: 12 additions & 9 deletions src/hotspot/share/opto/vector.cpp
Expand Up @@ -24,6 +24,7 @@

#include "precompiled.hpp"
#include "ci/ciSymbols.hpp"
#include "gc/shared/barrierSet.hpp"
#include "opto/castnode.hpp"
#include "opto/graphKit.hpp"
#include "opto/phaseX.hpp"
Expand Down Expand Up @@ -413,15 +414,17 @@ void PhaseVector::expand_vunbox_node(VectorUnboxNode* vec_unbox) {

Node* mem = vec_unbox->mem();
Node* ctrl = vec_unbox->in(0);
Node* vec_field_ld = LoadNode::make(gvn,
ctrl,
mem,
vec_adr,
vec_adr->bottom_type()->is_ptr(),
TypeOopPtr::make_from_klass(field->type()->as_klass()),
T_OBJECT,
MemNode::unordered);
vec_field_ld = gvn.transform(vec_field_ld);
Node* vec_field_ld;
{
DecoratorSet decorators = MO_UNORDERED | IN_HEAP;
C2AccessValuePtr addr(vec_adr, vec_adr->bottom_type()->is_ptr());
MergeMemNode* local_mem = MergeMemNode::make(mem);
gvn.record_for_igvn(local_mem);
BarrierSetC2* bs = BarrierSet::barrier_set()->barrier_set_c2();
C2OptAccess access(gvn, ctrl, local_mem, decorators, T_OBJECT, obj, addr);
const Type* type = TypeOopPtr::make_from_klass(field->type()->as_klass());
vec_field_ld = bs->load_at(access, type);
}

// For proper aliasing, attach concrete payload type.
ciKlass* payload_klass = ciTypeArrayKlass::make(bt);
Expand Down
1 change: 1 addition & 0 deletions src/hotspot/share/runtime/stubRoutines.cpp
Expand Up @@ -483,6 +483,7 @@ address StubRoutines::select_fill_function(BasicType t, bool aligned, const char
case T_NARROWOOP:
case T_NARROWKLASS:
case T_ADDRESS:
case T_VOID:
// Currently unsupported
return NULL;

Expand Down
2 changes: 1 addition & 1 deletion src/java.base/share/classes/java/lang/String.java
Expand Up @@ -4397,7 +4397,7 @@ void getBytes(byte[] dst, int dstBegin, byte coder) {
*/
void getBytes(byte[] dst, int srcPos, int dstBegin, byte coder, int length) {
if (coder() == coder) {
System.arraycopy(value, srcPos, dst, dstBegin << coder, length << coder());
System.arraycopy(value, srcPos << coder, dst, dstBegin << coder, length << coder);
} else { // this.coder == LATIN && coder == UTF16
StringLatin1.inflate(value, srcPos, dst, dstBegin, length);
}
Expand Down
18 changes: 17 additions & 1 deletion src/java.base/share/man/java.1
Expand Up @@ -22,7 +22,7 @@
.\"t
.\" Automatically generated by Pandoc 2.3.1
.\"
.TH "JAVA" "1" "2020" "JDK 17" "JDK Commands"
.TH "JAVA" "1" "2021" "JDK 17" "JDK Commands"
.hy
.SH NAME
.PP
Expand Down Expand Up @@ -4095,6 +4095,22 @@ The replacement Unified Logging syntax is
\f[CB]\-Xlog:class+loader+constraints=info\f[R].
See \f[B]Enable Logging with the JVM Unified Logging Framework\f[R].
.RE
.SH REMOVED JAVA OPTIONS
.PP
These \f[CB]java\f[R] options have been removed in JDK 16 and using them
results in an error of:
.RS
.PP
\f[CB]Unrecognized\ VM\ option\f[R] \f[I]option\-name\f[R]
.RE
.TP
.B \f[CB]\-XX:+UseParallelOldGC\f[R]
Enables the use of the parallel garbage collector for full GCs.
By default, this option is disabled.
Enabling it automatically enables the \f[CB]\-XX:+UseParallelGC\f[R]
option.
.RS
.RE
.PP
For the lists and descriptions of options removed in previous releases
see the \f[I]Removed Java Options\f[R] section in:
Expand Down
2 changes: 1 addition & 1 deletion src/java.base/share/man/keytool.1
Expand Up @@ -22,7 +22,7 @@
.\"t
.\" Automatically generated by Pandoc 2.3.1
.\"
.TH "KEYTOOL" "1" "2020" "JDK 16" "JDK Commands"
.TH "KEYTOOL" "1" "2021" "JDK 16" "JDK Commands"
.hy
.SH NAME
.PP
Expand Down
2 changes: 1 addition & 1 deletion src/java.rmi/share/man/rmid.1
Expand Up @@ -21,7 +21,7 @@
.\"
.\" Automatically generated by Pandoc 2.3.1
.\"
.TH "RMID" "1" "2020" "JDK 16" "JDK Commands"
.TH "RMID" "1" "2021" "JDK 16" "JDK Commands"
.hy
.SH NAME
.PP
Expand Down
2 changes: 1 addition & 1 deletion src/java.rmi/share/man/rmiregistry.1
Expand Up @@ -21,7 +21,7 @@
.\"
.\" Automatically generated by Pandoc 2.3.1
.\"
.TH "RMIREGISTRY" "1" "2020" "JDK 16" "JDK Commands"
.TH "RMIREGISTRY" "1" "2021" "JDK 16" "JDK Commands"
.hy
.SH NAME
.PP
Expand Down
2 changes: 1 addition & 1 deletion src/java.scripting/share/man/jrunscript.1
Expand Up @@ -21,7 +21,7 @@
.\"
.\" Automatically generated by Pandoc 2.3.1
.\"
.TH "JRUNSCRIPT" "1" "2020" "JDK 16" "JDK Commands"
.TH "JRUNSCRIPT" "1" "2021" "JDK 16" "JDK Commands"
.hy
.SH NAME
.PP
Expand Down
2 changes: 1 addition & 1 deletion src/jdk.compiler/share/man/javac.1
Expand Up @@ -21,7 +21,7 @@
.\"
.\" Automatically generated by Pandoc 2.3.1
.\"
.TH "JAVAC" "1" "2020" "JDK 16" "JDK Commands"
.TH "JAVAC" "1" "2021" "JDK 16" "JDK Commands"
.hy
.SH NAME
.PP
Expand Down
2 changes: 1 addition & 1 deletion src/jdk.compiler/share/man/serialver.1
Expand Up @@ -21,7 +21,7 @@
.\"
.\" Automatically generated by Pandoc 2.3.1
.\"
.TH "SERIALVER" "1" "2020" "JDK 16" "JDK Commands"
.TH "SERIALVER" "1" "2021" "JDK 16" "JDK Commands"
.hy
.SH NAME
.PP
Expand Down
2 changes: 1 addition & 1 deletion src/jdk.hotspot.agent/share/man/jhsdb.1
Expand Up @@ -21,7 +21,7 @@
.\"
.\" Automatically generated by Pandoc 2.3.1
.\"
.TH "JHSDB" "1" "2020" "JDK 16" "JDK Commands"
.TH "JHSDB" "1" "2021" "JDK 16" "JDK Commands"
.hy
.SH NAME
.PP
Expand Down
2 changes: 1 addition & 1 deletion src/jdk.jartool/share/man/jar.1
Expand Up @@ -21,7 +21,7 @@
.\"
.\" Automatically generated by Pandoc 2.3.1
.\"
.TH "JAR" "1" "2020" "JDK 16" "JDK Commands"
.TH "JAR" "1" "2021" "JDK 16" "JDK Commands"
.hy
.SH NAME
.PP
Expand Down
11 changes: 1 addition & 10 deletions src/jdk.jartool/share/man/jarsigner.1
Expand Up @@ -22,7 +22,7 @@
.\"t
.\" Automatically generated by Pandoc 2.3.1
.\"
.TH "JARSIGNER" "1" "2020" "JDK 16" "JDK Commands"
.TH "JARSIGNER" "1" "2021" "JDK 16" "JDK Commands"
.hy
.SH NAME
.PP
Expand Down Expand Up @@ -960,15 +960,6 @@ incurs higher overhead.
.RS
.RE
.TP
.B \f[CB]\-directsign\f[R]
By default, jarsigner stores the hash of the \f[CB]\&.SF\f[R] file and
possibly other information in a SignerInfo signedAttributes field, and
then calculates the signature on this field.
If this option is set, no SignerInfo signedAttributes field is generated
and the signature is calculated on the \f[CB]\&.SF\f[R] file directly.
.RS
.RE
.TP
.B \f[CB]\-sectionsonly\f[R]
If the \f[CB]\-sectionsonly\f[R] option appears on the command line, then
the \f[CB]\&.SF\f[R] file (signature file) generated when a JAR file is
Expand Down
4 changes: 2 additions & 2 deletions src/jdk.javadoc/share/man/javadoc.1
Expand Up @@ -21,7 +21,7 @@
.\"
.\" Automatically generated by Pandoc 2.3.1
.\"
.TH "JAVADOC" "1" "2020" "JDK 16" "JDK Commands"
.TH "JAVADOC" "1" "2021" "JDK 16" "JDK Commands"
.hy
.SH NAME
.PP
Expand Down Expand Up @@ -596,7 +596,7 @@ it does, you must enclose the title in quotation marks.
Additional quotation marks within the \f[CB]title\f[R] tag must be
escaped.
For example,
\f[CB]javadoc\ \-header\ "<b>My\ Library</b><br>v1.0"\ com.mypackage.\f[R]
\f[CB]javadoc\ \-doctitle\ "<b>My\ Library</b><br>v1.0"\ com.mypackage.\f[R]
.RS
.RE
.TP
Expand Down
2 changes: 1 addition & 1 deletion src/jdk.jcmd/share/man/jcmd.1
Expand Up @@ -21,7 +21,7 @@
.\"
.\" Automatically generated by Pandoc 2.3.1
.\"
.TH "JCMD" "1" "2020" "JDK 16" "JDK Commands"
.TH "JCMD" "1" "2021" "JDK 16" "JDK Commands"
.hy
.SH NAME
.PP
Expand Down
2 changes: 1 addition & 1 deletion src/jdk.jcmd/share/man/jinfo.1
Expand Up @@ -21,7 +21,7 @@
.\"
.\" Automatically generated by Pandoc 2.3.1
.\"
.TH "JINFO" "1" "2020" "JDK 16" "JDK Commands"
.TH "JINFO" "1" "2021" "JDK 16" "JDK Commands"
.hy
.SH NAME
.PP
Expand Down
2 changes: 1 addition & 1 deletion src/jdk.jcmd/share/man/jmap.1
Expand Up @@ -21,7 +21,7 @@
.\"
.\" Automatically generated by Pandoc 2.3.1
.\"
.TH "JMAP" "1" "2020" "JDK 16" "JDK Commands"
.TH "JMAP" "1" "2021" "JDK 16" "JDK Commands"
.hy
.SH NAME
.PP
Expand Down
2 changes: 1 addition & 1 deletion src/jdk.jcmd/share/man/jps.1
Expand Up @@ -21,7 +21,7 @@
.\"
.\" Automatically generated by Pandoc 2.3.1
.\"
.TH "JPS" "1" "2020" "JDK 16" "JDK Commands"
.TH "JPS" "1" "2021" "JDK 16" "JDK Commands"
.hy
.SH NAME
.PP
Expand Down
2 changes: 1 addition & 1 deletion src/jdk.jcmd/share/man/jstack.1
Expand Up @@ -21,7 +21,7 @@
.\"
.\" Automatically generated by Pandoc 2.3.1
.\"
.TH "JSTACK" "1" "2020" "JDK 16" "JDK Commands"
.TH "JSTACK" "1" "2021" "JDK 16" "JDK Commands"
.hy
.SH NAME
.PP
Expand Down
2 changes: 1 addition & 1 deletion src/jdk.jcmd/share/man/jstat.1
Expand Up @@ -21,7 +21,7 @@
.\"
.\" Automatically generated by Pandoc 2.3.1
.\"
.TH "JSTAT" "1" "2020" "JDK 16" "JDK Commands"
.TH "JSTAT" "1" "2021" "JDK 16" "JDK Commands"
.hy
.SH NAME
.PP
Expand Down
2 changes: 1 addition & 1 deletion src/jdk.jconsole/share/man/jconsole.1
Expand Up @@ -21,7 +21,7 @@
.\"
.\" Automatically generated by Pandoc 2.3.1
.\"
.TH "JCONSOLE" "1" "2020" "JDK 16" "JDK Commands"
.TH "JCONSOLE" "1" "2021" "JDK 16" "JDK Commands"
.hy
.SH NAME
.PP
Expand Down
2 changes: 1 addition & 1 deletion src/jdk.jdeps/share/man/javap.1
Expand Up @@ -21,7 +21,7 @@
.\"
.\" Automatically generated by Pandoc 2.3.1
.\"
.TH "JAVAP" "1" "2020" "JDK 16" "JDK Commands"
.TH "JAVAP" "1" "2021" "JDK 16" "JDK Commands"
.hy
.SH NAME
.PP
Expand Down

0 comments on commit 9b7a8f1

Please sign in to comment.