This commit is contained in:
Jonathan Gibbons 2019-01-11 11:42:23 -08:00
commit d7011d75c8
58 changed files with 382 additions and 236 deletions

View File

@ -529,3 +529,4 @@ eef755718cb24813031a842bbfc716a6cea18e9a jdk-12+23
7d4397b43fa305806160785a4c7210600d59581a jdk-12+24
7496df94b3b79f3da53925d2d137317715f11d97 jdk-12+25
de9fd809bb475401aad188eab2264226788aad81 jdk-12+26
f15d443f97318e9b40e6f451e327ff69ed4ec361 jdk-12+27

View File

@ -269,7 +269,7 @@ class StubGenerator: public StubCodeGenerator {
// when called via a c2i.
// Pass initial_caller_sp to framemanager.
__ mr(R21_tmp1, R1_SP);
__ mr(R21_sender_SP, R1_SP);
// Do a light-weight C-call here, r_new_arg_entry holds the address
// of the interpreter entry point (frame manager or native entry)

View File

@ -532,14 +532,8 @@ address TemplateInterpreterGenerator::generate_Reference_get_entry(void) {
// these parameters the pre-barrier does not generate
// the load of the previous value.
// Restore caller sp for c2i case.
#ifdef ASSERT
__ ld(R9_ARG7, 0, R1_SP);
__ ld(R10_ARG8, 0, R21_sender_SP);
__ cmpd(CCR0, R9_ARG7, R10_ARG8);
__ asm_assert_eq("backlink", 0x544);
#endif // ASSERT
__ mr(R1_SP, R21_sender_SP); // Cut the stack back to where the caller started.
// Restore caller sp for c2i case (from compiled) and for resized sender frame (from interpreted).
__ resize_frame_absolute(R21_sender_SP, R11_scratch1, R0);
__ blr();
@ -835,8 +829,13 @@ void TemplateInterpreterGenerator::generate_stack_overflow_check(Register Rmem_f
assert(StubRoutines::throw_StackOverflowError_entry() != NULL, "generated in wrong order");
__ load_const_optimized(Rscratch1, (StubRoutines::throw_StackOverflowError_entry()), R0);
__ mtctr(Rscratch1);
// Restore caller_sp.
// Restore caller_sp (c2i adapter may exist, but no shrinking of interpreted caller frame).
#ifdef ASSERT
Label frame_not_shrunk;
__ cmpld(CCR0, R1_SP, R21_sender_SP);
__ ble(CCR0, frame_not_shrunk);
__ stop("frame shrunk", 0x546);
__ bind(frame_not_shrunk);
__ ld(Rscratch1, 0, R1_SP);
__ ld(R0, 0, R21_sender_SP);
__ cmpd(CCR0, R0, Rscratch1);
@ -1155,15 +1154,6 @@ address TemplateInterpreterGenerator::generate_math_entry(AbstractInterpreter::M
}
}
// Pop c2i arguments (if any) off when we return.
#ifdef ASSERT
__ ld(R9_ARG7, 0, R1_SP);
__ ld(R10_ARG8, 0, R21_sender_SP);
__ cmpd(CCR0, R9_ARG7, R10_ARG8);
__ asm_assert_eq("backlink", 0x545);
#endif // ASSERT
__ mr(R1_SP, R21_sender_SP); // Cut the stack back to where the caller started.
if (use_instruction) {
switch (kind) {
case Interpreter::java_lang_math_sqrt: __ fsqrt(F1_RET, F1); break;
@ -1188,6 +1178,8 @@ address TemplateInterpreterGenerator::generate_math_entry(AbstractInterpreter::M
__ restore_LR_CR(R0);
}
// Restore caller sp for c2i case (from compiled) and for resized sender frame (from interpreted).
__ resize_frame_absolute(R21_sender_SP, R11_scratch1, R0);
__ blr();
__ flush();
@ -1843,8 +1835,8 @@ address TemplateInterpreterGenerator::generate_CRC32_update_entry() {
StubRoutines::ppc64::generate_load_crc_table_addr(_masm, table);
__ kernel_crc32_singleByte(crc, data, dataLen, table, tmp, true);
// Restore caller sp for c2i case and return.
__ mr(R1_SP, R21_sender_SP); // Cut the stack back to where the caller started.
// Restore caller sp for c2i case (from compiled) and for resized sender frame (from interpreted).
__ resize_frame_absolute(R21_sender_SP, R11_scratch1, R0);
__ blr();
// Generate a vanilla native entry as the slow path.
@ -1931,8 +1923,8 @@ address TemplateInterpreterGenerator::generate_CRC32_updateBytes_entry(AbstractI
// code compactness.
__ kernel_crc32_1word(crc, data, dataLen, table, t0, t1, t2, t3, tc0, tc1, tc2, tc3, true);
// Restore caller sp for c2i case and return.
__ mr(R1_SP, R21_sender_SP); // Cut the stack back to where the caller started.
// Restore caller sp for c2i case (from compiled) and for resized sender frame (from interpreted).
__ resize_frame_absolute(R21_sender_SP, R11_scratch1, R0);
__ blr();
// Generate a vanilla native entry as the slow path.
@ -2019,8 +2011,8 @@ address TemplateInterpreterGenerator::generate_CRC32C_updateBytes_entry(Abstract
// code compactness.
__ kernel_crc32_1word(crc, data, dataLen, table, t0, t1, t2, t3, tc0, tc1, tc2, tc3, false);
// Restore caller sp for c2i case and return.
__ mr(R1_SP, R21_sender_SP); // Cut the stack back to where the caller started.
// Restore caller sp for c2i case (from compiled) and for resized sender frame (from interpreted).
__ resize_frame_absolute(R21_sender_SP, R11_scratch1, R0);
__ blr();
BLOCK_COMMENT("} CRC32C_update{Bytes|DirectByteBuffer}");

View File

@ -46,6 +46,7 @@ class ciEnv : StackObj {
friend class CompileBroker;
friend class Dependencies; // for get_object, during logging
friend class PrepareExtraDataClosure;
private:
Arena* _arena; // Alias for _ciEnv_arena except in init_shared_objects()
@ -188,6 +189,10 @@ private:
}
}
ciMetadata* cached_metadata(Metadata* o) {
return _factory->cached_metadata(o);
}
ciInstance* get_instance(oop o) {
if (o == NULL) return NULL;
return get_object(o)->as_instance();

View File

@ -78,10 +78,81 @@ ciMethodData::ciMethodData() : ciMetadata(NULL) {
_parameters = NULL;
}
void ciMethodData::load_extra_data() {
// Check for entries that reference an unloaded method
class PrepareExtraDataClosure : public CleanExtraDataClosure {
MethodData* _mdo;
uint64_t _safepoint_counter;
GrowableArray<Method*> _uncached_methods;
public:
PrepareExtraDataClosure(MethodData* mdo)
: _mdo(mdo),
_safepoint_counter(SafepointSynchronize::safepoint_counter()),
_uncached_methods()
{ }
bool is_live(Method* m) {
if (!m->method_holder()->is_loader_alive()) {
return false;
}
if (CURRENT_ENV->cached_metadata(m) == NULL) {
// Uncached entries need to be pre-populated.
_uncached_methods.append(m);
}
return true;
}
bool has_safepointed() {
return SafepointSynchronize::safepoint_counter() != _safepoint_counter;
}
bool finish() {
if (_uncached_methods.length() == 0) {
// Preparation finished iff all Methods* were already cached.
return true;
}
// Holding locks through safepoints is bad practice.
MutexUnlocker mu(_mdo->extra_data_lock());
for (int i = 0; i < _uncached_methods.length(); ++i) {
if (has_safepointed()) {
// The metadata in the growable array might contain stale
// entries after a safepoint.
return false;
}
Method* method = _uncached_methods.at(i);
// Populating ciEnv caches may cause safepoints due
// to taking the Compile_lock with safepoint checks.
(void)CURRENT_ENV->get_method(method);
}
return false;
}
};
void ciMethodData::prepare_metadata() {
MethodData* mdo = get_MethodData();
for (;;) {
ResourceMark rm;
PrepareExtraDataClosure cl(mdo);
mdo->clean_extra_data(&cl);
if (cl.finish()) {
// When encountering uncached metadata, the Compile_lock might be
// acquired when creating ciMetadata handles, causing safepoints
// which requires a new round of preparation to clean out potentially
// new unloading metadata.
return;
}
}
}
void ciMethodData::load_extra_data() {
MethodData* mdo = get_MethodData();
MutexLocker ml(mdo->extra_data_lock());
// Deferred metadata cleaning due to concurrent class unloading.
prepare_metadata();
// After metadata preparation, there is no stale metadata,
// and no safepoints can introduce more stale metadata.
NoSafepointVerifier no_safepoint;
// speculative trap entries also hold a pointer to a Method so need to be translated
DataLayout* dp_src = mdo->extra_data_base();
@ -94,7 +165,7 @@ void ciMethodData::load_extra_data() {
// New traps in the MDO may have been added since we copied the
// data (concurrent deoptimizations before we acquired
// extra_data_lock above) or can be removed (a safepoint may occur
// in the translate_from call below) as we translate the copy:
// in the prepare_metadata call above) as we translate the copy:
// update the copy as we go.
int tag = dp_src->tag();
if (tag != DataLayout::arg_info_data_tag) {
@ -105,11 +176,7 @@ void ciMethodData::load_extra_data() {
case DataLayout::speculative_trap_data_tag: {
ciSpeculativeTrapData data_dst(dp_dst);
SpeculativeTrapData data_src(dp_src);
{ // During translation a safepoint can happen or VM lock can be taken (e.g., Compile_lock).
MutexUnlocker ml(mdo->extra_data_lock());
data_dst.translate_from(&data_src);
}
data_dst.translate_from(&data_src);
break;
}
case DataLayout::bit_data_tag:

View File

@ -475,6 +475,7 @@ private:
return (address) _data;
}
void prepare_metadata();
void load_extra_data();
ciProfileData* bci_to_extra_data(int bci, ciMethod* m, bool& two_free_slots);

View File

@ -265,6 +265,24 @@ int ciObjectFactory::metadata_compare(Metadata* const& key, ciMetadata* const& e
else return 0;
}
// ------------------------------------------------------------------
// ciObjectFactory::cached_metadata
//
// Get the ciMetadata corresponding to some Metadata. If the ciMetadata has
// already been created, it is returned. Otherwise, null is returned.
ciMetadata* ciObjectFactory::cached_metadata(Metadata* key) {
ASSERT_IN_VM;
bool found = false;
int index = _ci_metadata->find_sorted<Metadata*, ciObjectFactory::metadata_compare>(key, found);
if (!found) {
return NULL;
}
return _ci_metadata->at(index)->as_metadata();
}
// ------------------------------------------------------------------
// ciObjectFactory::get_metadata
//

View File

@ -100,6 +100,7 @@ public:
// Get the ciObject corresponding to some oop.
ciObject* get(oop key);
ciMetadata* get_metadata(Metadata* key);
ciMetadata* cached_metadata(Metadata* key);
ciSymbol* get_symbol(Symbol* key);
// Get the ciSymbol corresponding to one of the vmSymbols.

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2014, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014, 2019, 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
@ -503,26 +503,33 @@ Handle SystemDictionaryShared::get_shared_protection_domain(Handle class_loader,
Handle SystemDictionaryShared::get_shared_protection_domain(Handle class_loader,
ModuleEntry* mod, TRAPS) {
ClassLoaderData *loader_data = mod->loader_data();
Handle protection_domain;
if (mod->shared_protection_domain() == NULL) {
Symbol* location = mod->location();
if (location != NULL) {
Handle url_string = java_lang_String::create_from_symbol(
location, CHECK_(protection_domain));
Handle location_string = java_lang_String::create_from_symbol(
location, CHECK_NH);
Handle url;
JavaValue result(T_OBJECT);
Klass* classLoaders_klass =
SystemDictionary::jdk_internal_loader_ClassLoaders_klass();
JavaCalls::call_static(&result, classLoaders_klass, vmSymbols::toFileURL_name(),
if (location->starts_with("jrt:/")) {
url = JavaCalls::construct_new_instance(SystemDictionary::URL_klass(),
vmSymbols::string_void_signature(),
location_string, CHECK_NH);
} else {
Klass* classLoaders_klass =
SystemDictionary::jdk_internal_loader_ClassLoaders_klass();
JavaCalls::call_static(&result, classLoaders_klass, vmSymbols::toFileURL_name(),
vmSymbols::toFileURL_signature(),
url_string, CHECK_(protection_domain));
Handle url = Handle(THREAD, (oop)result.get_jobject());
location_string, CHECK_NH);
url = Handle(THREAD, (oop)result.get_jobject());
}
Handle pd = get_protection_domain_from_classloader(class_loader, url, THREAD);
Handle pd = get_protection_domain_from_classloader(class_loader, url,
CHECK_NH);
mod->set_shared_protection_domain(loader_data, pd);
}
}
protection_domain = Handle(THREAD, mod->shared_protection_domain());
Handle protection_domain(THREAD, mod->shared_protection_domain());
assert(protection_domain.not_null(), "sanity");
return protection_domain;
}

View File

@ -1159,6 +1159,19 @@ void nmethod::log_state_change() const {
}
}
void nmethod::unlink_from_method(bool acquire_lock) {
// We need to check if both the _code and _from_compiled_code_entry_point
// refer to this nmethod because there is a race in setting these two fields
// in Method* as seen in bugid 4947125.
// If the vep() points to the zombie nmethod, the memory for the nmethod
// could be flushed and the compiler and vtable stubs could still call
// through it.
if (method() != NULL && (method()->code() == this ||
method()->from_compiled_entry() == verified_entry_point())) {
method()->clear_code(acquire_lock);
}
}
/**
* Common functionality for both make_not_entrant and make_zombie
*/
@ -1246,17 +1259,7 @@ bool nmethod::make_not_entrant_or_zombie(int state) {
JVMCI_ONLY(maybe_invalidate_installed_code());
// Remove nmethod from method.
// We need to check if both the _code and _from_compiled_code_entry_point
// refer to this nmethod because there is a race in setting these two fields
// in Method* as seen in bugid 4947125.
// If the vep() points to the zombie nmethod, the memory for the nmethod
// could be flushed and the compiler and vtable stubs could still call
// through it.
if (method() != NULL && (method()->code() == this ||
method()->from_compiled_entry() == verified_entry_point())) {
HandleMark hm;
method()->clear_code(false /* already owns Patching_lock */);
}
unlink_from_method(false /* already owns Patching_lock */);
} // leave critical region under Patching_lock
#ifdef ASSERT

View File

@ -376,6 +376,8 @@ class nmethod : public CompiledMethod {
int comp_level() const { return _comp_level; }
void unlink_from_method(bool acquire_lock);
// Support for oops in scopes and relocs:
// Note: index 0 is reserved for null.
oop oop_at(int index) const;

View File

@ -275,11 +275,7 @@ public:
template <typename T>
static bool oop_arraycopy_in_heap(arrayOop src_obj, size_t src_offset_in_bytes, T* src_raw,
arrayOop dst_obj, size_t dst_offset_in_bytes, T* dst_raw,
size_t length) {
return Raw::oop_arraycopy(src_obj, src_offset_in_bytes, src_raw,
dst_obj, dst_offset_in_bytes, dst_raw,
length);
}
size_t length);
// Off-heap oop accesses. These accessors get resolved when
// IN_HEAP is not set (e.g. when using the NativeAccess API), it is

View File

@ -0,0 +1,60 @@
/*
* Copyright (c) 2019, Red Hat, 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.
*/
#ifndef SHARE_VM_GC_SHARED_BARRIERSET_INLINE_HPP
#define SHARE_VM_GC_SHARED_BARRIERSET_INLINE_HPP
#include "gc/shared/barrierSet.hpp"
#include "oops/accessDecorators.hpp"
#include "oops/arrayOop.hpp"
#include "oops/compressedOops.inline.hpp"
#include "oops/objArrayOop.inline.hpp"
#include "oops/oop.hpp"
template <DecoratorSet decorators, typename BarrierSetT>
template <typename T>
inline bool BarrierSet::AccessBarrier<decorators, BarrierSetT>::oop_arraycopy_in_heap(arrayOop src_obj, size_t src_offset_in_bytes, T* src_raw,
arrayOop dst_obj, size_t dst_offset_in_bytes, T* dst_raw,
size_t length) {
T* src = arrayOopDesc::obj_offset_to_raw(src_obj, src_offset_in_bytes, src_raw);
T* dst = arrayOopDesc::obj_offset_to_raw(dst_obj, dst_offset_in_bytes, dst_raw);
if (!HasDecorator<decorators, ARRAYCOPY_CHECKCAST>::value) {
// Covariant, copy without checks
return Raw::oop_arraycopy(NULL, 0, src, NULL, 0, dst, length);
}
// Copy each element with checking casts
Klass* const dst_klass = objArrayOop(dst_obj)->element_klass();
for (const T* const end = src + length; src < end; src++, dst++) {
const T elem = *src;
if (!oopDesc::is_instanceof_or_null(CompressedOops::decode(elem), dst_klass)) {
return false;
}
*dst = elem;
}
return true;
}
#endif // SHARE_VM_GC_SHARED_BARRIERSET_INLINE_HPP

View File

@ -983,7 +983,7 @@ void ShenandoahBarrierSetC2::clone_barrier_at_expansion(ArrayCopyNode* ac, Node*
Node* c = new ProjNode(call,TypeFunc::Control);
c = igvn.transform(c);
Node* m = new ProjNode(call, TypeFunc::Memory);
c = igvn.transform(m);
m = igvn.transform(m);
Node* dest = ac->in(ArrayCopyNode::Dest);
assert(dest->is_AddP(), "bad input");

View File

@ -42,6 +42,11 @@ bool ZBarrierSetNMethod::nmethod_entry_barrier(nmethod* nm) {
}
if (nm->is_unloading()) {
// We don't need to take the lock when unlinking nmethods from
// the Method, because it is only concurrently unlinked by
// the entry barrier, which acquires the per nmethod lock.
nm->unlink_from_method(false /* acquire_lock */);
// We can end up calling nmethods that are unloading
// since we clear compiled ICs lazily. Returning false
// will re-resovle the call and update the compiled IC.

View File

@ -611,15 +611,20 @@ public:
return;
}
ZLocker<ZReentrantLock> locker(ZNMethodTable::lock_for_nmethod(nm));
if (nm->is_unloading()) {
// Unlinking of the dependencies must happen before the
// handshake separating unlink and purge.
nm->flush_dependencies(false /* delete_immediately */);
// We don't need to take the lock when unlinking nmethods from
// the Method, because it is only concurrently unlinked by
// the entry barrier, which acquires the per nmethod lock.
nm->unlink_from_method(false /* acquire_lock */);
return;
}
ZLocker<ZReentrantLock> locker(ZNMethodTable::lock_for_nmethod(nm));
// Heal oops and disarm
ZNMethodOopClosure cl;
ZNMethodTable::entry_oops_do(entry, &cl);

View File

@ -25,6 +25,7 @@
#ifndef SHARE_OOPS_ACCESS_INLINE_HPP
#define SHARE_OOPS_ACCESS_INLINE_HPP
#include "gc/shared/barrierSet.inline.hpp"
#include "gc/shared/barrierSetConfig.inline.hpp"
#include "oops/access.hpp"
#include "oops/accessBackend.inline.hpp"

View File

@ -2186,6 +2186,7 @@ void InstanceKlass::clean_method_data() {
for (int m = 0; m < methods()->length(); m++) {
MethodData* mdo = methods()->at(m)->method_data();
if (mdo != NULL) {
MutexLockerEx ml(SafepointSynchronize::is_at_safepoint() ? NULL : mdo->extra_data_lock());
mdo->clean_method_data(/*always_clean*/false);
}
}

View File

@ -1653,11 +1653,6 @@ void MethodData::clean_extra_data_helper(DataLayout* dp, int shift, bool reset)
}
}
class CleanExtraDataClosure : public StackObj {
public:
virtual bool is_live(Method* m) = 0;
};
// Check for entries that reference an unloaded method
class CleanExtraDataKlassClosure : public CleanExtraDataClosure {
bool _always_clean;

View File

@ -1943,7 +1943,11 @@ public:
// adjusted in the event of a change in control flow.
//
class CleanExtraDataClosure;
class CleanExtraDataClosure : public StackObj {
public:
virtual bool is_live(Method* m) = 0;
};
class MethodData : public Metadata {
friend class VMStructs;
@ -2116,11 +2120,12 @@ private:
static bool profile_parameters_jsr292_only();
static bool profile_all_parameters();
void clean_extra_data(CleanExtraDataClosure* cl);
void clean_extra_data_helper(DataLayout* dp, int shift, bool reset = false);
void verify_extra_data_clean(CleanExtraDataClosure* cl);
public:
void clean_extra_data(CleanExtraDataClosure* cl);
static int header_size() {
return sizeof(MethodData)/wordSize;
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1994, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1994, 2019, 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
@ -3420,8 +3420,8 @@ public final class Class<T> implements java.io.Serializable,
StringBuilder sb = new StringBuilder();
sb.append(getName() + "." + name + "(");
if (argTypes != null) {
Stream.of(argTypes).map(c -> {return (c == null) ? "null" : c.getName();}).
collect(Collectors.joining(","));
sb.append(Stream.of(argTypes).map(c -> {return (c == null) ? "null" : c.getName();}).
collect(Collectors.joining(",")));
}
sb.append(")");
return sb.toString();

View File

@ -2813,8 +2813,7 @@ public final class String
* lines are then concatenated and returned.
* <p>
* If {@code n > 0} then {@code n} spaces (U+0020) are inserted at the
* beginning of each line. {@link String#isBlank() Blank lines} are
* unaffected.
* beginning of each line.
* <p>
* If {@code n < 0} then up to {@code n}
* {@link Character#isWhitespace(int) white space characters} are removed
@ -2849,7 +2848,7 @@ public final class String
: lines();
if (n > 0) {
final String spaces = " ".repeat(n);
stream = stream.map(s -> s.isBlank() ? s : spaces + s);
stream = stream.map(s -> spaces + s);
} else if (n == Integer.MIN_VALUE) {
stream = stream.map(s -> s.stripLeading());
} else if (n < 0) {

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2014, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014, 2019, 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
@ -1864,35 +1864,6 @@ public abstract class VarHandle implements Constable {
}
}
/**
* Compare this {@linkplain VarHandle} with another object for equality.
* Two {@linkplain VarHandle}s are considered equal if they both describe the
* same instance field, both describe the same static field, both describe
* array elements for arrays with the same component type, or both describe
* the same component of an off-heap structure.
*
* @param o the other object
* @return Whether this {@linkplain VarHandle} is equal to the other object
*/
@Override
public final boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
VarHandle that = (VarHandle) o;
return accessModeType(AccessMode.GET).equals(that.accessModeType(AccessMode.GET)) &&
internalEquals(that);
}
abstract boolean internalEquals(VarHandle vh);
@Override
public final int hashCode() {
return 31 * accessModeType(AccessMode.GET).hashCode() + internalHashCode();
}
abstract int internalHashCode();
/**
* Returns a compact textual description of this {@linkplain VarHandle},
* including the type of variable described, and a description of its coordinates.

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2015, 2019, 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
@ -63,17 +63,6 @@ final class VarHandle$Type$s {
return accessMode.at.accessModeType(receiverType, {#if[Object]?fieldType:$type$.class});
}
@Override
final boolean internalEquals(VarHandle vh) {
FieldInstanceReadOnly that = (FieldInstanceReadOnly) vh;
return fieldOffset == that.fieldOffset;
}
@Override
final int internalHashCode() {
return Long.hashCode(fieldOffset);
}
@Override
public Optional<VarHandleDesc> describeConstable() {
var receiverTypeRef = receiverType.describeConstable();
@ -349,17 +338,6 @@ final class VarHandle$Type$s {
#end[Object]
}
@Override
final boolean internalEquals(VarHandle vh) {
FieldStaticReadOnly that = (FieldStaticReadOnly) vh;
return base == that.base && fieldOffset == that.fieldOffset;
}
@Override
final int internalHashCode() {
return 31 * Long.hashCode(fieldOffset) + base.hashCode();
}
@Override
public Optional<VarHandleDesc> describeConstable() {
var fieldTypeRef = {#if[Object]?fieldType:$type$.class}.describeConstable();
@ -639,20 +617,6 @@ final class VarHandle$Type$s {
#end[Object]
}
@Override
final boolean internalEquals(VarHandle vh) {
// Equality of access mode types of AccessMode.GET is sufficient for
// equality checks
return true;
}
@Override
final int internalHashCode() {
// The hash code of the access mode types of AccessMode.GET is
// sufficient for hash code generation
return 0;
}
@Override
public Optional<VarHandleDesc> describeConstable() {
var arrayTypeRef = {#if[Object]?arrayType:$type$[].class}.describeConstable();

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2015, 2019, 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
@ -67,17 +67,6 @@ final class VarHandleByteArrayAs$Type$s extends VarHandleByteArrayBase {
super(form);
this.be = be;
}
@Override
final boolean internalEquals(VarHandle vh) {
ByteArrayViewVarHandle that = (ByteArrayViewVarHandle) vh;
return be == that.be;
}
@Override
final int internalHashCode() {
return Boolean.hashCode(be);
}
}
static final class ArrayHandle extends ByteArrayViewVarHandle {

View File

@ -288,7 +288,8 @@ final public class StartTlsResponseImpl extends StartTlsResponse {
*/
public void setConnection(Connection ldapConnection, String hostname) {
this.ldapConnection = ldapConnection;
this.hostname = (hostname != null) ? hostname : ldapConnection.host;
this.hostname = (hostname == null || hostname.isEmpty())
? ldapConnection.host : hostname;
originalInputStream = ldapConnection.inStream;
originalOutputStream = ldapConnection.outStream;
}

View File

@ -185,7 +185,7 @@ class ConsoleIOContext extends IOContext {
it.set(current);
}
historyLoad = Instant.now();
historyLoad = Instant.MIN;
loadHistory.forEach(line -> reader.getHistory().add(historyLoad, line));
in = reader;

View File

@ -85,7 +85,6 @@ gc/metaspace/CompressedClassSpaceSizeInJmapHeap.java 8193639 solaris-all
runtime/appcds/javaldr/GCSharedStringsDuringDump.java 8208778 macosx-x64
runtime/appcds/javaldr/GCDuringDump.java 8208778 macosx-x64
runtime/appcds/jigsaw/classpathtests/EmptyClassInBootClassPath.java 8213299 generic-all
runtime/CompressedOops/UseCompressedOops.java 8079353 generic-all
runtime/handshake/HandshakeWalkSuspendExitTest.java 8214174 generic-all
runtime/RedefineTests/RedefineRunningMethods.java 8208778 macosx-x64

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2018, 2019, 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,7 @@
* @bug 8209825
* @summary Checks VerifyStack after deoptimization of array allocation slow call
* @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:TieredStopAtLevel=1
* -XX:AllocatePrefetchLines=1 -XX:AllocateInstancePrefetchLines=1 -XX:AllocatePrefetchStepSize=16 -XX:AllocatePrefetchDistance=1
* -XX:MinTLABSize=1k -XX:TLABSize=1k
* -XX:+DeoptimizeALot -XX:+VerifyStack
* compiler.interpreter.TestVerifyStackAfterDeopt

View File

@ -0,0 +1,89 @@
/*
* Copyright (c) 2019, Red Hat, 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 TestArraycopyCheckcast
* @key gc
* @requires vm.gc.Epsilon & !vm.graal.enabled
* @summary Epsilon is able to handle checkcasted array copies
* @library /test/lib
* @bug 8215724
*
* @run main/othervm -Xmx1g -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC TestArraycopyCheckcast
* @run main/othervm -Xmx1g -Xint -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC TestArraycopyCheckcast
* @run main/othervm -Xmx1g -Xbatch -Xcomp -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC TestArraycopyCheckcast
* @run main/othervm -Xmx1g -Xbatch -Xcomp -XX:TieredStopAtLevel=1 -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC TestArraycopyCheckcast
* @run main/othervm -Xmx1g -Xbatch -Xcomp -XX:-TieredCompilation -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC TestArraycopyCheckcast
*/
import java.util.Random;
public class TestArraycopyCheckcast {
static int COUNT = Integer.getInteger("count", 1000);
public static void main(String[] args) throws Exception {
Object[] src = new Object[COUNT];
Object[] dst = new B[COUNT];
// Test 1. Copy nulls, should succeed
try {
System.arraycopy(src, 0, dst, 0, COUNT);
} catch (ArrayStoreException e) {
throw new IllegalStateException("Should have completed");
}
// Test 2. Copying incompatible type, should fail
for (int c = 0; c < COUNT; c++) {
src[c] = new A();
}
try {
System.arraycopy(src, 0, dst, 0, COUNT);
throw new IllegalStateException("Should have failed with ArrayStoreException");
} catch (ArrayStoreException e) {
// Expected
}
// Test 3. Copying compatible type, should succeeded
for (int c = 0; c < COUNT; c++) {
src[c] = new C();
}
try {
System.arraycopy(src, 0, dst, 0, COUNT);
} catch (ArrayStoreException e) {
throw new IllegalStateException("Should have completed");
}
for (int c = 0; c < COUNT; c++) {
if (src[c] != dst[c]) {
throw new IllegalStateException("Copy failed at index " + c);
}
}
}
static class A {}
static class B extends A {}
static class C extends B {}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2014, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014, 2019, 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
@ -48,25 +48,24 @@ public class ProtectionDomain {
TestCommon.list("ProtDomain",
"ProtDomainBOther",
"java/util/Dictionary",
"sun/tools/javac/Main",
"com/sun/tools/javac/Main",
"jdk/nio/zipfs/ZipInfo",
"java/net/URL",
"sun/rmi/rmic/Main",
"com/sun/jndi/dns/DnsName"));
OutputAnalyzer output;
// First class is loaded from CDS, second class is loaded from JAR
output = TestCommon.exec(appJar, "ProtDomain");
TestCommon.checkExec(output, "Protection Domains match");
TestCommon.run("-cp", appJar, "ProtDomain")
.assertNormalExit("Protection Domains match");
// First class is loaded from JAR, second class is loaded from CDS
output = TestCommon.exec(appJar, "ProtDomainB");
TestCommon.checkExec(output, "Protection Domains match");
TestCommon.run("-cp", appJar, "ProtDomainB")
.assertNormalExit("Protection Domains match");
// Test ProtectionDomain for application and extension module classes from the
// "modules" jimage
output = TestCommon.exec(appJar, "JimageClassProtDomain");
output.shouldNotContain("Failed: Protection Domains do not match");
TestCommon.run("-cp", appJar, "JimageClassProtDomain")
.assertNormalExit(output -> output.shouldNotContain(
"Failed: Protection Domains do not match"));
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2015, 2017, 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
@ -37,7 +37,7 @@ public class JimageClassProtDomain {
"java.util.Dictionary", "java.util.ServiceConfigurationError"},
{"Loading shared app module class first",
"sun.tools.javac.Main", "sun.tools.javac.BatchParser"},
"com.sun.tools.javac.Main", "com.sun.tools.javac.code.Symbol"},
{"Loading shared ext module class first",
"jdk.nio.zipfs.ZipInfo", "jdk.nio.zipfs.ZipPath"},
@ -46,7 +46,7 @@ public class JimageClassProtDomain {
"java.net.HttpCookie", "java.net.URL"},
{"Loading non-shared app module class first",
"sun.rmi.rmic.RMIGenerator", "sun.rmi.rmic.Main"},
"com.sun.tools.sjavac.Util", "com.sun.tools.sjavac.Main"},
{"Loading non-shared ext module class first",
"com.sun.jndi.dns.Resolver", "com.sun.jndi.dns.DnsName"}};
@ -61,13 +61,16 @@ public class JimageClassProtDomain {
Class c1 = Class.forName(shared);
Class c2 = Class.forName(nonShared);
if (c1.getProtectionDomain() != c2.getProtectionDomain()) {
System.out.println("Failed: Protection Domains do not match!");
System.out.println(c1.getProtectionDomain());
System.out.println(c1.getProtectionDomain().getCodeSource());
System.out.println(c2.getProtectionDomain());
System.out.println(c2.getProtectionDomain().getCodeSource());
System.exit(1);
throw new RuntimeException("Failed: Protection Domains do not match!");
} else {
System.out.println(c1.getProtectionDomain());
System.out.println(c1.getProtectionDomain().getCodeSource());
System.out.println(c2.getProtectionDomain());
System.out.println(c2.getProtectionDomain().getCodeSource());
System.out.println("Passed: Protection Domains match.");
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014, 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
@ -42,8 +42,7 @@ public class ProtDomain {
if (mine == his) {
System.out.println("Protection Domains match");
} else {
System.out.println("Protection Domains do not match!");
System.exit(1);
throw new RuntimeException("Protection Domains do not match!");
}
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014, 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
@ -42,8 +42,7 @@ public class ProtDomainB {
if (mine == his) {
System.out.println("Protection Domains match");
} else {
System.out.println("Protection Domains do not match!");
System.exit(1);
throw new RuntimeException("Protection Domains do not match!");
}
}
}

View File

@ -583,7 +583,6 @@ java/nio/file/WatchService/MayFlies.java 7158947 solaris-
java/nio/file/WatchService/LotsOfCancels.java 8188039 solaris-all Solaris 11
java/nio/file/WatchService/LotsOfEvents.java 7158947 solaris-all Solaris 11
sun/nio/cs/OLD/TestIBMDB.java 8211841 aix-ppc64
############################################################################

View File

@ -67,7 +67,7 @@ public class Indent {
Stream<String> stream = input.lines();
if (adjust > 0) {
final String spaces = " ".repeat(adjust);
stream = stream.map(s -> s.isBlank() ? s : spaces + s);
stream = stream.map(s -> spaces + s);
} else if (adjust < 0) {
stream = stream.map(s -> s.substring(Math.min(-adjust, indexOfNonWhitespace(s))));
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2018, 2019, 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
@ -67,7 +67,6 @@ public class CondyDescTest extends SymbolicDescTest {
private void testVarHandleDesc(DynamicConstantDesc<VarHandle> r, VarHandle vh) throws ReflectiveOperationException {
testSymbolicDesc(r);
assertEquals(r.resolveConstantDesc(LOOKUP), vh);
assertEquals(vh.describeConstable().orElseThrow(), r);
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2015, 2019, 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,8 +141,6 @@ public class VarHandleTestAccessBoolean extends VarHandleBaseTest {
for (int j = 0; j < vhs1.length; j++) {
if (i == j) {
assertEquals(vhs1[i], vhs1[i]);
assertEquals(vhs1[i], vhs2[i]);
assertEquals(vhs1[i].hashCode(), vhs2[i].hashCode());
}
else {
assertNotEquals(vhs1[i], vhs1[j]);

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2015, 2019, 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,8 +141,6 @@ public class VarHandleTestAccessByte extends VarHandleBaseTest {
for (int j = 0; j < vhs1.length; j++) {
if (i == j) {
assertEquals(vhs1[i], vhs1[i]);
assertEquals(vhs1[i], vhs2[i]);
assertEquals(vhs1[i].hashCode(), vhs2[i].hashCode());
}
else {
assertNotEquals(vhs1[i], vhs1[j]);

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2015, 2019, 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,8 +141,6 @@ public class VarHandleTestAccessChar extends VarHandleBaseTest {
for (int j = 0; j < vhs1.length; j++) {
if (i == j) {
assertEquals(vhs1[i], vhs1[i]);
assertEquals(vhs1[i], vhs2[i]);
assertEquals(vhs1[i].hashCode(), vhs2[i].hashCode());
}
else {
assertNotEquals(vhs1[i], vhs1[j]);

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2015, 2019, 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,8 +141,6 @@ public class VarHandleTestAccessDouble extends VarHandleBaseTest {
for (int j = 0; j < vhs1.length; j++) {
if (i == j) {
assertEquals(vhs1[i], vhs1[i]);
assertEquals(vhs1[i], vhs2[i]);
assertEquals(vhs1[i].hashCode(), vhs2[i].hashCode());
}
else {
assertNotEquals(vhs1[i], vhs1[j]);

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2015, 2019, 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,8 +141,6 @@ public class VarHandleTestAccessFloat extends VarHandleBaseTest {
for (int j = 0; j < vhs1.length; j++) {
if (i == j) {
assertEquals(vhs1[i], vhs1[i]);
assertEquals(vhs1[i], vhs2[i]);
assertEquals(vhs1[i].hashCode(), vhs2[i].hashCode());
}
else {
assertNotEquals(vhs1[i], vhs1[j]);

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2015, 2019, 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,8 +141,6 @@ public class VarHandleTestAccessInt extends VarHandleBaseTest {
for (int j = 0; j < vhs1.length; j++) {
if (i == j) {
assertEquals(vhs1[i], vhs1[i]);
assertEquals(vhs1[i], vhs2[i]);
assertEquals(vhs1[i].hashCode(), vhs2[i].hashCode());
}
else {
assertNotEquals(vhs1[i], vhs1[j]);

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2015, 2019, 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,8 +141,6 @@ public class VarHandleTestAccessLong extends VarHandleBaseTest {
for (int j = 0; j < vhs1.length; j++) {
if (i == j) {
assertEquals(vhs1[i], vhs1[i]);
assertEquals(vhs1[i], vhs2[i]);
assertEquals(vhs1[i].hashCode(), vhs2[i].hashCode());
}
else {
assertNotEquals(vhs1[i], vhs1[j]);

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2015, 2019, 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,8 +141,6 @@ public class VarHandleTestAccessShort extends VarHandleBaseTest {
for (int j = 0; j < vhs1.length; j++) {
if (i == j) {
assertEquals(vhs1[i], vhs1[i]);
assertEquals(vhs1[i], vhs2[i]);
assertEquals(vhs1[i].hashCode(), vhs2[i].hashCode());
}
else {
assertNotEquals(vhs1[i], vhs1[j]);

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2015, 2019, 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
@ -143,8 +143,6 @@ public class VarHandleTestAccessString extends VarHandleBaseTest {
for (int j = 0; j < vhs1.length; j++) {
if (i == j) {
assertEquals(vhs1[i], vhs1[i]);
assertEquals(vhs1[i], vhs2[i]);
assertEquals(vhs1[i].hashCode(), vhs2[i].hashCode());
}
else {
assertNotEquals(vhs1[i], vhs1[j]);

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2015, 2019, 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
@ -93,8 +93,6 @@ public class VarHandleTestByteArrayAsChar extends VarHandleBaseByteArrayTest {
for (int j = 0; j < vhs1.length; j++) {
if (i == j) {
assertEquals(vhs1[i], vhs1[i]);
assertEquals(vhs1[i], vhs2[i]);
assertEquals(vhs1[i].hashCode(), vhs2[i].hashCode());
}
else {
assertNotEquals(vhs1[i], vhs1[j]);

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2015, 2019, 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
@ -93,8 +93,6 @@ public class VarHandleTestByteArrayAsDouble extends VarHandleBaseByteArrayTest {
for (int j = 0; j < vhs1.length; j++) {
if (i == j) {
assertEquals(vhs1[i], vhs1[i]);
assertEquals(vhs1[i], vhs2[i]);
assertEquals(vhs1[i].hashCode(), vhs2[i].hashCode());
}
else {
assertNotEquals(vhs1[i], vhs1[j]);

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2015, 2019, 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
@ -93,8 +93,6 @@ public class VarHandleTestByteArrayAsFloat extends VarHandleBaseByteArrayTest {
for (int j = 0; j < vhs1.length; j++) {
if (i == j) {
assertEquals(vhs1[i], vhs1[i]);
assertEquals(vhs1[i], vhs2[i]);
assertEquals(vhs1[i].hashCode(), vhs2[i].hashCode());
}
else {
assertNotEquals(vhs1[i], vhs1[j]);

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2015, 2019, 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
@ -93,8 +93,6 @@ public class VarHandleTestByteArrayAsInt extends VarHandleBaseByteArrayTest {
for (int j = 0; j < vhs1.length; j++) {
if (i == j) {
assertEquals(vhs1[i], vhs1[i]);
assertEquals(vhs1[i], vhs2[i]);
assertEquals(vhs1[i].hashCode(), vhs2[i].hashCode());
}
else {
assertNotEquals(vhs1[i], vhs1[j]);

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2015, 2019, 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
@ -93,8 +93,6 @@ public class VarHandleTestByteArrayAsLong extends VarHandleBaseByteArrayTest {
for (int j = 0; j < vhs1.length; j++) {
if (i == j) {
assertEquals(vhs1[i], vhs1[i]);
assertEquals(vhs1[i], vhs2[i]);
assertEquals(vhs1[i].hashCode(), vhs2[i].hashCode());
}
else {
assertNotEquals(vhs1[i], vhs1[j]);

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2015, 2019, 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
@ -93,8 +93,6 @@ public class VarHandleTestByteArrayAsShort extends VarHandleBaseByteArrayTest {
for (int j = 0; j < vhs1.length; j++) {
if (i == j) {
assertEquals(vhs1[i], vhs1[i]);
assertEquals(vhs1[i], vhs2[i]);
assertEquals(vhs1[i].hashCode(), vhs2[i].hashCode());
}
else {
assertNotEquals(vhs1[i], vhs1[j]);

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2015, 2019, 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
@ -35,7 +35,8 @@ package jdk.jfr.event.gc.detailed;
* & vm.opt.ExplicitGCInvokesConcurrent != true
* @library /test/lib /test/jdk
* @run main/othervm -Xmx32m -Xms32m -Xmn12m -XX:+UseG1GC -XX:-UseStringDeduplication -XX:MaxTenuringThreshold=5 -XX:InitialTenuringThreshold=5 jdk.jfr.event.gc.detailed.TestPromotionEventWithG1
* @run main/othervm -Xmx32m -Xms32m -Xmn12m -XX:+UseG1GC -XX:-UseStringDeduplication -XX:MaxTenuringThreshold=5 -XX:InitialTenuringThreshold=5 -XX:MinTLABSize=576 -XX:TLABSize=576 jdk.jfr.event.gc.detailed.TestPromotionEventWithG1
* @run main/othervm -Xmx32m -Xms32m -Xmn12m -XX:AllocatePrefetchLines=1 -XX:AllocateInstancePrefetchLines=1 -XX:AllocatePrefetchStepSize=16 -XX:AllocatePrefetchDistance=1 -XX:+UseG1GC
* -XX:-UseStringDeduplication -Xlog:os+cpu=info -XX:MaxTenuringThreshold=5 -XX:InitialTenuringThreshold=5 -XX:MinTLABSize=768 -XX:TLABSize=768 jdk.jfr.event.gc.detailed.TestPromotionEventWithG1
*/
public class TestPromotionEventWithG1 {

View File

@ -31,7 +31,7 @@ import java.nio.charset.Charset;
import java.nio.charset.CharsetDecoder;
import java.nio.charset.CharsetEncoder;
import java.nio.charset.CharacterCodingException;
import sun.nio.cs.HistoricallyNamedCharset;
import sun.nio.cs.*;
import sun.nio.cs.ext.*;

View File

@ -31,7 +31,7 @@ import java.nio.charset.Charset;
import java.nio.charset.CharsetDecoder;
import java.nio.charset.CharsetEncoder;
import java.nio.charset.CharacterCodingException;
import sun.nio.cs.HistoricallyNamedCharset;
import sun.nio.cs.*;
import sun.nio.cs.ext.*;

View File

@ -30,7 +30,7 @@ import java.nio.charset.Charset;
import java.nio.charset.CharsetDecoder;
import java.nio.charset.CharsetEncoder;
import java.nio.charset.CharacterCodingException;
import sun.nio.cs.HistoricallyNamedCharset;
import sun.nio.cs.*;
import sun.nio.cs.ext.*;

View File

@ -30,7 +30,7 @@ import java.nio.charset.Charset;
import java.nio.charset.CharsetDecoder;
import java.nio.charset.CharsetEncoder;
import java.nio.charset.CharacterCodingException;
import sun.nio.cs.HistoricallyNamedCharset;
import sun.nio.cs.*;
import sun.nio.cs.ext.*;

View File

@ -33,8 +33,7 @@ import java.nio.CharBuffer;
import java.nio.charset.CharsetDecoder;
import java.nio.charset.CharsetEncoder;
import java.nio.charset.CoderResult;
import sun.nio.cs.HistoricallyNamedCharset;
import sun.nio.cs.Surrogate;
import sun.nio.cs.*;
import sun.nio.cs.ext.*;