--- a/.hgtags Fri Jan 25 13:50:44 2019 +0000
+++ b/.hgtags Tue Jan 29 17:42:58 2019 +0000
@@ -536,5 +536,5 @@
f15d443f97318e9b40e6f451e327ff69ed4ec361 jdk-12+27
a47b8125b7cc9ef59619745c163975fe935b57ed jdk-13+4
659b004b6a1bd8c31e766cbdf328d8f8473fd4d7 jdk-12+28
-
e3ed960609927b5fdfd0a797159835cd83a81a31 jdk-13+5
+44f41693631f9b5ac78ff4d2bfabd6734fe46df2 jdk-12+29
--- a/make/RunTests.gmk Fri Jan 25 13:50:44 2019 +0000
+++ b/make/RunTests.gmk Tue Jan 29 17:42:58 2019 +0000
@@ -119,10 +119,8 @@
JCOV_REPORT := $(JCOV_OUTPUT_DIR)/report
JCOV_MEM_OPTIONS := -Xms64m -Xmx4g
- ifneq ($(JCOV_IMAGE_DIR), )
- # Replace our normal test JDK with the JCov image, if present.
- JDK_UNDER_TEST := $(JCOV_IMAGE_DIR)
- endif
+ # Replace our normal test JDK with the JCov image.
+ JDK_UNDER_TEST := $(JCOV_IMAGE_DIR)
JCOV_ENVIRONMENT := JAVA_TOOL_OPTIONS="$(JCOV_MEM_OPTIONS)" \
_JAVA_OPTIONS="$(JCOV_MEM_OPTIONS)"
--- a/make/RunTestsPrebuilt.gmk Fri Jan 25 13:50:44 2019 +0000
+++ b/make/RunTestsPrebuilt.gmk Tue Jan 29 17:42:58 2019 +0000
@@ -95,12 +95,12 @@
# $1: The output file name
# $2..$N: The lines to output to the file
define CreateNewSpec
- $(if $(strip $(31)), \
+ $(if $(strip $(33)), \
$(error Internal makefile error: \
Too many arguments to macro, please update CreateNewSpec in RunTestsPrebuilt.gmk) \
) \
$(shell $(RM) $1) \
- $(foreach i, $(call sequence, 2, 30), \
+ $(foreach i, $(call sequence, 2, 32), \
$(if $(strip $($i)), \
$(call AppendFile, $(strip $($i)), $1) \
) \
@@ -275,6 +275,14 @@
LD := ld
endif
+ifneq ($(wildcard $(JDK_IMAGE_DIR)/template.xml), )
+ TEST_OPTS_JCOV := true
+ JCOV_IMAGE_DIR := $(JDK_IMAGE_DIR)
+else
+ TEST_OPTS_JCOV := false
+ JCOV_IMAGE_DIR :=
+endif
+
################################################################################
# Generate the ephemeral spec file
################################################################################
@@ -295,6 +303,7 @@
BOOT_JDK := $(BOOT_JDK), \
JT_HOME := $(JT_HOME), \
JDK_IMAGE_DIR := $(JDK_IMAGE_DIR), \
+ JCOV_IMAGE_DIR := $(JCOV_IMAGE_DIR), \
TEST_IMAGE_DIR := $(TEST_IMAGE_DIR), \
SYMBOLS_IMAGE_DIR := $(SYMBOLS_IMAGE_DIR), \
MAKE := $(MAKE), \
@@ -315,6 +324,7 @@
LIBRARY_PREFIX := $(LIBRARY_PREFIX), \
SHARED_LIBRARY_SUFFIX := $(SHARED_LIBRARY_SUFFIX), \
include $(TOPDIR)/make/RunTestsPrebuiltSpec.gmk, \
+ TEST_OPTS_JCOV := $(TEST_OPTS_JCOV), \
$(CUSTOM_NEW_SPEC_LINE), \
)
--- a/make/conf/jib-profiles.js Fri Jan 25 13:50:44 2019 +0000
+++ b/make/conf/jib-profiles.js Tue Jan 29 17:42:58 2019 +0000
@@ -760,20 +760,27 @@
if (testedProfile == null) {
testedProfile = input.build_os + "-" + input.build_cpu;
}
+ var testedProfileJDK = testedProfile + ".jdk";
+ var testedProfileTest = ""
+ if (testedProfile.endsWith("-jcov")) {
+ testedProfileTest = testedProfile.substring(0, testedProfile.length - "-jcov".length) + ".test";
+ } else {
+ testedProfileTest = testedProfile + ".test";
+ }
var testOnlyProfilesPrebuilt = {
"run-test-prebuilt": {
target_os: input.build_os,
target_cpu: input.build_cpu,
dependencies: [
- "jtreg", "gnumake", "boot_jdk", "devkit", "jib", testedProfile + ".jdk",
- testedProfile + ".test"
+ "jtreg", "gnumake", "boot_jdk", "devkit", "jib", "jcov", testedProfileJDK,
+ testedProfileTest
],
src: "src.conf",
make_args: [ "run-test-prebuilt", "LOG_CMDLINES=true", "JTREG_VERBOSE=fail,error,time" ],
environment: {
"BOOT_JDK": common.boot_jdk_home,
- "JDK_IMAGE_DIR": input.get(testedProfile + ".jdk", "home_path"),
- "TEST_IMAGE_DIR": input.get(testedProfile + ".test", "home_path")
+ "JDK_IMAGE_DIR": input.get(testedProfileJDK, "home_path"),
+ "TEST_IMAGE_DIR": input.get(testedProfileTest, "home_path")
},
labels: "test"
}
@@ -939,6 +946,7 @@
version: "3.0",
build_number: "b07",
file: "bundles/jcov-3_0.zip",
+ environment_name: "JCOV_HOME",
},
gnumake: {
--- a/make/data/charsetmapping/stdcs-aix Fri Jan 25 13:50:44 2019 +0000
+++ b/make/data/charsetmapping/stdcs-aix Tue Jan 29 17:42:58 2019 +0000
@@ -5,7 +5,6 @@
Big5_Solaris
Big5_HKSCS
EUC_CN
-EUC_JP
EUC_KR
GBK
GB18030
--- a/make/hotspot/gensrc/GensrcAdlc.gmk Fri Jan 25 13:50:44 2019 +0000
+++ b/make/hotspot/gensrc/GensrcAdlc.gmk Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2013, 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
@@ -142,6 +142,12 @@
)))
endif
+ ifeq ($(call check-jvm-feature, zgc), true)
+ AD_SRC_FILES += $(call uniq, $(wildcard $(foreach d, $(AD_SRC_ROOTS), \
+ $d/cpu/$(HOTSPOT_TARGET_CPU_ARCH)/gc/z/z_$(HOTSPOT_TARGET_CPU).ad \
+ )))
+ endif
+
SINGLE_AD_SRCFILE := $(ADLC_SUPPORT_DIR)/all-ad-src.ad
INSERT_FILENAME_AWK_SCRIPT := \
--- a/make/jdk/src/classes/build/tools/cldrconverter/CalendarType.java Fri Jan 25 13:50:44 2019 +0000
+++ b/make/jdk/src/classes/build/tools/cldrconverter/CalendarType.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 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
@@ -40,7 +40,7 @@
{0, 2}, // generic
{0, 2}, // gregorian
{0, 1}, // buddhist
- {232, 4}, // japanese (eras from Meiji)
+ {232, 5}, // japanese (eras from Meiji)
{0, 2}, // roc (Minguo)
{0, 1}, // islamic (Hijrah)
{0, 1}, // islamic-civil (same as islamic)
--- a/src/hotspot/cpu/aarch64/frame_aarch64.inline.hpp Fri Jan 25 13:50:44 2019 +0000
+++ b/src/hotspot/cpu/aarch64/frame_aarch64.inline.hpp Tue Jan 29 17:42:58 2019 +0000
@@ -137,11 +137,6 @@
// frame.
inline intptr_t* frame::id(void) const { return unextended_sp(); }
-// Relationals on frames based
-// Return true if the frame is younger (more recent activation) than the frame represented by id
-inline bool frame::is_younger(intptr_t* id) const { assert(this->id() != NULL && id != NULL, "NULL frame id");
- return this->id() < id ; }
-
// Return true if the frame is older (less recent activation) than the frame represented by id
inline bool frame::is_older(intptr_t* id) const { assert(this->id() != NULL && id != NULL, "NULL frame id");
return this->id() > id ; }
--- a/src/hotspot/cpu/aarch64/gc/shenandoah/shenandoahBarrierSetAssembler_aarch64.cpp Fri Jan 25 13:50:44 2019 +0000
+++ b/src/hotspot/cpu/aarch64/gc/shenandoah/shenandoahBarrierSetAssembler_aarch64.cpp Tue Jan 29 17:42:58 2019 +0000
@@ -423,45 +423,14 @@
}
void ShenandoahBarrierSetAssembler::cmpxchg_oop(MacroAssembler* masm, Register addr, Register expected, Register new_val,
- bool acquire, bool release, bool weak, bool encode,
- Register tmp1, Register tmp2, Register tmp3,
+ bool acquire, bool release, bool weak, bool is_cae,
Register result) {
- if (!ShenandoahCASBarrier) {
- if (UseCompressedOops) {
- if (encode) {
- __ encode_heap_oop(tmp1, expected);
- expected = tmp1;
- __ encode_heap_oop(tmp3, new_val);
- new_val = tmp3;
- }
- __ cmpxchg(addr, expected, new_val, Assembler::word, /* acquire*/ true, /* release*/ true, /* weak*/ false, rscratch1);
- __ membar(__ AnyAny);
- } else {
- __ cmpxchg(addr, expected, new_val, Assembler::xword, /* acquire*/ true, /* release*/ true, /* weak*/ false, rscratch1);
- __ membar(__ AnyAny);
- }
- return;
- }
-
- if (encode) {
- storeval_barrier(masm, new_val, tmp3);
- }
-
- if (UseCompressedOops) {
- if (encode) {
- __ encode_heap_oop(tmp1, expected);
- expected = tmp1;
- __ encode_heap_oop(tmp2, new_val);
- new_val = tmp2;
- }
- }
- bool is_cae = (result != noreg);
+ Register tmp = rscratch2;
bool is_narrow = UseCompressedOops;
Assembler::operand_size size = is_narrow ? Assembler::word : Assembler::xword;
- if (! is_cae) result = rscratch1;
- assert_different_registers(addr, expected, new_val, result, tmp3);
+ assert_different_registers(addr, expected, new_val, result, tmp);
Label retry, done, fail;
@@ -474,35 +443,38 @@
__ cmp(result, expected);
}
__ br(Assembler::NE, fail);
- __ store_exclusive(tmp3, new_val, addr, size, release);
+ __ store_exclusive(tmp, new_val, addr, size, release);
if (weak) {
- __ cmpw(tmp3, 0u); // If the store fails, return NE to our caller
+ __ cmpw(tmp, 0u); // If the store fails, return NE to our caller
} else {
- __ cbnzw(tmp3, retry);
+ __ cbnzw(tmp, retry);
}
__ b(done);
__ bind(fail);
// Check if rb(expected)==rb(result)
// Shuffle registers so that we have memory value ready for next expected.
- __ mov(tmp3, expected);
+ __ mov(tmp, expected);
__ mov(expected, result);
if (is_narrow) {
__ decode_heap_oop(result, result);
- __ decode_heap_oop(tmp3, tmp3);
+ __ decode_heap_oop(tmp, tmp);
}
read_barrier_impl(masm, result);
- read_barrier_impl(masm, tmp3);
- __ cmp(result, tmp3);
+ read_barrier_impl(masm, tmp);
+ __ cmp(result, tmp);
// Retry with expected now being the value we just loaded from addr.
__ br(Assembler::EQ, retry);
- if (is_narrow && is_cae) {
+ if (is_cae && is_narrow) {
// For cmp-and-exchange and narrow oops, we need to restore
// the compressed old-value. We moved it to 'expected' a few lines up.
__ mov(result, expected);
}
__ bind(done);
+ if (!is_cae) {
+ __ cset(result, Assembler::EQ);
+ }
}
#ifdef COMPILER1
--- a/src/hotspot/cpu/aarch64/gc/shenandoah/shenandoahBarrierSetAssembler_aarch64.hpp Fri Jan 25 13:50:44 2019 +0000
+++ b/src/hotspot/cpu/aarch64/gc/shenandoah/shenandoahBarrierSetAssembler_aarch64.hpp Tue Jan 29 17:42:58 2019 +0000
@@ -60,7 +60,6 @@
void read_barrier_not_null_impl(MacroAssembler* masm, Register dst);
void write_barrier(MacroAssembler* masm, Register dst);
void write_barrier_impl(MacroAssembler* masm, Register dst);
- void storeval_barrier(MacroAssembler* masm, Register dst, Register tmp);
void asm_acmp_barrier(MacroAssembler* masm, Register op1, Register op2);
address generate_shenandoah_wb(StubCodeGenerator* cgen);
@@ -68,6 +67,8 @@
public:
static address shenandoah_wb();
+ void storeval_barrier(MacroAssembler* masm, Register dst, Register tmp);
+
#ifdef COMPILER1
void gen_pre_barrier_stub(LIR_Assembler* ce, ShenandoahPreBarrierStub* stub);
void gen_write_barrier_stub(LIR_Assembler* ce, ShenandoahWriteBarrierStub* stub);
@@ -92,9 +93,7 @@
Label& slow_case);
void cmpxchg_oop(MacroAssembler* masm, Register addr, Register expected, Register new_val,
- bool acquire, bool release, bool weak, bool encode,
- Register tmp1, Register tmp2, Register tmp3 = rscratch2,
- Register result = noreg);
+ bool acquire, bool release, bool weak, bool is_cae, Register result);
virtual void barrier_stubs_init();
};
--- a/src/hotspot/cpu/aarch64/gc/shenandoah/shenandoahBarrierSetC1_aarch64.cpp Fri Jan 25 13:50:44 2019 +0000
+++ b/src/hotspot/cpu/aarch64/gc/shenandoah/shenandoahBarrierSetC1_aarch64.cpp Tue Jan 29 17:42:58 2019 +0000
@@ -28,15 +28,30 @@
#include "gc/shenandoah/shenandoahBarrierSetAssembler.hpp"
#include "gc/shenandoah/c1/shenandoahBarrierSetC1.hpp"
+#define __ masm->masm()->
+
void LIR_OpShenandoahCompareAndSwap::emit_code(LIR_Assembler* masm) {
Register addr = _addr->as_register_lo();
Register newval = _new_value->as_register();
Register cmpval = _cmp_value->as_register();
Register tmp1 = _tmp1->as_register();
Register tmp2 = _tmp2->as_register();
- ShenandoahBarrierSet::assembler()->cmpxchg_oop(masm->masm(), addr, cmpval, newval, /*acquire*/ false, /*release*/ true, /*weak*/ false, true, tmp1, tmp2);
+ Register result = result_opr()->as_register();
+
+ ShenandoahBarrierSet::assembler()->storeval_barrier(masm->masm(), newval, rscratch2);
+
+ if (UseCompressedOops) {
+ __ encode_heap_oop(tmp1, cmpval);
+ cmpval = tmp1;
+ __ encode_heap_oop(tmp2, newval);
+ newval = tmp2;
+ }
+
+ ShenandoahBarrierSet::assembler()->cmpxchg_oop(masm->masm(), addr, cmpval, newval, /*acquire*/ false, /*release*/ true, /*weak*/ false, /*is_cae*/ false, result);
}
+#undef __
+
#ifdef ASSERT
#define __ gen->lir(__FILE__, __LINE__)->
#else
@@ -58,13 +73,9 @@
LIR_Opr t1 = gen->new_register(T_OBJECT);
LIR_Opr t2 = gen->new_register(T_OBJECT);
LIR_Opr addr = access.resolved_addr()->as_address_ptr()->base();
-
- __ append(new LIR_OpShenandoahCompareAndSwap(addr, cmp_value.result(), new_value.result(), t1, t2,
- LIR_OprFact::illegalOpr));
+ LIR_Opr result = gen->new_register(T_INT);
- LIR_Opr result = gen->new_register(T_INT);
- __ cmove(lir_cond_equal, LIR_OprFact::intConst(1), LIR_OprFact::intConst(0),
- result, T_INT);
+ __ append(new LIR_OpShenandoahCompareAndSwap(addr, cmp_value.result(), new_value.result(), t1, t2, result));
return result;
}
}
--- a/src/hotspot/cpu/aarch64/gc/shenandoah/shenandoah_aarch64.ad Fri Jan 25 13:50:44 2019 +0000
+++ b/src/hotspot/cpu/aarch64/gc/shenandoah/shenandoah_aarch64.ad Tue Jan 29 17:42:58 2019 +0000
@@ -26,22 +26,22 @@
%}
encode %{
- enc_class aarch64_enc_cmpxchg_oop_shenandoah(memory mem, iRegP oldval, iRegP newval, iRegPNoSp tmp) %{
+ enc_class aarch64_enc_cmpxchg_oop_shenandoah(memory mem, iRegP oldval, iRegP newval, iRegPNoSp tmp, iRegINoSp res) %{
MacroAssembler _masm(&cbuf);
guarantee($mem$$index == -1 && $mem$$disp == 0, "impossible encoding");
Register tmp = $tmp$$Register;
__ mov(tmp, $oldval$$Register); // Must not clobber oldval.
ShenandoahBarrierSet::assembler()->cmpxchg_oop(&_masm, $mem$$Register, tmp, $newval$$Register,
- /*acquire*/ false, /*release*/ true, /*weak*/ false, /*encode*/ false, noreg, noreg);
+ /*acquire*/ false, /*release*/ true, /*weak*/ false, /*is_cae*/ false, $res$$Register);
%}
- enc_class aarch64_enc_cmpxchg_acq_oop_shenandoah(memory mem, iRegP oldval, iRegP newval, iRegPNoSp tmp) %{
+ enc_class aarch64_enc_cmpxchg_acq_oop_shenandoah(memory mem, iRegP oldval, iRegP newval, iRegPNoSp tmp, iRegINoSp res) %{
MacroAssembler _masm(&cbuf);
guarantee($mem$$index == -1 && $mem$$disp == 0, "impossible encoding");
Register tmp = $tmp$$Register;
__ mov(tmp, $oldval$$Register); // Must not clobber oldval.
ShenandoahBarrierSet::assembler()->cmpxchg_oop(&_masm, $mem$$Register, tmp, $newval$$Register,
- /*acquire*/ true, /*release*/ true, /*weak*/ false, /*encode*/ false, noreg, noreg);
+ /*acquire*/ true, /*release*/ true, /*weak*/ false, /*is_cae*/ false, $res$$Register);
%}
%}
@@ -66,11 +66,9 @@
format %{
"cmpxchg_shenandoah $mem, $oldval, $newval\t# (ptr) if $mem == $oldval then $mem <-- $newval with temp $tmp"
- "cset $res, EQ\t# $res <-- (EQ ? 1 : 0)"
%}
- ins_encode(aarch64_enc_cmpxchg_oop_shenandoah(mem, oldval, newval, tmp),
- aarch64_enc_cset_eq(res));
+ ins_encode(aarch64_enc_cmpxchg_oop_shenandoah(mem, oldval, newval, tmp, res));
ins_pipe(pipe_slow);
%}
@@ -84,14 +82,12 @@
format %{
"cmpxchgw_shenandoah $mem, $oldval, $newval\t# (ptr) if $mem == $oldval then $mem <-- $newval with temp $tmp"
- "cset $res, EQ\t# $res <-- (EQ ? 1 : 0)"
%}
ins_encode %{
Register tmp = $tmp$$Register;
__ mov(tmp, $oldval$$Register); // Must not clobber oldval.
- ShenandoahBarrierSet::assembler()->cmpxchg_oop(&_masm, $mem$$Register, tmp, $newval$$Register, /*acquire*/ false, /*release*/ true, /*weak*/ false, /*encode*/ false, noreg, noreg);
- __ cset($res$$Register, Assembler::EQ);
+ ShenandoahBarrierSet::assembler()->cmpxchg_oop(&_masm, $mem$$Register, tmp, $newval$$Register, /*acquire*/ false, /*release*/ true, /*weak*/ false, /*is_cae*/ false, $res$$Register);
%}
ins_pipe(pipe_slow);
@@ -107,11 +103,9 @@
format %{
"cmpxchg_acq_shenandoah_oop $mem, $oldval, $newval\t# (ptr) if $mem == $oldval then $mem <-- $newval with temp $tmp"
- "cset $res, EQ\t# $res <-- (EQ ? 1 : 0)"
%}
- ins_encode(aarch64_enc_cmpxchg_acq_oop_shenandoah(mem, oldval, newval, tmp),
- aarch64_enc_cset_eq(res));
+ ins_encode(aarch64_enc_cmpxchg_acq_oop_shenandoah(mem, oldval, newval, tmp, res));
ins_pipe(pipe_slow);
%}
@@ -126,14 +120,12 @@
format %{
"cmpxchgw_acq_shenandoah_narrow_oop $mem, $oldval, $newval\t# (ptr) if $mem == $oldval then $mem <-- $newval with temp $tmp"
- "cset $res, EQ\t# $res <-- (EQ ? 1 : 0)"
%}
ins_encode %{
Register tmp = $tmp$$Register;
__ mov(tmp, $oldval$$Register); // Must not clobber oldval.
- ShenandoahBarrierSet::assembler()->cmpxchg_oop(&_masm, $mem$$Register, tmp, $newval$$Register, /*acquire*/ true, /*release*/ true, /*weak*/ false, /*encode*/ false, noreg, noreg);
- __ cset($res$$Register, Assembler::EQ);
+ ShenandoahBarrierSet::assembler()->cmpxchg_oop(&_masm, $mem$$Register, tmp, $newval$$Register, /*acquire*/ true, /*release*/ true, /*weak*/ false, /*is_cae*/ false, $res$$Register);
%}
ins_pipe(pipe_slow);
@@ -150,7 +142,7 @@
Register tmp = $tmp$$Register;
__ mov(tmp, $oldval$$Register); // Must not clobber oldval.
ShenandoahBarrierSet::assembler()->cmpxchg_oop(&_masm, $mem$$Register, tmp, $newval$$Register,
- /*acquire*/ false, /*release*/ true, /*weak*/ false, /* encode*/ false, noreg, noreg, rscratch2, $res$$Register);
+ /*acquire*/ false, /*release*/ true, /*weak*/ false, /*is_cae*/ true, $res$$Register);
%}
ins_pipe(pipe_slow);
%}
@@ -166,7 +158,7 @@
Register tmp = $tmp$$Register;
__ mov(tmp, $oldval$$Register); // Must not clobber oldval.
ShenandoahBarrierSet::assembler()->cmpxchg_oop(&_masm, $mem$$Register, tmp, $newval$$Register,
- /*acquire*/ false, /*release*/ true, /*weak*/ false, /*encode*/ false, noreg, noreg, rscratch2, $res$$Register);
+ /*acquire*/ false, /*release*/ true, /*weak*/ false, /*is_cae*/ true, $res$$Register);
%}
ins_pipe(pipe_slow);
%}
@@ -183,7 +175,7 @@
Register tmp = $tmp$$Register;
__ mov(tmp, $oldval$$Register); // Must not clobber oldval.
ShenandoahBarrierSet::assembler()->cmpxchg_oop(&_masm, $mem$$Register, tmp, $newval$$Register,
- /*acquire*/ true, /*release*/ true, /*weak*/ false, /* encode*/ false, noreg, noreg, rscratch2, $res$$Register);
+ /*acquire*/ true, /*release*/ true, /*weak*/ false, /*is_cae*/ true, $res$$Register);
%}
ins_pipe(pipe_slow);
%}
@@ -200,7 +192,7 @@
Register tmp = $tmp$$Register;
__ mov(tmp, $oldval$$Register); // Must not clobber oldval.
ShenandoahBarrierSet::assembler()->cmpxchg_oop(&_masm, $mem$$Register, tmp, $newval$$Register,
- /*acquire*/ true, /*release*/ true, /*weak*/ false, /*encode*/ false, noreg, noreg, rscratch2, $res$$Register);
+ /*acquire*/ true, /*release*/ true, /*weak*/ false, /*is_cae*/ true, $res$$Register);
%}
ins_pipe(pipe_slow);
%}
@@ -217,8 +209,7 @@
Register tmp = $tmp$$Register;
__ mov(tmp, $oldval$$Register); // Must not clobber oldval.
ShenandoahBarrierSet::assembler()->cmpxchg_oop(&_masm, $mem$$Register, tmp, $newval$$Register,
- /*acquire*/ false, /*release*/ true, /*weak*/ true, /*encode*/ false, noreg, noreg);
- __ csetw($res$$Register, Assembler::EQ);
+ /*acquire*/ false, /*release*/ true, /*weak*/ true, /*is_cae*/ false, $res$$Register);
%}
ins_pipe(pipe_slow);
%}
@@ -229,14 +220,12 @@
effect(TEMP tmp, KILL cr);
format %{
"cmpxchg_shenandoah $res = $mem, $oldval, $newval\t# (ptr, weak) if $mem == $oldval then $mem <-- $newval"
- "csetw $res, EQ\t# $res <-- (EQ ? 1 : 0)"
%}
ins_encode %{
Register tmp = $tmp$$Register;
__ mov(tmp, $oldval$$Register); // Must not clobber oldval.
ShenandoahBarrierSet::assembler()->cmpxchg_oop(&_masm, $mem$$Register, tmp, $newval$$Register,
- /*acquire*/ false, /*release*/ true, /*weak*/ true, /*encode*/ false, noreg, noreg);
- __ csetw($res$$Register, Assembler::EQ);
+ /*acquire*/ false, /*release*/ true, /*weak*/ true, /*is_cae*/ false, $res$$Register);
%}
ins_pipe(pipe_slow);
%}
@@ -254,8 +243,7 @@
Register tmp = $tmp$$Register;
__ mov(tmp, $oldval$$Register); // Must not clobber oldval.
ShenandoahBarrierSet::assembler()->cmpxchg_oop(&_masm, $mem$$Register, tmp, $newval$$Register,
- /*acquire*/ true, /*release*/ true, /*weak*/ true, /*encode*/ false, noreg, noreg);
- __ csetw($res$$Register, Assembler::EQ);
+ /*acquire*/ true, /*release*/ true, /*weak*/ true, /*is_cae*/ false, $res$$Register);
%}
ins_pipe(pipe_slow);
%}
@@ -273,9 +261,7 @@
Register tmp = $tmp$$Register;
__ mov(tmp, $oldval$$Register); // Must not clobber oldval.
ShenandoahBarrierSet::assembler()->cmpxchg_oop(&_masm, $mem$$Register, tmp, $newval$$Register,
- /*acquire*/ true, /*release*/ true, /*weak*/ true, /*encode*/ false, noreg, noreg);
- __ csetw($res$$Register, Assembler::EQ);
+ /*acquire*/ true, /*release*/ true, /*weak*/ true, /*is_cae*/ false, $res$$Register);
%}
ins_pipe(pipe_slow);
%}
-
--- a/src/hotspot/cpu/arm/frame_arm.inline.hpp Fri Jan 25 13:50:44 2019 +0000
+++ b/src/hotspot/cpu/arm/frame_arm.inline.hpp Tue Jan 29 17:42:58 2019 +0000
@@ -120,17 +120,11 @@
// frame.
inline intptr_t* frame::id(void) const { return unextended_sp(); }
-// Relationals on frames based
-// Return true if the frame is younger (more recent activation) than the frame represented by id
-inline bool frame::is_younger(intptr_t* id) const { assert(this->id() != NULL && id != NULL, "NULL frame id");
- return this->id() < id ; }
-
// Return true if the frame is older (less recent activation) than the frame represented by id
inline bool frame::is_older(intptr_t* id) const { assert(this->id() != NULL && id != NULL, "NULL frame id");
return this->id() > id ; }
-
inline intptr_t* frame::link() const { return (intptr_t*) *(intptr_t **)addr_at(link_offset); }
inline intptr_t* frame::unextended_sp() const { return _unextended_sp; }
--- a/src/hotspot/cpu/s390/frame_s390.inline.hpp Fri Jan 25 13:50:44 2019 +0000
+++ b/src/hotspot/cpu/s390/frame_s390.inline.hpp Tue Jan 29 17:42:58 2019 +0000
@@ -111,14 +111,6 @@
return _fp;
}
-// Return true if this frame is younger (more recent activation) than
-// the frame represented by id.
-inline bool frame::is_younger(intptr_t* id) const {
- assert(this->id() != NULL && id != NULL, "NULL frame id");
- // Stack grows towards smaller addresses on z/Architecture.
- return this->id() < id;
-}
-
// Return true if this frame is older (less recent activation) than
// the frame represented by id.
inline bool frame::is_older(intptr_t* id) const {
--- a/src/hotspot/cpu/sparc/frame_sparc.inline.hpp Fri Jan 25 13:50:44 2019 +0000
+++ b/src/hotspot/cpu/sparc/frame_sparc.inline.hpp Tue Jan 29 17:42:58 2019 +0000
@@ -57,11 +57,6 @@
// frame.
inline intptr_t* frame::id(void) const { return unextended_sp(); }
-// Relationals on frames based
-// Return true if the frame is younger (more recent activation) than the frame represented by id
-inline bool frame::is_younger(intptr_t* id) const { assert(this->id() != NULL && id != NULL, "NULL frame id");
- return this->id() < id ; }
-
// Return true if the frame is older (less recent activation) than the frame represented by id
inline bool frame::is_older(intptr_t* id) const { assert(this->id() != NULL && id != NULL, "NULL frame id");
return this->id() > id ; }
--- a/src/hotspot/cpu/x86/frame_x86.inline.hpp Fri Jan 25 13:50:44 2019 +0000
+++ b/src/hotspot/cpu/x86/frame_x86.inline.hpp Tue Jan 29 17:42:58 2019 +0000
@@ -133,11 +133,6 @@
// frame.
inline intptr_t* frame::id(void) const { return unextended_sp(); }
-// Relationals on frames based
-// Return true if the frame is younger (more recent activation) than the frame represented by id
-inline bool frame::is_younger(intptr_t* id) const { assert(this->id() != NULL && id != NULL, "NULL frame id");
- return this->id() < id ; }
-
// Return true if the frame is older (less recent activation) than the frame represented by id
inline bool frame::is_older(intptr_t* id) const { assert(this->id() != NULL && id != NULL, "NULL frame id");
return this->id() > id ; }
--- a/src/hotspot/cpu/x86/gc/shenandoah/shenandoahBarrierSetAssembler_x86.cpp Fri Jan 25 13:50:44 2019 +0000
+++ b/src/hotspot/cpu/x86/gc/shenandoah/shenandoahBarrierSetAssembler_x86.cpp Tue Jan 29 17:42:58 2019 +0000
@@ -592,64 +592,19 @@
#ifndef _LP64
void ShenandoahBarrierSetAssembler::cmpxchg_oop(MacroAssembler* masm,
Register res, Address addr, Register oldval, Register newval,
- bool exchange, bool encode, Register tmp1, Register tmp2) {
+ bool exchange, Register tmp1, Register tmp2) {
// Shenandoah has no 32-bit version for this.
Unimplemented();
}
#else
void ShenandoahBarrierSetAssembler::cmpxchg_oop(MacroAssembler* masm,
Register res, Address addr, Register oldval, Register newval,
- bool exchange, bool encode, Register tmp1, Register tmp2) {
- if (!ShenandoahCASBarrier) {
-#ifdef _LP64
- if (UseCompressedOops) {
- if (encode) {
- __ encode_heap_oop(oldval);
- __ mov(rscratch1, newval);
- __ encode_heap_oop(rscratch1);
- newval = rscratch1;
- }
- if (os::is_MP()) {
- __ lock();
- }
- // oldval (rax) is implicitly used by this instruction
- __ cmpxchgl(newval, addr);
- } else
-#endif
- {
- if (os::is_MP()) {
- __ lock();
- }
- __ cmpxchgptr(newval, addr);
- }
-
- if (!exchange) {
- assert(res != NULL, "need result register");
- __ setb(Assembler::equal, res);
- __ movzbl(res, res);
- }
- return;
- }
-
+ bool exchange, Register tmp1, Register tmp2) {
assert(ShenandoahCASBarrier, "Should only be used when CAS barrier is enabled");
assert(oldval == rax, "must be in rax for implicit use in cmpxchg");
Label retry, done;
- // Apply storeval barrier to newval.
- if (encode) {
- storeval_barrier(masm, newval, tmp1);
- }
-
- if (UseCompressedOops) {
- if (encode) {
- __ encode_heap_oop(oldval);
- __ mov(rscratch1, newval);
- __ encode_heap_oop(rscratch1);
- newval = rscratch1;
- }
- }
-
// Remember oldval for retry logic below
if (UseCompressedOops) {
__ movl(tmp1, oldval);
--- a/src/hotspot/cpu/x86/gc/shenandoah/shenandoahBarrierSetAssembler_x86.hpp Fri Jan 25 13:50:44 2019 +0000
+++ b/src/hotspot/cpu/x86/gc/shenandoah/shenandoahBarrierSetAssembler_x86.hpp Tue Jan 29 17:42:58 2019 +0000
@@ -64,7 +64,6 @@
void write_barrier(MacroAssembler* masm, Register dst);
void write_barrier_impl(MacroAssembler* masm, Register dst);
- void storeval_barrier(MacroAssembler* masm, Register dst, Register tmp);
void storeval_barrier_impl(MacroAssembler* masm, Register dst, Register tmp);
address generate_shenandoah_wb(StubCodeGenerator* cgen);
@@ -75,6 +74,7 @@
public:
static address shenandoah_wb();
+ void storeval_barrier(MacroAssembler* masm, Register dst, Register tmp);
#ifdef COMPILER1
void gen_pre_barrier_stub(LIR_Assembler* ce, ShenandoahPreBarrierStub* stub);
void gen_write_barrier_stub(LIR_Assembler* ce, ShenandoahWriteBarrierStub* stub);
@@ -83,7 +83,7 @@
void cmpxchg_oop(MacroAssembler* masm,
Register res, Address addr, Register oldval, Register newval,
- bool exchange, bool encode, Register tmp1, Register tmp2);
+ bool exchange, Register tmp1, Register tmp2);
virtual void arraycopy_prologue(MacroAssembler* masm, DecoratorSet decorators, BasicType type,
Register src, Register dst, Register count);
virtual void arraycopy_epilogue(MacroAssembler* masm, DecoratorSet decorators, BasicType type,
--- a/src/hotspot/cpu/x86/gc/shenandoah/shenandoahBarrierSetC1_x86.cpp Fri Jan 25 13:50:44 2019 +0000
+++ b/src/hotspot/cpu/x86/gc/shenandoah/shenandoahBarrierSetC1_x86.cpp Tue Jan 29 17:42:58 2019 +0000
@@ -28,20 +28,36 @@
#include "gc/shenandoah/shenandoahBarrierSetAssembler.hpp"
#include "gc/shenandoah/c1/shenandoahBarrierSetC1.hpp"
+#define __ masm->masm()->
+
void LIR_OpShenandoahCompareAndSwap::emit_code(LIR_Assembler* masm) {
Register addr = _addr->as_register_lo();
Register newval = _new_value->as_register();
Register cmpval = _cmp_value->as_register();
Register tmp1 = _tmp1->as_register();
Register tmp2 = _tmp2->as_register();
+ Register result = result_opr()->as_register();
assert(cmpval == rax, "wrong register");
assert(newval != NULL, "new val must be register");
assert(cmpval != newval, "cmp and new values must be in different registers");
assert(cmpval != addr, "cmp and addr must be in different registers");
assert(newval != addr, "new value and addr must be in different registers");
- ShenandoahBarrierSet::assembler()->cmpxchg_oop(masm->masm(), NULL, Address(addr, 0), cmpval, newval, true, true, tmp1, tmp2);
+
+ // Apply storeval barrier to newval.
+ ShenandoahBarrierSet::assembler()->storeval_barrier(masm->masm(), newval, tmp1);
+
+ if (UseCompressedOops) {
+ __ encode_heap_oop(cmpval);
+ __ mov(rscratch1, newval);
+ __ encode_heap_oop(rscratch1);
+ newval = rscratch1;
+ }
+
+ ShenandoahBarrierSet::assembler()->cmpxchg_oop(masm->masm(), result, Address(addr, 0), cmpval, newval, false, tmp1, tmp2);
}
+#undef __
+
#ifdef ASSERT
#define __ gen->lir(__FILE__, __LINE__)->
#else
@@ -63,12 +79,9 @@
LIR_Opr t1 = gen->new_register(T_OBJECT);
LIR_Opr t2 = gen->new_register(T_OBJECT);
LIR_Opr addr = access.resolved_addr()->as_address_ptr()->base();
-
- __ append(new LIR_OpShenandoahCompareAndSwap(addr, cmp_value.result(), new_value.result(), t1, t2, LIR_OprFact::illegalOpr));
+ LIR_Opr result = gen->new_register(T_INT);
- LIR_Opr result = gen->new_register(T_INT);
- __ cmove(lir_cond_equal, LIR_OprFact::intConst(1), LIR_OprFact::intConst(0),
- result, T_INT);
+ __ append(new LIR_OpShenandoahCompareAndSwap(addr, cmp_value.result(), new_value.result(), t1, t2, result));
return result;
}
}
--- a/src/hotspot/cpu/x86/gc/shenandoah/shenandoah_x86_64.ad Fri Jan 25 13:50:44 2019 +0000
+++ b/src/hotspot/cpu/x86/gc/shenandoah/shenandoah_x86_64.ad Tue Jan 29 17:42:58 2019 +0000
@@ -83,7 +83,7 @@
ShenandoahBarrierSet::assembler()->cmpxchg_oop(&_masm,
$res$$Register, $mem_ptr$$Address, $oldval$$Register, $newval$$Register,
false, // swap
- false, $tmp1$$Register, $tmp2$$Register
+ $tmp1$$Register, $tmp2$$Register
);
%}
ins_pipe( pipe_cmpxchg );
@@ -104,7 +104,7 @@
ShenandoahBarrierSet::assembler()->cmpxchg_oop(&_masm,
$res$$Register, $mem_ptr$$Address, $oldval$$Register, $newval$$Register,
false, // swap
- false, $tmp1$$Register, $tmp2$$Register
+ $tmp1$$Register, $tmp2$$Register
);
%}
ins_pipe( pipe_cmpxchg );
@@ -123,7 +123,7 @@
ShenandoahBarrierSet::assembler()->cmpxchg_oop(&_masm,
NULL, $mem_ptr$$Address, $oldval$$Register, $newval$$Register,
true, // exchange
- false, $tmp1$$Register, $tmp2$$Register
+ $tmp1$$Register, $tmp2$$Register
);
%}
ins_pipe( pipe_cmpxchg );
@@ -145,7 +145,7 @@
ShenandoahBarrierSet::assembler()->cmpxchg_oop(&_masm,
NULL, $mem_ptr$$Address, $oldval$$Register, $newval$$Register,
true, // exchange
- false, $tmp1$$Register, $tmp2$$Register
+ $tmp1$$Register, $tmp2$$Register
);
%}
ins_pipe( pipe_cmpxchg );
--- a/src/hotspot/cpu/x86/gc/z/zBarrierSetAssembler_x86.cpp Fri Jan 25 13:50:44 2019 +0000
+++ b/src/hotspot/cpu/x86/gc/z/zBarrierSetAssembler_x86.cpp Tue Jan 29 17:42:58 2019 +0000
@@ -278,20 +278,21 @@
Register ref = stub->ref()->as_register();
Register ref_addr = noreg;
+ Register tmp = noreg;
- if (stub->ref_addr()->is_register()) {
+ if (stub->tmp()->is_valid()) {
+ // Load address into tmp register
+ ce->leal(stub->ref_addr(), stub->tmp());
+ ref_addr = tmp = stub->tmp()->as_pointer_register();
+ } else {
// Address already in register
- ref_addr = stub->ref_addr()->as_pointer_register();
- } else {
- // Load address into tmp register
- ce->leal(stub->ref_addr(), stub->tmp(), stub->patch_code(), stub->patch_info());
- ref_addr = stub->tmp()->as_pointer_register();
+ ref_addr = stub->ref_addr()->as_address_ptr()->base()->as_pointer_register();
}
assert_different_registers(ref, ref_addr, noreg);
- // Save rax unless it is the result register
- if (ref != rax) {
+ // Save rax unless it is the result or tmp register
+ if (ref != rax && tmp != rax) {
__ push(rax);
}
@@ -305,9 +306,13 @@
// Verify result
__ verify_oop(rax, "Bad oop");
- // Restore rax unless it is the result register
+ // Move result into place
if (ref != rax) {
__ movptr(ref, rax);
+ }
+
+ // Restore rax unless it is the result or tmp register
+ if (ref != rax && tmp != rax) {
__ pop(rax);
}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/hotspot/cpu/x86/gc/z/z_x86_64.ad Tue Jan 29 17:42:58 2019 +0000
@@ -0,0 +1,155 @@
+//
+// 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
+// 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.
+//
+
+source %{
+
+#include "gc/z/zBarrierSetAssembler.hpp"
+
+static void z_load_barrier_slow_reg(MacroAssembler& _masm, Register dst, Address src, bool weak) {
+ assert(dst != r12, "Invalid register");
+ assert(dst != r15, "Invalid register");
+ assert(dst != rsp, "Invalid register");
+
+ const address stub = weak ? ZBarrierSet::assembler()->load_barrier_weak_slow_stub(dst)
+ : ZBarrierSet::assembler()->load_barrier_slow_stub(dst);
+ __ lea(dst, src);
+ __ call(RuntimeAddress(stub));
+}
+
+%}
+
+// For XMM and YMM enabled processors
+instruct zLoadBarrierSlowRegXmmAndYmm(rRegP dst, memory src, rFlagsReg cr,
+ rxmm0 x0, rxmm1 x1, rxmm2 x2,rxmm3 x3,
+ rxmm4 x4, rxmm5 x5, rxmm6 x6, rxmm7 x7,
+ rxmm8 x8, rxmm9 x9, rxmm10 x10, rxmm11 x11,
+ rxmm12 x12, rxmm13 x13, rxmm14 x14, rxmm15 x15) %{
+
+ match(Set dst (LoadBarrierSlowReg src));
+ predicate(UseAVX <= 2);
+
+ effect(DEF dst, KILL cr,
+ KILL x0, KILL x1, KILL x2, KILL x3,
+ KILL x4, KILL x5, KILL x6, KILL x7,
+ KILL x8, KILL x9, KILL x10, KILL x11,
+ KILL x12, KILL x13, KILL x14, KILL x15);
+
+ format %{ "zLoadBarrierSlowRegXmmAndYmm $dst, $src" %}
+
+ ins_encode %{
+ z_load_barrier_slow_reg(_masm, $dst$$Register, $src$$Address, false /* weak */);
+ %}
+
+ ins_pipe(pipe_slow);
+%}
+
+// For ZMM enabled processors
+instruct zLoadBarrierSlowRegZmm(rRegP dst, memory src, rFlagsReg cr,
+ rxmm0 x0, rxmm1 x1, rxmm2 x2,rxmm3 x3,
+ rxmm4 x4, rxmm5 x5, rxmm6 x6, rxmm7 x7,
+ rxmm8 x8, rxmm9 x9, rxmm10 x10, rxmm11 x11,
+ rxmm12 x12, rxmm13 x13, rxmm14 x14, rxmm15 x15,
+ rxmm16 x16, rxmm17 x17, rxmm18 x18, rxmm19 x19,
+ rxmm20 x20, rxmm21 x21, rxmm22 x22, rxmm23 x23,
+ rxmm24 x24, rxmm25 x25, rxmm26 x26, rxmm27 x27,
+ rxmm28 x28, rxmm29 x29, rxmm30 x30, rxmm31 x31) %{
+
+ match(Set dst (LoadBarrierSlowReg src));
+ predicate(UseAVX == 3);
+
+ effect(DEF dst, KILL cr,
+ KILL x0, KILL x1, KILL x2, KILL x3,
+ KILL x4, KILL x5, KILL x6, KILL x7,
+ KILL x8, KILL x9, KILL x10, KILL x11,
+ KILL x12, KILL x13, KILL x14, KILL x15,
+ KILL x16, KILL x17, KILL x18, KILL x19,
+ KILL x20, KILL x21, KILL x22, KILL x23,
+ KILL x24, KILL x25, KILL x26, KILL x27,
+ KILL x28, KILL x29, KILL x30, KILL x31);
+
+ format %{ "zLoadBarrierSlowRegZmm $dst, $src" %}
+
+ ins_encode %{
+ z_load_barrier_slow_reg(_masm, $dst$$Register, $src$$Address, false /* weak */);
+ %}
+
+ ins_pipe(pipe_slow);
+%}
+
+// For XMM and YMM enabled processors
+instruct zLoadBarrierWeakSlowRegXmmAndYmm(rRegP dst, memory src, rFlagsReg cr,
+ rxmm0 x0, rxmm1 x1, rxmm2 x2,rxmm3 x3,
+ rxmm4 x4, rxmm5 x5, rxmm6 x6, rxmm7 x7,
+ rxmm8 x8, rxmm9 x9, rxmm10 x10, rxmm11 x11,
+ rxmm12 x12, rxmm13 x13, rxmm14 x14, rxmm15 x15) %{
+
+ match(Set dst (LoadBarrierWeakSlowReg src));
+ predicate(UseAVX <= 2);
+
+ effect(DEF dst, KILL cr,
+ KILL x0, KILL x1, KILL x2, KILL x3,
+ KILL x4, KILL x5, KILL x6, KILL x7,
+ KILL x8, KILL x9, KILL x10, KILL x11,
+ KILL x12, KILL x13, KILL x14, KILL x15);
+
+ format %{ "zLoadBarrierWeakSlowRegXmmAndYmm $dst, $src" %}
+
+ ins_encode %{
+ z_load_barrier_slow_reg(_masm, $dst$$Register, $src$$Address, true /* weak */);
+ %}
+
+ ins_pipe(pipe_slow);
+%}
+
+// For ZMM enabled processors
+instruct zLoadBarrierWeakSlowRegZmm(rRegP dst, memory src, rFlagsReg cr,
+ rxmm0 x0, rxmm1 x1, rxmm2 x2,rxmm3 x3,
+ rxmm4 x4, rxmm5 x5, rxmm6 x6, rxmm7 x7,
+ rxmm8 x8, rxmm9 x9, rxmm10 x10, rxmm11 x11,
+ rxmm12 x12, rxmm13 x13, rxmm14 x14, rxmm15 x15,
+ rxmm16 x16, rxmm17 x17, rxmm18 x18, rxmm19 x19,
+ rxmm20 x20, rxmm21 x21, rxmm22 x22, rxmm23 x23,
+ rxmm24 x24, rxmm25 x25, rxmm26 x26, rxmm27 x27,
+ rxmm28 x28, rxmm29 x29, rxmm30 x30, rxmm31 x31) %{
+
+ match(Set dst (LoadBarrierWeakSlowReg src));
+ predicate(UseAVX == 3);
+
+ effect(DEF dst, KILL cr,
+ KILL x0, KILL x1, KILL x2, KILL x3,
+ KILL x4, KILL x5, KILL x6, KILL x7,
+ KILL x8, KILL x9, KILL x10, KILL x11,
+ KILL x12, KILL x13, KILL x14, KILL x15,
+ KILL x16, KILL x17, KILL x18, KILL x19,
+ KILL x20, KILL x21, KILL x22, KILL x23,
+ KILL x24, KILL x25, KILL x26, KILL x27,
+ KILL x28, KILL x29, KILL x30, KILL x31);
+
+ format %{ "zLoadBarrierWeakSlowRegZmm $dst, $src" %}
+
+ ins_encode %{
+ z_load_barrier_slow_reg(_masm, $dst$$Register, $src$$Address, true /* weak */);
+ %}
+
+ ins_pipe(pipe_slow);
+%}
--- a/src/hotspot/cpu/x86/stubGenerator_x86_32.cpp Fri Jan 25 13:50:44 2019 +0000
+++ b/src/hotspot/cpu/x86/stubGenerator_x86_32.cpp Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1999, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 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
@@ -3709,8 +3709,6 @@
// Round to nearest, 24-bit mode, exceptions masked
StubRoutines::_fpu_cntrl_wrd_24 = 0x007F;
// Round to nearest, 64-bit mode, exceptions masked
- StubRoutines::_fpu_cntrl_wrd_64 = 0x037F;
- // Round to nearest, 64-bit mode, exceptions masked
StubRoutines::_mxcsr_std = 0x1F80;
// Note: the following two constants are 80-bit values
// layout is critical for correct loading by FPU.
--- a/src/hotspot/cpu/x86/stubGenerator_x86_64.cpp Fri Jan 25 13:50:44 2019 +0000
+++ b/src/hotspot/cpu/x86/stubGenerator_x86_64.cpp Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 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
@@ -5721,8 +5721,6 @@
// Round to nearest, 24-bit mode, exceptions masked
StubRoutines::_fpu_cntrl_wrd_24 = 0x007F;
// Round to nearest, 64-bit mode, exceptions masked
- StubRoutines::_fpu_cntrl_wrd_64 = 0x037F;
- // Round to nearest, 64-bit mode, exceptions masked
StubRoutines::_mxcsr_std = 0x1F80;
// Note: the following two constants are 80-bit values
// layout is critical for correct loading by FPU.
--- a/src/hotspot/cpu/x86/x86_64.ad Fri Jan 25 13:50:44 2019 +0000
+++ b/src/hotspot/cpu/x86/x86_64.ad Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
//
-// Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
+// Copyright (c) 2003, 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
@@ -526,12 +526,6 @@
%}
-source_hpp %{
-#if INCLUDE_ZGC
-#include "gc/z/zBarrierSetAssembler.hpp"
-#endif
-%}
-
//----------SOURCE BLOCK-------------------------------------------------------
// This is a block of C++ code which provides values, functions, and
// definitions necessary in the rest of the architecture description
@@ -12711,170 +12705,6 @@
ins_pipe(pipe_jmp);
%}
-//
-// Execute ZGC load barrier (strong) slow path
-//
-
-// For XMM and YMM enabled processors
-instruct loadBarrierSlowRegXmmAndYmm(rRegP dst, memory mem, rFlagsReg cr,
- rxmm0 x0, rxmm1 x1, rxmm2 x2,rxmm3 x3,
- rxmm4 x4, rxmm5 x5, rxmm6 x6, rxmm7 x7,
- rxmm8 x8, rxmm9 x9, rxmm10 x10, rxmm11 x11,
- rxmm12 x12, rxmm13 x13, rxmm14 x14, rxmm15 x15) %{
-
- match(Set dst (LoadBarrierSlowReg mem));
- predicate(UseAVX <= 2);
-
- effect(DEF dst, KILL cr,
- KILL x0, KILL x1, KILL x2, KILL x3,
- KILL x4, KILL x5, KILL x6, KILL x7,
- KILL x8, KILL x9, KILL x10, KILL x11,
- KILL x12, KILL x13, KILL x14, KILL x15);
-
- format %{"LoadBarrierSlowRegXmmAndYmm $dst, $mem" %}
- ins_encode %{
-#if INCLUDE_ZGC
- Register d = $dst$$Register;
- ZBarrierSetAssembler* bs = (ZBarrierSetAssembler*)BarrierSet::barrier_set()->barrier_set_assembler();
-
- assert(d != r12, "Can't be R12!");
- assert(d != r15, "Can't be R15!");
- assert(d != rsp, "Can't be RSP!");
-
- __ lea(d, $mem$$Address);
- __ call(RuntimeAddress(bs->load_barrier_slow_stub(d)));
-#else
- ShouldNotReachHere();
-#endif
- %}
- ins_pipe(pipe_slow);
-%}
-
-// For ZMM enabled processors
-instruct loadBarrierSlowRegZmm(rRegP dst, memory mem, rFlagsReg cr,
- rxmm0 x0, rxmm1 x1, rxmm2 x2,rxmm3 x3,
- rxmm4 x4, rxmm5 x5, rxmm6 x6, rxmm7 x7,
- rxmm8 x8, rxmm9 x9, rxmm10 x10, rxmm11 x11,
- rxmm12 x12, rxmm13 x13, rxmm14 x14, rxmm15 x15,
- rxmm16 x16, rxmm17 x17, rxmm18 x18, rxmm19 x19,
- rxmm20 x20, rxmm21 x21, rxmm22 x22, rxmm23 x23,
- rxmm24 x24, rxmm25 x25, rxmm26 x26, rxmm27 x27,
- rxmm28 x28, rxmm29 x29, rxmm30 x30, rxmm31 x31) %{
-
- match(Set dst (LoadBarrierSlowReg mem));
- predicate(UseAVX == 3);
-
- effect(DEF dst, KILL cr,
- KILL x0, KILL x1, KILL x2, KILL x3,
- KILL x4, KILL x5, KILL x6, KILL x7,
- KILL x8, KILL x9, KILL x10, KILL x11,
- KILL x12, KILL x13, KILL x14, KILL x15,
- KILL x16, KILL x17, KILL x18, KILL x19,
- KILL x20, KILL x21, KILL x22, KILL x23,
- KILL x24, KILL x25, KILL x26, KILL x27,
- KILL x28, KILL x29, KILL x30, KILL x31);
-
- format %{"LoadBarrierSlowRegZmm $dst, $mem" %}
- ins_encode %{
-#if INCLUDE_ZGC
- Register d = $dst$$Register;
- ZBarrierSetAssembler* bs = (ZBarrierSetAssembler*)BarrierSet::barrier_set()->barrier_set_assembler();
-
- assert(d != r12, "Can't be R12!");
- assert(d != r15, "Can't be R15!");
- assert(d != rsp, "Can't be RSP!");
-
- __ lea(d, $mem$$Address);
- __ call(RuntimeAddress(bs->load_barrier_slow_stub(d)));
-#else
- ShouldNotReachHere();
-#endif
- %}
- ins_pipe(pipe_slow);
-%}
-
-//
-// Execute ZGC load barrier (weak) slow path
-//
-
-// For XMM and YMM enabled processors
-instruct loadBarrierWeakSlowRegXmmAndYmm(rRegP dst, memory mem, rFlagsReg cr,
- rxmm0 x0, rxmm1 x1, rxmm2 x2,rxmm3 x3,
- rxmm4 x4, rxmm5 x5, rxmm6 x6, rxmm7 x7,
- rxmm8 x8, rxmm9 x9, rxmm10 x10, rxmm11 x11,
- rxmm12 x12, rxmm13 x13, rxmm14 x14, rxmm15 x15) %{
-
- match(Set dst (LoadBarrierWeakSlowReg mem));
- predicate(UseAVX <= 2);
-
- effect(DEF dst, KILL cr,
- KILL x0, KILL x1, KILL x2, KILL x3,
- KILL x4, KILL x5, KILL x6, KILL x7,
- KILL x8, KILL x9, KILL x10, KILL x11,
- KILL x12, KILL x13, KILL x14, KILL x15);
-
- format %{"LoadBarrierWeakSlowRegXmmAndYmm $dst, $mem" %}
- ins_encode %{
-#if INCLUDE_ZGC
- Register d = $dst$$Register;
- ZBarrierSetAssembler* bs = (ZBarrierSetAssembler*)BarrierSet::barrier_set()->barrier_set_assembler();
-
- assert(d != r12, "Can't be R12!");
- assert(d != r15, "Can't be R15!");
- assert(d != rsp, "Can't be RSP!");
-
- __ lea(d,$mem$$Address);
- __ call(RuntimeAddress(bs->load_barrier_weak_slow_stub(d)));
-#else
- ShouldNotReachHere();
-#endif
- %}
- ins_pipe(pipe_slow);
-%}
-
-// For ZMM enabled processors
-instruct loadBarrierWeakSlowRegZmm(rRegP dst, memory mem, rFlagsReg cr,
- rxmm0 x0, rxmm1 x1, rxmm2 x2,rxmm3 x3,
- rxmm4 x4, rxmm5 x5, rxmm6 x6, rxmm7 x7,
- rxmm8 x8, rxmm9 x9, rxmm10 x10, rxmm11 x11,
- rxmm12 x12, rxmm13 x13, rxmm14 x14, rxmm15 x15,
- rxmm16 x16, rxmm17 x17, rxmm18 x18, rxmm19 x19,
- rxmm20 x20, rxmm21 x21, rxmm22 x22, rxmm23 x23,
- rxmm24 x24, rxmm25 x25, rxmm26 x26, rxmm27 x27,
- rxmm28 x28, rxmm29 x29, rxmm30 x30, rxmm31 x31) %{
-
- match(Set dst (LoadBarrierWeakSlowReg mem));
- predicate(UseAVX == 3);
-
- effect(DEF dst, KILL cr,
- KILL x0, KILL x1, KILL x2, KILL x3,
- KILL x4, KILL x5, KILL x6, KILL x7,
- KILL x8, KILL x9, KILL x10, KILL x11,
- KILL x12, KILL x13, KILL x14, KILL x15,
- KILL x16, KILL x17, KILL x18, KILL x19,
- KILL x20, KILL x21, KILL x22, KILL x23,
- KILL x24, KILL x25, KILL x26, KILL x27,
- KILL x28, KILL x29, KILL x30, KILL x31);
-
- format %{"LoadBarrierWeakSlowRegZmm $dst, $mem" %}
- ins_encode %{
-#if INCLUDE_ZGC
- Register d = $dst$$Register;
- ZBarrierSetAssembler* bs = (ZBarrierSetAssembler*)BarrierSet::barrier_set()->barrier_set_assembler();
-
- assert(d != r12, "Can't be R12!");
- assert(d != r15, "Can't be R15!");
- assert(d != rsp, "Can't be RSP!");
-
- __ lea(d,$mem$$Address);
- __ call(RuntimeAddress(bs->load_barrier_weak_slow_stub(d)));
-#else
- ShouldNotReachHere();
-#endif
- %}
- ins_pipe(pipe_slow);
-%}
-
// ============================================================================
// This name is KNOWN by the ADLC and cannot be changed.
// The ADLC forces a 'TypeRawPtr::BOTTOM' output type
--- a/src/hotspot/share/c1/c1_LIRAssembler.hpp Fri Jan 25 13:50:44 2019 +0000
+++ b/src/hotspot/share/c1/c1_LIRAssembler.hpp Tue Jan 29 17:42:58 2019 +0000
@@ -240,7 +240,7 @@
void align_call(LIR_Code code);
void negate(LIR_Opr left, LIR_Opr dest, LIR_Opr tmp = LIR_OprFact::illegalOpr);
- void leal(LIR_Opr src, LIR_Opr dest, LIR_PatchCode patch_code, CodeEmitInfo* info);
+ void leal(LIR_Opr src, LIR_Opr dest, LIR_PatchCode patch_code = lir_patch_none, CodeEmitInfo* info = NULL);
void rt_call(LIR_Opr result, address dest, const LIR_OprList* args, LIR_Opr tmp, CodeEmitInfo* info);
--- a/src/hotspot/share/ci/ciArray.hpp Fri Jan 25 13:50:44 2019 +0000
+++ b/src/hotspot/share/ci/ciArray.hpp Tue Jan 29 17:42:58 2019 +0000
@@ -73,7 +73,6 @@
// What kind of ciObject is this?
bool is_array() { return true; }
- bool is_java_object() { return true; }
};
#endif // SHARE_CI_CIARRAY_HPP
--- a/src/hotspot/share/ci/ciCallProfile.hpp Fri Jan 25 13:50:44 2019 +0000
+++ b/src/hotspot/share/ci/ciCallProfile.hpp Tue Jan 29 17:42:58 2019 +0000
@@ -79,17 +79,6 @@
assert(i < _limit, "out of Call Profile MorphismLimit");
return _receiver[i];
}
-
- // Rescale the current profile based on the incoming scale
- ciCallProfile rescale(double scale) {
- assert(scale >= 0 && scale <= 1.0, "out of range");
- ciCallProfile call = *this;
- call._count = (int)(call._count * scale);
- for (int i = 0; i < _morphism; i++) {
- call._receiver_count[i] = (int)(call._receiver_count[i] * scale);
- }
- return call;
- }
};
#endif // SHARE_CI_CICALLPROFILE_HPP
--- a/src/hotspot/share/ci/ciCallSite.cpp Fri Jan 25 13:50:44 2019 +0000
+++ b/src/hotspot/share/ci/ciCallSite.cpp Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 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
@@ -32,12 +32,6 @@
bool ciCallSite::is_constant_call_site() {
return klass()->is_subclass_of(CURRENT_ENV->ConstantCallSite_klass());
}
-bool ciCallSite::is_mutable_call_site() {
- return klass()->is_subclass_of(CURRENT_ENV->MutableCallSite_klass());
-}
-bool ciCallSite::is_volatile_call_site() {
- return klass()->is_subclass_of(CURRENT_ENV->VolatileCallSite_klass());
-}
// ------------------------------------------------------------------
// ciCallSite::get_target
--- a/src/hotspot/share/ci/ciCallSite.hpp Fri Jan 25 13:50:44 2019 +0000
+++ b/src/hotspot/share/ci/ciCallSite.hpp Tue Jan 29 17:42:58 2019 +0000
@@ -38,8 +38,6 @@
bool is_call_site() const { return true; }
bool is_constant_call_site();
- bool is_mutable_call_site();
- bool is_volatile_call_site();
// Return the target MethodHandle of this CallSite.
ciMethodHandle* get_target() const;
--- a/src/hotspot/share/ci/ciMethodData.cpp Fri Jan 25 13:50:44 2019 +0000
+++ b/src/hotspot/share/ci/ciMethodData.cpp Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2001, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 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
@@ -208,15 +208,17 @@
// Snapshot the data -- actually, take an approximate snapshot of
// the data. Any concurrently executing threads may be changing the
// data as we copy it.
- Copy::disjoint_words((HeapWord*) mdo,
- (HeapWord*) &_orig,
- sizeof(_orig) / HeapWordSize);
+ Copy::disjoint_words_atomic((HeapWord*) mdo,
+ (HeapWord*) &_orig,
+ sizeof(_orig) / HeapWordSize);
Arena* arena = CURRENT_ENV->arena();
_data_size = mdo->data_size();
_extra_data_size = mdo->extra_data_size();
int total_size = _data_size + _extra_data_size;
_data = (intptr_t *) arena->Amalloc(total_size);
- Copy::disjoint_words((HeapWord*) mdo->data_base(), (HeapWord*) _data, total_size / HeapWordSize);
+ Copy::disjoint_words_atomic((HeapWord*) mdo->data_base(),
+ (HeapWord*) _data,
+ total_size / HeapWordSize);
// Traverse the profile data, translating any oops into their
// ci equivalents.
@@ -535,10 +537,6 @@
set_bits(_eflags, f);
}
-void ciMethodData::clear_eflag(MethodData::EscapeFlag f) {
- clear_bits(_eflags, f);
-}
-
bool ciMethodData::eflag_set(MethodData::EscapeFlag f) const {
return mask_bits(_eflags, f) != 0;
}
--- a/src/hotspot/share/ci/ciMethodData.hpp Fri Jan 25 13:50:44 2019 +0000
+++ b/src/hotspot/share/ci/ciMethodData.hpp Tue Jan 29 17:42:58 2019 +0000
@@ -271,11 +271,6 @@
}
}
- intptr_t argument_type(int i) const {
- assert(has_arguments(), "no arg type profiling data");
- return args()->type(i);
- }
-
ciKlass* valid_argument_type(int i) const {
assert(has_arguments(), "no arg type profiling data");
return args()->valid_type(i);
@@ -315,11 +310,6 @@
ciBranchData(DataLayout* layout) : BranchData(layout) {};
};
-class ciArrayData : public ArrayData {
-public:
- ciArrayData(DataLayout* layout) : ArrayData(layout) {};
-};
-
class ciMultiBranchData : public MultiBranchData {
public:
ciMultiBranchData(DataLayout* layout) : MultiBranchData(layout) {};
@@ -471,10 +461,6 @@
ciArgInfoData *arg_info() const;
- address data_base() const {
- return (address) _data;
- }
-
void prepare_metadata();
void load_extra_data();
ciProfileData* bci_to_extra_data(int bci, ciMethod* m, bool& two_free_slots);
@@ -574,7 +560,6 @@
void update_escape_info();
void set_eflag(MethodData::EscapeFlag f);
- void clear_eflag(MethodData::EscapeFlag f);
bool eflag_set(MethodData::EscapeFlag f) const;
void set_arg_local(int i);
--- a/src/hotspot/share/ci/ciNullObject.hpp Fri Jan 25 13:50:44 2019 +0000
+++ b/src/hotspot/share/ci/ciNullObject.hpp Tue Jan 29 17:42:58 2019 +0000
@@ -42,9 +42,6 @@
void print_impl(outputStream* st);
public:
- // Is this ciObject a Java Language Object? That is,
- // is the ciObject an instance or an array
- bool is_java_object() { return true; }
// What kind of ciObject is this?
bool is_null_object() const { return true; }
--- a/src/hotspot/share/ci/ciObject.hpp Fri Jan 25 13:50:44 2019 +0000
+++ b/src/hotspot/share/ci/ciObject.hpp Tue Jan 29 17:42:58 2019 +0000
@@ -115,7 +115,6 @@
// What kind of ciObject is this?
virtual bool is_null_object() const { return false; }
virtual bool is_call_site() const { return false; }
- virtual bool is_cpcache() const { return false; }
virtual bool is_instance() { return false; }
virtual bool is_member_name() const { return false; }
virtual bool is_method_handle() const { return false; }
--- a/src/hotspot/share/ci/ciStreams.cpp Fri Jan 25 13:50:44 2019 +0000
+++ b/src/hotspot/share/ci/ciStreams.cpp Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1999, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 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
@@ -224,14 +224,6 @@
}
// ------------------------------------------------------------------
-// ciBytecodeStream::get_constant_cache_index
-// Return the CP cache index, or -1 if there isn't any.
-int ciBytecodeStream::get_constant_cache_index() const {
- // work-alike for Bytecode_loadconstant::cache_index()
- return has_cache_index() ? get_constant_raw_index() : -1;
-}
-
-// ------------------------------------------------------------------
// ciBytecodeStream::get_constant
//
// If this bytecode is one of the ldc variants, get the referenced
@@ -318,19 +310,6 @@
}
// ------------------------------------------------------------------
-// ciBytecodeStream::get_field_signature_index
-//
-// Get the constant pool index of the signature of the field
-// referenced by the current bytecode. Used for generating
-// deoptimization information.
-int ciBytecodeStream::get_field_signature_index() {
- VM_ENTRY_MARK;
- ConstantPool* cpool = _holder->get_instanceKlass()->constants();
- int nt_index = cpool->name_and_type_ref_index_at(get_field_index());
- return cpool->signature_ref_index_at(nt_index);
-}
-
-// ------------------------------------------------------------------
// ciBytecodeStream::get_method_index
//
// If this is a method invocation bytecode, get the constant pool
@@ -474,13 +453,3 @@
)
}
-// ------------------------------------------------------------------
-// ciBytecodeStream::get_resolved_references
-ciObjArray* ciBytecodeStream::get_resolved_references() {
- VM_ENTRY_MARK;
- // Get the constant pool.
- ConstantPool* cpool = _holder->get_instanceKlass()->constants();
-
- // Create a resolved references array and return it.
- return CURRENT_ENV->get_object(cpool->resolved_references())->as_obj_array();
- }
--- a/src/hotspot/share/ci/ciStreams.hpp Fri Jan 25 13:50:44 2019 +0000
+++ b/src/hotspot/share/ci/ciStreams.hpp Tue Jan 29 17:42:58 2019 +0000
@@ -70,12 +70,6 @@
_start = _pc = base; _end = base + size;
}
- void assert_wide(bool require_wide) const {
- if (require_wide)
- { assert(is_wide(), "must be a wide instruction"); }
- else { assert(!is_wide(), "must not be a wide instruction"); }
- }
-
Bytecode bytecode() const { return Bytecode(this, _bc_start); }
Bytecode next_bytecode() const { return Bytecode(this, _pc); }
@@ -155,10 +149,6 @@
return bytecode().get_index_u1(cur_bc_raw());
}
- int get_index_u1_cpcache() const {
- return bytecode().get_index_u1_cpcache(cur_bc_raw());
- }
-
// Get a byte index following this bytecode.
// If prefixed with a wide bytecode, get a wide index.
int get_index() const {
@@ -218,16 +208,12 @@
int get_int_table( int index ) const {
return Bytes::get_Java_u4((address)&_table_base[index]); }
- // For tableswitch - get length of offset part
- int get_tableswitch_length() { return get_int_table(2)-get_int_table(1)+1; }
-
int get_dest_table( int index ) const {
return cur_bci() + get_int_table(index); }
// --- Constant pool access ---
int get_constant_raw_index() const;
int get_constant_pool_index() const;
- int get_constant_cache_index() const;
int get_field_index();
int get_method_index();
@@ -255,7 +241,6 @@
ciInstanceKlass* get_declared_field_holder();
int get_field_holder_index();
- int get_field_signature_index();
ciMethod* get_method(bool& will_link, ciSignature* *declared_signature_result);
bool has_appendix();
@@ -266,8 +251,6 @@
int get_method_holder_index();
int get_method_signature_index(const constantPoolHandle& cpool);
- // Get the resolved references arrays from the constant pool
- ciObjArray* get_resolved_references();
};
--- a/src/hotspot/share/ci/ciTypeFlow.cpp Fri Jan 25 13:50:44 2019 +0000
+++ b/src/hotspot/share/ci/ciTypeFlow.cpp Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 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
@@ -2427,22 +2427,6 @@
}
// ------------------------------------------------------------------
-// ciTypeFlow::PostOrderLoops::next
-//
-// Advance to next loop tree using a postorder, left-to-right traversal.
-void ciTypeFlow::PostorderLoops::next() {
- assert(!done(), "must not be done.");
- if (_current->sibling() != NULL) {
- _current = _current->sibling();
- while (_current->child() != NULL) {
- _current = _current->child();
- }
- } else {
- _current = _current->parent();
- }
-}
-
-// ------------------------------------------------------------------
// ciTypeFlow::PreOrderLoops::next
//
// Advance to next loop tree using a preorder, left-to-right traversal.
--- a/src/hotspot/share/ci/ciTypeFlow.hpp Fri Jan 25 13:50:44 2019 +0000
+++ b/src/hotspot/share/ci/ciTypeFlow.hpp Tue Jan 29 17:42:58 2019 +0000
@@ -765,22 +765,6 @@
void print(outputStream* st = tty, int indent = 0) const PRODUCT_RETURN;
};
- // Postorder iteration over the loop tree.
- class PostorderLoops : public StackObj {
- private:
- Loop* _root;
- Loop* _current;
- public:
- PostorderLoops(Loop* root) : _root(root), _current(root) {
- while (_current->child() != NULL) {
- _current = _current->child();
- }
- }
- bool done() { return _current == NULL; } // Finished iterating?
- void next(); // Advance to next loop
- Loop* current() { return _current; } // Return current loop.
- };
-
// Preorder iteration over the loop tree.
class PreorderLoops : public StackObj {
private:
@@ -857,7 +841,6 @@
int start_block_num() const { return 0; }
Block* rpo_at(int rpo) const { assert(0 <= rpo && rpo < block_count(), "out of bounds");
return _block_map[rpo]; }
- int next_pre_order() { return _next_pre_order; }
int inc_next_pre_order() { return _next_pre_order++; }
private:
--- a/src/hotspot/share/ci/ciUtilities.cpp Fri Jan 25 13:50:44 2019 +0000
+++ b/src/hotspot/share/ci/ciUtilities.cpp Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 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
@@ -42,13 +42,6 @@
}
// ------------------------------------------------------------------
-// basictype_to_char
-const char basictype_to_char(BasicType t) {
- char c = type2char(t);
- return c ? c : 'X';
-}
-
-// ------------------------------------------------------------------
// card_table_base
jbyte *ci_card_table_address() {
BarrierSet* bs = BarrierSet::barrier_set();
--- a/src/hotspot/share/ci/ciUtilities.hpp Fri Jan 25 13:50:44 2019 +0000
+++ b/src/hotspot/share/ci/ciUtilities.hpp Tue Jan 29 17:42:58 2019 +0000
@@ -49,7 +49,6 @@
}
const char* basictype_to_str(BasicType t);
-const char basictype_to_char(BasicType t);
jbyte *ci_card_table_address();
template <typename T> T ci_card_table_address_as() {
--- a/src/hotspot/share/classfile/stringTable.cpp Fri Jan 25 13:50:44 2019 +0000
+++ b/src/hotspot/share/classfile/stringTable.cpp Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 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
@@ -376,68 +376,11 @@
} while(true);
}
-// GC support
-class StringTableIsAliveCounter : public BoolObjectClosure {
- BoolObjectClosure* _real_boc;
- public:
- size_t _count;
- size_t _count_total;
- StringTableIsAliveCounter(BoolObjectClosure* boc) : _real_boc(boc), _count(0),
- _count_total(0) {}
- bool do_object_b(oop obj) {
- bool ret = _real_boc->do_object_b(obj);
- if (!ret) {
- ++_count;
- }
- ++_count_total;
- return ret;
- }
-};
-
-void StringTable::unlink_or_oops_do(BoolObjectClosure* is_alive, OopClosure* f,
- size_t* processed, size_t* removed) {
- DoNothingClosure dnc;
- assert(is_alive != NULL, "No closure");
- StringTableIsAliveCounter stiac(is_alive);
- OopClosure* tmp = f != NULL ? f : &dnc;
-
- StringTable::the_table()->_weak_handles->weak_oops_do(&stiac, tmp);
-
- // This is the serial case without ParState.
- // Just set the correct number and check for a cleaning phase.
- the_table()->_uncleaned_items_count = stiac._count;
- StringTable::the_table()->check_concurrent_work();
-
- if (processed != NULL) {
- *processed = stiac._count_total;
- }
- if (removed != NULL) {
- *removed = stiac._count;
- }
-}
-
void StringTable::oops_do(OopClosure* f) {
assert(f != NULL, "No closure");
StringTable::the_table()->_weak_handles->oops_do(f);
}
-void StringTable::possibly_parallel_unlink(
- OopStorage::ParState<false, false>* _par_state_string, BoolObjectClosure* cl,
- size_t* processed, size_t* removed)
-{
- DoNothingClosure dnc;
- assert(cl != NULL, "No closure");
- StringTableIsAliveCounter stiac(cl);
-
- _par_state_string->weak_oops_do(&stiac, &dnc);
-
- // Accumulate the dead strings.
- the_table()->add_items_to_clean(stiac._count);
-
- *processed = stiac._count_total;
- *removed = stiac._count;
-}
-
void StringTable::possibly_parallel_oops_do(
OopStorage::ParState<false /* concurrent */, false /* const */>*
_par_state_string, OopClosure* f)
--- a/src/hotspot/share/classfile/stringTable.hpp Fri Jan 25 13:50:44 2019 +0000
+++ b/src/hotspot/share/classfile/stringTable.hpp Tue Jan 29 17:42:58 2019 +0000
@@ -128,20 +128,10 @@
the_table()->add_items_to_clean(ndead);
}
- // Delete pointers to otherwise-unreachable objects.
- static void unlink(BoolObjectClosure* cl) {
- unlink_or_oops_do(cl);
- }
- static void unlink_or_oops_do(BoolObjectClosure* is_alive, OopClosure* f = NULL,
- size_t* processed = NULL, size_t* removed = NULL);
-
// Serially invoke "f->do_oop" on the locations of all oops in the table.
static void oops_do(OopClosure* f);
// Possibly parallel versions of the above
- static void possibly_parallel_unlink(
- OopStorage::ParState<false /* concurrent */, false /* const*/>* par_state_string,
- BoolObjectClosure* cl, size_t* processed, size_t* removed);
static void possibly_parallel_oops_do(
OopStorage::ParState<false /* concurrent */, false /* const*/>* par_state_string,
OopClosure* f);
--- a/src/hotspot/share/code/nmethod.cpp Fri Jan 25 13:50:44 2019 +0000
+++ b/src/hotspot/share/code/nmethod.cpp Tue Jan 29 17:42:58 2019 +0000
@@ -1100,7 +1100,11 @@
"must be at safepoint");
// Unregister must be done before the state change
- Universe::heap()->unregister_nmethod(this);
+ {
+ MutexLockerEx ml(SafepointSynchronize::is_at_safepoint() ? NULL : CodeCache_lock,
+ Mutex::_no_safepoint_check_flag);
+ Universe::heap()->unregister_nmethod(this);
+ }
// Log the unloading.
log_state_change();
--- a/src/hotspot/share/gc/cms/cmsHeap.cpp Fri Jan 25 13:50:44 2019 +0000
+++ b/src/hotspot/share/gc/cms/cmsHeap.cpp Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 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
@@ -225,15 +225,11 @@
ScanningOption so,
bool only_strong_roots,
OopsInGenClosure* root_closure,
- CLDClosure* cld_closure,
- OopStorage::ParState<false, false>* par_state_string) {
+ CLDClosure* cld_closure) {
MarkingCodeBlobClosure mark_code_closure(root_closure, !CodeBlobToOopClosure::FixRelocations);
CLDClosure* weak_cld_closure = only_strong_roots ? NULL : cld_closure;
process_roots(scope, so, root_closure, cld_closure, weak_cld_closure, &mark_code_closure);
- if (!only_strong_roots) {
- process_string_table_roots(scope, root_closure, par_state_string);
- }
if (young_gen_as_roots &&
_process_strong_tasks->try_claim_task(GCH_PS_younger_gens)) {
--- a/src/hotspot/share/gc/cms/cmsHeap.hpp Fri Jan 25 13:50:44 2019 +0000
+++ b/src/hotspot/share/gc/cms/cmsHeap.hpp Tue Jan 29 17:42:58 2019 +0000
@@ -91,8 +91,7 @@
ScanningOption so,
bool only_strong_roots,
OopsInGenClosure* root_closure,
- CLDClosure* cld_closure,
- OopStorage::ParState<false, false>* par_state_string = NULL);
+ CLDClosure* cld_closure);
GCMemoryManager* old_manager() const { return _old_manager; }
--- a/src/hotspot/share/gc/cms/concurrentMarkSweepGeneration.cpp Fri Jan 25 13:50:44 2019 +0000
+++ b/src/hotspot/share/gc/cms/concurrentMarkSweepGeneration.cpp Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 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
@@ -4333,8 +4333,7 @@
GenCollectedHeap::ScanningOption(_collector->CMSCollector::roots_scanning_options()),
_collector->should_unload_classes(),
&par_mri_cl,
- &cld_closure,
- &_par_state_string);
+ &cld_closure);
assert(_collector->should_unload_classes()
|| (_collector->CMSCollector::roots_scanning_options() & GenCollectedHeap::SO_AllCodeCache),
@@ -4464,8 +4463,7 @@
GenCollectedHeap::ScanningOption(_collector->CMSCollector::roots_scanning_options()),
_collector->should_unload_classes(),
&par_mrias_cl,
- NULL, // The dirty klasses will be handled below
- &_par_state_string);
+ NULL); // The dirty klasses will be handled below
assert(_collector->should_unload_classes()
|| (_collector->CMSCollector::roots_scanning_options() & GenCollectedHeap::SO_AllCodeCache),
@@ -5277,12 +5275,6 @@
// Clean up unreferenced symbols in symbol table.
SymbolTable::unlink();
}
-
- {
- GCTraceTime(Debug, gc, phases) t("Scrub String Table", _gc_timer_cm);
- // Delete entries for dead interned strings.
- StringTable::unlink(&_is_alive_closure);
- }
}
// Restore any preserved marks as a result of mark stack or
--- a/src/hotspot/share/gc/cms/parNewGeneration.cpp Fri Jan 25 13:50:44 2019 +0000
+++ b/src/hotspot/share/gc/cms/parNewGeneration.cpp Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 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
@@ -606,8 +606,7 @@
heap->young_process_roots(_strong_roots_scope,
&par_scan_state.to_space_root_closure(),
&par_scan_state.older_gen_closure(),
- &cld_scan_closure,
- &_par_state_string);
+ &cld_scan_closure);
par_scan_state.end_strong_roots();
--- a/src/hotspot/share/gc/g1/g1CollectedHeap.cpp Fri Jan 25 13:50:44 2019 +0000
+++ b/src/hotspot/share/gc/g1/g1CollectedHeap.cpp Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 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
@@ -3362,24 +3362,54 @@
void G1CollectedHeap::complete_cleaning(BoolObjectClosure* is_alive,
bool class_unloading_occurred) {
- uint n_workers = workers()->active_workers();
-
- G1StringDedupUnlinkOrOopsDoClosure dedup_closure(is_alive, NULL, false);
- ParallelCleaningTask g1_unlink_task(is_alive, &dedup_closure, n_workers, class_unloading_occurred);
- workers()->run_task(&g1_unlink_task);
+ uint num_workers = workers()->active_workers();
+ ParallelCleaningTask unlink_task(is_alive, num_workers, class_unloading_occurred, false);
+ workers()->run_task(&unlink_task);
}
-void G1CollectedHeap::partial_cleaning(BoolObjectClosure* is_alive,
- bool process_strings,
- bool process_string_dedup) {
- if (!process_strings && !process_string_dedup) {
- // Nothing to clean.
- return;
+// Clean string dedup data structures.
+// Ideally we would prefer to use a StringDedupCleaningTask here, but we want to
+// record the durations of the phases. Hence the almost-copy.
+class G1StringDedupCleaningTask : public AbstractGangTask {
+ BoolObjectClosure* _is_alive;
+ OopClosure* _keep_alive;
+ G1GCPhaseTimes* _phase_times;
+
+public:
+ G1StringDedupCleaningTask(BoolObjectClosure* is_alive,
+ OopClosure* keep_alive,
+ G1GCPhaseTimes* phase_times) :
+ AbstractGangTask("Partial Cleaning Task"),
+ _is_alive(is_alive),
+ _keep_alive(keep_alive),
+ _phase_times(phase_times)
+ {
+ assert(G1StringDedup::is_enabled(), "String deduplication disabled.");
+ StringDedup::gc_prologue(true);
}
- G1StringDedupUnlinkOrOopsDoClosure dedup_closure(is_alive, NULL, false);
- StringCleaningTask g1_unlink_task(is_alive, process_string_dedup ? &dedup_closure : NULL, process_strings);
- workers()->run_task(&g1_unlink_task);
+ ~G1StringDedupCleaningTask() {
+ StringDedup::gc_epilogue();
+ }
+
+ void work(uint worker_id) {
+ StringDedupUnlinkOrOopsDoClosure cl(_is_alive, _keep_alive);
+ {
+ G1GCParPhaseTimesTracker x(_phase_times, G1GCPhaseTimes::StringDedupQueueFixup, worker_id);
+ StringDedupQueue::unlink_or_oops_do(&cl);
+ }
+ {
+ G1GCParPhaseTimesTracker x(_phase_times, G1GCPhaseTimes::StringDedupTableFixup, worker_id);
+ StringDedupTable::unlink_or_oops_do(&cl, worker_id);
+ }
+ }
+};
+
+void G1CollectedHeap::string_dedup_cleaning(BoolObjectClosure* is_alive,
+ OopClosure* keep_alive,
+ G1GCPhaseTimes* phase_times) {
+ G1StringDedupCleaningTask cl(is_alive, keep_alive, phase_times);
+ workers()->run_task(&cl);
}
class G1RedirtyLoggedCardsTask : public AbstractGangTask {
@@ -3911,11 +3941,6 @@
// not copied during the pause.
process_discovered_references(per_thread_states);
- // FIXME
- // CM's reference processing also cleans up the string table.
- // Should we do that here also? We could, but it is a serial operation
- // and could significantly increase the pause time.
-
G1STWIsAliveClosure is_alive(this);
G1KeepAliveClosure keep_alive(this);
@@ -3923,12 +3948,12 @@
g1_policy()->phase_times()->weak_phase_times());
if (G1StringDedup::is_enabled()) {
- double fixup_start = os::elapsedTime();
-
- G1StringDedup::unlink_or_oops_do(&is_alive, &keep_alive, true, g1_policy()->phase_times());
-
- double fixup_time_ms = (os::elapsedTime() - fixup_start) * 1000.0;
- g1_policy()->phase_times()->record_string_dedup_fixup_time(fixup_time_ms);
+ double string_dedup_time_ms = os::elapsedTime();
+
+ string_dedup_cleaning(&is_alive, &keep_alive, g1_policy()->phase_times());
+
+ double string_cleanup_time_ms = (os::elapsedTime() - string_dedup_time_ms) * 1000.0;
+ g1_policy()->phase_times()->record_string_deduplication_time(string_cleanup_time_ms);
}
if (evacuation_failed()) {
--- a/src/hotspot/share/gc/g1/g1CollectedHeap.hpp Fri Jan 25 13:50:44 2019 +0000
+++ b/src/hotspot/share/gc/g1/g1CollectedHeap.hpp Tue Jan 29 17:42:58 2019 +0000
@@ -1332,14 +1332,12 @@
// after a full GC.
void rebuild_strong_code_roots();
- // Partial cleaning used when class unloading is disabled.
- // Let the caller choose what structures to clean out:
- // - StringTable
- // - StringDeduplication structures
- void partial_cleaning(BoolObjectClosure* is_alive, bool unlink_strings, bool unlink_string_dedup);
+ // Partial cleaning of VM internal data structures.
+ void string_dedup_cleaning(BoolObjectClosure* is_alive,
+ OopClosure* keep_alive,
+ G1GCPhaseTimes* phase_times = NULL);
- // Complete cleaning used when class unloading is enabled.
- // Cleans out all structures handled by partial_cleaning and also the CodeCache.
+ // Performs cleaning of data structures after class unloading.
void complete_cleaning(BoolObjectClosure* is_alive, bool class_unloading_occurred);
// Redirty logged cards in the refinement queue.
--- a/src/hotspot/share/gc/g1/g1ConcurrentMark.cpp Fri Jan 25 13:50:44 2019 +0000
+++ b/src/hotspot/share/gc/g1/g1ConcurrentMark.cpp Tue Jan 29 17:42:58 2019 +0000
@@ -1655,11 +1655,9 @@
GCTraceTime(Debug, gc, phases) debug("Class Unloading", _gc_timer_cm);
bool purged_classes = SystemDictionary::do_unloading(_gc_timer_cm);
_g1h->complete_cleaning(&g1_is_alive, purged_classes);
- } else {
- GCTraceTime(Debug, gc, phases) debug("Cleanup", _gc_timer_cm);
- // No need to clean string table as it is treated as strong roots when
- // class unloading is disabled.
- _g1h->partial_cleaning(&g1_is_alive, false, G1StringDedup::is_enabled());
+ } else if (StringDedup::is_enabled()) {
+ GCTraceTime(Debug, gc, phases) debug("String Deduplication", _gc_timer_cm);
+ _g1h->string_dedup_cleaning(&g1_is_alive, NULL);
}
}
--- a/src/hotspot/share/gc/g1/g1FullCollector.cpp Fri Jan 25 13:50:44 2019 +0000
+++ b/src/hotspot/share/gc/g1/g1FullCollector.cpp Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 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
@@ -224,10 +224,10 @@
// Unload classes and purge the SystemDictionary.
bool purged_class = SystemDictionary::do_unloading(scope()->timer());
_heap->complete_cleaning(&_is_alive, purged_class);
- } else {
- GCTraceTime(Debug, gc, phases) debug("Phase 1: String and Symbol Tables Cleanup", scope()->timer());
- // If no class unloading just clean out strings.
- _heap->partial_cleaning(&_is_alive, true, G1StringDedup::is_enabled());
+ } else if (G1StringDedup::is_enabled()) {
+ GCTraceTime(Debug, gc, phases) debug("Phase 1: String Dedup Cleanup", scope()->timer());
+ // If no class unloading just clean out string deduplication data.
+ _heap->string_dedup_cleaning(&_is_alive, NULL);
}
scope()->tracer()->report_object_count_after_gc(&_is_alive);
--- a/src/hotspot/share/gc/g1/g1FullGCAdjustTask.cpp Fri Jan 25 13:50:44 2019 +0000
+++ b/src/hotspot/share/gc/g1/g1FullGCAdjustTask.cpp Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 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
@@ -86,7 +86,7 @@
_weak_proc_task(collector->workers()),
_hrclaimer(collector->workers()),
_adjust(),
- _adjust_string_dedup(NULL, &_adjust, G1StringDedup::is_enabled()) {
+ _string_dedup_cleaning_task(NULL, &_adjust, false) {
// Need cleared claim bits for the roots processing
ClassLoaderDataGraph::clear_claimed_marks();
}
@@ -110,15 +110,10 @@
CLDToOopClosure adjust_cld(&_adjust, ClassLoaderData::_claim_strong);
CodeBlobToOopClosure adjust_code(&_adjust, CodeBlobToOopClosure::FixRelocations);
- _root_processor.process_all_roots(
- &_adjust,
- &adjust_cld,
- &adjust_code);
+ _root_processor.process_all_roots(&_adjust, &adjust_cld, &adjust_code);
- // Adjust string dedup if enabled.
- if (G1StringDedup::is_enabled()) {
- G1StringDedup::parallel_unlink(&_adjust_string_dedup, worker_id);
- }
+ // Adjust string dedup data structures.
+ _string_dedup_cleaning_task.work(worker_id);
// Now adjust pointers region by region
G1AdjustRegionClosure blk(collector()->mark_bitmap(), worker_id);
--- a/src/hotspot/share/gc/g1/g1FullGCAdjustTask.hpp Fri Jan 25 13:50:44 2019 +0000
+++ b/src/hotspot/share/gc/g1/g1FullGCAdjustTask.hpp Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 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
@@ -30,6 +30,7 @@
#include "gc/g1/g1RootProcessor.hpp"
#include "gc/g1/g1StringDedup.hpp"
#include "gc/g1/heapRegionManager.hpp"
+#include "gc/shared/parallelCleaning.hpp"
#include "gc/shared/weakProcessorPhaseTimes.hpp"
#include "gc/shared/weakProcessor.hpp"
#include "utilities/ticks.hpp"
@@ -42,7 +43,7 @@
WeakProcessor::Task _weak_proc_task;
HeapRegionClaimer _hrclaimer;
G1AdjustClosure _adjust;
- G1StringDedupUnlinkOrOopsDoClosure _adjust_string_dedup;
+ StringDedupCleaningTask _string_dedup_cleaning_task;
public:
G1FullGCAdjustTask(G1FullCollector* collector);
--- a/src/hotspot/share/gc/g1/g1FullGCMarkTask.cpp Fri Jan 25 13:50:44 2019 +0000
+++ b/src/hotspot/share/gc/g1/g1FullGCMarkTask.cpp Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 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
@@ -49,15 +49,13 @@
MarkingCodeBlobClosure code_closure(marker->mark_closure(), !CodeBlobToOopClosure::FixRelocations);
if (ClassUnloading) {
- _root_processor.process_strong_roots(
- marker->mark_closure(),
- marker->cld_closure(),
- &code_closure);
+ _root_processor.process_strong_roots(marker->mark_closure(),
+ marker->cld_closure(),
+ &code_closure);
} else {
- _root_processor.process_all_roots_no_string_table(
- marker->mark_closure(),
- marker->cld_closure(),
- &code_closure);
+ _root_processor.process_all_roots(marker->mark_closure(),
+ marker->cld_closure(),
+ &code_closure);
}
// Mark stack is populated, now process and drain it.
--- a/src/hotspot/share/gc/g1/g1GCPhaseTimes.cpp Fri Jan 25 13:50:44 2019 +0000
+++ b/src/hotspot/share/gc/g1/g1GCPhaseTimes.cpp Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 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
@@ -53,7 +53,6 @@
// Root scanning phases
_gc_par_phases[ThreadRoots] = new WorkerDataArray<double>(max_gc_threads, "Thread Roots (ms):");
- _gc_par_phases[StringTableRoots] = new WorkerDataArray<double>(max_gc_threads, "StringTable Roots (ms):");
_gc_par_phases[UniverseRoots] = new WorkerDataArray<double>(max_gc_threads, "Universe Roots (ms):");
_gc_par_phases[JNIRoots] = new WorkerDataArray<double>(max_gc_threads, "JNI Handles Roots (ms):");
_gc_par_phases[ObjectSynchronizerRoots] = new WorkerDataArray<double>(max_gc_threads, "ObjectSynchronizer Roots (ms):");
@@ -136,7 +135,7 @@
_cur_strong_code_root_purge_time_ms = 0.0;
_cur_evac_fail_recalc_used = 0.0;
_cur_evac_fail_remove_self_forwards = 0.0;
- _cur_string_dedup_fixup_time_ms = 0.0;
+ _cur_string_deduplication_time_ms = 0.0;
_cur_prepare_tlab_time_ms = 0.0;
_cur_resize_tlab_time_ms = 0.0;
_cur_derived_pointer_table_update_time_ms = 0.0;
@@ -290,12 +289,12 @@
}
}
-void G1GCPhaseTimes::debug_phase(WorkerDataArray<double>* phase) const {
+void G1GCPhaseTimes::debug_phase(WorkerDataArray<double>* phase, uint extra_indent) const {
LogTarget(Debug, gc, phases) lt;
if (lt.is_enabled()) {
ResourceMark rm;
LogStream ls(lt);
- log_phase(phase, 2, &ls, true);
+ log_phase(phase, 2 + extra_indent, &ls, true);
}
}
@@ -417,7 +416,7 @@
_recorded_total_free_cset_time_ms +
_cur_fast_reclaim_humongous_time_ms +
_cur_expand_heap_time_ms +
- _cur_string_dedup_fixup_time_ms;
+ _cur_string_deduplication_time_ms;
info_time("Post Evacuate Collection Set", sum_ms);
@@ -430,9 +429,9 @@
_weak_phase_times.log_print(2);
if (G1StringDedup::is_enabled()) {
- debug_time("String Dedup Fixup", _cur_string_dedup_fixup_time_ms);
- debug_phase(_gc_par_phases[StringDedupQueueFixup]);
- debug_phase(_gc_par_phases[StringDedupTableFixup]);
+ debug_time("String Deduplication", _cur_string_deduplication_time_ms);
+ debug_phase(_gc_par_phases[StringDedupQueueFixup], 1);
+ debug_phase(_gc_par_phases[StringDedupTableFixup], 1);
}
if (G1CollectedHeap::heap()->evacuation_failed()) {
@@ -497,7 +496,6 @@
"GCWorkerStart",
"ExtRootScan",
"ThreadRoots",
- "StringTableRoots",
"UniverseRoots",
"JNIRoots",
"ObjectSynchronizerRoots",
--- a/src/hotspot/share/gc/g1/g1GCPhaseTimes.hpp Fri Jan 25 13:50:44 2019 +0000
+++ b/src/hotspot/share/gc/g1/g1GCPhaseTimes.hpp Tue Jan 29 17:42:58 2019 +0000
@@ -48,7 +48,6 @@
GCWorkerStart,
ExtRootScan,
ThreadRoots,
- StringTableRoots,
UniverseRoots,
JNIRoots,
ObjectSynchronizerRoots,
@@ -104,8 +103,6 @@
private:
// Markers for grouping the phases in the GCPhases enum above
static const int GCMainParPhasesLast = GCWorkerEnd;
- static const int StringDedupPhasesFirst = StringDedupQueueFixup;
- static const int StringDedupPhasesLast = StringDedupTableFixup;
WorkerDataArray<double>* _gc_par_phases[GCParPhasesSentinel];
@@ -134,7 +131,7 @@
double _cur_evac_fail_recalc_used;
double _cur_evac_fail_remove_self_forwards;
- double _cur_string_dedup_fixup_time_ms;
+ double _cur_string_deduplication_time_ms;
double _cur_prepare_tlab_time_ms;
double _cur_resize_tlab_time_ms;
@@ -187,7 +184,7 @@
void details(T* phase, const char* indent) const;
void log_phase(WorkerDataArray<double>* phase, uint indent, outputStream* out, bool print_sum) const;
- void debug_phase(WorkerDataArray<double>* phase) const;
+ void debug_phase(WorkerDataArray<double>* phase, uint extra_indent = 0) const;
void trace_phase(WorkerDataArray<double>* phase, bool print_sum = true) const;
void info_time(const char* name, double value) const;
@@ -272,8 +269,8 @@
_cur_evac_fail_remove_self_forwards = ms;
}
- void record_string_dedup_fixup_time(double ms) {
- _cur_string_dedup_fixup_time_ms = ms;
+ void record_string_deduplication_time(double ms) {
+ _cur_string_deduplication_time_ms = ms;
}
void record_ref_proc_time(double ms) {
--- a/src/hotspot/share/gc/g1/g1HeapVerifier.cpp Fri Jan 25 13:50:44 2019 +0000
+++ b/src/hotspot/share/gc/g1/g1HeapVerifier.cpp Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 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
@@ -490,9 +490,7 @@
{
G1RootProcessor root_processor(_g1h, 1);
- root_processor.process_all_roots(&rootsCl,
- &cldCl,
- &blobsCl);
+ root_processor.process_all_roots(&rootsCl, &cldCl, &blobsCl);
}
bool failures = rootsCl.failures() || codeRootsCl.failures();
--- a/src/hotspot/share/gc/g1/g1RootProcessor.cpp Fri Jan 25 13:50:44 2019 +0000
+++ b/src/hotspot/share/gc/g1/g1RootProcessor.cpp Tue Jan 29 17:42:58 2019 +0000
@@ -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
@@ -90,7 +90,6 @@
}
process_vm_roots(closures, phase_times, worker_i);
- process_string_table_roots(closures, phase_times, worker_i);
{
// Now the CM ref_processor roots.
@@ -188,34 +187,17 @@
void G1RootProcessor::process_all_roots(OopClosure* oops,
CLDClosure* clds,
- CodeBlobClosure* blobs,
- bool process_string_table) {
+ CodeBlobClosure* blobs) {
AllRootsClosures closures(oops, clds);
process_java_roots(&closures, NULL, 0);
process_vm_roots(&closures, NULL, 0);
- if (process_string_table) {
- process_string_table_roots(&closures, NULL, 0);
- }
process_code_cache_roots(blobs, NULL, 0);
_process_strong_tasks.all_tasks_completed(n_workers());
}
-void G1RootProcessor::process_all_roots(OopClosure* oops,
- CLDClosure* clds,
- CodeBlobClosure* blobs) {
- process_all_roots(oops, clds, blobs, true);
-}
-
-void G1RootProcessor::process_all_roots_no_string_table(OopClosure* oops,
- CLDClosure* clds,
- CodeBlobClosure* blobs) {
- assert(!ClassUnloading, "Should only be used when class unloading is disabled");
- process_all_roots(oops, clds, blobs, false);
-}
-
void G1RootProcessor::process_java_roots(G1RootClosures* closures,
G1GCPhaseTimes* phase_times,
uint worker_i) {
@@ -295,16 +277,6 @@
}
}
-void G1RootProcessor::process_string_table_roots(G1RootClosures* closures,
- G1GCPhaseTimes* phase_times,
- uint worker_i) {
- assert(closures->weak_oops() != NULL, "Should only be called when all roots are processed");
- G1GCParPhaseTimesTracker x(phase_times, G1GCPhaseTimes::StringTableRoots, worker_i);
- // All threads execute the following. A specific chunk of buckets
- // from the StringTable are the individual tasks.
- StringTable::possibly_parallel_oops_do(&_par_state_string, closures->weak_oops());
-}
-
void G1RootProcessor::process_code_cache_roots(CodeBlobClosure* code_closure,
G1GCPhaseTimes* phase_times,
uint worker_i) {
--- a/src/hotspot/share/gc/g1/g1RootProcessor.hpp Fri Jan 25 13:50:44 2019 +0000
+++ b/src/hotspot/share/gc/g1/g1RootProcessor.hpp Tue Jan 29 17:42:58 2019 +0000
@@ -75,11 +75,6 @@
void worker_has_discovered_all_strong_classes();
void wait_until_all_strong_classes_discovered();
- void process_all_roots(OopClosure* oops,
- CLDClosure* clds,
- CodeBlobClosure* blobs,
- bool process_string_table);
-
void process_java_roots(G1RootClosures* closures,
G1GCPhaseTimes* phase_times,
uint worker_i);
@@ -88,10 +83,6 @@
G1GCPhaseTimes* phase_times,
uint worker_i);
- void process_string_table_roots(G1RootClosures* closures,
- G1GCPhaseTimes* phase_times,
- uint worker_i);
-
void process_code_cache_roots(CodeBlobClosure* code_closure,
G1GCPhaseTimes* phase_times,
uint worker_i);
@@ -101,7 +92,7 @@
// Apply correct closures from pss to the strongly and weakly reachable roots in the system
// in a single pass.
- // Record and report timing measurements for sub phases using the worker_i
+ // Record and report timing measurements for sub phases using worker_id.
void evacuate_roots(G1ParScanThreadState* pss, uint worker_id);
// Apply oops, clds and blobs to all strongly reachable roots in the system
@@ -114,13 +105,6 @@
CLDClosure* clds,
CodeBlobClosure* blobs);
- // Apply oops, clds and blobs to strongly and weakly reachable roots in the system,
- // the only thing different from process_all_roots is that we skip the string table
- // to avoid keeping every string live when doing class unloading.
- void process_all_roots_no_string_table(OopClosure* oops,
- CLDClosure* clds,
- CodeBlobClosure* blobs);
-
// Number of worker threads used by the root processor.
uint n_workers() const;
};
--- a/src/hotspot/share/gc/g1/g1StringDedup.cpp Fri Jan 25 13:50:44 2019 +0000
+++ b/src/hotspot/share/gc/g1/g1StringDedup.cpp Tue Jan 29 17:42:58 2019 +0000
@@ -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
@@ -89,53 +89,3 @@
}
}
-void G1StringDedup::oops_do(OopClosure* keep_alive) {
- assert(is_enabled(), "String deduplication not enabled");
- unlink_or_oops_do(NULL, keep_alive, true /* allow_resize_and_rehash */);
-}
-
-void G1StringDedup::parallel_unlink(G1StringDedupUnlinkOrOopsDoClosure* unlink, uint worker_id) {
- assert(is_enabled(), "String deduplication not enabled");
- StringDedupQueue::unlink_or_oops_do(unlink);
- StringDedupTable::unlink_or_oops_do(unlink, worker_id);
-}
-
-//
-// Task for parallel unlink_or_oops_do() operation on the deduplication queue
-// and table.
-//
-class G1StringDedupUnlinkOrOopsDoTask : public AbstractGangTask {
-private:
- G1StringDedupUnlinkOrOopsDoClosure _cl;
- G1GCPhaseTimes* _phase_times;
-
-public:
- G1StringDedupUnlinkOrOopsDoTask(BoolObjectClosure* is_alive,
- OopClosure* keep_alive,
- bool allow_resize_and_rehash,
- G1GCPhaseTimes* phase_times) :
- AbstractGangTask("G1StringDedupUnlinkOrOopsDoTask"),
- _cl(is_alive, keep_alive, allow_resize_and_rehash), _phase_times(phase_times) { }
-
- virtual void work(uint worker_id) {
- {
- G1GCParPhaseTimesTracker x(_phase_times, G1GCPhaseTimes::StringDedupQueueFixup, worker_id);
- StringDedupQueue::unlink_or_oops_do(&_cl);
- }
- {
- G1GCParPhaseTimesTracker x(_phase_times, G1GCPhaseTimes::StringDedupTableFixup, worker_id);
- StringDedupTable::unlink_or_oops_do(&_cl, worker_id);
- }
- }
-};
-
-void G1StringDedup::unlink_or_oops_do(BoolObjectClosure* is_alive,
- OopClosure* keep_alive,
- bool allow_resize_and_rehash,
- G1GCPhaseTimes* phase_times) {
- assert(is_enabled(), "String deduplication not enabled");
-
- G1StringDedupUnlinkOrOopsDoTask task(is_alive, keep_alive, allow_resize_and_rehash, phase_times);
- G1CollectedHeap* g1h = G1CollectedHeap::heap();
- g1h->workers()->run_task(&task);
-}
--- a/src/hotspot/share/gc/g1/g1StringDedup.hpp Fri Jan 25 13:50:44 2019 +0000
+++ b/src/hotspot/share/gc/g1/g1StringDedup.hpp Tue Jan 29 17:42:58 2019 +0000
@@ -78,35 +78,6 @@
static void enqueue_from_mark(oop java_string, uint worker_id);
static void enqueue_from_evacuation(bool from_young, bool to_young,
unsigned int queue, oop java_string);
-
- static void oops_do(OopClosure* keep_alive);
- static void parallel_unlink(G1StringDedupUnlinkOrOopsDoClosure* unlink, uint worker_id);
- static void unlink_or_oops_do(BoolObjectClosure* is_alive, OopClosure* keep_alive,
- bool allow_resize_and_rehash, G1GCPhaseTimes* phase_times = NULL);
-};
-
-//
-// This closure encapsulates the state and the closures needed when scanning
-// the deduplication queue and table during the unlink_or_oops_do() operation.
-// A single instance of this closure is created and then shared by all worker
-// threads participating in the scan.
-//
-class G1StringDedupUnlinkOrOopsDoClosure : public StringDedupUnlinkOrOopsDoClosure {
-public:
- G1StringDedupUnlinkOrOopsDoClosure(BoolObjectClosure* is_alive,
- OopClosure* keep_alive,
- bool allow_resize_and_rehash) :
- StringDedupUnlinkOrOopsDoClosure(is_alive, keep_alive) {
- if (G1StringDedup::is_enabled()) {
- G1StringDedup::gc_prologue(allow_resize_and_rehash);
- }
- }
-
- ~G1StringDedupUnlinkOrOopsDoClosure() {
- if (G1StringDedup::is_enabled()) {
- G1StringDedup::gc_epilogue();
- }
- }
};
#endif // SHARE_GC_G1_G1STRINGDEDUP_HPP
--- a/src/hotspot/share/gc/parallel/psMarkSweep.cpp Fri Jan 25 13:50:44 2019 +0000
+++ b/src/hotspot/share/gc/parallel/psMarkSweep.cpp Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 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
@@ -567,12 +567,6 @@
}
{
- GCTraceTime(Debug, gc, phases) t("Scrub String Table", _gc_timer);
- // Delete entries for dead interned strings.
- StringTable::unlink(is_alive_closure());
- }
-
- {
GCTraceTime(Debug, gc, phases) t("Scrub Symbol Table", _gc_timer);
// Clean up unreferenced symbols in symbol table.
SymbolTable::unlink();
@@ -630,7 +624,6 @@
CodeBlobToOopClosure adjust_from_blobs(adjust_pointer_closure(), CodeBlobToOopClosure::FixRelocations);
CodeCache::blobs_do(&adjust_from_blobs);
AOTLoader::oops_do(adjust_pointer_closure());
- StringTable::oops_do(adjust_pointer_closure());
ref_processor()->weak_oops_do(adjust_pointer_closure());
PSScavenge::reference_processor()->weak_oops_do(adjust_pointer_closure());
--- a/src/hotspot/share/gc/parallel/psParallelCompact.cpp Fri Jan 25 13:50:44 2019 +0000
+++ b/src/hotspot/share/gc/parallel/psParallelCompact.cpp Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 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
@@ -2185,12 +2185,6 @@
}
{
- GCTraceTime(Debug, gc, phases) t("Scrub String Table", &_gc_timer);
- // Delete entries for dead interned strings.
- StringTable::unlink(is_alive_closure());
- }
-
- {
GCTraceTime(Debug, gc, phases) t("Scrub Symbol Table", &_gc_timer);
// Clean up unreferenced symbols in symbol table.
SymbolTable::unlink();
@@ -2226,7 +2220,6 @@
CodeBlobToOopClosure adjust_from_blobs(&oop_closure, CodeBlobToOopClosure::FixRelocations);
CodeCache::blobs_do(&adjust_from_blobs);
AOTLoader::oops_do(&oop_closure);
- StringTable::oops_do(&oop_closure);
ref_processor()->weak_oops_do(&oop_closure);
// Roots were visited so references into the young gen in roots
// may have been scanned. Process them also.
--- a/src/hotspot/share/gc/parallel/psScavenge.cpp Fri Jan 25 13:50:44 2019 +0000
+++ b/src/hotspot/share/gc/parallel/psScavenge.cpp Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 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
@@ -430,12 +430,6 @@
WeakProcessor::weak_oops_do(&_is_alive_closure, &root_closure);
}
- {
- GCTraceTime(Debug, gc, phases) tm("Scrub String Table", &_gc_timer);
- // Unlink any dead interned Strings and process the remaining live ones.
- StringTable::unlink_or_oops_do(&_is_alive_closure, &root_closure);
- }
-
// Verify that usage of root_closure didn't copy any objects.
assert(promotion_manager->stacks_empty(),"stacks should be empty at this point");
--- a/src/hotspot/share/gc/serial/genMarkSweep.cpp Fri Jan 25 13:50:44 2019 +0000
+++ b/src/hotspot/share/gc/serial/genMarkSweep.cpp Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 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
@@ -240,12 +240,6 @@
}
{
- GCTraceTime(Debug, gc, phases) t("Scrub String Table", gc_timer());
- // Delete entries for dead interned strings.
- StringTable::unlink(&is_alive);
- }
-
- {
GCTraceTime(Debug, gc, phases) t("Scrub Symbol Table", gc_timer());
// Clean up unreferenced symbols in symbol table.
SymbolTable::unlink();
--- a/src/hotspot/share/gc/shared/c1/barrierSetC1.cpp Fri Jan 25 13:50:44 2019 +0000
+++ b/src/hotspot/share/gc/shared/c1/barrierSetC1.cpp Tue Jan 29 17:42:58 2019 +0000
@@ -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
@@ -62,9 +62,13 @@
if (resolve_in_register) {
LIR_Opr resolved_addr = gen->new_pointer_register();
- __ leal(addr_opr, resolved_addr);
- resolved_addr = LIR_OprFact::address(new LIR_Address(resolved_addr, access.type()));
- return resolved_addr;
+ if (needs_patching) {
+ __ leal(addr_opr, resolved_addr, lir_patch_normal, access.patch_emit_info());
+ access.clear_decorators(C1_NEEDS_PATCHING);
+ } else {
+ __ leal(addr_opr, resolved_addr);
+ }
+ return LIR_OprFact::address(new LIR_Address(resolved_addr, access.type()));
} else {
return addr_opr;
}
--- a/src/hotspot/share/gc/shared/c1/barrierSetC1.hpp Fri Jan 25 13:50:44 2019 +0000
+++ b/src/hotspot/share/gc/shared/c1/barrierSetC1.hpp Tue Jan 29 17:42:58 2019 +0000
@@ -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
@@ -92,17 +92,18 @@
load_offset();
}
- LIRGenerator* gen() const { return _gen; }
- CodeEmitInfo*& patch_emit_info() { return _patch_emit_info; }
- CodeEmitInfo*& access_emit_info() { return _access_emit_info; }
- LIRAddressOpr& base() { return _base; }
- LIRAddressOpr& offset() { return _offset; }
- BasicType type() const { return _type; }
- LIR_Opr resolved_addr() const { return _resolved_addr; }
- void set_resolved_addr(LIR_Opr addr) { _resolved_addr = addr; }
- bool is_oop() const { return _type == T_ARRAY || _type == T_OBJECT; }
- DecoratorSet decorators() const { return _decorators; }
- bool is_raw() const { return (_decorators & AS_RAW) != 0; }
+ LIRGenerator* gen() const { return _gen; }
+ CodeEmitInfo*& patch_emit_info() { return _patch_emit_info; }
+ CodeEmitInfo*& access_emit_info() { return _access_emit_info; }
+ LIRAddressOpr& base() { return _base; }
+ LIRAddressOpr& offset() { return _offset; }
+ BasicType type() const { return _type; }
+ LIR_Opr resolved_addr() const { return _resolved_addr; }
+ void set_resolved_addr(LIR_Opr addr) { _resolved_addr = addr; }
+ bool is_oop() const { return _type == T_ARRAY || _type == T_OBJECT; }
+ DecoratorSet decorators() const { return _decorators; }
+ void clear_decorators(DecoratorSet ds) { _decorators &= ~ds; }
+ bool is_raw() const { return (_decorators & AS_RAW) != 0; }
};
// The BarrierSetC1 class is the main entry point for the GC backend of the Access API in C1.
--- a/src/hotspot/share/gc/shared/genCollectedHeap.cpp Fri Jan 25 13:50:44 2019 +0000
+++ b/src/hotspot/share/gc/shared/genCollectedHeap.cpp Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 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
@@ -849,33 +849,14 @@
}
}
-void GenCollectedHeap::process_string_table_roots(StrongRootsScope* scope,
- OopClosure* root_closure,
- OopStorage::ParState<false, false>* par_state_string) {
- assert(root_closure != NULL, "Must be set");
- // All threads execute the following. A specific chunk of buckets
- // from the StringTable are the individual tasks.
-
- // Either we should be single threaded or have a ParState
- assert((scope->n_threads() <= 1) || par_state_string != NULL, "Parallel but no ParState");
-
- if (scope->n_threads() > 1) {
- StringTable::possibly_parallel_oops_do(par_state_string, root_closure);
- } else {
- StringTable::oops_do(root_closure);
- }
-}
-
void GenCollectedHeap::young_process_roots(StrongRootsScope* scope,
OopsInGenClosure* root_closure,
OopsInGenClosure* old_gen_closure,
- CLDClosure* cld_closure,
- OopStorage::ParState<false, false>* par_state_string) {
+ CLDClosure* cld_closure) {
MarkingCodeBlobClosure mark_code_closure(root_closure, CodeBlobToOopClosure::FixRelocations);
process_roots(scope, SO_ScavengeCodeCache, root_closure,
cld_closure, cld_closure, &mark_code_closure);
- process_string_table_roots(scope, root_closure, par_state_string);
if (_process_strong_tasks->try_claim_task(GCH_PS_younger_gens)) {
root_closure->reset_generation();
@@ -895,19 +876,11 @@
ScanningOption so,
bool only_strong_roots,
OopsInGenClosure* root_closure,
- CLDClosure* cld_closure,
- OopStorage::ParState<false, false>* par_state_string) {
+ CLDClosure* cld_closure) {
MarkingCodeBlobClosure mark_code_closure(root_closure, is_adjust_phase);
CLDClosure* weak_cld_closure = only_strong_roots ? NULL : cld_closure;
process_roots(scope, so, root_closure, cld_closure, weak_cld_closure, &mark_code_closure);
- if (is_adjust_phase) {
- // We never treat the string table as roots during marking
- // for the full gc, so we only need to process it during
- // the adjust phase.
- process_string_table_roots(scope, root_closure, par_state_string);
- }
-
_process_strong_tasks->all_tasks_completed(scope->n_threads());
}
--- a/src/hotspot/share/gc/shared/genCollectedHeap.hpp Fri Jan 25 13:50:44 2019 +0000
+++ b/src/hotspot/share/gc/shared/genCollectedHeap.hpp Tue Jan 29 17:42:58 2019 +0000
@@ -400,10 +400,6 @@
CLDClosure* weak_cld_closure,
CodeBlobToOopClosure* code_roots);
- void process_string_table_roots(StrongRootsScope* scope,
- OopClosure* root_closure,
- OopStorage::ParState<false, false>* par_state_string);
-
// Accessor for memory state verification support
NOT_PRODUCT(
virtual size_t skip_header_HeapWords() { return 0; }
@@ -416,16 +412,14 @@
void young_process_roots(StrongRootsScope* scope,
OopsInGenClosure* root_closure,
OopsInGenClosure* old_gen_closure,
- CLDClosure* cld_closure,
- OopStorage::ParState<false, false>* par_state_string = NULL);
+ CLDClosure* cld_closure);
void full_process_roots(StrongRootsScope* scope,
bool is_adjust_phase,
ScanningOption so,
bool only_strong_roots,
OopsInGenClosure* root_closure,
- CLDClosure* cld_closure,
- OopStorage::ParState<false, false>* par_state_string = NULL);
+ CLDClosure* cld_closure);
// Apply "root_closure" to all the weak roots of the system.
// These include JNI weak roots, string table,
--- a/src/hotspot/share/gc/shared/owstTaskTerminator.cpp Fri Jan 25 13:50:44 2019 +0000
+++ b/src/hotspot/share/gc/shared/owstTaskTerminator.cpp Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2018, Red Hat, Inc. All rights reserved.
+ * Copyright (c) 2018, 2019, Red Hat, Inc. All rights reserved.
*
* 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
@@ -38,15 +38,17 @@
// Single worker, done
if (_n_threads == 1) {
_offered_termination = 1;
+ assert(!peek_in_queue_set(), "Precondition");
return true;
}
_blocker->lock_without_safepoint_check();
+ _offered_termination++;
// All arrived, done
- _offered_termination++;
if (_offered_termination == _n_threads) {
_blocker->notify_all();
_blocker->unlock();
+ assert(!peek_in_queue_set(), "Precondition");
return true;
}
@@ -59,21 +61,31 @@
if (do_spin_master_work(terminator)) {
assert(_offered_termination == _n_threads, "termination condition");
+ assert(!peek_in_queue_set(), "Precondition");
return true;
} else {
_blocker->lock_without_safepoint_check();
+ // There is possibility that termination is reached between dropping the lock
+ // before returning from do_spin_master_work() and acquiring lock above.
+ if (_offered_termination == _n_threads) {
+ _blocker->unlock();
+ assert(!peek_in_queue_set(), "Precondition");
+ return true;
+ }
}
} else {
_blocker->wait(true, WorkStealingSleepMillis);
if (_offered_termination == _n_threads) {
_blocker->unlock();
+ assert(!peek_in_queue_set(), "Precondition");
return true;
}
}
size_t tasks = tasks_in_queue_set();
if (exit_termination(tasks, terminator)) {
+ assert_lock_strong(_blocker);
_offered_termination--;
_blocker->unlock();
return false;
@@ -153,19 +165,24 @@
_total_peeks++;
#endif
size_t tasks = tasks_in_queue_set();
- if (exit_termination(tasks, terminator)) {
+ bool exit = exit_termination(tasks, terminator);
+ {
MonitorLockerEx locker(_blocker, Mutex::_no_safepoint_check_flag);
- if (tasks >= _offered_termination - 1) {
- locker.notify_all();
- } else {
- for (; tasks > 1; tasks--) {
- locker.notify();
+ // Termination condition reached
+ if (_offered_termination == _n_threads) {
+ _spin_master = NULL;
+ return true;
+ } else if (exit) {
+ if (tasks >= _offered_termination - 1) {
+ locker.notify_all();
+ } else {
+ for (; tasks > 1; tasks--) {
+ locker.notify();
+ }
}
+ _spin_master = NULL;
+ return false;
}
- _spin_master = NULL;
- return false;
- } else if (_offered_termination == _n_threads) {
- return true;
}
}
}
--- a/src/hotspot/share/gc/shared/owstTaskTerminator.hpp Fri Jan 25 13:50:44 2019 +0000
+++ b/src/hotspot/share/gc/shared/owstTaskTerminator.hpp Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2018, Red Hat, Inc. All rights reserved.
+ * Copyright (c) 2018, 2019, Red Hat, Inc. All rights reserved.
*
* 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
@@ -55,6 +55,7 @@
}
virtual ~OWSTTaskTerminator() {
+ assert(_spin_master == NULL, "Should have been reset");
assert(_blocker != NULL, "Can not be NULL");
delete _blocker;
}
--- a/src/hotspot/share/gc/shared/parallelCleaning.cpp Fri Jan 25 13:50:44 2019 +0000
+++ b/src/hotspot/share/gc/shared/parallelCleaning.cpp Tue Jan 29 17:42:58 2019 +0000
@@ -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
@@ -31,48 +31,35 @@
#include "memory/resourceArea.hpp"
#include "logging/log.hpp"
-StringCleaningTask::StringCleaningTask(BoolObjectClosure* is_alive, StringDedupUnlinkOrOopsDoClosure* dedup_closure, bool process_strings) :
- AbstractGangTask("String Unlinking"),
- _is_alive(is_alive),
- _dedup_closure(dedup_closure),
- _par_state_string(StringTable::weak_storage()),
- _initial_string_table_size((int) StringTable::the_table()->table_size()),
- _process_strings(process_strings), _strings_processed(0), _strings_removed(0) {
+StringDedupCleaningTask::StringDedupCleaningTask(BoolObjectClosure* is_alive,
+ OopClosure* keep_alive,
+ bool resize_table) :
+ AbstractGangTask("String Dedup Cleaning"),
+ _dedup_closure(is_alive, keep_alive) {
- if (process_strings) {
- StringTable::reset_dead_counter();
+ if (StringDedup::is_enabled()) {
+ StringDedup::gc_prologue(resize_table);
}
}
-StringCleaningTask::~StringCleaningTask() {
- log_info(gc, stringtable)(
- "Cleaned string table, "
- "strings: " SIZE_FORMAT " processed, " SIZE_FORMAT " removed",
- strings_processed(), strings_removed());
- if (_process_strings) {
- StringTable::finish_dead_counter();
+StringDedupCleaningTask::~StringDedupCleaningTask() {
+ if (StringDedup::is_enabled()) {
+ StringDedup::gc_epilogue();
}
}
-void StringCleaningTask::work(uint worker_id) {
- size_t strings_processed = 0;
- size_t strings_removed = 0;
- if (_process_strings) {
- StringTable::possibly_parallel_unlink(&_par_state_string, _is_alive, &strings_processed, &strings_removed);
- Atomic::add(strings_processed, &_strings_processed);
- Atomic::add(strings_removed, &_strings_removed);
- }
- if (_dedup_closure != NULL) {
- StringDedup::parallel_unlink(_dedup_closure, worker_id);
+void StringDedupCleaningTask::work(uint worker_id) {
+ if (StringDedup::is_enabled()) {
+ StringDedup::parallel_unlink(&_dedup_closure, worker_id);
}
}
CodeCacheUnloadingTask::CodeCacheUnloadingTask(uint num_workers, BoolObjectClosure* is_alive, bool unloading_occurred) :
- _unloading_scope(is_alive),
- _unloading_occurred(unloading_occurred),
- _num_workers(num_workers),
- _first_nmethod(NULL),
- _claimed_nmethod(NULL) {
+ _unloading_scope(is_alive),
+ _unloading_occurred(unloading_occurred),
+ _num_workers(num_workers),
+ _first_nmethod(NULL),
+ _claimed_nmethod(NULL) {
// Get first alive nmethod
CompiledMethodIterator iter(CompiledMethodIterator::only_alive);
if(iter.next()) {
@@ -175,10 +162,12 @@
}
ParallelCleaningTask::ParallelCleaningTask(BoolObjectClosure* is_alive,
- StringDedupUnlinkOrOopsDoClosure* dedup_closure, uint num_workers, bool unloading_occurred) :
+ uint num_workers,
+ bool unloading_occurred,
+ bool resize_dedup_table) :
AbstractGangTask("Parallel Cleaning"),
_unloading_occurred(unloading_occurred),
- _string_task(is_alive, StringDedup::is_enabled() ? dedup_closure : NULL, true),
+ _string_dedup_task(is_alive, NULL, resize_dedup_table),
_code_cache_task(num_workers, is_alive, unloading_occurred),
_klass_cleaning_task() {
}
@@ -188,8 +177,8 @@
// Do first pass of code cache cleaning.
_code_cache_task.work(worker_id);
- // Clean the Strings and Symbols.
- _string_task.work(worker_id);
+ // Clean the string dedup data structures.
+ _string_dedup_task.work(worker_id);
// Clean all klasses that were not unloaded.
// The weak metadata in klass doesn't need to be
--- a/src/hotspot/share/gc/shared/parallelCleaning.hpp Fri Jan 25 13:50:44 2019 +0000
+++ b/src/hotspot/share/gc/shared/parallelCleaning.hpp Tue Jan 29 17:42:58 2019 +0000
@@ -33,27 +33,14 @@
class ParallelCleaningTask;
-class StringCleaningTask : public AbstractGangTask {
-private:
- BoolObjectClosure* _is_alive;
- StringDedupUnlinkOrOopsDoClosure * const _dedup_closure;
-
- OopStorage::ParState<false /* concurrent */, false /* const */> _par_state_string;
-
- int _initial_string_table_size;
-
- bool _process_strings;
- volatile size_t _strings_processed;
- volatile size_t _strings_removed;
+class StringDedupCleaningTask : public AbstractGangTask {
+ StringDedupUnlinkOrOopsDoClosure _dedup_closure;
public:
- StringCleaningTask(BoolObjectClosure* is_alive, StringDedupUnlinkOrOopsDoClosure* dedup_closure, bool process_strings);
- ~StringCleaningTask();
+ StringDedupCleaningTask(BoolObjectClosure* is_alive, OopClosure* keep_alive, bool resize_table);
+ ~StringDedupCleaningTask();
void work(uint worker_id);
-
- size_t strings_processed() const { return _strings_processed; }
- size_t strings_removed() const { return _strings_removed; }
};
class CodeCacheUnloadingTask {
@@ -100,18 +87,21 @@
void work();
};
-// To minimize the remark pause times, the tasks below are done in parallel.
+// Do cleanup of some weakly held data in the same parallel task.
+// Assumes a non-moving context.
class ParallelCleaningTask : public AbstractGangTask {
private:
- bool _unloading_occurred;
- StringCleaningTask _string_task;
- CodeCacheUnloadingTask _code_cache_task;
- KlassCleaningTask _klass_cleaning_task;
+ bool _unloading_occurred;
+ StringDedupCleaningTask _string_dedup_task;
+ CodeCacheUnloadingTask _code_cache_task;
+ KlassCleaningTask _klass_cleaning_task;
public:
// The constructor is run in the VMThread.
- ParallelCleaningTask(BoolObjectClosure* is_alive, StringDedupUnlinkOrOopsDoClosure* dedup_closure,
- uint num_workers, bool unloading_occurred);
+ ParallelCleaningTask(BoolObjectClosure* is_alive,
+ uint num_workers,
+ bool unloading_occurred,
+ bool resize_dedup_table);
void work(uint worker_id);
};
--- a/src/hotspot/share/gc/shared/stringdedup/stringDedup.cpp Fri Jan 25 13:50:44 2019 +0000
+++ b/src/hotspot/share/gc/shared/stringdedup/stringDedup.cpp Tue Jan 29 17:42:58 2019 +0000
@@ -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
@@ -53,7 +53,6 @@
StringDedupTable::deduplicate(java_string, &dummy);
}
-
void StringDedup::parallel_unlink(StringDedupUnlinkOrOopsDoClosure* unlink, uint worker_id) {
assert(is_enabled(), "String deduplication not enabled");
StringDedupQueue::unlink_or_oops_do(unlink);
@@ -80,5 +79,8 @@
StringDedupUnlinkOrOopsDoClosure::StringDedupUnlinkOrOopsDoClosure(BoolObjectClosure* is_alive,
OopClosure* keep_alive) :
- _is_alive(is_alive), _keep_alive(keep_alive) {
+ _always_true(),
+ _do_nothing(),
+ _is_alive(is_alive != NULL ? is_alive : &_always_true),
+ _keep_alive(keep_alive != NULL ? keep_alive : &_do_nothing) {
}
--- a/src/hotspot/share/gc/shared/stringdedup/stringDedup.hpp Fri Jan 25 13:50:44 2019 +0000
+++ b/src/hotspot/share/gc/shared/stringdedup/stringDedup.hpp Tue Jan 29 17:42:58 2019 +0000
@@ -113,30 +113,18 @@
// the deduplication queue and table during the unlink_or_oops_do() operation.
//
class StringDedupUnlinkOrOopsDoClosure : public StackObj {
-private:
+ AlwaysTrueClosure _always_true;
+ DoNothingClosure _do_nothing;
BoolObjectClosure* _is_alive;
OopClosure* _keep_alive;
public:
StringDedupUnlinkOrOopsDoClosure(BoolObjectClosure* is_alive,
- OopClosure* keep_alive);
+ OopClosure* keep_alive);
- // Applies and returns the result from the is_alive closure, or
- // returns true if no such closure was provided.
- bool is_alive(oop o) {
- if (_is_alive != NULL) {
- return _is_alive->do_object_b(o);
- }
- return true;
- }
+ bool is_alive(oop o) { return _is_alive->do_object_b(o); }
- // Applies the keep_alive closure, or does nothing if no such
- // closure was provided.
- void keep_alive(oop* p) {
- if (_keep_alive != NULL) {
- _keep_alive->do_oop(p);
- }
- }
+ void keep_alive(oop* p) { _keep_alive->do_oop(p); }
};
#endif // SHARE_GC_SHARED_STRINGDEDUP_STRINGDEDUP_HPP
--- a/src/hotspot/share/gc/shared/taskqueue.cpp Fri Jan 25 13:50:44 2019 +0000
+++ b/src/hotspot/share/gc/shared/taskqueue.cpp Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 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
@@ -118,6 +118,11 @@
_queue_set(queue_set),
_offered_termination(0) {}
+ParallelTaskTerminator::~ParallelTaskTerminator() {
+ assert(_offered_termination == 0 || !peek_in_queue_set(), "Precondition");
+ assert(_offered_termination == 0 || _offered_termination == _n_threads, "Terminated or aborted" );
+}
+
bool ParallelTaskTerminator::peek_in_queue_set() {
return _queue_set->peek();
}
@@ -162,6 +167,7 @@
assert(_offered_termination <= _n_threads, "Invariant");
// Are all threads offering termination?
if (_offered_termination == _n_threads) {
+ assert(!peek_in_queue_set(), "Precondition");
return true;
} else {
// Look for more work.
@@ -211,9 +217,7 @@
#endif
if (peek_in_queue_set() ||
(terminator != NULL && terminator->should_exit_termination())) {
- Atomic::dec(&_offered_termination);
- assert(_offered_termination < _n_threads, "Invariant");
- return false;
+ return complete_or_exit_termination();
}
}
}
@@ -229,6 +233,23 @@
}
#endif
+bool ParallelTaskTerminator::complete_or_exit_termination() {
+ // If termination is ever reached, terminator should stay in such state,
+ // so that all threads see the same state
+ uint current_offered = _offered_termination;
+ uint expected_value;
+ do {
+ if (current_offered == _n_threads) {
+ assert(!peek_in_queue_set(), "Precondition");
+ return true;
+ }
+ expected_value = current_offered;
+ } while ((current_offered = Atomic::cmpxchg(current_offered - 1, &_offered_termination, current_offered)) != expected_value);
+
+ assert(_offered_termination < _n_threads, "Invariant");
+ return false;
+}
+
void ParallelTaskTerminator::reset_for_reuse() {
if (_offered_termination != 0) {
assert(_offered_termination == _n_threads,
--- a/src/hotspot/share/gc/shared/taskqueue.hpp Fri Jan 25 13:50:44 2019 +0000
+++ b/src/hotspot/share/gc/shared/taskqueue.hpp Tue Jan 29 17:42:58 2019 +0000
@@ -451,7 +451,10 @@
protected:
uint _n_threads;
TaskQueueSetSuper* _queue_set;
+
+ DEFINE_PAD_MINUS_SIZE(0, DEFAULT_CACHE_LINE_SIZE, 0);
volatile uint _offered_termination;
+ DEFINE_PAD_MINUS_SIZE(1, DEFAULT_CACHE_LINE_SIZE, sizeof(volatile uint));
#ifdef TRACESPINNING
static uint _total_yields;
@@ -464,11 +467,18 @@
virtual void yield();
void sleep(uint millis);
+ // Called when exiting termination is requested.
+ // When the request is made, terminator may have already terminated
+ // (e.g. all threads are arrived and offered termination). In this case,
+ // it should ignore the request and complete the termination.
+ // Return true if termination is completed. Otherwise, return false.
+ bool complete_or_exit_termination();
public:
// "n_threads" is the number of threads to be terminated. "queue_set" is a
// queue sets of work queues of other threads.
ParallelTaskTerminator(uint n_threads, TaskQueueSetSuper* queue_set);
+ virtual ~ParallelTaskTerminator();
// The current thread has no work, and is ready to terminate if everyone
// else is. If returns "true", all threads are terminated. If returns
--- a/src/hotspot/share/gc/shared/weakProcessor.cpp Fri Jan 25 13:50:44 2019 +0000
+++ b/src/hotspot/share/gc/shared/weakProcessor.cpp Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 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
@@ -23,9 +23,9 @@
*/
#include "precompiled.hpp"
+#include "classfile/stringTable.hpp"
#include "gc/shared/oopStorage.inline.hpp"
#include "gc/shared/oopStorageParState.inline.hpp"
-#include "gc/shared/weakProcessor.hpp"
#include "gc/shared/weakProcessor.inline.hpp"
#include "gc/shared/weakProcessorPhases.hpp"
#include "gc/shared/weakProcessorPhaseTimes.hpp"
@@ -35,13 +35,19 @@
#include "utilities/macros.hpp"
void WeakProcessor::weak_oops_do(BoolObjectClosure* is_alive, OopClosure* keep_alive) {
+ StringTable::reset_dead_counter();
+ CountingIsAliveClosure<BoolObjectClosure> cl(is_alive);
FOR_EACH_WEAK_PROCESSOR_PHASE(phase) {
if (WeakProcessorPhases::is_serial(phase)) {
- WeakProcessorPhases::processor(phase)(is_alive, keep_alive);
+ WeakProcessorPhases::processor(phase)(&cl, keep_alive);
} else {
- WeakProcessorPhases::oop_storage(phase)->weak_oops_do(is_alive, keep_alive);
+ WeakProcessorPhases::oop_storage(phase)->weak_oops_do(&cl, keep_alive);
+ }
+ if (WeakProcessorPhases::is_stringtable(phase)) {
+ StringTable::inc_dead_counter(cl.num_dead());
}
}
+ StringTable::finish_dead_counter();
}
void WeakProcessor::oops_do(OopClosure* closure) {
@@ -93,6 +99,7 @@
OopStorage* storage = WeakProcessorPhases::oop_storage(phase);
new (states++) StorageState(storage, _nworkers);
}
+ StringTable::reset_dead_counter();
}
WeakProcessor::Task::Task(uint nworkers) :
@@ -122,6 +129,7 @@
}
FREE_C_HEAP_ARRAY(StorageState, _storage_states);
}
+ StringTable::finish_dead_counter();
}
void WeakProcessor::GangTask::work(uint worker_id) {
--- a/src/hotspot/share/gc/shared/weakProcessor.inline.hpp Fri Jan 25 13:50:44 2019 +0000
+++ b/src/hotspot/share/gc/shared/weakProcessor.inline.hpp Tue Jan 29 17:42:58 2019 +0000
@@ -25,6 +25,7 @@
#ifndef SHARE_GC_SHARED_WEAKPROCESSOR_INLINE_HPP
#define SHARE_GC_SHARED_WEAKPROCESSOR_INLINE_HPP
+#include "classfile/stringTable.hpp"
#include "gc/shared/oopStorage.inline.hpp"
#include "gc/shared/oopStorageParState.inline.hpp"
#include "gc/shared/weakProcessor.hpp"
@@ -36,6 +37,27 @@
class BoolObjectClosure;
class OopClosure;
+template<typename T>
+class CountingIsAliveClosure : public BoolObjectClosure {
+ T* _inner;
+
+ size_t _num_dead;
+ size_t _num_total;
+
+public:
+ CountingIsAliveClosure(T* cl) : _inner(cl), _num_dead(0), _num_total(0) { }
+
+ virtual bool do_object_b(oop obj) {
+ bool result = _inner->do_object_b(obj);
+ _num_dead += !result;
+ _num_total++;
+ return result;
+ }
+
+ size_t num_dead() const { return _num_dead; }
+ size_t num_total() const { return _num_total; }
+};
+
template<typename IsAlive, typename KeepAlive>
void WeakProcessor::Task::work(uint worker_id,
IsAlive* is_alive,
@@ -45,16 +67,26 @@
worker_id, _nworkers);
FOR_EACH_WEAK_PROCESSOR_PHASE(phase) {
+ CountingIsAliveClosure<IsAlive> cl(is_alive);
if (WeakProcessorPhases::is_serial(phase)) {
uint serial_index = WeakProcessorPhases::serial_index(phase);
if (_serial_phases_done.try_claim_task(serial_index)) {
WeakProcessorPhaseTimeTracker pt(_phase_times, phase);
- WeakProcessorPhases::processor(phase)(is_alive, keep_alive);
+ WeakProcessorPhases::processor(phase)(&cl, keep_alive);
+ if (_phase_times != NULL) {
+ _phase_times->record_phase_items(phase, cl.num_dead(), cl.num_total());
+ }
}
} else {
WeakProcessorPhaseTimeTracker pt(_phase_times, phase, worker_id);
uint storage_index = WeakProcessorPhases::oop_storage_index(phase);
- _storage_states[storage_index].weak_oops_do(is_alive, keep_alive);
+ _storage_states[storage_index].weak_oops_do(&cl, keep_alive);
+ if (_phase_times != NULL) {
+ _phase_times->record_worker_items(worker_id, phase, cl.num_dead(), cl.num_total());
+ }
+ }
+ if (WeakProcessorPhases::is_stringtable(phase)) {
+ StringTable::inc_dead_counter(cl.num_dead());
}
}
--- a/src/hotspot/share/gc/shared/weakProcessorPhaseTimes.cpp Fri Jan 25 13:50:44 2019 +0000
+++ b/src/hotspot/share/gc/shared/weakProcessorPhaseTimes.cpp Tue Jan 29 17:42:58 2019 +0000
@@ -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
@@ -49,6 +49,7 @@
#ifdef ASSERT
static bool is_initialized_time(double t) { return t >= 0.0; }
+static bool is_initialized_items(size_t i) { return i != 0; }
#endif // ASSERT
static void reset_times(double* times, size_t ntimes) {
@@ -57,28 +58,43 @@
}
}
+static void reset_items(size_t* items, size_t nitems) {
+ for (size_t i = 0; i < nitems; ++i) {
+ items[i] = 0;
+ }
+}
+
WeakProcessorPhaseTimes::WeakProcessorPhaseTimes(uint max_threads) :
_max_threads(max_threads),
_active_workers(0),
_total_time_sec(uninitialized_time),
- _worker_phase_times_sec()
+ _worker_data(),
+ _worker_dead_items(),
+ _worker_total_items()
{
assert(_max_threads > 0, "max_threads must not be zero");
reset_times(_phase_times_sec, ARRAY_SIZE(_phase_times_sec));
+ reset_items(_phase_dead_items, ARRAY_SIZE(_phase_dead_items));
+ reset_items(_phase_total_items, ARRAY_SIZE(_phase_total_items));
if (_max_threads > 1) {
- WorkerDataArray<double>** wpt = _worker_phase_times_sec;
+ WorkerDataArray<double>** wpt = _worker_data;
FOR_EACH_WEAK_PROCESSOR_OOP_STORAGE_PHASE(phase) {
const char* description = WeakProcessorPhases::description(phase);
- *wpt++ = new WorkerDataArray<double>(_max_threads, description);
+ *wpt = new WorkerDataArray<double>(_max_threads, description);
+ (*wpt)->link_thread_work_items(new WorkerDataArray<size_t>(_max_threads, "Dead"), DeadItems);
+ (*wpt)->link_thread_work_items(new WorkerDataArray<size_t>(_max_threads, "Total"), TotalItems);
+ wpt++;
}
}
}
WeakProcessorPhaseTimes::~WeakProcessorPhaseTimes() {
- for (size_t i = 0; i < ARRAY_SIZE(_worker_phase_times_sec); ++i) {
- delete _worker_phase_times_sec[i];
+ for (size_t i = 0; i < ARRAY_SIZE(_worker_data); ++i) {
+ delete _worker_data[i];
+ delete _worker_dead_items[i];
+ delete _worker_total_items[i];
}
}
@@ -100,9 +116,11 @@
_active_workers = 0;
_total_time_sec = uninitialized_time;
reset_times(_phase_times_sec, ARRAY_SIZE(_phase_times_sec));
+ reset_items(_phase_dead_items, ARRAY_SIZE(_phase_dead_items));
+ reset_items(_phase_total_items, ARRAY_SIZE(_phase_total_items));
if (_max_threads > 1) {
- for (size_t i = 0; i < ARRAY_SIZE(_worker_phase_times_sec); ++i) {
- _worker_phase_times_sec[i]->reset();
+ for (size_t i = 0; i < ARRAY_SIZE(_worker_data); ++i) {
+ _worker_data[i]->reset();
}
}
}
@@ -129,10 +147,20 @@
_phase_times_sec[phase_index(phase)] = time_sec;
}
+void WeakProcessorPhaseTimes::record_phase_items(WeakProcessorPhase phase, size_t num_dead, size_t num_total) {
+ uint p = phase_index(phase);
+ assert(!is_initialized_items(_phase_dead_items[p]),
+ "Already set dead items for phase %u", p);
+ assert(!is_initialized_items(_phase_total_items[p]),
+ "Already set total items for phase %u", p);
+ _phase_dead_items[p] = num_dead;
+ _phase_total_items[p] = num_total;
+}
+
WorkerDataArray<double>* WeakProcessorPhaseTimes::worker_data(WeakProcessorPhase phase) const {
assert_oop_storage_phase(phase);
assert(active_workers() > 1, "No worker data when single-threaded");
- return _worker_phase_times_sec[WeakProcessorPhases::oop_storage_index(phase)];
+ return _worker_data[WeakProcessorPhases::oop_storage_index(phase)];
}
double WeakProcessorPhaseTimes::worker_time_sec(uint worker_id, WeakProcessorPhase phase) const {
@@ -155,6 +183,18 @@
}
}
+void WeakProcessorPhaseTimes::record_worker_items(uint worker_id,
+ WeakProcessorPhase phase,
+ size_t num_dead,
+ size_t num_total) {
+ if (active_workers() == 1) {
+ record_phase_items(phase, num_dead, num_total);
+ } else {
+ worker_data(phase)->set_or_add_thread_work_item(worker_id, num_dead, DeadItems);
+ worker_data(phase)->set_or_add_thread_work_item(worker_id, num_total, TotalItems);
+ }
+}
+
static double elapsed_time_sec(Ticks start_time, Ticks end_time) {
return (end_time - start_time).seconds();
}
@@ -223,6 +263,16 @@
indent_str(indent),
WeakProcessorPhases::description(phase),
phase_time_sec(phase) * MILLIUNITS);
+
+ log_debug(gc, phases)("%s%s: " SIZE_FORMAT,
+ indent_str(indent + 1),
+ "Dead",
+ _phase_dead_items[phase_index(phase)]);
+
+ log_debug(gc, phases)("%s%s: " SIZE_FORMAT,
+ indent_str(indent + 1),
+ "Total",
+ _phase_total_items[phase_index(phase)]);
}
void WeakProcessorPhaseTimes::log_mt_phase_summary(WeakProcessorPhase phase,
@@ -231,27 +281,36 @@
LogStream ls(lt);
ls.print("%s", indents[indent]);
worker_data(phase)->print_summary_on(&ls, true);
+ log_mt_phase_details(worker_data(phase), indent + 1);
+
+ for (uint i = 0; i < worker_data(phase)->MaxThreadWorkItems; i++) {
+ WorkerDataArray<size_t>* work_items = worker_data(phase)->thread_work_items(i);
+ if (work_items != NULL) {
+ ls.print("%s", indents[indent + 1]);
+ work_items->print_summary_on(&ls, true);
+ log_mt_phase_details(work_items, indent + 1);
+ }
+ }
}
-void WeakProcessorPhaseTimes::log_mt_phase_details(WeakProcessorPhase phase,
+template <typename T>
+void WeakProcessorPhaseTimes::log_mt_phase_details(WorkerDataArray<T>* data,
uint indent) const {
LogTarget(Trace, gc, phases) lt;
- LogStream ls(lt);
- ls.print("%s", indents[indent]);
- worker_data(phase)->print_details_on(&ls);
+ if (lt.is_enabled()) {
+ LogStream ls(lt);
+ ls.print("%s", indents[indent]);
+ data->print_details_on(&ls);
+ }
}
void WeakProcessorPhaseTimes::log_print_phases(uint indent) const {
if (log_is_enabled(Debug, gc, phases)) {
- bool details_enabled = log_is_enabled(Trace, gc, phases);
FOR_EACH_WEAK_PROCESSOR_PHASE(phase) {
if (is_serial_phase(phase) || (active_workers() == 1)) {
log_st_phase(phase, indent);
} else {
log_mt_phase_summary(phase, indent);
- if (details_enabled) {
- log_mt_phase_details(phase, indent + 1);
- }
}
}
}
--- a/src/hotspot/share/gc/shared/weakProcessorPhaseTimes.hpp Fri Jan 25 13:50:44 2019 +0000
+++ b/src/hotspot/share/gc/shared/weakProcessorPhaseTimes.hpp Tue Jan 29 17:42:58 2019 +0000
@@ -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
@@ -33,6 +33,10 @@
template<typename T> class WorkerDataArray;
class WeakProcessorPhaseTimes : public CHeapObj<mtGC> {
+ enum {
+ DeadItems,
+ TotalItems
+ };
uint _max_threads;
uint _active_workers;
@@ -43,15 +47,20 @@
// processed by multiple threads are unused, as are entries for
// unexecuted phases.
double _phase_times_sec[WeakProcessorPhases::phase_count];
+ size_t _phase_dead_items[WeakProcessorPhases::phase_count];
+ size_t _phase_total_items[WeakProcessorPhases::phase_count];
- // Per-worker times, if multiple threads used and the phase was executed.
- WorkerDataArray<double>* _worker_phase_times_sec[WeakProcessorPhases::oop_storage_phase_count];
+ // Per-worker times and linked items, if multiple threads used and the phase was executed.
+ WorkerDataArray<double>* _worker_data[WeakProcessorPhases::oop_storage_phase_count];
+ WorkerDataArray<size_t>* _worker_dead_items[WeakProcessorPhases::oop_storage_phase_count];
+ WorkerDataArray<size_t>* _worker_total_items[WeakProcessorPhases::oop_storage_phase_count];
WorkerDataArray<double>* worker_data(WeakProcessorPhase phase) const;
void log_st_phase(WeakProcessorPhase phase, uint indent) const;
void log_mt_phase_summary(WeakProcessorPhase phase, uint indent) const;
- void log_mt_phase_details(WeakProcessorPhase phase, uint indent) const;
+ template <typename T>
+ void log_mt_phase_details(WorkerDataArray<T>* data, uint indent) const;
public:
WeakProcessorPhaseTimes(uint max_threads);
@@ -67,7 +76,9 @@
void record_total_time_sec(double time_sec);
void record_phase_time_sec(WeakProcessorPhase phase, double time_sec);
+ void record_phase_items(WeakProcessorPhase phase, size_t num_dead, size_t num_total);
void record_worker_time_sec(uint worker_id, WeakProcessorPhase phase, double time_sec);
+ void record_worker_items(uint worker_id, WeakProcessorPhase phase, size_t num_dead, size_t num_total);
void reset();
--- a/src/hotspot/share/gc/shared/weakProcessorPhases.cpp Fri Jan 25 13:50:44 2019 +0000
+++ b/src/hotspot/share/gc/shared/weakProcessorPhases.cpp Tue Jan 29 17:42:58 2019 +0000
@@ -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
@@ -23,6 +23,7 @@
*/
#include "precompiled.hpp"
+#include "classfile/stringTable.hpp"
#include "classfile/systemDictionary.hpp"
#include "gc/shared/weakProcessorPhases.hpp"
#include "runtime/jniHandles.hpp"
@@ -78,6 +79,7 @@
JVMTI_ONLY(case jvmti: return "JVMTI weak processing";)
JFR_ONLY(case jfr: return "JFR weak processing";)
case jni: return "JNI weak processing";
+ case stringtable: return "StringTable weak processing";
case vm: return "VM weak processing";
default:
ShouldNotReachHere();
@@ -98,9 +100,14 @@
OopStorage* WeakProcessorPhases::oop_storage(Phase phase) {
switch (phase) {
case jni: return JNIHandles::weak_global_handles();
+ case stringtable: return StringTable::weak_storage();
case vm: return SystemDictionary::vm_weak_oop_storage();
default:
ShouldNotReachHere();
return NULL;
}
}
+
+bool WeakProcessorPhases::is_stringtable(Phase phase) {
+ return phase == stringtable;
+}
--- a/src/hotspot/share/gc/shared/weakProcessorPhases.hpp Fri Jan 25 13:50:44 2019 +0000
+++ b/src/hotspot/share/gc/shared/weakProcessorPhases.hpp Tue Jan 29 17:42:58 2019 +0000
@@ -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
@@ -44,6 +44,7 @@
// OopStorage phases.
jni,
+ stringtable,
vm
};
@@ -65,6 +66,8 @@
static const char* description(Phase phase);
static Processor processor(Phase phase); // Precondition: is_serial(phase)
static OopStorage* oop_storage(Phase phase); // Precondition: is_oop_storage(phase)
+
+ static bool is_stringtable(Phase phase);
};
typedef WeakProcessorPhases::Phase WeakProcessorPhase;
--- a/src/hotspot/share/gc/shenandoah/c2/shenandoahBarrierSetC2.cpp Fri Jan 25 13:50:44 2019 +0000
+++ b/src/hotspot/share/gc/shenandoah/c2/shenandoahBarrierSetC2.cpp Tue Jan 29 17:42:58 2019 +0000
@@ -777,11 +777,19 @@
if (adr->bottom_type()->is_ptr_to_narrowoop()) {
Node *newval_enc = kit->gvn().transform(new EncodePNode(new_val, new_val->bottom_type()->make_narrowoop()));
Node *oldval_enc = kit->gvn().transform(new EncodePNode(expected_val, expected_val->bottom_type()->make_narrowoop()));
- load_store = kit->gvn().transform(new ShenandoahCompareAndExchangeNNode(kit->control(), mem, adr, newval_enc, oldval_enc, adr_type, value_type->make_narrowoop(), mo));
+ if (ShenandoahCASBarrier) {
+ load_store = kit->gvn().transform(new ShenandoahCompareAndExchangeNNode(kit->control(), mem, adr, newval_enc, oldval_enc, adr_type, value_type->make_narrowoop(), mo));
+ } else {
+ load_store = kit->gvn().transform(new CompareAndExchangeNNode(kit->control(), mem, adr, newval_enc, oldval_enc, adr_type, value_type->make_narrowoop(), mo));
+ }
} else
#endif
{
- load_store = kit->gvn().transform(new ShenandoahCompareAndExchangePNode(kit->control(), mem, adr, new_val, expected_val, adr_type, value_type->is_oopptr(), mo));
+ if (ShenandoahCASBarrier) {
+ load_store = kit->gvn().transform(new ShenandoahCompareAndExchangePNode(kit->control(), mem, adr, new_val, expected_val, adr_type, value_type->is_oopptr(), mo));
+ } else {
+ load_store = kit->gvn().transform(new CompareAndExchangePNode(kit->control(), mem, adr, new_val, expected_val, adr_type, value_type->is_oopptr(), mo));
+ }
}
access.set_raw_access(load_store);
@@ -815,18 +823,34 @@
if (adr->bottom_type()->is_ptr_to_narrowoop()) {
Node *newval_enc = kit->gvn().transform(new EncodePNode(new_val, new_val->bottom_type()->make_narrowoop()));
Node *oldval_enc = kit->gvn().transform(new EncodePNode(expected_val, expected_val->bottom_type()->make_narrowoop()));
- if (is_weak_cas) {
- load_store = kit->gvn().transform(new ShenandoahWeakCompareAndSwapNNode(kit->control(), mem, adr, newval_enc, oldval_enc, mo));
+ if (ShenandoahCASBarrier) {
+ if (is_weak_cas) {
+ load_store = kit->gvn().transform(new ShenandoahWeakCompareAndSwapNNode(kit->control(), mem, adr, newval_enc, oldval_enc, mo));
+ } else {
+ load_store = kit->gvn().transform(new ShenandoahCompareAndSwapNNode(kit->control(), mem, adr, newval_enc, oldval_enc, mo));
+ }
} else {
- load_store = kit->gvn().transform(new ShenandoahCompareAndSwapNNode(kit->control(), mem, adr, newval_enc, oldval_enc, mo));
+ if (is_weak_cas) {
+ load_store = kit->gvn().transform(new WeakCompareAndSwapNNode(kit->control(), mem, adr, newval_enc, oldval_enc, mo));
+ } else {
+ load_store = kit->gvn().transform(new CompareAndSwapNNode(kit->control(), mem, adr, newval_enc, oldval_enc, mo));
+ }
}
} else
#endif
{
- if (is_weak_cas) {
- load_store = kit->gvn().transform(new ShenandoahWeakCompareAndSwapPNode(kit->control(), mem, adr, new_val, expected_val, mo));
+ if (ShenandoahCASBarrier) {
+ if (is_weak_cas) {
+ load_store = kit->gvn().transform(new ShenandoahWeakCompareAndSwapPNode(kit->control(), mem, adr, new_val, expected_val, mo));
+ } else {
+ load_store = kit->gvn().transform(new ShenandoahCompareAndSwapPNode(kit->control(), mem, adr, new_val, expected_val, mo));
+ }
} else {
- load_store = kit->gvn().transform(new ShenandoahCompareAndSwapPNode(kit->control(), mem, adr, new_val, expected_val, mo));
+ if (is_weak_cas) {
+ load_store = kit->gvn().transform(new WeakCompareAndSwapPNode(kit->control(), mem, adr, new_val, expected_val, mo));
+ } else {
+ load_store = kit->gvn().transform(new CompareAndSwapPNode(kit->control(), mem, adr, new_val, expected_val, mo));
+ }
}
}
access.set_raw_access(load_store);
--- a/src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp Fri Jan 25 13:50:44 2019 +0000
+++ b/src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp Tue Jan 29 17:42:58 2019 +0000
@@ -1923,8 +1923,7 @@
ShenandoahPhaseTimings::full_gc_purge_par :
ShenandoahPhaseTimings::purge_par);
uint active = _workers->active_workers();
- StringDedupUnlinkOrOopsDoClosure dedup_cl(is_alive, NULL);
- ParallelCleaningTask unlink_task(is_alive, &dedup_cl, active, purged_class);
+ ParallelCleaningTask unlink_task(is_alive, active, purged_class, true);
_workers->run_task(&unlink_task);
}
--- a/src/hotspot/share/gc/shenandoah/shenandoahRootProcessor.cpp Fri Jan 25 13:50:44 2019 +0000
+++ b/src/hotspot/share/gc/shenandoah/shenandoahRootProcessor.cpp Tue Jan 29 17:42:58 2019 +0000
@@ -78,7 +78,6 @@
WeakProcessor::oops_do(oops);
ObjectSynchronizer::oops_do(oops);
SystemDictionary::oops_do(oops);
- StringTable::oops_do(oops);
if (ShenandoahStringDedup::is_enabled()) {
ShenandoahStringDedup::oops_do_slow(oops);
@@ -209,13 +208,6 @@
ObjectSynchronizer::oops_do(strong_roots);
}
}
-
- // All threads execute the following. A specific chunk of buckets
- // from the StringTable are the individual tasks.
- if (weak_roots != NULL) {
- ShenandoahWorkerTimingsTracker timer(worker_times, ShenandoahPhaseTimings::StringTableRoots, worker_id);
- StringTable::possibly_parallel_oops_do(&_par_state_string, weak_roots);
- }
}
uint ShenandoahRootProcessor::n_workers() const {
--- a/src/hotspot/share/gc/z/c1/zBarrierSetC1.cpp Fri Jan 25 13:50:44 2019 +0000
+++ b/src/hotspot/share/gc/z/c1/zBarrierSetC1.cpp Tue Jan 29 17:42:58 2019 +0000
@@ -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
@@ -36,24 +36,17 @@
_ref_addr(access.resolved_addr()),
_ref(ref),
_tmp(LIR_OprFact::illegalOpr),
- _patch_info(access.patch_emit_info()),
_runtime_stub(runtime_stub) {
+ assert(_ref_addr->is_address(), "Must be an address");
+ assert(_ref->is_register(), "Must be a register");
+
// Allocate tmp register if needed
- if (!_ref_addr->is_register()) {
- assert(_ref_addr->is_address(), "Must be an address");
- if (_ref_addr->as_address_ptr()->index()->is_valid() ||
- _ref_addr->as_address_ptr()->disp() != 0) {
- // Has index or displacement, need tmp register to load address into
- _tmp = access.gen()->new_pointer_register();
- } else {
- // No index or displacement, address available in base register
- _ref_addr = _ref_addr->as_address_ptr()->base();
- }
+ if (_ref_addr->as_address_ptr()->index()->is_valid() ||
+ _ref_addr->as_address_ptr()->disp() != 0) {
+ // Has index or displacement, need tmp register to load address into
+ _tmp = access.gen()->new_pointer_register();
}
-
- assert(_ref->is_register(), "Must be a register");
- assert(_ref_addr->is_register() != _tmp->is_register(), "Only one should be a register");
}
DecoratorSet ZLoadBarrierStubC1::decorators() const {
@@ -72,28 +65,14 @@
return _tmp;
}
-LIR_PatchCode ZLoadBarrierStubC1::patch_code() const {
- return (_decorators & C1_NEEDS_PATCHING) != 0 ? lir_patch_normal : lir_patch_none;
-}
-
-CodeEmitInfo*& ZLoadBarrierStubC1::patch_info() {
- return _patch_info;
-}
-
address ZLoadBarrierStubC1::runtime_stub() const {
return _runtime_stub;
}
void ZLoadBarrierStubC1::visit(LIR_OpVisitState* visitor) {
- if (_patch_info != NULL) {
- visitor->do_slow_case(_patch_info);
- } else {
- visitor->do_slow_case();
- }
-
+ visitor->do_slow_case();
visitor->do_input(_ref_addr);
visitor->do_output(_ref);
-
if (_tmp->is_valid()) {
visitor->do_temp(_tmp);
}
@@ -174,6 +153,14 @@
__ branch_destination(stub->continuation());
}
+LIR_Opr ZBarrierSetC1::resolve_address(LIRAccess& access, bool resolve_in_register) {
+ // We must resolve in register when patching. This is to avoid
+ // having a patch area in the load barrier stub, since the call
+ // into the runtime to patch will not have the proper oop map.
+ const bool patch_before_barrier = barrier_needed(access) && (access.decorators() & C1_NEEDS_PATCHING) != 0;
+ return BarrierSetC1::resolve_address(access, resolve_in_register || patch_before_barrier);
+}
+
#undef __
void ZBarrierSetC1::load_at_resolved(LIRAccess& access, LIR_Opr result) {
--- a/src/hotspot/share/gc/z/c1/zBarrierSetC1.hpp Fri Jan 25 13:50:44 2019 +0000
+++ b/src/hotspot/share/gc/z/c1/zBarrierSetC1.hpp Tue Jan 29 17:42:58 2019 +0000
@@ -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
@@ -32,12 +32,11 @@
class ZLoadBarrierStubC1 : public CodeStub {
private:
- DecoratorSet _decorators;
- LIR_Opr _ref_addr;
- LIR_Opr _ref;
- LIR_Opr _tmp;
- CodeEmitInfo* _patch_info;
- address _runtime_stub;
+ DecoratorSet _decorators;
+ LIR_Opr _ref_addr;
+ LIR_Opr _ref;
+ LIR_Opr _tmp;
+ address _runtime_stub;
public:
ZLoadBarrierStubC1(LIRAccess& access, LIR_Opr ref, address runtime_stub);
@@ -46,8 +45,6 @@
LIR_Opr ref() const;
LIR_Opr ref_addr() const;
LIR_Opr tmp() const;
- LIR_PatchCode patch_code() const;
- CodeEmitInfo*& patch_info();
address runtime_stub() const;
virtual void emit_code(LIR_Assembler* ce);
@@ -67,6 +64,7 @@
void load_barrier(LIRAccess& access, LIR_Opr result) const;
protected:
+ virtual LIR_Opr resolve_address(LIRAccess& access, bool resolve_in_register);
virtual void load_at_resolved(LIRAccess& access, LIR_Opr result);
virtual LIR_Opr atomic_xchg_at_resolved(LIRAccess& access, LIRItem& value);
virtual LIR_Opr atomic_cmpxchg_at_resolved(LIRAccess& access, LIRItem& cmp_value, LIRItem& new_value);
--- a/src/hotspot/share/gc/z/zDriver.cpp Fri Jan 25 13:50:44 2019 +0000
+++ b/src/hotspot/share/gc/z/zDriver.cpp Tue Jan 29 17:42:58 2019 +0000
@@ -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
@@ -24,7 +24,6 @@
#include "precompiled.hpp"
#include "gc/shared/gcId.hpp"
#include "gc/shared/gcLocker.hpp"
-#include "gc/shared/gcVMOperations.hpp"
#include "gc/shared/isGCActiveMark.hpp"
#include "gc/z/zCollectedHeap.hpp"
#include "gc/z/zDriver.hpp"
@@ -45,7 +44,6 @@
static const ZStatPhaseConcurrent ZPhaseConcurrentProcessNonStrongReferences("Concurrent Process Non-Strong References");
static const ZStatPhaseConcurrent ZPhaseConcurrentResetRelocationSet("Concurrent Reset Relocation Set");
static const ZStatPhaseConcurrent ZPhaseConcurrentDestroyDetachedPages("Concurrent Destroy Detached Pages");
-static const ZStatPhasePause ZPhasePauseVerify("Pause Verify");
static const ZStatPhaseConcurrent ZPhaseConcurrentSelectRelocationSet("Concurrent Select Relocation Set");
static const ZStatPhaseConcurrent ZPhaseConcurrentPrepareRelocationSet("Concurrent Prepare Relocation Set");
static const ZStatPhasePause ZPhasePauseRelocateStart("Pause Relocate Start");
@@ -53,41 +51,26 @@
static const ZStatCriticalPhase ZCriticalPhaseGCLockerStall("GC Locker Stall", false /* verbose */);
static const ZStatSampler ZSamplerJavaThreads("System", "Java Threads", ZStatUnitThreads);
-class ZOperationClosure : public StackObj {
+class VM_ZOperation : public VM_Operation {
+private:
+ const uint _gc_id;
+ bool _gc_locked;
+ bool _success;
+
public:
- virtual const char* name() const = 0;
+ VM_ZOperation() :
+ _gc_id(GCId::current()),
+ _gc_locked(false),
+ _success(false) {}
virtual bool needs_inactive_gc_locker() const {
- // An inactive GC locker is needed in operations where we change the good
- // mask or move objects. Changing the good mask will invalidate all oops,
+ // An inactive GC locker is needed in operations where we change the bad
+ // mask or move objects. Changing the bad mask will invalidate all oops,
// which makes it conceptually the same thing as moving all objects.
return false;
}
virtual bool do_operation() = 0;
-};
-
-class VM_ZOperation : public VM_Operation {
-private:
- ZOperationClosure* _cl;
- uint _gc_id;
- bool _gc_locked;
- bool _success;
-
-public:
- VM_ZOperation(ZOperationClosure* cl) :
- _cl(cl),
- _gc_id(GCId::current()),
- _gc_locked(false),
- _success(false) {}
-
- virtual VMOp_Type type() const {
- return VMOp_ZOperation;
- }
-
- virtual const char* name() const {
- return _cl->name();
- }
virtual bool doit_prologue() {
Heap_lock->lock();
@@ -95,31 +78,28 @@
}
virtual void doit() {
- assert(SafepointSynchronize::is_at_safepoint(), "Should be at safepoint");
-
- ZStatSample(ZSamplerJavaThreads, Threads::number_of_threads());
-
- // JVMTI support
- SvcGCMarker sgcm(SvcGCMarker::CONCURRENT);
+ // Abort if GC locker state is incompatible
+ if (needs_inactive_gc_locker() && GCLocker::check_active_before_gc()) {
+ _gc_locked = true;
+ return;
+ }
- // Setup GC id
- GCIdMark gcid(_gc_id);
+ // Setup GC id and active marker
+ GCIdMark gc_id_mark(_gc_id);
+ IsGCActiveMark gc_active_mark;
- if (_cl->needs_inactive_gc_locker() && GCLocker::check_active_before_gc()) {
- // GC locker is active, bail out
- _gc_locked = true;
- } else {
- // Execute operation
- IsGCActiveMark mark;
- _success = _cl->do_operation();
- }
+ // Execute operation
+ _success = do_operation();
+
+ // Update statistics
+ ZStatSample(ZSamplerJavaThreads, Threads::number_of_threads());
}
virtual void doit_epilogue() {
Heap_lock->unlock();
}
- bool gc_locked() {
+ bool gc_locked() const {
return _gc_locked;
}
@@ -169,10 +149,10 @@
return false;
}
-class ZMarkStartClosure : public ZOperationClosure {
+class VM_ZMarkStart : public VM_ZOperation {
public:
- virtual const char* name() const {
- return "ZMarkStart";
+ virtual VMOp_Type type() const {
+ return VMOp_ZMarkStart;
}
virtual bool needs_inactive_gc_locker() const {
@@ -198,37 +178,23 @@
}
};
-class ZMarkEndClosure : public ZOperationClosure {
+class VM_ZMarkEnd : public VM_ZOperation {
public:
- virtual const char* name() const {
- return "ZMarkEnd";
+ virtual VMOp_Type type() const {
+ return VMOp_ZMarkEnd;
}
virtual bool do_operation() {
ZStatTimer timer(ZPhasePauseMarkEnd);
ZServiceabilityMarkEndTracer tracer;
-
return ZHeap::heap()->mark_end();
}
};
-class ZVerifyClosure : public ZOperationClosure {
+class VM_ZRelocateStart : public VM_ZOperation {
public:
- virtual const char* name() const {
- return "ZVerify";
- }
-
- virtual bool do_operation() {
- ZStatTimer timer(ZPhasePauseVerify);
- Universe::verify();
- return true;
- }
-};
-
-class ZRelocateStartClosure : public ZOperationClosure {
-public:
- virtual const char* name() const {
- return "ZRelocateStart";
+ virtual VMOp_Type type() const {
+ return VMOp_ZRelocateStart;
}
virtual bool needs_inactive_gc_locker() const {
@@ -238,7 +204,6 @@
virtual bool do_operation() {
ZStatTimer timer(ZPhasePauseRelocateStart);
ZServiceabilityRelocateStartTracer tracer;
-
ZHeap::heap()->relocate_start();
return true;
}
@@ -251,24 +216,6 @@
create_and_start();
}
-bool ZDriver::vm_operation(ZOperationClosure* cl) {
- for (;;) {
- VM_ZOperation op(cl);
- VMThread::execute(&op);
- if (op.gc_locked()) {
- // Wait for GC to become unlocked and restart the VM operation
- ZStatTimer timer(ZCriticalPhaseGCLockerStall);
- _gc_locker_port.wait();
- continue;
- }
-
- // Notify VM operation completed
- _gc_locker_port.ack();
-
- return op.success();
- }
-}
-
void ZDriver::collect(GCCause::Cause cause) {
switch (cause) {
case GCCause::_wb_young_gc:
@@ -306,19 +253,96 @@
}
}
-GCCause::Cause ZDriver::start_gc_cycle() {
- // Wait for GC request
- return _gc_cycle_port.receive();
+template <typename T>
+bool ZDriver::pause() {
+ for (;;) {
+ T op;
+ VMThread::execute(&op);
+ if (op.gc_locked()) {
+ // Wait for GC to become unlocked and restart the VM operation
+ ZStatTimer timer(ZCriticalPhaseGCLockerStall);
+ _gc_locker_port.wait();
+ continue;
+ }
+
+ // Notify VM operation completed
+ _gc_locker_port.ack();
+
+ return op.success();
+ }
+}
+
+void ZDriver::pause_mark_start() {
+ pause<VM_ZMarkStart>();
+}
+
+void ZDriver::concurrent_mark() {
+ ZStatTimer timer(ZPhaseConcurrentMark);
+ ZHeap::heap()->mark(true /* initial */);
+}
+
+bool ZDriver::pause_mark_end() {
+ return pause<VM_ZMarkEnd>();
+}
+
+void ZDriver::concurrent_mark_continue() {
+ ZStatTimer timer(ZPhaseConcurrentMarkContinue);
+ ZHeap::heap()->mark(false /* initial */);
+}
+
+void ZDriver::concurrent_process_non_strong_references() {
+ ZStatTimer timer(ZPhaseConcurrentProcessNonStrongReferences);
+ ZHeap::heap()->process_non_strong_references();
}
-class ZDriverCycleScope : public StackObj {
+void ZDriver::concurrent_reset_relocation_set() {
+ ZStatTimer timer(ZPhaseConcurrentResetRelocationSet);
+ ZHeap::heap()->reset_relocation_set();
+}
+
+void ZDriver::concurrent_destroy_detached_pages() {
+ ZStatTimer timer(ZPhaseConcurrentDestroyDetachedPages);
+ ZHeap::heap()->destroy_detached_pages();
+}
+
+void ZDriver::pause_verify() {
+ if (VerifyBeforeGC || VerifyDuringGC || VerifyAfterGC) {
+ VM_Verify op;
+ VMThread::execute(&op);
+ }
+}
+
+void ZDriver::concurrent_select_relocation_set() {
+ ZStatTimer timer(ZPhaseConcurrentSelectRelocationSet);
+ ZHeap::heap()->select_relocation_set();
+}
+
+void ZDriver::concurrent_prepare_relocation_set() {
+ ZStatTimer timer(ZPhaseConcurrentPrepareRelocationSet);
+ ZHeap::heap()->prepare_relocation_set();
+}
+
+void ZDriver::pause_relocate_start() {
+ pause<VM_ZRelocateStart>();
+}
+
+void ZDriver::concurrent_relocate() {
+ ZStatTimer timer(ZPhaseConcurrentRelocated);
+ ZHeap::heap()->relocate();
+}
+
+void ZDriver::check_out_of_memory() {
+ ZHeap::heap()->check_out_of_memory();
+}
+
+class ZDriverGCScope : public StackObj {
private:
GCIdMark _gc_id;
GCCauseSetter _gc_cause_setter;
ZStatTimer _timer;
public:
- ZDriverCycleScope(GCCause::Cause cause) :
+ ZDriverGCScope(GCCause::Cause cause) :
_gc_id(),
_gc_cause_setter(ZCollectedHeap::heap(), cause),
_timer(ZPhaseCycle) {
@@ -326,7 +350,7 @@
ZStatCycle::at_start();
}
- ~ZDriverCycleScope() {
+ ~ZDriverGCScope() {
// Calculate boost factor
const double boost_factor = (double)ZHeap::heap()->nconcurrent_worker_threads() /
(double)ZHeap::heap()->nconcurrent_no_boost_worker_threads();
@@ -339,96 +363,63 @@
}
};
-void ZDriver::run_gc_cycle(GCCause::Cause cause) {
- ZDriverCycleScope scope(cause);
+void ZDriver::gc(GCCause::Cause cause) {
+ ZDriverGCScope scope(cause);
// Phase 1: Pause Mark Start
- {
- ZMarkStartClosure cl;
- vm_operation(&cl);
- }
+ pause_mark_start();
// Phase 2: Concurrent Mark
- {
- ZStatTimer timer(ZPhaseConcurrentMark);
- ZHeap::heap()->mark(true /* initial */);
- }
+ concurrent_mark();
// Phase 3: Pause Mark End
- {
- ZMarkEndClosure cl;
- while (!vm_operation(&cl)) {
- // Phase 3.5: Concurrent Mark Continue
- ZStatTimer timer(ZPhaseConcurrentMarkContinue);
- ZHeap::heap()->mark(false /* initial */);
- }
+ while (!pause_mark_end()) {
+ // Phase 3.5: Concurrent Mark Continue
+ concurrent_mark_continue();
}
// Phase 4: Concurrent Process Non-Strong References
- {
- ZStatTimer timer(ZPhaseConcurrentProcessNonStrongReferences);
- ZHeap::heap()->process_non_strong_references();
- }
+ concurrent_process_non_strong_references();
// Phase 5: Concurrent Reset Relocation Set
- {
- ZStatTimer timer(ZPhaseConcurrentResetRelocationSet);
- ZHeap::heap()->reset_relocation_set();
- }
+ concurrent_reset_relocation_set();
// Phase 6: Concurrent Destroy Detached Pages
- {
- ZStatTimer timer(ZPhaseConcurrentDestroyDetachedPages);
- ZHeap::heap()->destroy_detached_pages();
- }
+ concurrent_destroy_detached_pages();
// Phase 7: Pause Verify
- if (VerifyBeforeGC || VerifyDuringGC || VerifyAfterGC) {
- ZVerifyClosure cl;
- vm_operation(&cl);
- }
+ pause_verify();
// Phase 8: Concurrent Select Relocation Set
- {
- ZStatTimer timer(ZPhaseConcurrentSelectRelocationSet);
- ZHeap::heap()->select_relocation_set();
- }
+ concurrent_select_relocation_set();
// Phase 9: Concurrent Prepare Relocation Set
- {
- ZStatTimer timer(ZPhaseConcurrentPrepareRelocationSet);
- ZHeap::heap()->prepare_relocation_set();
- }
+ concurrent_prepare_relocation_set();
// Phase 10: Pause Relocate Start
- {
- ZRelocateStartClosure cl;
- vm_operation(&cl);
- }
+ pause_relocate_start();
// Phase 11: Concurrent Relocate
- {
- ZStatTimer timer(ZPhaseConcurrentRelocated);
- ZHeap::heap()->relocate();
- }
-}
-
-void ZDriver::end_gc_cycle() {
- // Notify GC cycle completed
- _gc_cycle_port.ack();
-
- // Check for out of memory condition
- ZHeap::heap()->check_out_of_memory();
+ concurrent_relocate();
}
void ZDriver::run_service() {
// Main loop
while (!should_terminate()) {
- const GCCause::Cause cause = start_gc_cycle();
- if (cause != GCCause::_no_gc) {
- run_gc_cycle(cause);
- end_gc_cycle();
+ // Wait for GC request
+ const GCCause::Cause cause = _gc_cycle_port.receive();
+ if (cause == GCCause::_no_gc) {
+ continue;
}
+
+ // Run GC
+ gc(cause);
+
+ // Notify GC completed
+ _gc_cycle_port.ack();
+
+ // Check for out of memory condition
+ check_out_of_memory();
}
}
--- a/src/hotspot/share/gc/z/zDriver.hpp Fri Jan 25 13:50:44 2019 +0000
+++ b/src/hotspot/share/gc/z/zDriver.hpp Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2017, 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
@@ -28,18 +28,31 @@
#include "gc/shared/gcCause.hpp"
#include "gc/z/zMessagePort.hpp"
-class ZOperationClosure;
+class VM_ZOperation;
class ZDriver : public ConcurrentGCThread {
private:
ZMessagePort<GCCause::Cause> _gc_cycle_port;
ZRendezvousPort _gc_locker_port;
- bool vm_operation(ZOperationClosure* cl);
+ template <typename T> bool pause();
- GCCause::Cause start_gc_cycle();
- void run_gc_cycle(GCCause::Cause cause);
- void end_gc_cycle();
+ void pause_mark_start();
+ void concurrent_mark();
+ bool pause_mark_end();
+ void concurrent_mark_continue();
+ void concurrent_process_non_strong_references();
+ void concurrent_reset_relocation_set();
+ void concurrent_destroy_detached_pages();
+ void pause_verify();
+ void concurrent_select_relocation_set();
+ void concurrent_prepare_relocation_set();
+ void pause_relocate_start();
+ void concurrent_relocate();
+
+ void check_out_of_memory();
+
+ void gc(GCCause::Cause cause);
protected:
virtual void run_service();
--- a/src/hotspot/share/gc/z/zNMethodTable.cpp Fri Jan 25 13:50:44 2019 +0000
+++ b/src/hotspot/share/gc/z/zNMethodTable.cpp Tue Jan 29 17:42:58 2019 +0000
@@ -264,21 +264,17 @@
}
}
-bool ZNMethodTable::unregister_entry(ZNMethodTableEntry* table, size_t size, nmethod* nm) {
+void ZNMethodTable::unregister_entry(ZNMethodTableEntry* table, size_t size, nmethod* nm) {
if (size == 0) {
// Table is empty
- return false;
+ return;
}
size_t index = first_index(nm, size);
for (;;) {
const ZNMethodTableEntry table_entry = table[index];
-
- if (!table_entry.registered() && !table_entry.unregistered()) {
- // Entry not found
- return false;
- }
+ assert(table_entry.registered() || table_entry.unregistered(), "Entry not found");
if (table_entry.registered() && table_entry.method() == nm) {
// Remove entry
@@ -287,7 +283,7 @@
// Destroy GC data
ZNMethodData::destroy(gc_data(nm));
set_gc_data(nm, NULL);
- return true;
+ return;
}
index = next_index(index, size);
@@ -451,8 +447,6 @@
return;
}
- assert(CodeCache_lock->owned_by_self(), "Lock must be held");
-
while (_iter_table != NULL) {
MutexUnlockerEx mu(CodeCache_lock, Mutex::_no_safepoint_check_flag);
os::naked_short_sleep(1);
@@ -460,6 +454,7 @@
}
void ZNMethodTable::unregister_nmethod(nmethod* nm) {
+ assert(CodeCache_lock->owned_by_self(), "Lock must be held");
ResourceMark rm;
sweeper_wait_for_iteration();
@@ -467,14 +462,9 @@
log_unregister(nm);
// Remove entry
- if (unregister_entry(_table, _size, nm)) {
- // Entry was unregistered. When unregister_entry() instead returns
- // false the nmethod was not in the table (because it didn't have
- // any oops) so we do not want to decrease the number of registered
- // entries in that case.
- _nregistered--;
- _nunregistered++;
- }
+ unregister_entry(_table, _size, nm);
+ _nunregistered++;
+ _nregistered--;
}
void ZNMethodTable::disarm_nmethod(nmethod* nm) {
--- a/src/hotspot/share/gc/z/zNMethodTable.hpp Fri Jan 25 13:50:44 2019 +0000
+++ b/src/hotspot/share/gc/z/zNMethodTable.hpp Tue Jan 29 17:42:58 2019 +0000
@@ -57,7 +57,7 @@
static void sweeper_wait_for_iteration();
static bool register_entry(ZNMethodTableEntry* table, size_t size, ZNMethodTableEntry entry);
- static bool unregister_entry(ZNMethodTableEntry* table, size_t size, nmethod* nm);
+ static void unregister_entry(ZNMethodTableEntry* table, size_t size, nmethod* nm);
static void rebuild(size_t new_size);
static void rebuild_if_needed();
--- a/src/hotspot/share/gc/z/zReferenceProcessor.cpp Fri Jan 25 13:50:44 2019 +0000
+++ b/src/hotspot/share/gc/z/zReferenceProcessor.cpp Tue Jan 29 17:42:58 2019 +0000
@@ -39,45 +39,11 @@
static const ZStatSubPhase ZSubPhaseConcurrentReferencesProcess("Concurrent References Process");
static const ZStatSubPhase ZSubPhaseConcurrentReferencesEnqueue("Concurrent References Enqueue");
-ZReferenceProcessor::ZReferenceProcessor(ZWorkers* workers) :
- _workers(workers),
- _soft_reference_policy(NULL),
- _encountered_count(),
- _discovered_count(),
- _enqueued_count(),
- _discovered_list(NULL),
- _pending_list(NULL),
- _pending_list_tail(_pending_list.addr()) {}
-
-void ZReferenceProcessor::set_soft_reference_policy(bool clear) {
- static AlwaysClearPolicy always_clear_policy;
- static LRUMaxHeapPolicy lru_max_heap_policy;
-
- if (clear) {
- log_info(gc, ref)("Clearing All Soft References");
- _soft_reference_policy = &always_clear_policy;
- } else {
- _soft_reference_policy = &lru_max_heap_policy;
- }
-
- _soft_reference_policy->setup();
+static ReferenceType reference_type(oop reference) {
+ return InstanceKlass::cast(reference->klass())->reference_type();
}
-void ZReferenceProcessor::update_soft_reference_clock() const {
- const jlong now = os::javaTimeNanos() / NANOSECS_PER_MILLISEC;
- java_lang_ref_SoftReference::set_clock(now);
-}
-
-bool ZReferenceProcessor::is_inactive_final_reference(oop obj, ReferenceType type) const {
- // A non-null next field for a FinalReference means the reference is inactive.
- return (type == REF_FINAL) && (java_lang_ref_Reference::next(obj) != NULL);
-}
-
-ReferenceType ZReferenceProcessor::reference_type(oop obj) const {
- return InstanceKlass::cast(obj->klass())->reference_type();
-}
-
-const char* ZReferenceProcessor::reference_type_name(ReferenceType type) const {
+static const char* reference_type_name(ReferenceType type) {
switch (type) {
case REF_SOFT:
return "Soft";
@@ -97,53 +63,134 @@
}
}
-volatile oop* ZReferenceProcessor::reference_referent_addr(oop obj) const {
- return (volatile oop*)java_lang_ref_Reference::referent_addr_raw(obj);
+static volatile oop* reference_referent_addr(oop reference) {
+ return (volatile oop*)java_lang_ref_Reference::referent_addr_raw(reference);
+}
+
+static oop reference_referent(oop reference) {
+ return *reference_referent_addr(reference);
+}
+
+static void reference_set_referent(oop reference, oop referent) {
+ java_lang_ref_Reference::set_referent_raw(reference, referent);
+}
+
+static oop* reference_discovered_addr(oop reference) {
+ return (oop*)java_lang_ref_Reference::discovered_addr_raw(reference);
+}
+
+static oop reference_discovered(oop reference) {
+ return *reference_discovered_addr(reference);
+}
+
+static void reference_set_discovered(oop reference, oop discovered) {
+ java_lang_ref_Reference::set_discovered_raw(reference, discovered);
+}
+
+static oop* reference_next_addr(oop reference) {
+ return (oop*)java_lang_ref_Reference::next_addr_raw(reference);
+}
+
+static oop reference_next(oop reference) {
+ return *reference_next_addr(reference);
+}
+
+static void reference_set_next(oop reference, oop next) {
+ java_lang_ref_Reference::set_next_raw(reference, next);
+}
+
+static void soft_reference_update_clock() {
+ const jlong now = os::javaTimeNanos() / NANOSECS_PER_MILLISEC;
+ java_lang_ref_SoftReference::set_clock(now);
}
-oop ZReferenceProcessor::reference_referent(oop obj) const {
- return *reference_referent_addr(obj);
+ZReferenceProcessor::ZReferenceProcessor(ZWorkers* workers) :
+ _workers(workers),
+ _soft_reference_policy(NULL),
+ _encountered_count(),
+ _discovered_count(),
+ _enqueued_count(),
+ _discovered_list(NULL),
+ _pending_list(NULL),
+ _pending_list_tail(_pending_list.addr()) {}
+
+void ZReferenceProcessor::set_soft_reference_policy(bool clear) {
+ static AlwaysClearPolicy always_clear_policy;
+ static LRUMaxHeapPolicy lru_max_heap_policy;
+
+ if (clear) {
+ log_info(gc, ref)("Clearing All SoftReferences");
+ _soft_reference_policy = &always_clear_policy;
+ } else {
+ _soft_reference_policy = &lru_max_heap_policy;
+ }
+
+ _soft_reference_policy->setup();
}
-bool ZReferenceProcessor::is_referent_strongly_alive_or_null(oop obj, ReferenceType type) const {
- // Check if the referent is strongly alive or null, in which case we don't want to
- // discover the reference. It can only be null if the application called
- // Reference.enqueue() or Reference.clear().
- //
+bool ZReferenceProcessor::is_inactive(oop reference, oop referent, ReferenceType type) const {
+ if (type == REF_FINAL) {
+ // A FinalReference is inactive if its next field is non-null. An application can't
+ // call enqueue() or clear() on a FinalReference.
+ return reference_next(reference) != NULL;
+ } else {
+ // A non-FinalReference is inactive if the referent is null. The referent can only
+ // be null if the application called Reference.enqueue() or Reference.clear().
+ return referent == NULL;
+ }
+}
+
+bool ZReferenceProcessor::is_strongly_live(oop referent) const {
+ return ZHeap::heap()->is_object_strongly_live(ZOop::to_address(referent));
+}
+
+bool ZReferenceProcessor::is_softly_live(oop reference, ReferenceType type) const {
+ if (type != REF_SOFT) {
+ // Not a SoftReference
+ return false;
+ }
+
+ // Ask SoftReference policy
+ const jlong clock = java_lang_ref_SoftReference::clock();
+ assert(clock != 0, "Clock not initialized");
+ assert(_soft_reference_policy != NULL, "Policy not initialized");
+ return !_soft_reference_policy->should_clear_reference(reference, clock);
+}
+
+bool ZReferenceProcessor::should_discover(oop reference, ReferenceType type) const {
+ volatile oop* const referent_addr = reference_referent_addr(reference);
+ const oop referent = ZBarrier::weak_load_barrier_on_oop_field(referent_addr);
+
+ if (is_inactive(reference, referent, type)) {
+ return false;
+ }
+
+ if (is_strongly_live(referent)) {
+ return false;
+ }
+
+ if (is_softly_live(reference, type)) {
+ return false;
+ }
+
// PhantomReferences with finalizable marked referents should technically not have
// to be discovered. However, InstanceRefKlass::oop_oop_iterate_ref_processing()
// does not know about the finalizable mark concept, and will therefore mark
// referents in non-discovered PhantomReferences as strongly live. To prevent
// this, we always discover PhantomReferences with finalizable marked referents.
// They will automatically be dropped during the reference processing phase.
-
- volatile oop* const p = reference_referent_addr(obj);
- const oop o = ZBarrier::weak_load_barrier_on_oop_field(p);
- return o == NULL || ZHeap::heap()->is_object_strongly_live(ZOop::to_address(o));
+ return true;
}
-bool ZReferenceProcessor::is_referent_softly_alive(oop obj, ReferenceType type) const {
- if (type != REF_SOFT) {
- // Not a soft reference
- return false;
- }
-
- // Ask soft reference policy
- const jlong clock = java_lang_ref_SoftReference::clock();
- assert(clock != 0, "Clock not initialized");
- assert(_soft_reference_policy != NULL, "Policy not initialized");
- return !_soft_reference_policy->should_clear_reference(obj, clock);
-}
-
-bool ZReferenceProcessor::should_drop_reference(oop obj, ReferenceType type) const {
+bool ZReferenceProcessor::should_drop(oop reference, ReferenceType type) const {
// This check is racing with a call to Reference.clear() from the application.
// If the application clears the reference after this check it will still end
// up on the pending list, and there's nothing we can do about that without
// changing the Reference.clear() API. This check is also racing with a call
// to Reference.enqueue() from the application, which is unproblematic, since
// the application wants the reference to be enqueued anyway.
- const oop o = reference_referent(obj);
- if (o == NULL) {
+ const oop referent = reference_referent(reference);
+ if (referent == NULL) {
// Reference has been cleared, by a call to Reference.enqueue()
// or Reference.clear() from the application, which means we
// should drop the reference.
@@ -153,22 +200,14 @@
// Check if the referent is still alive, in which case we should
// drop the reference.
if (type == REF_PHANTOM) {
- return ZBarrier::is_alive_barrier_on_phantom_oop(o);
+ return ZBarrier::is_alive_barrier_on_phantom_oop(referent);
} else {
- return ZBarrier::is_alive_barrier_on_weak_oop(o);
+ return ZBarrier::is_alive_barrier_on_weak_oop(referent);
}
}
-bool ZReferenceProcessor::should_mark_referent(ReferenceType type) const {
- // Referents of final references (and its reachable sub graph) are
- // always marked finalizable during discovery. This avoids the problem
- // of later having to mark those objects if the referent is still final
- // reachable during processing.
- return type == REF_FINAL;
-}
-
-void ZReferenceProcessor::keep_referent_alive(oop obj, ReferenceType type) const {
- volatile oop* const p = reference_referent_addr(obj);
+void ZReferenceProcessor::keep_alive(oop reference, ReferenceType type) const {
+ volatile oop* const p = reference_referent_addr(reference);
if (type == REF_PHANTOM) {
ZBarrier::keep_alive_barrier_on_phantom_oop_field(p);
} else {
@@ -176,82 +215,86 @@
}
}
-bool ZReferenceProcessor::discover_reference(oop obj, ReferenceType type) {
+void ZReferenceProcessor::make_inactive(oop reference, ReferenceType type) const {
+ if (type == REF_FINAL) {
+ // Don't clear referent. It is needed by the Finalizer thread to make the call
+ // to finalize(). A FinalReference is instead made inactive by self-looping the
+ // next field. An application can't call FinalReference.enqueue(), so there is
+ // no race to worry about when setting the next field.
+ assert(reference_next(reference) == NULL, "Already inactive");
+ reference_set_next(reference, reference);
+ } else {
+ // Clear referent
+ reference_set_referent(reference, NULL);
+ }
+}
+
+void ZReferenceProcessor::discover(oop reference, ReferenceType type) {
+ log_trace(gc, ref)("Discovered Reference: " PTR_FORMAT " (%s)", p2i(reference), reference_type_name(type));
+
+ // Update statistics
+ _discovered_count.get()[type]++;
+
+ if (type == REF_FINAL) {
+ // Mark referent (and its reachable subgraph) finalizable. This avoids
+ // the problem of later having to mark those objects if the referent is
+ // still final reachable during processing.
+ volatile oop* const referent_addr = reference_referent_addr(reference);
+ ZBarrier::mark_barrier_on_oop_field(referent_addr, true /* finalizable */);
+ }
+
+ // Add reference to discovered list
+ assert(reference_discovered(reference) == NULL, "Already discovered");
+ oop* const list = _discovered_list.addr();
+ reference_set_discovered(reference, *list);
+ *list = reference;
+}
+
+bool ZReferenceProcessor::discover_reference(oop reference, ReferenceType type) {
if (!RegisterReferences) {
// Reference processing disabled
return false;
}
- log_trace(gc, ref)("Encountered Reference: " PTR_FORMAT " (%s)", p2i(obj), reference_type_name(type));
+ log_trace(gc, ref)("Encountered Reference: " PTR_FORMAT " (%s)", p2i(reference), reference_type_name(type));
// Update statistics
_encountered_count.get()[type]++;
- if (is_referent_strongly_alive_or_null(obj, type) ||
- is_inactive_final_reference(obj, type) ||
- is_referent_softly_alive(obj, type)) {
+ if (!should_discover(reference, type)) {
// Not discovered
return false;
}
- discover(obj, type);
+ discover(reference, type);
// Discovered
return true;
}
-void ZReferenceProcessor::discover(oop obj, ReferenceType type) {
- log_trace(gc, ref)("Discovered Reference: " PTR_FORMAT " (%s)", p2i(obj), reference_type_name(type));
-
- // Update statistics
- _discovered_count.get()[type]++;
-
- // Mark referent finalizable
- if (should_mark_referent(type)) {
- oop* const referent_addr = (oop*)java_lang_ref_Reference::referent_addr_raw(obj);
- ZBarrier::mark_barrier_on_oop_field(referent_addr, true /* finalizable */);
- }
-
- // Add reference to discovered list
- assert(java_lang_ref_Reference::discovered(obj) == NULL, "Already discovered");
- oop* const list = _discovered_list.addr();
- java_lang_ref_Reference::set_discovered(obj, *list);
- *list = obj;
-}
-
-oop ZReferenceProcessor::drop(oop obj, ReferenceType type) {
- log_trace(gc, ref)("Dropped Reference: " PTR_FORMAT " (%s)", p2i(obj), reference_type_name(type));
+oop ZReferenceProcessor::drop(oop reference, ReferenceType type) {
+ log_trace(gc, ref)("Dropped Reference: " PTR_FORMAT " (%s)", p2i(reference), reference_type_name(type));
// Keep referent alive
- keep_referent_alive(obj, type);
+ keep_alive(reference, type);
// Unlink and return next in list
- const oop next = java_lang_ref_Reference::discovered(obj);
- java_lang_ref_Reference::set_discovered(obj, NULL);
+ const oop next = reference_discovered(reference);
+ reference_set_discovered(reference, NULL);
return next;
}
-oop* ZReferenceProcessor::keep(oop obj, ReferenceType type) {
- log_trace(gc, ref)("Enqueued Reference: " PTR_FORMAT " (%s)", p2i(obj), reference_type_name(type));
+oop* ZReferenceProcessor::keep(oop reference, ReferenceType type) {
+ log_trace(gc, ref)("Enqueued Reference: " PTR_FORMAT " (%s)", p2i(reference), reference_type_name(type));
// Update statistics
_enqueued_count.get()[type]++;
- if (type != REF_FINAL) {
- // Clear referent
- java_lang_ref_Reference::set_referent(obj, NULL);
- } else {
- // For a FinalReference, don't clear the referent, because it is
- // needed for the finalize call. Instead, make the reference
- // inactive by self-looping the 'next' field. FinalReference
- // doesn't allow Reference.enqueue, so there's no race to worry
- // about when setting 'next'.
- assert(java_lang_ref_Reference::next(obj) == NULL, "enqueued FinalReference");
- java_lang_ref_Reference::set_next_raw(obj, obj);
- }
+ // Make reference inactive
+ make_inactive(reference, type);
// Return next in list
- return (oop*)java_lang_ref_Reference::discovered_addr_raw(obj);
+ return reference_discovered_addr(reference);
}
void ZReferenceProcessor::work() {
@@ -260,13 +303,13 @@
oop* p = list;
while (*p != NULL) {
- const oop obj = *p;
- const ReferenceType type = reference_type(obj);
+ const oop reference = *p;
+ const ReferenceType type = reference_type(reference);
- if (should_drop_reference(obj, type)) {
- *p = drop(obj, type);
+ if (should_drop(reference, type)) {
+ *p = drop(reference, type);
} else {
- p = keep(obj, type);
+ p = keep(reference, type);
}
}
@@ -390,8 +433,8 @@
ZReferenceProcessorTask task(this);
_workers->run_concurrent(&task);
- // Update soft reference clock
- update_soft_reference_clock();
+ // Update SoftReference clock
+ soft_reference_update_clock();
// Collect, log and trace statistics
collect_statistics();
--- a/src/hotspot/share/gc/z/zReferenceProcessor.hpp Fri Jan 25 13:50:44 2019 +0000
+++ b/src/hotspot/share/gc/z/zReferenceProcessor.hpp Tue Jan 29 17:42:58 2019 +0000
@@ -46,22 +46,19 @@
ZContended<oop> _pending_list;
oop* _pending_list_tail;
- void update_soft_reference_clock() const;
+ bool is_inactive(oop reference, oop referent, ReferenceType type) const;
+ bool is_strongly_live(oop referent) const;
+ bool is_softly_live(oop reference, ReferenceType type) const;
- ReferenceType reference_type(oop obj) const;
- const char* reference_type_name(ReferenceType type) const;
- volatile oop* reference_referent_addr(oop obj) const;
- oop reference_referent(oop obj) const;
- bool is_inactive_final_reference(oop obj, ReferenceType type) const;
- bool is_referent_strongly_alive_or_null(oop obj, ReferenceType type) const;
- bool is_referent_softly_alive(oop obj, ReferenceType type) const;
- bool should_drop_reference(oop obj, ReferenceType type) const;
- bool should_mark_referent(ReferenceType type) const;
- void keep_referent_alive(oop obj, ReferenceType type) const;
+ bool should_discover(oop reference, ReferenceType type) const;
+ bool should_drop(oop reference, ReferenceType type) const;
+ void keep_alive(oop reference, ReferenceType type) const;
+ void make_inactive(oop reference, ReferenceType type) const;
- void discover(oop obj, ReferenceType type);
- oop drop(oop obj, ReferenceType type);
- oop* keep(oop obj, ReferenceType type);
+ void discover(oop reference, ReferenceType type);
+
+ oop drop(oop reference, ReferenceType type);
+ oop* keep(oop reference, ReferenceType type);
bool is_empty() const;
--- a/src/hotspot/share/gc/z/zServiceability.hpp Fri Jan 25 13:50:44 2019 +0000
+++ b/src/hotspot/share/gc/z/zServiceability.hpp Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 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
@@ -25,6 +25,7 @@
#define SHARE_GC_Z_ZSERVICEABILITY_HPP
#include "gc/shared/collectorCounters.hpp"
+#include "gc/shared/gcVMOperations.hpp"
#include "memory/allocation.hpp"
#include "services/memoryManager.hpp"
#include "services/memoryPool.hpp"
@@ -88,12 +89,14 @@
template <bool IsGCStart, bool IsGCEnd>
class ZServiceabilityTracer : public StackObj {
private:
+ SvcGCMarker _svc_gc_marker;
ZServiceabilityMemoryUsageTracker _memory_usage_tracker;
ZServiceabilityManagerStatsTracer _manager_stats_tracer;
ZServiceabilityCountersTracer _counters_tracer;
public:
ZServiceabilityTracer() :
+ _svc_gc_marker(SvcGCMarker::CONCURRENT),
_memory_usage_tracker(),
_manager_stats_tracer(IsGCStart, IsGCEnd),
_counters_tracer() {}
--- a/src/hotspot/share/interpreter/bytecodeStream.hpp Fri Jan 25 13:50:44 2019 +0000
+++ b/src/hotspot/share/interpreter/bytecodeStream.hpp Tue Jan 29 17:42:58 2019 +0000
@@ -211,7 +211,6 @@
return _code;
}
- bool is_active_breakpoint() const { return Bytecodes::is_active_breakpoint_at(bcp()); }
Bytecodes::Code code() const { return _code; }
// Unsigned indices, widening
--- a/src/hotspot/share/interpreter/bytecodeTracer.cpp Fri Jan 25 13:50:44 2019 +0000
+++ b/src/hotspot/share/interpreter/bytecodeTracer.cpp Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 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
@@ -225,7 +225,6 @@
int ilimit = constants->length();
Bytecodes::Code code = raw_code();
- ConstantPoolCache* cache = NULL;
if (Bytecodes::uses_cp_cache(code)) {
bool okay = true;
switch (code) {
@@ -256,8 +255,7 @@
bool BytecodePrinter::check_cp_cache_index(int i, int& cp_index, outputStream* st) {
ConstantPool* constants = method()->constants();
- int ilimit = constants->length(), climit = 0;
- Bytecodes::Code code = raw_code();
+ int climit = 0;
ConstantPoolCache* cache = constants->cache();
// If rewriter hasn't run, the index is the cp_index
@@ -307,7 +305,6 @@
bool BytecodePrinter::check_invokedynamic_index(int i, int& cp_index, outputStream* st) {
- ConstantPool* constants = method()->constants();
assert(ConstantPool::is_invokedynamic_index(i), "not secondary index?");
i = ConstantPool::decode_invokedynamic_index(i) + ConstantPool::CPCACHE_INDEX_TAG;
--- a/src/hotspot/share/interpreter/bytecodes.hpp Fri Jan 25 13:50:44 2019 +0000
+++ b/src/hotspot/share/interpreter/bytecodes.hpp Tue Jan 29 17:42:58 2019 +0000
@@ -380,7 +380,6 @@
static Code code_or_bp_at(address bcp) { return (Code)cast(*bcp); }
static Code code_at(Method* method, int bci);
- static bool is_active_breakpoint_at(address bcp) { return (Code)*bcp == _breakpoint; }
// find a bytecode, behind a breakpoint if necessary:
static Code non_breakpoint_code_at(const Method* method, address bcp);
@@ -405,18 +404,12 @@
// if 'end' is provided, it indicates the end of the code buffer which
// should not be read past when parsing.
static int special_length_at(Bytecodes::Code code, address bcp, address end = NULL);
- static int special_length_at(Method* method, address bcp, address end = NULL) { return special_length_at(code_at(method, bcp), bcp, end); }
static int raw_special_length_at(address bcp, address end = NULL);
static int length_for_code_at(Bytecodes::Code code, address bcp) { int l = length_for(code); return l > 0 ? l : special_length_at(code, bcp); }
static int length_at (Method* method, address bcp) { return length_for_code_at(code_at(method, bcp), bcp); }
static int java_length_at (Method* method, address bcp) { return length_for_code_at(java_code_at(method, bcp), bcp); }
static bool is_java_code (Code code) { return 0 <= code && code < number_of_java_codes; }
- static bool is_aload (Code code) { return (code == _aload || code == _aload_0 || code == _aload_1
- || code == _aload_2 || code == _aload_3); }
- static bool is_astore (Code code) { return (code == _astore || code == _astore_0 || code == _astore_1
- || code == _astore_2 || code == _astore_3); }
-
static bool is_store_into_local(Code code){ return (_istore <= code && code <= _astore_3); }
static bool is_const (Code code) { return (_aconst_null <= code && code <= _ldc2_w); }
static bool is_zero_const (Code code) { return (code == _aconst_null || code == _iconst_0
@@ -433,7 +426,6 @@
assert(code == (u_char)code, "must be a byte");
return _flags[code + (is_wide ? (1<<BitsPerByte) : 0)];
}
- static int format_bits (Code code, bool is_wide) { return flags(code, is_wide) & _all_fmt_bits; }
static bool has_all_flags (Code code, int test_flags, bool is_wide) {
return (flags(code, is_wide) & test_flags) == test_flags;
}
--- a/src/hotspot/share/interpreter/interpreterRuntime.cpp Fri Jan 25 13:50:44 2019 +0000
+++ b/src/hotspot/share/interpreter/interpreterRuntime.cpp Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 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
@@ -135,11 +135,6 @@
frame& get_frame() { return _last_frame; }
};
-
-bool InterpreterRuntime::is_breakpoint(JavaThread *thread) {
- return Bytecodes::code_or_bp_at(LastFrameAccessor(thread).bcp()) == Bytecodes::_breakpoint;
-}
-
//------------------------------------------------------------------------------------------------------------------------
// State accessors
--- a/src/hotspot/share/interpreter/interpreterRuntime.hpp Fri Jan 25 13:50:44 2019 +0000
+++ b/src/hotspot/share/interpreter/interpreterRuntime.hpp Tue Jan 29 17:42:58 2019 +0000
@@ -126,7 +126,6 @@
static void _breakpoint(JavaThread* thread, Method* method, address bcp);
static Bytecodes::Code get_original_bytecode_at(JavaThread* thread, Method* method, address bcp);
static void set_original_bytecode_at(JavaThread* thread, Method* method, address bcp, Bytecodes::Code new_code);
- static bool is_breakpoint(JavaThread *thread);
// Safepoints
static void at_safepoint(JavaThread* thread);
--- a/src/hotspot/share/interpreter/invocationCounter.cpp Fri Jan 25 13:50:44 2019 +0000
+++ b/src/hotspot/share/interpreter/invocationCounter.cpp Tue Jan 29 17:42:58 2019 +0000
@@ -78,9 +78,6 @@
int InvocationCounter::_init [InvocationCounter::number_of_states];
InvocationCounter::Action InvocationCounter::_action[InvocationCounter::number_of_states];
-int InvocationCounter::InterpreterInvocationLimit;
-int InvocationCounter::InterpreterBackwardBranchLimit;
-int InvocationCounter::InterpreterProfileLimit;
const char* InvocationCounter::state_as_string(State state) {
@@ -135,26 +132,6 @@
guarantee((int)number_of_states <= (int)state_limit, "adjust number_of_state_bits");
def(wait_for_nothing, 0, do_nothing);
def(wait_for_compile, 0, do_decay);
-
- InterpreterInvocationLimit = CompileThreshold << number_of_noncount_bits;
- InterpreterProfileLimit = ((CompileThreshold * InterpreterProfilePercentage) / 100)<< number_of_noncount_bits;
-
- // When methodData is collected, the backward branch limit is compared against a
- // methodData counter, rather than an InvocationCounter. In the former case, we
- // don't need the shift by number_of_noncount_bits, but we do need to adjust
- // the factor by which we scale the threshold.
- if (ProfileInterpreter) {
- InterpreterBackwardBranchLimit = (int)((int64_t)CompileThreshold * (OnStackReplacePercentage - InterpreterProfilePercentage) / 100);
- } else {
- InterpreterBackwardBranchLimit = (int)(((int64_t)CompileThreshold * OnStackReplacePercentage / 100) << number_of_noncount_bits);
- }
-
- assert(0 <= InterpreterBackwardBranchLimit,
- "OSR threshold should be non-negative");
- assert(0 <= InterpreterProfileLimit &&
- InterpreterProfileLimit <= InterpreterInvocationLimit,
- "profile threshold should be less than the compilation threshold "
- "and non-negative");
}
void invocationCounter_init() {
--- a/src/hotspot/share/interpreter/invocationCounter.hpp Fri Jan 25 13:50:44 2019 +0000
+++ b/src/hotspot/share/interpreter/invocationCounter.hpp Tue Jan 29 17:42:58 2019 +0000
@@ -57,10 +57,6 @@
};
public:
- static int InterpreterInvocationLimit; // CompileThreshold scaled for interpreter use
- static int InterpreterBackwardBranchLimit; // A separate threshold for on stack replacement
- static int InterpreterProfileLimit; // Profiling threshold scaled for interpreter use
-
typedef address (*Action)(const methodHandle& method, TRAPS);
enum PublicConstants {
@@ -95,10 +91,6 @@
Action action() const { return _action[state()]; }
int count() const { return _counter >> number_of_noncount_bits; }
- int get_InvocationLimit() const { return InterpreterInvocationLimit >> number_of_noncount_bits; }
- int get_BackwardBranchLimit() const { return InterpreterBackwardBranchLimit >> number_of_noncount_bits; }
- int get_ProfileLimit() const { return InterpreterProfileLimit >> number_of_noncount_bits; }
-
#ifdef CC_INTERP
// Test counter using scaled limits like the asm interpreter would do rather than doing
// the shifts to normalize the counter.
--- a/src/hotspot/share/libadt/set.cpp Fri Jan 25 13:50:44 2019 +0000
+++ b/src/hotspot/share/libadt/set.cpp Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 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,22 +35,8 @@
//-------------------------Virtual Functions-----------------------------------
// These functions MUST be implemented by the inheriting class.
-class SparseSet;
-/* Removed for MCC BUG
- Set::operator const SparseSet*() const { assert(0); return NULL; } */
-const SparseSet *Set::asSparseSet() const { assert(0); return NULL; }
class VectorSet;
-/* Removed for MCC BUG
- Set::operator const VectorSet*() const { assert(0); return NULL; } */
const VectorSet *Set::asVectorSet() const { assert(0); return NULL; }
-class ListSet;
-/* Removed for MCC BUG
- Set::operator const ListSet*() const { assert(0); return NULL; } */
-const ListSet *Set::asListSet() const { assert(0); return NULL; }
-class CoSet;
-/* Removed for MCC BUG
- Set::operator const CoSet*() const { assert(0); return NULL; } */
-const CoSet *Set::asCoSet() const { assert(0); return NULL; }
//------------------------------setstr-----------------------------------------
// Create a string with a printable representation of a set.
--- a/src/hotspot/share/libadt/set.hpp Fri Jan 25 13:50:44 2019 +0000
+++ b/src/hotspot/share/libadt/set.hpp Tue Jan 29 17:42:58 2019 +0000
@@ -164,9 +164,6 @@
virtual int operator <=(const Set &s) const=0;
int operator >=(const Set &s) const { return s <= *this; }
- // Return any member of the Set. Undefined if the Set is empty.
- virtual uint getelem(void) const=0;
-
// Clear all the elements in the Set
virtual void Clear(void)=0;
@@ -188,15 +185,7 @@
virtual int parse(const char *s);
// Convert a generic Set to a specific Set
- /* Removed for MCC BUG
- virtual operator const SparseSet* (void) const;
- virtual operator const VectorSet* (void) const;
- virtual operator const ListSet * (void) const;
- virtual operator const CoSet * (void) const; */
- virtual const SparseSet *asSparseSet(void) const;
virtual const VectorSet *asVectorSet(void) const;
- virtual const ListSet *asListSet (void) const;
- virtual const CoSet *asCoSet (void) const;
// Hash the set. Sets of different types but identical elements will NOT
// hash the same. Same set type, same elements WILL hash the same.
@@ -204,16 +193,11 @@
protected:
friend class SetI;
- friend class CoSet;
virtual class SetI_ *iterate(uint&) const=0;
// Need storeage for the set
Arena *_set_arena;
};
-typedef Set&((*Set_Constructor)(Arena *arena));
-extern Set &ListSet_Construct(Arena *arena);
-extern Set &VectorSet_Construct(Arena *arena);
-extern Set &SparseSet_Construct(Arena *arena);
//------------------------------Iteration--------------------------------------
// Loop thru all elements of the set, setting "elem" to the element numbers
--- a/src/hotspot/share/libadt/vectset.cpp Fri Jan 25 13:50:44 2019 +0000
+++ b/src/hotspot/share/libadt/vectset.cpp Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 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
@@ -60,12 +60,6 @@
data[1] = 0;
}
-//------------------------------Construct--------------------------------------
-Set &VectorSet_Construct(Arena *arena)
-{
- return *(new VectorSet(arena));
-}
-
//------------------------------operator=--------------------------------------
Set &VectorSet::operator = (const Set &set)
{
@@ -293,20 +287,6 @@
return ((data[word] & mask))!=0; // Return the sense of the bit
}
-//------------------------------getelem----------------------------------------
-// Get any element from the set.
-uint VectorSet::getelem(void) const
-{
- uint i; // Exit value of loop
- for( i=0; i<size; i++ )
- if( data[i] )
- break;
- uint32_t word = data[i];
- int j; // Exit value of loop
- for( j= -1; word; j++, word>>=1 );
- return (i<<5)+j;
-}
-
//------------------------------Clear------------------------------------------
// Clear a set
void VectorSet::Clear(void)
--- a/src/hotspot/share/libadt/vectset.hpp Fri Jan 25 13:50:44 2019 +0000
+++ b/src/hotspot/share/libadt/vectset.hpp Tue Jan 29 17:42:58 2019 +0000
@@ -95,7 +95,6 @@
int disjoint (const Set &s) const; // True if sets are disjoint
int operator [](uint elem) const; // Test for membership
- uint getelem(void) const; // Return a random element
void Clear(void); // Clear a set
uint Size(void) const; // Number of elements in the Set.
void Sort(void); // Sort before iterating
--- a/src/hotspot/share/logging/logPrefix.hpp Fri Jan 25 13:50:44 2019 +0000
+++ b/src/hotspot/share/logging/logPrefix.hpp Tue Jan 29 17:42:58 2019 +0000
@@ -79,7 +79,6 @@
LOG_PREFIX(GCId::print_prefix, LOG_TAGS(gc, ref, start)) \
LOG_PREFIX(GCId::print_prefix, LOG_TAGS(gc, reloc)) \
LOG_PREFIX(GCId::print_prefix, LOG_TAGS(gc, start)) \
- LOG_PREFIX(GCId::print_prefix, LOG_TAGS(gc, stringtable)) \
LOG_PREFIX(GCId::print_prefix, LOG_TAGS(gc, symboltable)) \
LOG_PREFIX(GCId::print_prefix, LOG_TAGS(gc, sweep)) \
LOG_PREFIX(GCId::print_prefix, LOG_TAGS(gc, task)) \
--- a/src/hotspot/share/memory/binaryTreeDictionary.hpp Fri Jan 25 13:50:44 2019 +0000
+++ b/src/hotspot/share/memory/binaryTreeDictionary.hpp Tue Jan 29 17:42:58 2019 +0000
@@ -120,7 +120,6 @@
// node to point to the new node.
TreeList<Chunk_t, FreeList_t>* remove_chunk_replace_if_needed(TreeChunk<Chunk_t, FreeList_t>* tc);
// See FreeList.
- void return_chunk_at_head(TreeChunk<Chunk_t, FreeList_t>* tc);
void return_chunk_at_tail(TreeChunk<Chunk_t, FreeList_t>* tc);
};
@@ -236,7 +235,6 @@
size_t num_free_blocks() const;
size_t tree_height() const;
size_t tree_height_helper(TreeList<Chunk_t, FreeList_t>* tl) const;
- size_t total_nodes_in_tree(TreeList<Chunk_t, FreeList_t>* tl) const;
size_t total_nodes_helper(TreeList<Chunk_t, FreeList_t>* tl) const;
public:
--- a/src/hotspot/share/memory/binaryTreeDictionary.inline.hpp Fri Jan 25 13:50:44 2019 +0000
+++ b/src/hotspot/share/memory/binaryTreeDictionary.inline.hpp Tue Jan 29 17:42:58 2019 +0000
@@ -245,35 +245,6 @@
assert(tail() == NULL || tail()->next() == NULL, "list invariant");
}
-// Add this chunk at the head of the list. "At the head of the list"
-// is defined to be after the chunk pointer to by head(). This is
-// because the TreeList<Chunk_t, FreeList_t> is embedded in the first TreeChunk<Chunk_t, FreeList_t> in the
-// list. See the definition of TreeChunk<Chunk_t, FreeList_t>.
-template <class Chunk_t, class FreeList_t>
-void TreeList<Chunk_t, FreeList_t>::return_chunk_at_head(TreeChunk<Chunk_t, FreeList_t>* chunk) {
- assert(chunk->list() == this, "list should be set for chunk");
- assert(head() != NULL, "The tree list is embedded in the first chunk");
- assert(chunk != NULL, "returning NULL chunk");
- // This is expensive for metaspace
- assert(!FLSVerifyDictionary || !this->verify_chunk_in_free_list(chunk), "Double entry");
- assert(head() == NULL || head()->prev() == NULL, "list invariant");
- assert(tail() == NULL || tail()->next() == NULL, "list invariant");
-
- Chunk_t* fc = head()->next();
- if (fc != NULL) {
- chunk->link_after(fc);
- } else {
- assert(tail() == NULL, "List is inconsistent");
- this->link_tail(chunk);
- }
- head()->link_after(chunk);
- assert(!head() || size() == head()->size(), "Wrong sized chunk in list");
- FreeList_t::increment_count();
- debug_only(this->increment_returned_bytes_by(chunk->size()*sizeof(HeapWord));)
- assert(head() == NULL || head()->prev() == NULL, "list invariant");
- assert(tail() == NULL || tail()->next() == NULL, "list invariant");
-}
-
template <class Chunk_t, class FreeList_t>
void TreeChunk<Chunk_t, FreeList_t>::assert_is_mangled() const {
assert((ZapUnusedHeapArea &&
@@ -799,11 +770,6 @@
total_nodes_helper(tl->right());
}
-template <class Chunk_t, class FreeList_t>
-size_t BinaryTreeDictionary<Chunk_t, FreeList_t>::total_nodes_in_tree(TreeList<Chunk_t, FreeList_t>* tl) const {
- return total_nodes_helper(root());
-}
-
// Searches the tree for a chunk that ends at the
// specified address.
template <class Chunk_t, class FreeList_t>
--- a/src/hotspot/share/memory/heapShared.hpp Fri Jan 25 13:50:44 2019 +0000
+++ b/src/hotspot/share/memory/heapShared.hpp Tue Jan 29 17:42:58 2019 +0000
@@ -191,9 +191,6 @@
static void verify_subgraph_from(oop orig_obj) PRODUCT_RETURN;
static KlassSubGraphInfo* get_subgraph_info(Klass *k);
- static int num_of_subgraph_infos();
-
- static void build_archived_subgraph_info_records(int num_records);
static void init_subgraph_entry_fields(ArchivableStaticFieldInfo fields[],
int num, Thread* THREAD);
@@ -321,10 +318,6 @@
inline static bool is_archived_object(oop p) NOT_CDS_JAVA_HEAP_RETURN_(false);
- static void archive_java_heap_objects() NOT_CDS_JAVA_HEAP_RETURN;
-
- static char* read_archived_subgraph_infos(char* buffer) NOT_CDS_JAVA_HEAP_RETURN_(buffer);
- static void write_archived_subgraph_infos() NOT_CDS_JAVA_HEAP_RETURN;
static void initialize_from_archived_subgraph(Klass* k) NOT_CDS_JAVA_HEAP_RETURN;
// NarrowOops stored in the CDS archive may use a different encoding scheme
--- a/src/hotspot/share/memory/metaspace.cpp Fri Jan 25 13:50:44 2019 +0000
+++ b/src/hotspot/share/memory/metaspace.cpp Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 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
@@ -873,19 +873,6 @@
return vsn;
}
-bool MetaspaceUtils::is_in_committed(const void* p) {
-#if INCLUDE_CDS
- if (UseSharedSpaces) {
- for (int idx = MetaspaceShared::ro; idx <= MetaspaceShared::mc; idx++) {
- if (FileMapInfo::current_info()->is_in_shared_region(p, idx)) {
- return true;
- }
- }
- }
-#endif
- return find_enclosing_virtual_space(p) != NULL;
-}
-
bool MetaspaceUtils::is_range_in_committed(const void* from, const void* to) {
#if INCLUDE_CDS
if (UseSharedSpaces) {
--- a/src/hotspot/share/memory/metaspace.hpp Fri Jan 25 13:50:44 2019 +0000
+++ b/src/hotspot/share/memory/metaspace.hpp Tue Jan 29 17:42:58 2019 +0000
@@ -333,7 +333,6 @@
// Utils to check if a pointer or range is part of a committed metaspace region
// without acquiring any locks.
static metaspace::VirtualSpaceNode* find_enclosing_virtual_space(const void* p);
- static bool is_in_committed(const void* p);
static bool is_range_in_committed(const void* from, const void* to);
public:
@@ -387,9 +386,6 @@
}
static size_t min_chunk_size_words();
- static size_t min_chunk_size_bytes() {
- return min_chunk_size_words() * BytesPerWord;
- }
// Flags for print_report().
enum ReportFlag {
--- a/src/hotspot/share/memory/metaspaceShared.cpp Fri Jan 25 13:50:44 2019 +0000
+++ b/src/hotspot/share/memory/metaspaceShared.cpp Tue Jan 29 17:42:58 2019 +0000
@@ -218,10 +218,6 @@
return _ro_region.allocate(num_bytes);
}
-char* MetaspaceShared::read_only_space_top() {
- return _ro_region.top();
-}
-
void MetaspaceShared::initialize_runtime_shared_and_meta_spaces() {
assert(UseSharedSpaces, "Must be called when UseSharedSpaces is enabled");
--- a/src/hotspot/share/memory/metaspaceShared.hpp Fri Jan 25 13:50:44 2019 +0000
+++ b/src/hotspot/share/memory/metaspaceShared.hpp Tue Jan 29 17:42:58 2019 +0000
@@ -168,14 +168,11 @@
static bool try_link_class(InstanceKlass* ik, TRAPS);
static void link_and_cleanup_shared_classes(TRAPS);
- static void check_shared_class_loader_type(InstanceKlass* ik);
// Allocate a block of memory from the "mc", "ro", or "rw" regions.
static char* misc_code_space_alloc(size_t num_bytes);
static char* read_only_space_alloc(size_t num_bytes);
- static char* read_only_space_top();
-
template <typename T>
static Array<T>* new_ro_array(int length) {
#if INCLUDE_CDS
--- a/src/hotspot/share/memory/universe.cpp Fri Jan 25 13:50:44 2019 +0000
+++ b/src/hotspot/share/memory/universe.cpp Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 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
@@ -1286,14 +1286,6 @@
#endif // PRODUCT
-void Universe::compute_verify_oop_data() {
- verify_oop_mask();
- verify_oop_bits();
- verify_mark_mask();
- verify_mark_bits();
-}
-
-
void LatestMethodCache::init(Klass* k, Method* m) {
if (!UseSharedSpaces) {
_klass = k;
--- a/src/hotspot/share/memory/universe.hpp Fri Jan 25 13:50:44 2019 +0000
+++ b/src/hotspot/share/memory/universe.hpp Tue Jan 29 17:42:58 2019 +0000
@@ -258,7 +258,6 @@
static uintptr_t _verify_oop_bits;
static void calculate_verify_data(HeapWord* low_boundary, HeapWord* high_boundary) PRODUCT_RETURN;
- static void compute_verify_oop_data();
public:
// Known classes in the VM
@@ -392,8 +391,6 @@
};
static NARROW_OOP_MODE narrow_oop_mode();
static const char* narrow_oop_mode_to_string(NARROW_OOP_MODE mode);
- static char* preferred_heap_base(size_t heap_size, size_t alignment, NARROW_OOP_MODE mode);
- static char* preferred_metaspace_base(size_t heap_size, NARROW_OOP_MODE mode);
static address narrow_oop_base() { return _narrow_oop._base; }
// Test whether bits of addr and possible offsets into the heap overlap.
static bool is_disjoint_heap_base_address(address addr) {
@@ -416,10 +413,8 @@
// For UseCompressedClassPointers
static address narrow_klass_base() { return _narrow_klass._base; }
- static bool is_narrow_klass_base(void* addr) { return (narrow_klass_base() == (address)addr); }
static uint64_t narrow_klass_range() { return _narrow_klass_range; }
static int narrow_klass_shift() { return _narrow_klass._shift; }
- static bool narrow_klass_use_implicit_null_checks() { return _narrow_klass._use_implicit_null_checks; }
static address* narrow_ptrs_base_addr() { return &_narrow_ptrs_base; }
static void set_narrow_ptrs_base(address a) { _narrow_ptrs_base = a; }
@@ -441,7 +436,6 @@
static ReservedSpace reserve_heap(size_t heap_size, size_t alignment);
// Historic gc information
- static size_t get_heap_capacity_at_last_gc() { return _heap_capacity_at_last_gc; }
static size_t get_heap_free_at_last_gc() { return _heap_capacity_at_last_gc - _heap_used_at_last_gc; }
static size_t get_heap_used_at_last_gc() { return _heap_used_at_last_gc; }
static void update_heap_info_at_gc();
@@ -517,25 +511,4 @@
static int base_vtable_size() { return _base_vtable_size; }
};
-class DeferredObjAllocEvent : public CHeapObj<mtInternal> {
- private:
- oop _oop;
- size_t _bytesize;
- jint _arena_id;
-
- public:
- DeferredObjAllocEvent(const oop o, const size_t s, const jint id) {
- _oop = o;
- _bytesize = s;
- _arena_id = id;
- }
-
- ~DeferredObjAllocEvent() {
- }
-
- jint arena_id() { return _arena_id; }
- size_t bytesize() { return _bytesize; }
- oop get_oop() { return _oop; }
-};
-
#endif // SHARE_MEMORY_UNIVERSE_HPP
--- a/src/hotspot/share/memory/virtualspace.cpp Fri Jan 25 13:50:44 2019 +0000
+++ b/src/hotspot/share/memory/virtualspace.cpp Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 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
@@ -266,11 +266,6 @@
}
-size_t ReservedSpace::allocation_align_size_down(size_t size) {
- return align_down(size, os::vm_allocation_granularity());
-}
-
-
void ReservedSpace::release() {
if (is_reserved()) {
char *real_base = _base - _noaccess_prefix;
--- a/src/hotspot/share/memory/virtualspace.hpp Fri Jan 25 13:50:44 2019 +0000
+++ b/src/hotspot/share/memory/virtualspace.hpp Tue Jan 29 17:42:58 2019 +0000
@@ -88,7 +88,6 @@
static size_t page_align_size_up(size_t size);
static size_t page_align_size_down(size_t size);
static size_t allocation_align_size_up(size_t size);
- static size_t allocation_align_size_down(size_t size);
bool contains(const void* p) const {
return (base() <= ((char*)p)) && (((char*)p) < (base() + size()));
}
--- a/src/hotspot/share/oops/compiledICHolder.hpp Fri Jan 25 13:50:44 2019 +0000
+++ b/src/hotspot/share/oops/compiledICHolder.hpp Tue Jan 29 17:42:58 2019 +0000
@@ -65,9 +65,6 @@
Klass* holder_klass() const { return _holder_klass; }
Metadata* holder_metadata() const { return _holder_metadata; }
- void set_holder_metadata(Metadata* m) { _holder_metadata = m; }
- void set_holder_klass(Klass* k) { _holder_klass = k; }
-
static int holder_metadata_offset() { return offset_of(CompiledICHolder, _holder_metadata); }
static int holder_klass_offset() { return offset_of(CompiledICHolder, _holder_klass); }
--- a/src/hotspot/share/oops/constantPool.cpp Fri Jan 25 13:50:44 2019 +0000
+++ b/src/hotspot/share/oops/constantPool.cpp Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 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
@@ -817,9 +817,9 @@
constantTag tag = tag_at(which);
if (tag.is_dynamic_constant() ||
tag.is_dynamic_constant_in_error()) {
- // have to look at the signature for this one
- Symbol* constant_type = uncached_signature_ref_at(which);
- return constantTag::ofBasicType(FieldType::basic_type(constant_type));
+ BasicType bt = basic_type_for_constant_at(which);
+ // dynamic constant could return an array, treat as object
+ return constantTag::ofBasicType(is_reference_type(bt) ? T_OBJECT : bt);
}
return tag;
}
--- a/src/hotspot/share/opto/callGenerator.cpp Fri Jan 25 13:50:44 2019 +0000
+++ b/src/hotspot/share/opto/callGenerator.cpp Tue Jan 29 17:42:58 2019 +0000
@@ -46,9 +46,17 @@
return TypeFunc::make(method());
}
-bool CallGenerator::is_inlined_method_handle_intrinsic(JVMState* jvms, ciMethod* callee) {
- ciMethod* symbolic_info = jvms->method()->get_method_at_bci(jvms->bci());
- return symbolic_info->is_method_handle_intrinsic() && !callee->is_method_handle_intrinsic();
+bool CallGenerator::is_inlined_method_handle_intrinsic(JVMState* jvms, ciMethod* m) {
+ return is_inlined_method_handle_intrinsic(jvms->method(), jvms->bci(), m);
+}
+
+bool CallGenerator::is_inlined_method_handle_intrinsic(ciMethod* caller, int bci, ciMethod* m) {
+ ciMethod* symbolic_info = caller->get_method_at_bci(bci);
+ return is_inlined_method_handle_intrinsic(symbolic_info, m);
+}
+
+bool CallGenerator::is_inlined_method_handle_intrinsic(ciMethod* symbolic_info, ciMethod* m) {
+ return symbolic_info->is_method_handle_intrinsic() && !m->is_method_handle_intrinsic();
}
//-----------------------------ParseGenerator---------------------------------
@@ -888,7 +896,8 @@
const TypeOopPtr* arg_type = arg->bottom_type()->isa_oopptr();
const Type* sig_type = TypeOopPtr::make_from_klass(signature->accessing_klass());
if (arg_type != NULL && !arg_type->higher_equal(sig_type)) {
- Node* cast_obj = gvn.transform(new CheckCastPPNode(kit.control(), arg, sig_type));
+ const Type* recv_type = arg_type->join_speculative(sig_type); // keep speculative part
+ Node* cast_obj = gvn.transform(new CheckCastPPNode(kit.control(), arg, recv_type));
kit.set_argument(0, cast_obj);
}
}
@@ -900,7 +909,8 @@
const TypeOopPtr* arg_type = arg->bottom_type()->isa_oopptr();
const Type* sig_type = TypeOopPtr::make_from_klass(t->as_klass());
if (arg_type != NULL && !arg_type->higher_equal(sig_type)) {
- Node* cast_obj = gvn.transform(new CheckCastPPNode(kit.control(), arg, sig_type));
+ const Type* narrowed_arg_type = arg_type->join_speculative(sig_type); // keep speculative part
+ Node* cast_obj = gvn.transform(new CheckCastPPNode(kit.control(), arg, narrowed_arg_type));
kit.set_argument(receiver_skip + j, cast_obj);
}
}
--- a/src/hotspot/share/opto/callGenerator.hpp Fri Jan 25 13:50:44 2019 +0000
+++ b/src/hotspot/share/opto/callGenerator.hpp Tue Jan 29 17:42:58 2019 +0000
@@ -176,6 +176,8 @@
}
static bool is_inlined_method_handle_intrinsic(JVMState* jvms, ciMethod* m);
+ static bool is_inlined_method_handle_intrinsic(ciMethod* caller, int bci, ciMethod* m);
+ static bool is_inlined_method_handle_intrinsic(ciMethod* symbolic_info, ciMethod* m);
};
--- a/src/hotspot/share/opto/callnode.cpp Fri Jan 25 13:50:44 2019 +0000
+++ b/src/hotspot/share/opto/callnode.cpp Tue Jan 29 17:42:58 2019 +0000
@@ -967,6 +967,21 @@
return CallNode::cmp(call) && _method == call._method &&
_override_symbolic_info == call._override_symbolic_info;
}
+#ifdef ASSERT
+bool CallJavaNode::validate_symbolic_info() const {
+ if (method() == NULL) {
+ return true; // call into runtime or uncommon trap
+ }
+ ciMethod* symbolic_info = jvms()->method()->get_method_at_bci(_bci);
+ ciMethod* callee = method();
+ if (symbolic_info->is_method_handle_intrinsic() && !callee->is_method_handle_intrinsic()) {
+ assert(override_symbolic_info(), "should be set");
+ }
+ assert(ciMethod::is_consistent_info(symbolic_info, callee), "inconsistent info");
+ return true;
+}
+#endif
+
#ifndef PRODUCT
void CallJavaNode::dump_spec(outputStream *st) const {
if( _method ) _method->print_short_name(st);
--- a/src/hotspot/share/opto/callnode.hpp Fri Jan 25 13:50:44 2019 +0000
+++ b/src/hotspot/share/opto/callnode.hpp Tue Jan 29 17:42:58 2019 +0000
@@ -683,6 +683,8 @@
void set_override_symbolic_info(bool f) { _override_symbolic_info = f; }
bool override_symbolic_info() const { return _override_symbolic_info; }
+ DEBUG_ONLY( bool validate_symbolic_info() const; )
+
#ifndef PRODUCT
virtual void dump_spec(outputStream *st) const;
virtual void dump_compact_spec(outputStream *st) const;
--- a/src/hotspot/share/opto/chaitin.cpp Fri Jan 25 13:50:44 2019 +0000
+++ b/src/hotspot/share/opto/chaitin.cpp Tue Jan 29 17:42:58 2019 +0000
@@ -756,6 +756,16 @@
lrg._is_float = 1;
}
+ // Check for twice prior spilling. Once prior spilling might have
+ // spilled 'soft', 2nd prior spill should have spilled 'hard' and
+ // further spilling is unlikely to make progress.
+ if (_spilled_once.test(n->_idx)) {
+ lrg._was_spilled1 = 1;
+ if (_spilled_twice.test(n->_idx)) {
+ lrg._was_spilled2 = 1;
+ }
+ }
+
#ifndef PRODUCT
// Collect bits not used by product code, but which may be useful for
// debugging.
@@ -768,16 +778,6 @@
copy_src._has_copy = 1;
}
- // Check for twice prior spilling. Once prior spilling might have
- // spilled 'soft', 2nd prior spill should have spilled 'hard' and
- // further spilling is unlikely to make progress.
- if (_spilled_once.test(n->_idx)) {
- lrg._was_spilled1 = 1;
- if (_spilled_twice.test(n->_idx)) {
- lrg._was_spilled2 = 1;
- }
- }
-
if (trace_spilling() && lrg._def != NULL) {
// collect defs for MultiDef printing
if (lrg._defs == NULL) {
--- a/src/hotspot/share/opto/doCall.cpp Fri Jan 25 13:50:44 2019 +0000
+++ b/src/hotspot/share/opto/doCall.cpp Tue Jan 29 17:42:58 2019 +0000
@@ -202,9 +202,9 @@
}
// Try using the type profile.
- if (call_does_dispatch && site_count > 0 && receiver_count > 0) {
+ if (call_does_dispatch && site_count > 0 && UseTypeProfile) {
// The major receiver's count >= TypeProfileMajorReceiverPercent of site_count.
- bool have_major_receiver = (100.*profile.receiver_prob(0) >= (float)TypeProfileMajorReceiverPercent);
+ bool have_major_receiver = profile.has_receiver(0) && (100.*profile.receiver_prob(0) >= (float)TypeProfileMajorReceiverPercent);
ciMethod* receiver_method = NULL;
int morphism = profile.morphism();
@@ -258,8 +258,9 @@
}
}
CallGenerator* miss_cg;
- Deoptimization::DeoptReason reason = morphism == 2 ?
- Deoptimization::Reason_bimorphic : Deoptimization::reason_class_check(speculative_receiver_type != NULL);
+ Deoptimization::DeoptReason reason = (morphism == 2
+ ? Deoptimization::Reason_bimorphic
+ : Deoptimization::reason_class_check(speculative_receiver_type != NULL));
if ((morphism == 1 || (morphism == 2 && next_hit_cg != NULL)) &&
!too_many_traps(caller, bci, reason)
) {
@@ -281,8 +282,8 @@
miss_cg = CallGenerator::for_predicted_call(profile.receiver(1), miss_cg, next_hit_cg, PROB_MAX);
}
if (miss_cg != NULL) {
- trace_type_profile(C, jvms->method(), jvms->depth() - 1, jvms->bci(), receiver_method, profile.receiver(0), site_count, receiver_count);
ciKlass* k = speculative_receiver_type != NULL ? speculative_receiver_type : profile.receiver(0);
+ trace_type_profile(C, jvms->method(), jvms->depth() - 1, jvms->bci(), receiver_method, k, site_count, receiver_count);
float hit_prob = speculative_receiver_type != NULL ? 1.0 : profile.receiver_prob(0);
CallGenerator* cg = CallGenerator::for_predicted_call(k, miss_cg, hit_cg, hit_prob);
if (cg != NULL) return cg;
--- a/src/hotspot/share/opto/library_call.cpp Fri Jan 25 13:50:44 2019 +0000
+++ b/src/hotspot/share/opto/library_call.cpp Tue Jan 29 17:42:58 2019 +0000
@@ -3850,6 +3850,13 @@
method, bci());
slow_call->set_optimized_virtual(true);
}
+ if (CallGenerator::is_inlined_method_handle_intrinsic(this->method(), bci(), callee())) {
+ // To be able to issue a direct call (optimized virtual or virtual)
+ // and skip a call to MH.linkTo*/invokeBasic adapter, additional information
+ // about the method being invoked should be attached to the call site to
+ // make resolution logic work (see SharedRuntime::resolve_{virtual,opt_virtual}_call_C).
+ slow_call->set_override_symbolic_info(true);
+ }
set_arguments_for_java_call(slow_call);
set_edges_for_java_call(slow_call);
return slow_call;
--- a/src/hotspot/share/opto/matcher.cpp Fri Jan 25 13:50:44 2019 +0000
+++ b/src/hotspot/share/opto/matcher.cpp Tue Jan 29 17:42:58 2019 +0000
@@ -1170,6 +1170,7 @@
if( mcall->is_MachCallJava() ) {
MachCallJavaNode *mcall_java = mcall->as_MachCallJava();
const CallJavaNode *call_java = call->as_CallJava();
+ assert(call_java->validate_symbolic_info(), "inconsistent info");
method = call_java->method();
mcall_java->_method = method;
mcall_java->_bci = call_java->_bci;
--- a/src/hotspot/share/opto/memnode.cpp Fri Jan 25 13:50:44 2019 +0000
+++ b/src/hotspot/share/opto/memnode.cpp Tue Jan 29 17:42:58 2019 +0000
@@ -1532,10 +1532,14 @@
Node* address = in(MemNode::Address);
bool progress = false;
+ bool addr_mark = ((phase->type(address)->isa_oopptr() || phase->type(address)->isa_narrowoop()) &&
+ phase->type(address)->is_ptr()->offset() == oopDesc::mark_offset_in_bytes());
+
// Skip up past a SafePoint control. Cannot do this for Stores because
// pointer stores & cardmarks must stay on the same side of a SafePoint.
if( ctrl != NULL && ctrl->Opcode() == Op_SafePoint &&
- phase->C->get_alias_index(phase->type(address)->is_ptr()) != Compile::AliasIdxRaw ) {
+ phase->C->get_alias_index(phase->type(address)->is_ptr()) != Compile::AliasIdxRaw &&
+ !addr_mark ) {
ctrl = ctrl->in(0);
set_req(MemNode::Control,ctrl);
progress = true;
--- a/src/hotspot/share/opto/regmask.cpp Fri Jan 25 13:50:44 2019 +0000
+++ b/src/hotspot/share/opto/regmask.cpp Tue Jan 29 17:42:58 2019 +0000
@@ -32,36 +32,6 @@
#define RM_SIZE _RM_SIZE /* a constant private to the class RegMask */
-//-------------Non-zero bit search methods used by RegMask---------------------
-// Find highest 1, or return 32 if empty
-int find_highest_bit( uint32_t mask ) {
- int n = 0;
- if( mask > 0xffff ) {
- mask >>= 16;
- n += 16;
- }
- if( mask > 0xff ) {
- mask >>= 8;
- n += 8;
- }
- if( mask > 0xf ) {
- mask >>= 4;
- n += 4;
- }
- if( mask > 0x3 ) {
- mask >>= 2;
- n += 2;
- }
- if( mask > 0x1 ) {
- mask >>= 1;
- n += 1;
- }
- if( mask == 0 ) {
- n = 32;
- }
- return n;
-}
-
//------------------------------dump-------------------------------------------
#ifndef PRODUCT
--- a/src/hotspot/share/opto/regmask.hpp Fri Jan 25 13:50:44 2019 +0000
+++ b/src/hotspot/share/opto/regmask.hpp Tue Jan 29 17:42:58 2019 +0000
@@ -27,6 +27,7 @@
#include "code/vmreg.hpp"
#include "opto/optoreg.hpp"
+#include "utilities/count_leading_zeros.hpp"
#include "utilities/count_trailing_zeros.hpp"
// Some fun naming (textual) substitutions:
@@ -50,8 +51,10 @@
static int find_lowest_bit(uint32_t mask) {
return count_trailing_zeros(mask);
}
-// Find highest 1, or return 32 if empty
-int find_highest_bit( uint32_t mask );
+// Find highest 1, undefined if empty/0
+static int find_highest_bit(uint32_t mask) {
+ return count_leading_zeros(mask) ^ 31;
+}
//------------------------------RegMask----------------------------------------
// The ADL file describes how to print the machine-specific registers, as well
--- a/src/hotspot/share/prims/jni.cpp Fri Jan 25 13:50:44 2019 +0000
+++ b/src/hotspot/share/prims/jni.cpp Tue Jan 29 17:42:58 2019 +0000
@@ -2591,9 +2591,10 @@
ret = JNIHandles::make_local(env, a->obj_at(index));
return ret;
} else {
- char buf[jintAsStringSize];
- sprintf(buf, "%d", index);
- THROW_MSG_0(vmSymbols::java_lang_ArrayIndexOutOfBoundsException(), buf);
+ ResourceMark rm(THREAD);
+ stringStream ss;
+ ss.print("Index %d out of bounds for length %d", index, a->length());
+ THROW_MSG_0(vmSymbols::java_lang_ArrayIndexOutOfBoundsException(), ss.as_string());
}
JNI_END
@@ -2624,9 +2625,10 @@
THROW_MSG(vmSymbols::java_lang_ArrayStoreException(), ss.as_string());
}
} else {
- char buf[jintAsStringSize];
- sprintf(buf, "%d", index);
- THROW_MSG(vmSymbols::java_lang_ArrayIndexOutOfBoundsException(), buf);
+ ResourceMark rm(THREAD);
+ stringStream ss;
+ ss.print("Index %d out of bounds for length %d", index, a->length());
+ THROW_MSG(vmSymbols::java_lang_ArrayIndexOutOfBoundsException(), ss.as_string());
}
JNI_END
@@ -2801,6 +2803,19 @@
, HOTSPOT_JNI_RELEASEDOUBLEARRAYELEMENTS_ENTRY(env, array, (double *) buf, mode),
HOTSPOT_JNI_RELEASEDOUBLEARRAYELEMENTS_RETURN())
+static void check_bounds(jsize start, jsize copy_len, jsize array_len, TRAPS) {
+ ResourceMark rm(THREAD);
+ if (copy_len < 0) {
+ stringStream ss;
+ ss.print("Length %d is negative", copy_len);
+ THROW_MSG(vmSymbols::java_lang_ArrayIndexOutOfBoundsException(), ss.as_string());
+ } else if (start < 0 || (start > array_len - copy_len)) {
+ stringStream ss;
+ ss.print("Array region %d.." INT64_FORMAT " out of bounds for length %d",
+ start, (int64_t)start+(int64_t)copy_len, array_len);
+ THROW_MSG(vmSymbols::java_lang_ArrayIndexOutOfBoundsException(), ss.as_string());
+ }
+}
#define DEFINE_GETSCALARARRAYREGION(ElementTag,ElementType,Result, Tag \
, EntryProbe, ReturnProbe); \
@@ -2814,12 +2829,9 @@
EntryProbe; \
DT_VOID_RETURN_MARK(Get##Result##ArrayRegion); \
typeArrayOop src = typeArrayOop(JNIHandles::resolve_non_null(array)); \
- if (start < 0 || len < 0 || (start > src->length() - len)) { \
- THROW(vmSymbols::java_lang_ArrayIndexOutOfBoundsException()); \
- } else { \
- if (len > 0) { \
- ArrayAccess<>::arraycopy_to_native(src, typeArrayOopDesc::element_offset<ElementType>(start), buf, len); \
- } \
+ check_bounds(start, len, src->length(), CHECK); \
+ if (len > 0) { \
+ ArrayAccess<>::arraycopy_to_native(src, typeArrayOopDesc::element_offset<ElementType>(start), buf, len); \
} \
JNI_END
@@ -2861,12 +2873,9 @@
EntryProbe; \
DT_VOID_RETURN_MARK(Set##Result##ArrayRegion); \
typeArrayOop dst = typeArrayOop(JNIHandles::resolve_non_null(array)); \
- if (start < 0 || len < 0 || (start > dst->length() - len)) { \
- THROW(vmSymbols::java_lang_ArrayIndexOutOfBoundsException()); \
- } else { \
- if (len > 0) { \
- ArrayAccess<>::arraycopy_from_native(buf, dst, typeArrayOopDesc::element_offset<ElementType>(start), len); \
- } \
+ check_bounds(start, len, dst->length(), CHECK); \
+ if (len > 0) { \
+ ArrayAccess<>::arraycopy_from_native(buf, dst, typeArrayOopDesc::element_offset<ElementType>(start), len); \
} \
JNI_END
--- a/src/hotspot/share/prims/jvmtiImpl.hpp Fri Jan 25 13:50:44 2019 +0000
+++ b/src/hotspot/share/prims/jvmtiImpl.hpp Tue Jan 29 17:42:58 2019 +0000
@@ -297,25 +297,11 @@
// lazily create _jvmti_breakpoints and _breakpoint_list
static JvmtiBreakpoints& get_jvmti_breakpoints();
- // quickly test whether the bcp matches a cached breakpoint in the list
- static inline bool is_breakpoint(address bcp);
-
static void oops_do(OopClosure* f);
static void metadata_do(void f(Metadata*)) NOT_JVMTI_RETURN;
static void gc_epilogue();
};
-// quickly test whether the bcp matches a cached breakpoint in the list
-bool JvmtiCurrentBreakpoints::is_breakpoint(address bcp) {
- address *bps = get_breakpoint_list();
- if (bps == NULL) return false;
- for ( ; (*bps) != NULL; bps++) {
- if ((*bps) == bcp) return true;
- }
- return false;
-}
-
-
///////////////////////////////////////////////////////////////
//
// class VM_ChangeBreakpoints
--- a/src/hotspot/share/prims/methodHandles.cpp Fri Jan 25 13:50:44 2019 +0000
+++ b/src/hotspot/share/prims/methodHandles.cpp Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 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
@@ -968,7 +968,6 @@
bool search_superc = ((match_flags & SEARCH_SUPERCLASSES) != 0);
bool search_intfc = ((match_flags & SEARCH_INTERFACES) != 0);
bool local_only = !(search_superc | search_intfc);
- bool classes_only = false;
if (name != NULL) {
if (name->utf8_length() == 0) return 0; // a match is not possible
--- a/src/hotspot/share/prims/methodHandles.hpp Fri Jan 25 13:50:44 2019 +0000
+++ b/src/hotspot/share/prims/methodHandles.hpp Tue Jan 29 17:42:58 2019 +0000
@@ -67,7 +67,6 @@
static oop init_MemberName(Handle mname_h, Handle target_h, TRAPS); // compute vmtarget/vmindex from target
static oop init_field_MemberName(Handle mname_h, fieldDescriptor& fd, bool is_setter = false);
static oop init_method_MemberName(Handle mname_h, CallInfo& info);
- static int method_ref_kind(Method* m, bool do_dispatch_if_possible = true);
static int find_MemberNames(Klass* k, Symbol* name, Symbol* sig,
int mflags, Klass* caller,
int skip, objArrayHandle results, TRAPS);
@@ -148,8 +147,6 @@
static Bytecodes::Code signature_polymorphic_intrinsic_bytecode(vmIntrinsics::ID id);
- static int get_named_constant(int which, Handle name_box, TRAPS);
-
public:
static Symbol* lookup_signature(oop type_str, bool polymorphic, TRAPS); // use TempNewSymbol
static Symbol* lookup_basic_type_signature(Symbol* sig, bool keep_last_arg, TRAPS); // use TempNewSymbol
@@ -158,11 +155,6 @@
}
static bool is_basic_type_signature(Symbol* sig);
- static Symbol* lookup_method_type(Symbol* msig, Handle mtype, TRAPS);
-
- static void print_as_method_type_on(outputStream* st, Symbol* sig) {
- print_as_basic_type_signature_on(st, sig, true, true);
- }
static void print_as_basic_type_signature_on(outputStream* st, Symbol* sig, bool keep_arrays = false, bool keep_basic_names = false);
// decoding CONSTANT_MethodHandle constants
@@ -188,13 +180,6 @@
assert(ref_kind_is_valid(ref_kind), "");
return (ref_kind & 1) != 0;
}
- static bool ref_kind_is_static(int ref_kind) {
- return !ref_kind_has_receiver(ref_kind) && (ref_kind != JVM_REF_newInvokeSpecial);
- }
- static bool ref_kind_does_dispatch(int ref_kind) {
- return (ref_kind == JVM_REF_invokeVirtual ||
- ref_kind == JVM_REF_invokeInterface);
- }
static int ref_kind_to_flags(int ref_kind);
--- a/src/hotspot/share/prims/whitebox.cpp Fri Jan 25 13:50:44 2019 +0000
+++ b/src/hotspot/share/prims/whitebox.cpp Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 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,6 +93,9 @@
#include "services/memTracker.hpp"
#include "utilities/nativeCallStack.hpp"
#endif // INCLUDE_NMT
+#if INCLUDE_AOT
+#include "aot/aotLoader.hpp"
+#endif // INCLUDE_AOT
#ifdef LINUX
#include "osContainer_linux.hpp"
@@ -2118,6 +2121,14 @@
return (jint) SystemDictionary::pd_cache_table()->removed_entries_count();
WB_END
+WB_ENTRY(jint, WB_AotLibrariesCount(JNIEnv* env, jobject o))
+ jint result = 0;
+#if INCLUDE_AOT
+ result = (jint) AOTLoader::heaps_count();
+#endif
+ return result;
+WB_END
+
#define CC (char*)
static JNINativeMethod methods[] = {
@@ -2350,6 +2361,7 @@
{CC"disableElfSectionCache", CC"()V", (void*)&WB_DisableElfSectionCache },
{CC"resolvedMethodRemovedCount", CC"()I", (void*)&WB_ResolvedMethodRemovedCount },
{CC"protectionDomainRemovedCount", CC"()I", (void*)&WB_ProtectionDomainRemovedCount },
+ {CC"aotLibrariesCount", CC"()I", (void*)&WB_AotLibrariesCount },
};
--- a/src/hotspot/share/runtime/arguments.cpp Fri Jan 25 13:50:44 2019 +0000
+++ b/src/hotspot/share/runtime/arguments.cpp Tue Jan 29 17:42:58 2019 +0000
@@ -328,10 +328,6 @@
_agentList.add(agentLib);
}
-void Arguments::add_loaded_agent(const char* name, char* options, bool absolute_path, void* os_lib) {
- _agentList.add(new AgentLibrary(name, options, absolute_path, os_lib));
-}
-
// Return TRUE if option matches 'property', or 'property=', or 'property.'.
static bool matches_property_suffix(const char* option, const char* property, size_t len) {
return ((strncmp(option, property, len) == 0) &&
--- a/src/hotspot/share/runtime/arguments.hpp Fri Jan 25 13:50:44 2019 +0000
+++ b/src/hotspot/share/runtime/arguments.hpp Tue Jan 29 17:42:58 2019 +0000
@@ -346,7 +346,6 @@
// Late-binding agents not started via arguments
static void add_loaded_agent(AgentLibrary *agentLib);
- static void add_loaded_agent(const char* name, char* options, bool absolute_path, void* os_lib);
// Operation modi
static Mode _mode;
@@ -368,7 +367,6 @@
static bool _UseOnStackReplacement;
static bool _BackgroundCompilation;
static bool _ClipInlining;
- static bool _CIDynamicCompilePriority;
static intx _Tier3InvokeNotifyFreqLog;
static intx _Tier4InvocationThreshold;
--- a/src/hotspot/share/runtime/deoptimization.cpp Fri Jan 25 13:50:44 2019 +0000
+++ b/src/hotspot/share/runtime/deoptimization.cpp Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 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
@@ -1284,36 +1284,6 @@
}
-void Deoptimization::revoke_biases_of_monitors(CodeBlob* cb) {
- if (!UseBiasedLocking) {
- return;
- }
-
- assert(SafepointSynchronize::is_at_safepoint(), "must only be called from safepoint");
- GrowableArray<Handle>* objects_to_revoke = new GrowableArray<Handle>();
- for (JavaThreadIteratorWithHandle jtiwh; JavaThread *jt = jtiwh.next(); ) {
- if (jt->has_last_Java_frame()) {
- StackFrameStream sfs(jt, true);
- while (!sfs.is_done()) {
- frame* cur = sfs.current();
- if (cb->contains(cur->pc())) {
- vframe* vf = vframe::new_vframe(cur, sfs.register_map(), jt);
- compiledVFrame* cvf = compiledVFrame::cast(vf);
- // Revoke monitors' biases in all scopes
- while (!cvf->is_top()) {
- collect_monitors(cvf, objects_to_revoke);
- cvf = compiledVFrame::cast(cvf->sender());
- }
- collect_monitors(cvf, objects_to_revoke);
- }
- sfs.next();
- }
- }
- }
- BiasedLocking::revoke_at_safepoint(objects_to_revoke);
-}
-
-
void Deoptimization::deoptimize_single_frame(JavaThread* thread, frame fr, Deoptimization::DeoptReason reason) {
assert(fr.can_be_deoptimized(), "checking frame type");
@@ -2300,11 +2270,6 @@
return _deoptimization_hist[Reason_none][0][0];
}
-jint Deoptimization::deoptimization_count(DeoptReason reason) {
- assert(reason >= 0 && reason < Reason_LIMIT, "oob");
- return _deoptimization_hist[reason][0][0];
-}
-
void Deoptimization::print_statistics() {
juint total = total_deoptimization_count();
juint account = total;
--- a/src/hotspot/share/runtime/deoptimization.hpp Fri Jan 25 13:50:44 2019 +0000
+++ b/src/hotspot/share/runtime/deoptimization.hpp Tue Jan 29 17:42:58 2019 +0000
@@ -154,9 +154,6 @@
// Helper function to revoke biases of all monitors in frame if UseBiasedLocking
// is enabled
static void revoke_biases_of_monitors(JavaThread* thread, frame fr, RegisterMap* map);
- // Helper function to revoke biases of all monitors in frames
- // executing in a particular CodeBlob if UseBiasedLocking is enabled
- static void revoke_biases_of_monitors(CodeBlob* cb);
#if COMPILER2_OR_JVMCI
JVMCI_ONLY(public:)
@@ -420,7 +417,6 @@
int trap_request);
static jint total_deoptimization_count();
- static jint deoptimization_count(DeoptReason reason);
// JVMTI PopFrame support
--- a/src/hotspot/share/runtime/frame.cpp Fri Jan 25 13:50:44 2019 +0000
+++ b/src/hotspot/share/runtime/frame.cpp Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 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
@@ -368,29 +368,6 @@
return result;
}
-// Note: called by profiler - NOT for current thread
-frame frame::profile_find_Java_sender_frame(JavaThread *thread) {
-// If we don't recognize this frame, walk back up the stack until we do
- RegisterMap map(thread, false);
- frame first_java_frame = frame();
-
- // Find the first Java frame on the stack starting with input frame
- if (is_java_frame()) {
- // top frame is compiled frame or deoptimized frame
- first_java_frame = *this;
- } else if (safe_for_sender(thread)) {
- for (frame sender_frame = sender(&map);
- sender_frame.safe_for_sender(thread) && !sender_frame.is_first_frame();
- sender_frame = sender_frame.sender(&map)) {
- if (sender_frame.is_java_frame()) {
- first_java_frame = sender_frame;
- break;
- }
- }
- }
- return first_java_frame;
-}
-
// Interpreter frames
--- a/src/hotspot/share/runtime/frame.hpp Fri Jan 25 13:50:44 2019 +0000
+++ b/src/hotspot/share/runtime/frame.hpp Tue Jan 29 17:42:58 2019 +0000
@@ -148,9 +148,6 @@
// returns the sending frame
frame sender(RegisterMap* map) const;
- // for Profiling - acting on another frame. walks sender frames
- // if valid.
- frame profile_find_Java_sender_frame(JavaThread *thread);
bool safe_for_sender(JavaThread *thread);
// returns the sender, but skips conversion frames
--- a/src/hotspot/share/runtime/globals.hpp Fri Jan 25 13:50:44 2019 +0000
+++ b/src/hotspot/share/runtime/globals.hpp Tue Jan 29 17:42:58 2019 +0000
@@ -140,8 +140,8 @@
// notproduct flags are settable / visible only during development and are not declared in the PRODUCT version
// A flag must be declared with one of the following types:
-// bool, int, uint, intx, uintx, size_t, ccstr, double, or uint64_t.
-// The type "ccstr" is an alias for "const char*" and is used
+// bool, int, uint, intx, uintx, size_t, ccstr, ccstrlist, double, or uint64_t.
+// The type "ccstr" and "ccstrlist" are an alias for "const char*" and is used
// only in this file, because the macrology requires single-token type names.
// Note: Diagnostic options not meant for VM tuning or for product modes.
--- a/src/hotspot/share/runtime/statSampler.cpp Fri Jan 25 13:50:44 2019 +0000
+++ b/src/hotspot/share/runtime/statSampler.cpp Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2001, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 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
@@ -356,14 +356,3 @@
PerfDataManager::create_counter(SUN_OS, "hrt.ticks",
PerfData::U_Ticks, psh, CHECK);
}
-
-/*
- * the statSampler_exit() function is called from os_init.cpp on
- * exit of the vm.
- */
-void statSampler_exit() {
-
- if (!UsePerfData) return;
-
- StatSampler::destroy();
-}
--- a/src/hotspot/share/runtime/statSampler.hpp Fri Jan 25 13:50:44 2019 +0000
+++ b/src/hotspot/share/runtime/statSampler.hpp Tue Jan 29 17:42:58 2019 +0000
@@ -65,6 +65,4 @@
static void destroy();
};
-void statSampler_exit();
-
#endif // SHARE_RUNTIME_STATSAMPLER_HPP
--- a/src/hotspot/share/runtime/stubRoutines.cpp Fri Jan 25 13:50:44 2019 +0000
+++ b/src/hotspot/share/runtime/stubRoutines.cpp Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 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
@@ -73,7 +73,6 @@
jint StubRoutines::_fpu_cntrl_wrd_std = 0;
jint StubRoutines::_fpu_cntrl_wrd_24 = 0;
-jint StubRoutines::_fpu_cntrl_wrd_64 = 0;
jint StubRoutines::_fpu_cntrl_wrd_trunc = 0;
jint StubRoutines::_mxcsr_std = 0;
jint StubRoutines::_fpu_subnormal_bias1[3] = { 0, 0, 0 };
@@ -163,11 +162,6 @@
address StubRoutines::_dlibm_tan_cot_huge = NULL;
address StubRoutines::_dtan = NULL;
-double (* StubRoutines::_intrinsic_log10 )(double) = NULL;
-double (* StubRoutines::_intrinsic_sin )(double) = NULL;
-double (* StubRoutines::_intrinsic_cos )(double) = NULL;
-double (* StubRoutines::_intrinsic_tan )(double) = NULL;
-
address StubRoutines::_safefetch32_entry = NULL;
address StubRoutines::_safefetch32_fault_pc = NULL;
address StubRoutines::_safefetch32_continuation_pc = NULL;
--- a/src/hotspot/share/runtime/stubRoutines.hpp Fri Jan 25 13:50:44 2019 +0000
+++ b/src/hotspot/share/runtime/stubRoutines.hpp Tue Jan 29 17:42:58 2019 +0000
@@ -78,10 +78,6 @@
class StubRoutines: AllStatic {
public:
- enum platform_independent_constants {
- max_size_of_parameters = 256 // max. parameter size supported by megamorphic lookups
- };
-
// Dependencies
friend class StubGenerator;
@@ -114,7 +110,6 @@
static jint _fpu_cntrl_wrd_std;
static jint _fpu_cntrl_wrd_24;
- static jint _fpu_cntrl_wrd_64;
static jint _fpu_cntrl_wrd_trunc;
static jint _mxcsr_std;
static jint _fpu_subnormal_bias1[3];
@@ -207,18 +202,6 @@
static address _dlibm_tan_cot_huge;
static address _dtan;
- // These are versions of the java.lang.Math methods which perform
- // the same operations as the intrinsic version. They are used for
- // constant folding in the compiler to ensure equivalence. If the
- // intrinsic version returns the same result as the strict version
- // then they can be set to the appropriate function from
- // SharedRuntime.
- static double (*_intrinsic_log10)(double);
- static double (*_intrinsic_pow)(double, double);
- static double (*_intrinsic_sin)(double);
- static double (*_intrinsic_cos)(double);
- static double (*_intrinsic_tan)(double);
-
// Safefetch stubs.
static address _safefetch32_entry;
static address _safefetch32_fault_pc;
@@ -289,7 +272,6 @@
static jint fpu_cntrl_wrd_std() { return _fpu_cntrl_wrd_std; }
static address addr_fpu_cntrl_wrd_std() { return (address)&_fpu_cntrl_wrd_std; }
static address addr_fpu_cntrl_wrd_24() { return (address)&_fpu_cntrl_wrd_24; }
- static address addr_fpu_cntrl_wrd_64() { return (address)&_fpu_cntrl_wrd_64; }
static address addr_fpu_cntrl_wrd_trunc() { return (address)&_fpu_cntrl_wrd_trunc; }
static address addr_mxcsr_std() { return (address)&_mxcsr_std; }
static address addr_fpu_subnormal_bias1() { return (address)&_fpu_subnormal_bias1; }
@@ -386,27 +368,6 @@
static address zero_aligned_words() { return _zero_aligned_words; }
- static double intrinsic_log10(double d) {
- assert(_intrinsic_log10 != NULL, "must be defined");
- return _intrinsic_log10(d);
- }
- static double intrinsic_pow(double d, double d2) {
- assert(_intrinsic_pow != NULL, "must be defined");
- return _intrinsic_pow(d, d2);
- }
- static double intrinsic_sin(double d) {
- assert(_intrinsic_sin != NULL, "must be defined");
- return _intrinsic_sin(d);
- }
- static double intrinsic_cos(double d) {
- assert(_intrinsic_cos != NULL, "must be defined");
- return _intrinsic_cos(d);
- }
- static double intrinsic_tan(double d) {
- assert(_intrinsic_tan != NULL, "must be defined");
- return _intrinsic_tan(d);
- }
-
//
// Safefetch stub support
//
--- a/src/hotspot/share/runtime/thread.cpp Fri Jan 25 13:50:44 2019 +0000
+++ b/src/hotspot/share/runtime/thread.cpp Tue Jan 29 17:42:58 2019 +0000
@@ -2392,8 +2392,19 @@
}
}
- VM_ThreadSuspend vm_suspend;
- VMThread::execute(&vm_suspend);
+ if (Thread::current() == this) {
+ // Safely self-suspend.
+ // If we don't do this explicitly it will implicitly happen
+ // before we transition back to Java, and on some other thread-state
+ // transition paths, but not as we exit a JVM TI SuspendThread call.
+ // As SuspendThread(current) must not return (until resumed) we must
+ // self-suspend here.
+ ThreadBlockInVM tbivm(this);
+ java_suspend_self();
+ } else {
+ VM_ThreadSuspend vm_suspend;
+ VMThread::execute(&vm_suspend);
+ }
}
// Part II of external suspension.
--- a/src/hotspot/share/runtime/timer.cpp Fri Jan 25 13:50:44 2019 +0000
+++ b/src/hotspot/share/runtime/timer.cpp Tue Jan 29 17:42:58 2019 +0000
@@ -118,59 +118,3 @@
assert(is_updated(), "must not be clear");
return os::elapsed_counter() - _counter;
}
-
-TraceCPUTime::TraceCPUTime(bool doit,
- bool print_cr,
- outputStream *logfile) :
- _active(doit),
- _print_cr(print_cr),
- _starting_user_time(0.0),
- _starting_system_time(0.0),
- _starting_real_time(0.0),
- _logfile(logfile),
- _error(false) {
- if (_active) {
- if (logfile != NULL) {
- _logfile = logfile;
- } else {
- _logfile = tty;
- }
-
- _error = !os::getTimesSecs(&_starting_real_time,
- &_starting_user_time,
- &_starting_system_time);
- }
-}
-
-TraceCPUTime::~TraceCPUTime() {
- if (_active) {
- bool valid = false;
- if (!_error) {
- double real_secs; // walk clock time
- double system_secs; // system time
- double user_secs; // user time for all threads
-
- double real_time, user_time, system_time;
- valid = os::getTimesSecs(&real_time, &user_time, &system_time);
- if (valid) {
-
- user_secs = user_time - _starting_user_time;
- system_secs = system_time - _starting_system_time;
- real_secs = real_time - _starting_real_time;
-
- _logfile->print(" [Times: user=%3.2f sys=%3.2f real=%3.2f secs] ",
- user_secs, system_secs, real_secs);
-
- } else {
- _logfile->print("[Invalid result in TraceCPUTime]");
- }
- } else {
- _logfile->print("[Error in TraceCPUTime]");
- }
- if (_print_cr) {
- _logfile->cr();
- }
- _logfile->flush();
- }
-}
-
--- a/src/hotspot/share/runtime/timer.hpp Fri Jan 25 13:50:44 2019 +0000
+++ b/src/hotspot/share/runtime/timer.hpp Tue Jan 29 17:42:58 2019 +0000
@@ -72,23 +72,6 @@
jlong ticks_since_update() const;
};
-class TraceCPUTime: public StackObj {
- private:
- bool _active; // true if times will be measured and printed
- bool _print_cr; // if true print carriage return at end
- double _starting_user_time; // user time at start of measurement
- double _starting_system_time; // system time at start of measurement
- double _starting_real_time; // real time at start of measurement
- outputStream* _logfile; // output is printed to this stream
- bool _error; // true if an error occurred, turns off output
-
- public:
- TraceCPUTime(bool doit = true,
- bool print_cr = true,
- outputStream *logfile = NULL);
- ~TraceCPUTime();
-};
-
class TimeHelper {
public:
static double counter_to_seconds(jlong counter);
--- a/src/hotspot/share/runtime/vmOperations.hpp Fri Jan 25 13:50:44 2019 +0000
+++ b/src/hotspot/share/runtime/vmOperations.hpp Tue Jan 29 17:42:58 2019 +0000
@@ -68,7 +68,9 @@
template(G1CollectForAllocation) \
template(G1CollectFull) \
template(G1Concurrent) \
- template(ZOperation) \
+ template(ZMarkStart) \
+ template(ZMarkEnd) \
+ template(ZRelocateStart) \
template(HandshakeOneThread) \
template(HandshakeAllThreads) \
template(HandshakeFallback) \
@@ -119,7 +121,6 @@
template(PrintCompileQueue) \
template(PrintClassHierarchy) \
template(ThreadSuspend) \
- template(CTWThreshold) \
template(ThreadsSuspendJVMTI) \
template(ICBufferFull) \
template(ScavengeMonitors) \
@@ -270,12 +271,6 @@
VMOp_Type type() const { return VMOp_ThreadSuspend; }
};
-// empty vm op, when forcing a safepoint due to ctw threshold is reached for the sweeper
-class VM_CTWThreshold: public VM_ForceSafepoint {
- public:
- VMOp_Type type() const { return VMOp_CTWThreshold; }
-};
-
// empty vm op, when forcing a safepoint to suspend threads from jvmti
class VM_ThreadsSuspendJVMTI: public VM_ForceSafepoint {
public:
--- a/src/hotspot/share/utilities/bitMap.hpp Fri Jan 25 13:50:44 2019 +0000
+++ b/src/hotspot/share/utilities/bitMap.hpp Tue Jan 29 17:42:58 2019 +0000
@@ -429,12 +429,6 @@
return _map.size();
}
- // Returns number of full slots that have been allocated
- idx_t size_in_slots() {
- // Round down
- return _map.size() / _bits_per_slot;
- }
-
bool is_valid_index(idx_t slot_index, idx_t bit_within_slot_index);
bool at(idx_t slot_index, idx_t bit_within_slot_index) const;
void set_bit(idx_t slot_index, idx_t bit_within_slot_index);
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/hotspot/share/utilities/count_leading_zeros.hpp Tue Jan 29 17:42:58 2019 +0000
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 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
+ * 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_UTILITIES_COUNT_LEADING_ZEROS_HPP
+#define SHARE_UTILITIES_COUNT_LEADING_ZEROS_HPP
+
+#include "utilities/debug.hpp"
+#include "utilities/globalDefinitions.hpp"
+#include "utilities/count_trailing_zeros.hpp"
+
+#if defined(TARGET_COMPILER_visCPP)
+#include <intrin.h>
+#pragma intrinsic(_BitScanReverse)
+#elif defined(TARGET_COMPILER_xlc)
+#include <builtins.h>
+#endif
+
+// uint32_t count_leading_zeros(uint32_t x)
+// Return the number of leading zeros in x, e.g. the zero-based index
+// of the most significant set bit in x. Undefined for 0.
+inline uint32_t count_leading_zeros(uint32_t x) {
+ assert(x != 0, "precondition");
+#if defined(TARGET_COMPILER_gcc)
+ return __builtin_clz(x);
+#elif defined(TARGET_COMPILER_visCPP)
+ unsigned long index;
+ _BitScanReverse(&index, x);
+ return index ^ 31u;
+#elif defined(TARGET_COMPILER_xlc)
+ return __cntlz4(x);
+#else
+ // Efficient and portable fallback implementation:
+ // http://graphics.stanford.edu/~seander/bithacks.html#IntegerLogDeBruijn
+ // - with positions xor'd by 31 to get number of leading zeros
+ // rather than position of highest bit.
+ static const int MultiplyDeBruijnBitPosition[32] = {
+ 31, 22, 30, 21, 18, 10, 29, 2, 20, 17, 15, 13, 9, 6, 28, 1,
+ 23, 19, 11, 3, 16, 14, 7, 24, 12, 4, 8, 25, 5, 26, 27, 0
+ };
+
+ x |= x >> 1; // first round down to one less than a power of 2
+ x |= x >> 2;
+ x |= x >> 4;
+ x |= x >> 8;
+ x |= x >> 16;
+ return MultiplyDeBruijnBitPosition[(uint32_t)( x * 0x07c4acddu ) >> 27];
+#endif
+}
+
+#endif // SHARE_UTILITIES_COUNT_LEADING_ZEROS_HPP
--- a/src/hotspot/share/utilities/resourceHash.hpp Fri Jan 25 13:50:44 2019 +0000
+++ b/src/hotspot/share/utilities/resourceHash.hpp Tue Jan 29 17:42:58 2019 +0000
@@ -27,11 +27,6 @@
#include "memory/allocation.hpp"
-template<typename K> struct ResourceHashtableFns {
- typedef unsigned (*hash_fn)(K const&);
- typedef bool (*equals_fn)(K const&, K const&);
-};
-
template<
typename K, typename V,
// xlC does not compile this:
@@ -160,10 +155,6 @@
++bucket;
}
}
-
- static size_t node_size() {
- return sizeof(Node);
- }
};
--- a/src/java.base/share/classes/javax/net/ssl/SSLSocket.java Fri Jan 25 13:50:44 2019 +0000
+++ b/src/java.base/share/classes/javax/net/ssl/SSLSocket.java Tue Jan 29 17:42:58 2019 +0000
@@ -135,7 +135,7 @@
* applications should each close both sides of their respective connection.
* For {@code SSLSocket} objects, for example, an application can call
* {@link Socket#shutdownOutput()} or {@link java.io.OutputStream#close()}
- * for output strean close and call {@link Socket#shutdownInput()} or
+ * for output stream close and call {@link Socket#shutdownInput()} or
* {@link java.io.InputStream#close()} for input stream close. Note that
* in some cases, closing the input stream may depend on the peer's output
* stream being closed first. If the connection is not closed in an orderly
--- a/src/java.base/share/classes/sun/security/ssl/SSLAlgorithmDecomposer.java Fri Jan 25 13:50:44 2019 +0000
+++ b/src/java.base/share/classes/sun/security/ssl/SSLAlgorithmDecomposer.java Tue Jan 29 17:42:58 2019 +0000
@@ -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
@@ -266,7 +266,8 @@
// ignore: unknown or unsupported ciphersuite
}
- if (cipherSuite != null) {
+ if (cipherSuite != null &&
+ cipherSuite != CipherSuite.TLS_EMPTY_RENEGOTIATION_INFO_SCSV) {
return decompose(cipherSuite.keyExchange,
cipherSuite.bulkCipher,
cipherSuite.macAlg,
--- a/src/java.base/share/classes/sun/security/util/ECUtil.java Fri Jan 25 13:50:44 2019 +0000
+++ b/src/java.base/share/classes/sun/security/util/ECUtil.java Tue Jan 29 17:42:58 2019 +0000
@@ -31,7 +31,6 @@
import java.security.interfaces.*;
import java.security.spec.*;
import java.util.Arrays;
-import sun.security.x509.X509Key;
public class ECUtil {
@@ -103,7 +102,7 @@
ECParameterSpec params) throws InvalidKeySpecException {
KeyFactory keyFactory = getKeyFactory();
ECPublicKeySpec keySpec = new ECPublicKeySpec(w, params);
- X509Key key = (X509Key)keyFactory.generatePublic(keySpec);
+ Key key = keyFactory.generatePublic(keySpec);
return key.getEncoded();
}
--- a/src/java.base/share/lib/security/default.policy Fri Jan 25 13:50:44 2019 +0000
+++ b/src/java.base/share/lib/security/default.policy Tue Jan 29 17:42:58 2019 +0000
@@ -201,6 +201,7 @@
permission java.io.FilePermission "<<ALL FILES>>", "read,write,delete";
permission java.lang.RuntimePermission "fileSystemProvider";
permission java.util.PropertyPermission "os.name", "read";
+ permission java.util.PropertyPermission "user.dir", "read";
};
// permissions needed by applications using java.desktop module
--- a/src/java.net.http/share/classes/java/net/http/HttpResponse.java Fri Jan 25 13:50:44 2019 +0000
+++ b/src/java.net.http/share/classes/java/net/http/HttpResponse.java Tue Jan 29 17:42:58 2019 +0000
@@ -47,6 +47,7 @@
import java.util.concurrent.Flow.Subscription;
import java.util.function.Consumer;
import java.util.function.Function;
+import java.util.function.Supplier;
import java.util.stream.Stream;
import javax.net.ssl.SSLSession;
import jdk.internal.net.http.BufferingSubscriber;
@@ -1282,17 +1283,26 @@
*
* <p> The mapping function is executed using the client's {@linkplain
* HttpClient#executor() executor}, and can therefore be used to map any
- * response body type, including blocking {@link InputStream}, as shown
- * in the following example which uses a well-known JSON parser to
+ * response body type, including blocking {@link InputStream}.
+ * However, performing any blocking operation in the mapper function
+ * runs the risk of blocking the executor's thread for an unknown
+ * amount of time (at least until the blocking operation finishes),
+ * which may end up starving the executor of available threads.
+ * Therefore, in the case where mapping to the desired type might
+ * block (e.g. by reading on the {@code InputStream}), then mapping
+ * to a {@link java.util.function.Supplier Supplier} of the desired
+ * type and deferring the blocking operation until {@link Supplier#get()
+ * Supplier::get} is invoked by the caller's thread should be preferred,
+ * as shown in the following example which uses a well-known JSON parser to
* convert an {@code InputStream} into any annotated Java type.
*
* <p>For example:
- * <pre> {@code public static <W> BodySubscriber<W> asJSON(Class<W> targetType) {
+ * <pre> {@code public static <W> BodySubscriber<Supplier<W>> asJSON(Class<W> targetType) {
* BodySubscriber<InputStream> upstream = BodySubscribers.ofInputStream();
*
- * BodySubscriber<W> downstream = BodySubscribers.mapping(
+ * BodySubscriber<Supplier<W>> downstream = BodySubscribers.mapping(
* upstream,
- * (InputStream is) -> {
+ * (InputStream is) -> () -> {
* try (InputStream stream = is) {
* ObjectMapper objectMapper = new ObjectMapper();
* return objectMapper.readValue(stream, targetType);
@@ -1301,7 +1311,7 @@
* }
* });
* return downstream;
- * } }</pre>
+ * } }</pre>
*
* @param <T> the upstream body type
* @param <U> the type of the body subscriber returned
--- a/src/java.net.http/share/classes/jdk/internal/net/http/HttpRequestImpl.java Fri Jan 25 13:50:44 2019 +0000
+++ b/src/java.net.http/share/classes/jdk/internal/net/http/HttpRequestImpl.java Tue Jan 29 17:42:58 2019 +0000
@@ -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
@@ -43,6 +43,7 @@
import java.net.http.HttpRequest;
import jdk.internal.net.http.common.HttpHeadersBuilder;
import jdk.internal.net.http.common.Utils;
+import jdk.internal.net.http.websocket.OpeningHandshake;
import jdk.internal.net.http.websocket.WebSocketRequest;
import static jdk.internal.net.http.common.Utils.ALLOWED_HEADERS;
@@ -157,7 +158,11 @@
/** Returns a new instance suitable for authentication. */
public static HttpRequestImpl newInstanceForAuthentication(HttpRequestImpl other) {
- return new HttpRequestImpl(other.uri(), other.method(), other);
+ HttpRequestImpl request = new HttpRequestImpl(other.uri(), other.method(), other);
+ if (request.isWebSocket()) {
+ Utils.setWebSocketUpgradeHeaders(request);
+ }
+ return request;
}
/**
--- a/src/java.net.http/share/classes/jdk/internal/net/http/common/Utils.java Fri Jan 25 13:50:44 2019 +0000
+++ b/src/java.net.http/share/classes/jdk/internal/net/http/common/Utils.java Tue Jan 29 17:42:58 2019 +0000
@@ -263,6 +263,15 @@
: ! PROXY_AUTH_DISABLED_SCHEMES.isEmpty();
}
+ // WebSocket connection Upgrade headers
+ private static final String HEADER_CONNECTION = "Connection";
+ private static final String HEADER_UPGRADE = "Upgrade";
+
+ public static final void setWebSocketUpgradeHeaders(HttpRequestImpl request) {
+ request.setSystemHeader(HEADER_UPGRADE, "websocket");
+ request.setSystemHeader(HEADER_CONNECTION, "Upgrade");
+ }
+
public static IllegalArgumentException newIAE(String message, Object... args) {
return new IllegalArgumentException(format(message, args));
}
--- a/src/java.net.http/share/classes/jdk/internal/net/http/websocket/OpeningHandshake.java Fri Jan 25 13:50:44 2019 +0000
+++ b/src/java.net.http/share/classes/jdk/internal/net/http/websocket/OpeningHandshake.java Tue Jan 29 17:42:58 2019 +0000
@@ -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,7 @@
requestBuilder.version(Version.HTTP_1_1).GET();
request = requestBuilder.buildForWebSocket();
request.isWebSocket(true);
- request.setSystemHeader(HEADER_UPGRADE, "websocket");
- request.setSystemHeader(HEADER_CONNECTION, "Upgrade");
+ Utils.setWebSocketUpgradeHeaders(request);
request.setProxy(proxy);
}
--- a/src/java.xml/share/classes/com/sun/xml/internal/stream/writers/XMLStreamWriterImpl.java Fri Jan 25 13:50:44 2019 +0000
+++ b/src/java.xml/share/classes/com/sun/xml/internal/stream/writers/XMLStreamWriterImpl.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 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
@@ -44,6 +44,7 @@
import java.util.Iterator;
import java.util.List;
import java.util.Map;
+import java.util.Objects;
import java.util.Random;
import java.util.Set;
import javax.xml.XMLConstants;
@@ -1729,12 +1730,7 @@
*/
private boolean isDefaultNamespace(String uri) {
String defaultNamespace = fInternalNamespaceContext.getURI(DEFAULT_PREFIX);
-
- if (uri.equals(defaultNamespace)) {
- return true;
- }
-
- return false;
+ return Objects.equals(uri, defaultNamespace);
}
/**
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Type.java Fri Jan 25 13:50:44 2019 +0000
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Type.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1999, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 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
@@ -896,7 +896,7 @@
if (moreInfo && bound != null && !isPrintingBound)
try {
isPrintingBound = true;
- s.append("{:").append(bound.bound).append(":}");
+ s.append("{:").append(bound.getUpperBound()).append(":}");
} finally {
isPrintingBound = false;
}
@@ -1607,7 +1607,7 @@
* itself. Furthermore, the erasure_field of the class
* points to the first class or interface bound.
*/
- public Type bound = null;
+ private Type _bound = null;
/** The lower bound of this type variable.
* TypeVars don't normally have a lower bound, so it is normally set
@@ -1620,7 +1620,7 @@
super(null, TypeMetadata.EMPTY);
Assert.checkNonNull(lower);
tsym = new TypeVariableSymbol(0, name, this, owner);
- this.bound = null;
+ this.setUpperBound(null);
this.lower = lower;
}
@@ -1632,15 +1632,20 @@
TypeMetadata metadata) {
super(tsym, metadata);
Assert.checkNonNull(lower);
- this.bound = bound;
+ this.setUpperBound(bound);
this.lower = lower;
}
@Override
public TypeVar cloneWithMetadata(TypeMetadata md) {
- return new TypeVar(tsym, bound, lower, md) {
+ return new TypeVar(tsym, getUpperBound(), lower, md) {
@Override
public Type baseType() { return TypeVar.this.baseType(); }
+
+ @Override @DefinedBy(Api.LANGUAGE_MODEL)
+ public Type getUpperBound() { return TypeVar.this.getUpperBound(); }
+
+ public void setUpperBound(Type bound) { TypeVar.this.setUpperBound(bound); }
};
}
@@ -1655,12 +1660,9 @@
}
@Override @DefinedBy(Api.LANGUAGE_MODEL)
- public Type getUpperBound() {
- if ((bound == null || bound.hasTag(NONE)) && this != tsym.type) {
- bound = tsym.type.getUpperBound();
- }
- return bound;
- }
+ public Type getUpperBound() { return _bound; }
+
+ public void setUpperBound(Type bound) { this._bound = bound; }
int rank_field = -1;
@@ -1709,7 +1711,7 @@
WildcardType wildcard) {
super(name, owner, lower);
this.lower = Assert.checkNonNull(lower);
- this.bound = upper;
+ this.setUpperBound(upper);
this.wildcard = wildcard;
}
@@ -1725,9 +1727,14 @@
@Override
public CapturedType cloneWithMetadata(TypeMetadata md) {
- return new CapturedType(tsym, bound, bound, lower, wildcard, md) {
+ return new CapturedType(tsym, getUpperBound(), getUpperBound(), lower, wildcard, md) {
@Override
public Type baseType() { return CapturedType.this.baseType(); }
+
+ @Override @DefinedBy(Api.LANGUAGE_MODEL)
+ public Type getUpperBound() { return CapturedType.this.getUpperBound(); }
+
+ public void setUpperBound(Type bound) { CapturedType.this.setUpperBound(bound); }
};
}
@@ -1832,7 +1839,7 @@
public void complete() {
for (List<Type> l = tvars; l.nonEmpty(); l = l.tail) {
- ((TypeVar)l.head).bound.complete();
+ ((TypeVar)l.head).getUpperBound().complete();
}
qtype.complete();
}
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Types.java Fri Jan 25 13:50:44 2019 +0000
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Types.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 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
@@ -132,7 +132,7 @@
if (t.hasTag(WILDCARD)) {
WildcardType w = (WildcardType) t;
if (w.isSuperBound())
- return w.bound == null ? syms.objectType : w.bound.bound;
+ return w.bound == null ? syms.objectType : w.bound.getUpperBound();
else
return wildUpperBound(w.type);
}
@@ -146,7 +146,7 @@
public Type cvarUpperBound(Type t) {
if (t.hasTag(TYPEVAR)) {
TypeVar v = (TypeVar) t;
- return v.isCaptured() ? cvarUpperBound(v.bound) : v;
+ return v.isCaptured() ? cvarUpperBound(v.getUpperBound()) : v;
}
else return t;
}
@@ -1821,14 +1821,14 @@
case TYPEVAR:
if (isSubtype(t, s)) {
return true;
- } else if (isCastable(t.bound, s, noWarnings)) {
+ } else if (isCastable(t.getUpperBound(), s, noWarnings)) {
warnStack.head.warn(LintCategory.UNCHECKED);
return true;
} else {
return false;
}
default:
- return isCastable(t.bound, s, warnStack.head);
+ return isCastable(t.getUpperBound(), s, warnStack.head);
}
}
@@ -1954,7 +1954,7 @@
if (t == s) return false;
if (t.hasTag(TYPEVAR)) {
TypeVar tv = (TypeVar) t;
- return !isCastable(tv.bound,
+ return !isCastable(tv.getUpperBound(),
relaxBound(s),
noWarnings);
}
@@ -2150,7 +2150,7 @@
if (t.tsym == sym)
return t;
else
- return asSuper(t.bound, sym);
+ return asSuper(t.getUpperBound(), sym);
}
@Override
@@ -2269,7 +2269,7 @@
@Override
public Type visitTypeVar(TypeVar t, Symbol sym) {
- return memberType(t.bound, sym);
+ return memberType(t.getUpperBound(), sym);
}
@Override
@@ -2392,7 +2392,7 @@
@Override
public Type visitTypeVar(TypeVar t, Boolean recurse) {
- Type erased = erasure(t.bound, recurse);
+ Type erased = erasure(t.getUpperBound(), recurse);
return combineMetadata(erased, t);
}
};
@@ -2498,11 +2498,11 @@
*/
@Override
public Type visitTypeVar(TypeVar t, Void ignored) {
- if (t.bound.hasTag(TYPEVAR) ||
- (!t.bound.isCompound() && !t.bound.isInterface())) {
- return t.bound;
+ if (t.getUpperBound().hasTag(TYPEVAR) ||
+ (!t.getUpperBound().isCompound() && !t.getUpperBound().isInterface())) {
+ return t.getUpperBound();
} else {
- return supertype(t.bound);
+ return supertype(t.getUpperBound());
}
}
@@ -2573,11 +2573,11 @@
@Override
public List<Type> visitTypeVar(TypeVar t, Void ignored) {
- if (t.bound.isCompound())
- return interfaces(t.bound);
-
- if (t.bound.isInterface())
- return List.of(t.bound);
+ if (t.getUpperBound().isCompound())
+ return interfaces(t.getUpperBound());
+
+ if (t.getUpperBound().isInterface())
+ return List.of(t.getUpperBound());
return List.nil();
}
@@ -2662,9 +2662,9 @@
* @param allInterfaces are all bounds interface types?
*/
public void setBounds(TypeVar t, List<Type> bounds, boolean allInterfaces) {
- t.bound = bounds.tail.isEmpty() ?
+ t.setUpperBound( bounds.tail.isEmpty() ?
bounds.head :
- makeIntersectionType(bounds, allInterfaces);
+ makeIntersectionType(bounds, allInterfaces) );
t.rank_field = -1;
}
// </editor-fold>
@@ -2674,10 +2674,10 @@
* Return list of bounds of the given type variable.
*/
public List<Type> getBounds(TypeVar t) {
- if (t.bound.hasTag(NONE))
+ if (t.getUpperBound().hasTag(NONE))
return List.nil();
- else if (t.bound.isErroneous() || !t.bound.isCompound())
- return List.of(t.bound);
+ else if (t.getUpperBound().isErroneous() || !t.getUpperBound().isCompound())
+ return List.of(t.getUpperBound());
else if ((erasure(t).tsym.flags() & INTERFACE) == 0)
return interfaces(t).prepend(supertype(t));
else
@@ -3361,8 +3361,8 @@
// calculate new bounds
for (Type t : tvars) {
TypeVar tv = (TypeVar) t;
- Type bound = subst(tv.bound, from, to);
- if (bound != tv.bound)
+ Type bound = subst(tv.getUpperBound(), from, to);
+ if (bound != tv.getUpperBound())
changed = true;
newBoundsBuf.append(bound);
}
@@ -3386,15 +3386,15 @@
// set the bounds of new type variables to the new bounds
for (Type t : newTvars.toList()) {
TypeVar tv = (TypeVar) t;
- tv.bound = newBounds.head;
+ tv.setUpperBound( newBounds.head );
newBounds = newBounds.tail;
}
return newTvars.toList();
}
public TypeVar substBound(TypeVar t, List<Type> from, List<Type> to) {
- Type bound1 = subst(t.bound, from, to);
- if (bound1 == t.bound)
+ Type bound1 = subst(t.getUpperBound(), from, to);
+ if (bound1 == t.getUpperBound())
return t;
else {
// create new type variable without bounds
@@ -3402,7 +3402,7 @@
t.getMetadata());
// the new bound should use the new type variable in place
// of the old
- tv.bound = subst(bound1, List.of(t), List.of(tv));
+ tv.setUpperBound( subst(bound1, List.of(t), List.of(tv)) );
return tv;
}
}
@@ -3435,7 +3435,7 @@
List<Type> tvars1 = tvars.map(newInstanceFun);
for (List<Type> l = tvars1; l.nonEmpty(); l = l.tail) {
TypeVar tv = (TypeVar) l.head;
- tv.bound = subst(tv.bound, tvars, tvars1);
+ tv.setUpperBound( subst(tv.getUpperBound(), tvars, tvars1) );
}
return tvars1;
}
@@ -3614,11 +3614,11 @@
}
private void appendTyparamString(TypeVar t, StringBuilder buf) {
buf.append(t);
- if (t.bound == null ||
- t.bound.tsym.getQualifiedName() == names.java_lang_Object)
+ if (t.getUpperBound() == null ||
+ t.getUpperBound().tsym.getQualifiedName() == names.java_lang_Object)
return;
buf.append(" extends "); // Java syntax; no need for i18n
- Type bound = t.bound;
+ Type bound = t.getUpperBound();
if (!bound.isCompound()) {
buf.append(bound);
} else if ((erasure(t).tsym.flags() & INTERFACE) == 0) {
@@ -4375,24 +4375,24 @@
Ui = syms.objectType;
switch (Ti.kind) {
case UNBOUND:
- Si.bound = subst(Ui, A, S);
+ Si.setUpperBound( subst(Ui, A, S) );
Si.lower = syms.botType;
break;
case EXTENDS:
- Si.bound = glb(Ti.getExtendsBound(), subst(Ui, A, S));
+ Si.setUpperBound( glb(Ti.getExtendsBound(), subst(Ui, A, S)) );
Si.lower = syms.botType;
break;
case SUPER:
- Si.bound = subst(Ui, A, S);
+ Si.setUpperBound( subst(Ui, A, S) );
Si.lower = Ti.getSuperBound();
break;
}
- Type tmpBound = Si.bound.hasTag(UNDETVAR) ? ((UndetVar)Si.bound).qtype : Si.bound;
+ Type tmpBound = Si.getUpperBound().hasTag(UNDETVAR) ? ((UndetVar)Si.getUpperBound()).qtype : Si.getUpperBound();
Type tmpLower = Si.lower.hasTag(UNDETVAR) ? ((UndetVar)Si.lower).qtype : Si.lower;
- if (!Si.bound.hasTag(ERROR) &&
+ if (!Si.getUpperBound().hasTag(ERROR) &&
!Si.lower.hasTag(ERROR) &&
isSameType(tmpBound, tmpLower)) {
- currentS.head = Si.bound;
+ currentS.head = Si.getUpperBound();
}
}
currentA = currentA.tail;
@@ -4720,9 +4720,9 @@
@Override
public Type visitTypeVar(TypeVar t, Void s) {
if (rewriteTypeVars) {
- Type bound = t.bound.contains(t) ?
- erasure(t.bound) :
- visit(t.bound);
+ Type bound = t.getUpperBound().contains(t) ?
+ erasure(t.getUpperBound()) :
+ visit(t.getUpperBound());
return rewriteAsWildcardType(bound, t, EXTENDS);
} else {
return t;
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Attr.java Fri Jan 25 13:50:44 2019 +0000
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Attr.java Tue Jan 29 17:42:58 2019 +0000
@@ -798,7 +798,7 @@
for (JCTypeParameter tvar : typarams) {
TypeVar a = (TypeVar)tvar.type;
a.tsym.flags_field |= UNATTRIBUTED;
- a.bound = Type.noType;
+ a.setUpperBound(Type.noType);
if (!tvar.bounds.isEmpty()) {
List<Type> bounds = List.of(attribType(tvar.bounds.head, env));
for (JCExpression bound : tvar.bounds.tail)
@@ -4520,9 +4520,9 @@
annotate.annotateTypeParameterSecondStage(tree, tree.annotations);
}
- if (!typeVar.bound.isErroneous()) {
+ if (!typeVar.getUpperBound().isErroneous()) {
//fixup type-parameter bound computed in 'attribTypeVariables'
- typeVar.bound = checkIntersection(tree, tree.bounds);
+ typeVar.setUpperBound(checkIntersection(tree, tree.bounds));
}
}
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Check.java Fri Jan 25 13:50:44 2019 +0000
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Check.java Tue Jan 29 17:42:58 2019 +0000
@@ -2285,7 +2285,7 @@
return;
if (seen.contains(t)) {
tv = (TypeVar)t;
- tv.bound = types.createErrorType(t);
+ tv.setUpperBound(types.createErrorType(t));
log.error(pos, Errors.CyclicInheritance(t));
} else if (t.hasTag(TYPEVAR)) {
tv = (TypeVar)t;
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Infer.java Fri Jan 25 13:50:44 2019 +0000
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Infer.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1999, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 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
@@ -537,8 +537,8 @@
for (Type t : todo) {
UndetVar uv = (UndetVar)t;
TypeVar ct = (TypeVar)uv.getInst();
- ct.bound = types.glb(inferenceContext.asInstTypes(types.getBounds(ct)));
- if (ct.bound.isErroneous()) {
+ ct.setUpperBound( types.glb(inferenceContext.asInstTypes(types.getBounds(ct))) );
+ if (ct.getUpperBound().isErroneous()) {
//report inference error if glb fails
reportBoundError(uv, InferenceBound.UPPER);
}
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/LambdaToMethod.java Fri Jan 25 13:50:44 2019 +0000
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/LambdaToMethod.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 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
@@ -989,7 +989,7 @@
// use the SAM parameter type
if (checkForIntersection && descPTypes.head.getKind() == TypeKind.TYPEVAR) {
TypeVar tv = (TypeVar) descPTypes.head;
- if (tv.bound.getKind() == TypeKind.INTERSECTION) {
+ if (tv.getUpperBound().getKind() == TypeKind.INTERSECTION) {
parmType = samPTypes.head;
}
}
@@ -2375,7 +2375,7 @@
return true;
case TYPEVAR:
TypeVar tv = (TypeVar) t;
- return isIntersectionOrUnionType(tv.bound);
+ return isIntersectionOrUnionType(tv.getUpperBound());
}
return false;
}
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/util/RichDiagnosticFormatter.java Fri Jan 25 13:50:44 2019 +0000
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/util/RichDiagnosticFormatter.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2009, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 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
@@ -506,11 +506,11 @@
public Void visitCapturedType(CapturedType t, Void ignored) {
if (indexOf(t, WhereClauseKind.CAPTURED) == -1) {
String suffix = t.lower == syms.botType ? ".1" : "";
- JCDiagnostic d = diags.fragment("where.captured"+ suffix, t, t.bound, t.lower, t.wildcard);
+ JCDiagnostic d = diags.fragment("where.captured"+ suffix, t, t.getUpperBound(), t.lower, t.wildcard);
whereClauses.get(WhereClauseKind.CAPTURED).put(t, d);
visit(t.wildcard);
visit(t.lower);
- visit(t.bound);
+ visit(t.getUpperBound());
}
return null;
}
@@ -555,7 +555,7 @@
t = (TypeVar)t.stripMetadataIfNeeded();
if (indexOf(t, WhereClauseKind.TYPEVAR) == -1) {
//access the bound type and skip error types
- Type bound = t.bound;
+ Type bound = t.getUpperBound();
while ((bound instanceof ErrorType))
bound = ((ErrorType)bound).getOriginalType();
//retrieve the bound list - if the type variable
--- a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/VM.java Fri Jan 25 13:50:44 2019 +0000
+++ b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/VM.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 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
@@ -130,6 +130,7 @@
private static Type intxType;
private static Type uintxType;
private static Type sizetType;
+ private static Type uint64tType;
private static CIntegerType boolType;
private Boolean sharingEnabled;
private Boolean compressedOopsEnabled;
@@ -231,6 +232,50 @@
return addr.getCIntegerAt(0, sizetType.getSize(), true);
}
+ public boolean isCcstr() {
+ return type.equals("ccstr");
+ }
+
+ public String getCcstr() {
+ if (Assert.ASSERTS_ENABLED) {
+ Assert.that(isCcstr(), "not a ccstr flag!");
+ }
+ return CStringUtilities.getString(addr.getAddressAt(0));
+ }
+
+ public boolean isCcstrlist() {
+ return type.equals("ccstrlist");
+ }
+
+ public String getCcstrlist() {
+ if (Assert.ASSERTS_ENABLED) {
+ Assert.that(isCcstrlist(), "not a ccstrlist flag!");
+ }
+ return CStringUtilities.getString(addr.getAddressAt(0));
+ }
+
+ public boolean isDouble() {
+ return type.equals("double");
+ }
+
+ public double getDouble() {
+ if (Assert.ASSERTS_ENABLED) {
+ Assert.that(isDouble(), "not a double flag!");
+ }
+ return addr.getJDoubleAt(0);
+ }
+
+ public boolean isUint64t() {
+ return type.equals("uint64_t");
+ }
+
+ public long getUint64t() {
+ if (Assert.ASSERTS_ENABLED) {
+ Assert.that(isUint64t(), "not an uint64_t flag!");
+ }
+ return addr.getCIntegerAt(0, uint64tType.getSize(), true);
+ }
+
public String getValue() {
if (isBool()) {
return Boolean.toString(getBool());
@@ -241,11 +286,27 @@
} else if (isIntx()) {
return Long.toString(getIntx());
} else if (isUIntx()) {
- return Long.toString(getUIntx());
+ return Long.toUnsignedString(getUIntx());
} else if (isSizet()) {
- return Long.toString(getSizet());
+ return Long.toUnsignedString(getSizet());
+ } else if (isCcstr()) {
+ var str = getCcstr();
+ if (str != null) {
+ str = "\"" + str + "\"";
+ }
+ return str;
+ } else if (isCcstrlist()) {
+ var str = getCcstrlist();
+ if (str != null) {
+ str = "\"" + str + "\"";
+ }
+ return str;
+ } else if (isDouble()) {
+ return Double.toString(getDouble());
+ } else if (isUint64t()) {
+ return Long.toUnsignedString(getUint64t());
} else {
- return null;
+ throw new WrongTypeException("Unknown type: " + type + " (" + name + ")");
}
}
};
@@ -383,6 +444,7 @@
intxType = db.lookupType("intx");
uintxType = db.lookupType("uintx");
sizetType = db.lookupType("size_t");
+ uint64tType = db.lookupType("uint64_t");
boolType = (CIntegerType) db.lookupType("bool");
minObjAlignmentInBytes = getObjectAlignmentInBytes();
--- a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/tools/HeapSummary.java Fri Jan 25 13:50:44 2019 +0000
+++ b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/tools/HeapSummary.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 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
@@ -294,6 +294,8 @@
if (f != null) {
if (f.isBool()) {
return f.getBool()? 1L : 0L;
+ } else if (f.isUIntx() || f.isSizet() || f.isUint64t()) {
+ return Long.parseUnsignedLong(f.getValue());
} else {
return Long.parseLong(f.getValue());
}
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/IntegerExactExceptionTest.java Fri Jan 25 13:50:44 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/IntegerExactExceptionTest.java Tue Jan 29 17:42:58 2019 +0000
@@ -98,6 +98,10 @@
}
}
+ public void testIntegerExactOverflowWithoutUse3() {
+ Math.addExact(Integer.MAX_VALUE, 1);
+ }
+
@Test
public void testIntegerExactWithoutUse1() throws InvalidInstalledCodeException {
ResolvedJavaMethod method = getResolvedJavaMethod("testIntegerExactOverflowWithoutUse1");
@@ -126,6 +130,20 @@
assertTrue(gotException);
}
+ @Test
+ public void testIntegerExactWithoutUse3() throws InvalidInstalledCodeException {
+ ResolvedJavaMethod method = getResolvedJavaMethod("testIntegerExactOverflowWithoutUse3");
+ InstalledCode code = getCode(method);
+
+ boolean gotException = false;
+ try {
+ code.executeVarargs(this);
+ } catch (ArithmeticException e) {
+ gotException = true;
+ }
+ assertTrue(gotException);
+ }
+
static long longCounter = 10;
public void testLongExactOverflowSnippet(long input) {
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/StandardGraphBuilderPlugins.java Fri Jan 25 13:50:44 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/StandardGraphBuilderPlugins.java Tue Jan 29 17:42:58 2019 +0000
@@ -560,19 +560,14 @@
}
private static boolean createIntegerExactOperation(GraphBuilderContext b, JavaKind kind, ValueNode x, ValueNode y, IntegerExactOp op) {
- if (x.isConstant() && y.isConstant()) {
- b.addPush(kind, createIntegerExactArithmeticNode(x, y, null, op));
+ BytecodeExceptionKind exceptionKind = kind == JavaKind.Int ? BytecodeExceptionKind.INTEGER_EXACT_OVERFLOW : BytecodeExceptionKind.LONG_EXACT_OVERFLOW;
+ AbstractBeginNode exceptionEdge = b.genExplicitExceptionEdge(exceptionKind);
+ if (exceptionEdge != null) {
+ IntegerExactArithmeticSplitNode split = b.addPush(kind, createIntegerExactSplit(x, y, exceptionEdge, op));
+ split.setNext(b.add(new BeginNode()));
return true;
- } else {
- BytecodeExceptionKind exceptionKind = kind == JavaKind.Int ? BytecodeExceptionKind.INTEGER_EXACT_OVERFLOW : BytecodeExceptionKind.LONG_EXACT_OVERFLOW;
- AbstractBeginNode exceptionEdge = b.genExplicitExceptionEdge(exceptionKind);
- if (exceptionEdge != null) {
- IntegerExactArithmeticSplitNode split = b.addPush(kind, createIntegerExactSplit(x, y, exceptionEdge, op));
- split.setNext(b.add(new BeginNode()));
- return true;
- }
- return false;
}
+ return false;
}
private static void registerMathPlugins(InvocationPlugins plugins, boolean allowDeoptimization) {
--- a/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/TaskHelper.java Fri Jan 25 13:50:44 2019 +0000
+++ b/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/TaskHelper.java Tue Jan 29 17:42:58 2019 +0000
@@ -24,11 +24,8 @@
*/
package jdk.tools.jlink.internal;
-import java.io.File;
import java.io.IOException;
import java.io.PrintWriter;
-import java.lang.module.Configuration;
-import java.lang.module.ModuleFinder;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
@@ -48,17 +45,16 @@
import java.util.stream.Collectors;
import java.util.stream.Stream;
-import jdk.tools.jlink.internal.plugins.ExcludeJmodSectionPlugin;
-import jdk.tools.jlink.plugin.Plugin;
-import jdk.tools.jlink.plugin.Plugin.Category;
import jdk.tools.jlink.builder.DefaultImageBuilder;
import jdk.tools.jlink.builder.ImageBuilder;
-import jdk.tools.jlink.plugin.PluginException;
import jdk.tools.jlink.internal.Jlink.PluginsConfiguration;
+import jdk.tools.jlink.internal.plugins.DefaultCompressPlugin;
+import jdk.tools.jlink.internal.plugins.ExcludeJmodSectionPlugin;
import jdk.tools.jlink.internal.plugins.PluginsResourceBundle;
-import jdk.tools.jlink.internal.plugins.DefaultCompressPlugin;
import jdk.tools.jlink.internal.plugins.StripDebugPlugin;
-import jdk.internal.module.ModulePath;
+import jdk.tools.jlink.plugin.Plugin;
+import jdk.tools.jlink.plugin.Plugin.Category;
+import jdk.tools.jlink.plugin.PluginException;
/**
*
@@ -240,17 +236,7 @@
private final List<PluginOption> pluginsOptions = new ArrayList<>();
private final List<PluginOption> mainOptions = new ArrayList<>();
- private PluginsHelper(String pp) throws BadArgs {
-
- if (pp != null) {
- String[] dirs = pp.split(File.pathSeparator);
- List<Path> paths = new ArrayList<>(dirs.length);
- for (String dir : dirs) {
- paths.add(Paths.get(dir));
- }
-
- pluginsLayer = createPluginsLayer(paths);
- }
+ private PluginsHelper() throws BadArgs {
plugins = PluginRepository.getPlugins(pluginsLayer);
@@ -544,7 +530,7 @@
// Must extract it prior to do any option analysis.
// Required to interpret custom plugin options.
// Unit tests can call Task multiple time in same JVM.
- pluginOptions = new PluginsHelper(null);
+ pluginOptions = new PluginsHelper();
// process options
for (int i = 0; i < args.length; i++) {
@@ -741,24 +727,6 @@
return System.getProperty("java.version");
}
- static ModuleLayer createPluginsLayer(List<Path> paths) {
-
- Path[] dirs = paths.toArray(new Path[0]);
- ModuleFinder finder = ModulePath.of(Runtime.version(), true, dirs);
- Configuration bootConfiguration = ModuleLayer.boot().configuration();
- try {
- Configuration cf = bootConfiguration
- .resolveAndBind(ModuleFinder.of(),
- finder,
- Collections.emptySet());
- ClassLoader scl = ClassLoader.getSystemClassLoader();
- return ModuleLayer.boot().defineModulesWithOneLoader(cf, scl);
- } catch (Exception ex) {
- // Malformed plugin modules (e.g.: same package in multiple modules).
- throw new PluginException("Invalid modules in the plugins path: " + ex);
- }
- }
-
// Display all plugins
private static boolean showsPlugin(Plugin plugin) {
return (!Utils.isDisabled(plugin) && plugin.getOption() != null);
--- a/src/jdk.localedata/share/classes/sun/util/cldr/resources/common/main/ja.xml Fri Jan 25 13:50:44 2019 +0000
+++ b/src/jdk.localedata/share/classes/sun/util/cldr/resources/common/main/ja.xml Tue Jan 29 17:42:58 2019 +0000
@@ -3633,6 +3633,7 @@
<era type="233">大正</era>
<era type="234">昭和</era>
<era type="235">平成</era>
+ <era type="236">元号</era> <!-- NewEra -->
</eraAbbr>
<eraNarrow>
<era type="0">大化</era>
@@ -3871,6 +3872,7 @@
<era type="233">T</era>
<era type="234">S</era>
<era type="235">H</era>
+ <era type="236">N</era> <!-- NewEra -->
</eraNarrow>
</eras>
<dateFormats>
--- a/src/jdk.localedata/share/classes/sun/util/cldr/resources/common/main/root.xml Fri Jan 25 13:50:44 2019 +0000
+++ b/src/jdk.localedata/share/classes/sun/util/cldr/resources/common/main/root.xml Tue Jan 29 17:42:58 2019 +0000
@@ -2030,6 +2030,7 @@
<era type="233">Taishō</era>
<era type="234">Shōwa</era>
<era type="235">Heisei</era>
+ <era type="236">NewEra</era> <!-- NewEra -->
</eraAbbr>
<eraNarrow>
<era type="0">Taika (645–650)</era>
@@ -2268,6 +2269,7 @@
<era type="233">T</era>
<era type="234">S</era>
<era type="235">H</era>
+ <era type="236">N</era> <!-- NewEra -->
</eraNarrow>
</eras>
<dateFormats>
--- a/src/jdk.zipfs/share/classes/jdk/nio/zipfs/ZipFileSystemProvider.java Fri Jan 25 13:50:44 2019 +0000
+++ b/src/jdk.zipfs/share/classes/jdk/nio/zipfs/ZipFileSystemProvider.java Tue Jan 29 17:42:58 2019 +0000
@@ -39,6 +39,9 @@
import java.nio.file.attribute.FileAttribute;
import java.nio.file.attribute.FileAttributeView;
import java.nio.file.spi.FileSystemProvider;
+import java.security.AccessController;
+import java.security.PrivilegedActionException;
+import java.security.PrivilegedExceptionAction;
import java.util.HashMap;
import java.util.Map;
import java.util.Set;
@@ -317,7 +320,13 @@
//////////////////////////////////////////////////////////////
void removeFileSystem(Path zfpath, ZipFileSystem zfs) throws IOException {
synchronized (filesystems) {
- zfpath = zfpath.toRealPath();
+ Path tempPath = zfpath;
+ PrivilegedExceptionAction<Path> action = tempPath::toRealPath;
+ try {
+ zfpath = AccessController.doPrivileged(action);
+ } catch (PrivilegedActionException e) {
+ throw (IOException) e.getException();
+ }
if (filesystems.get(zfpath) == zfs)
filesystems.remove(zfpath);
}
--- a/test/hotspot/gtest/memory/test_virtualSpaceNode.cpp Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/gtest/memory/test_virtualSpaceNode.cpp Tue Jan 29 17:42:58 2019 +0000
@@ -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,9 @@
#include "utilities/formatBuffer.hpp"
#include "unittest.hpp"
+// include as last, or otherwise we pull in an incompatible "assert" macro
+#include <vector>
+
using namespace metaspace;
namespace {
@@ -71,24 +74,55 @@
// removes all the chunks added to the ChunkManager since creation of ChunkManagerRestorer
class ChunkManagerRestorer {
- ChunkManager* const _cm;
- Metachunk* _chunks[NumberOfFreeLists];
- public:
- ChunkManagerRestorer(ChunkManager* cm) : _cm(cm) {
- for (ChunkIndex i = ZeroIndex; i < NumberOfFreeLists; i = next_chunk_index(i)) {
- ChunkList* l = ChunkManagerTest::free_chunks(_cm, i);
- _chunks[i] = l->tail();
+ metaspace::ChunkManager* const _cm;
+ std::vector<metaspace::Metachunk*>* _free_chunks[metaspace::NumberOfFreeLists];
+ int _count_pre_existing;
+public:
+ ChunkManagerRestorer(metaspace::ChunkManager* cm) : _cm(cm), _count_pre_existing(0) {
+ _cm->locked_verify();
+ for (metaspace::ChunkIndex i = metaspace::ZeroIndex; i < metaspace::NumberOfFreeLists; i = next_chunk_index(i)) {
+ metaspace::ChunkList* l = ChunkManagerTest::free_chunks(_cm, i);
+ _count_pre_existing += l->count();
+ std::vector<metaspace::Metachunk*> *v = new std::vector<metaspace::Metachunk*>(l->count());
+ metaspace::Metachunk* c = l->head();
+ while (c) {
+ v->push_back(c);
+ c = c->next();
+ }
+ _free_chunks[i] = v;
}
}
~ChunkManagerRestorer() {
+ _cm->locked_verify();
+ for (metaspace::ChunkIndex i = metaspace::ZeroIndex; i < metaspace::NumberOfFreeLists; i = next_chunk_index(i)) {
+ metaspace::ChunkList* l = ChunkManagerTest::free_chunks(_cm, i);
+ std::vector<metaspace::Metachunk*> *v = _free_chunks[i];
+ ssize_t count = l->count();
+ for (ssize_t j = 0; j < count; j++) {
+ metaspace::Metachunk* c = l->head();
+ while (c) {
+ bool found = false;
+ for (size_t k = 0; k < v->size() && !found; k++) {
+ found = (c == v->at(k));
+ }
+ if (found) {
+ c = c->next();
+ } else {
+ _cm->remove_chunk(c);
+ break;
+ }
+ }
+ }
+ delete _free_chunks[i];
+ _free_chunks[i] = NULL;
+ }
+ int count_after_cleanup = 0;
for (ChunkIndex i = ZeroIndex; i < NumberOfFreeLists; i = next_chunk_index(i)) {
ChunkList* l = ChunkManagerTest::free_chunks(_cm, i);
- Metachunk* t = l->tail();
- while (t != _chunks[i]) {
- _cm->remove_chunk(t);
- t = l->tail();
- }
+ count_after_cleanup += l->count();
}
+ EXPECT_EQ(_count_pre_existing, count_after_cleanup);
+ _cm->locked_verify();
}
};
@@ -121,7 +155,6 @@
// committed - used = words left to retire
const size_t words_left = page_chunks - SmallChunk - SpecializedChunk;
-
size_t num_medium_chunks, num_small_chunks, num_spec_chunks;
chunk_up(words_left, num_medium_chunks, num_small_chunks, num_spec_chunks);
@@ -155,7 +188,6 @@
TEST_VM(VirtualSpaceNodeTest, all_vsn_is_committed_half_is_used_by_chunks) {
MutexLockerEx ml(MetaspaceExpand_lock, Mutex::_no_safepoint_check_flag);
-
ChunkManager cm(false);
VirtualSpaceNode vsn(false, vsn_test_size_bytes);
ChunkManagerRestorer c(Metaspace::get_chunk_manager(false));
@@ -165,6 +197,7 @@
vsn.get_chunk_vs(MediumChunk);
vsn.get_chunk_vs(MediumChunk);
vsn.retire(&cm);
+
// DISABLED: checks started to fail after 8198423
// EXPECT_EQ(2UL, ChunkManagerTest::sum_free_chunks_count(&cm)) << "should have been memory left for 2 chunks";
// EXPECT_EQ(2UL * MediumChunk, ChunkManagerTest::sum_free_chunks(&cm)) << "sizes should add up";
@@ -172,13 +205,13 @@
TEST_VM(VirtualSpaceNodeTest, no_committed_memory) {
MutexLockerEx ml(MetaspaceExpand_lock, Mutex::_no_safepoint_check_flag);
-
ChunkManager cm(false);
VirtualSpaceNode vsn(false, vsn_test_size_bytes);
ChunkManagerRestorer c(Metaspace::get_chunk_manager(false));
vsn.initialize();
vsn.retire(&cm);
+
ASSERT_EQ(0UL, ChunkManagerTest::sum_free_chunks_count(&cm)) << "did not commit any memory in the VSN";
}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/gtest/utilities/test_count_leading_zeros.cpp Tue Jan 29 17:42:58 2019 +0000
@@ -0,0 +1,57 @@
+/*
+ * Copyright (c) 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
+ * 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.
+ *
+ */
+
+#include "precompiled.hpp"
+#include "utilities/count_leading_zeros.hpp"
+#include "utilities/globalDefinitions.hpp"
+#include "unittest.hpp"
+
+TEST(count_leading_zeros, one_or_two_set_bits) {
+ unsigned i = 0; // Position of a set bit.
+ for (uint32_t ix = 1; ix != 0; ix <<= 1, ++i) {
+ unsigned j = 0; // Position of a set bit.
+ for (uint32_t jx = 1; jx != 0; jx <<= 1, ++j) {
+ uint32_t value = ix | jx;
+ EXPECT_EQ(31u - MAX2(i, j), count_leading_zeros(value))
+ << "value = " << value;
+ }
+ }
+}
+
+TEST(count_leading_zeros, high_zeros_low_ones) {
+ unsigned i = 0; // Number of leading zeros
+ uint32_t value = ~(uint32_t)0;
+ for ( ; value != 0; value >>= 1, ++i) {
+ EXPECT_EQ(i, count_leading_zeros(value))
+ << "value = " << value;
+ }
+}
+
+TEST(count_leading_zeros, high_ones_low_zeros) {
+ uint32_t value = ~(uint32_t)0;
+ for ( ; value != 0; value <<= 1) {
+ EXPECT_EQ(0u, count_leading_zeros(value))
+ << "value = " << value;
+ }
+}
--- a/test/hotspot/gtest/utilities/test_count_trailing_zeros.cpp Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/gtest/utilities/test_count_trailing_zeros.cpp Tue Jan 29 17:42:58 2019 +0000
@@ -39,16 +39,15 @@
}
}
-TEST(count_trailing_zeros, all_ones_followed_by_all_zeros) {
- unsigned i = BitsPerWord - 1; // Index of most significant set bit.
+TEST(count_trailing_zeros, high_zeros_low_ones) {
uintx value = ~(uintx)0;
- for ( ; value != 0; value >>= 1, --i) {
+ for ( ; value != 0; value >>= 1) {
EXPECT_EQ(0u, count_trailing_zeros(value))
<< "value = " << value;
}
}
-TEST(count_trailing_zeros, all_zeros_followed_by_all_ones) {
+TEST(count_trailing_zeros, high_ones_low_zeros) {
unsigned i = 0; // Index of least significant set bit.
uintx value = ~(uintx)0;
for ( ; value != 0; value <<= 1, ++i) {
--- a/test/hotspot/jtreg/ProblemList-graal.txt Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/ProblemList-graal.txt Tue Jan 29 17:42:58 2019 +0000
@@ -145,6 +145,7 @@
org.graalvm.compiler.core.test.OptionsVerifierTest 8205081
org.graalvm.compiler.hotspot.test.CompilationWrapperTest 8205081
org.graalvm.compiler.replacements.test.classfile.ClassfileBytecodeProviderTest 8205081
+org.graalvm.compiler.debug.test.DebugContextTest 8205081
org.graalvm.compiler.core.test.deopt.CompiledMethodTest 8202955
--- a/test/hotspot/jtreg/ProblemList.txt Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/ProblemList.txt Tue Jan 29 17:42:58 2019 +0000
@@ -57,6 +57,10 @@
compiler/runtime/Test8168712.java 8211769,8211771 generic-ppc64,generic-ppc64le,linux-s390x
+applications/ctw/modules/java_desktop.java 8217851 windows-all
+applications/ctw/modules/java_desktop_2.java 8217851 windows-all
+applications/ctw/modules/jdk_jconsole.java 8217851 windows-all
+
#############################################################################
# :hotspot_gc
--- a/test/hotspot/jtreg/TEST.ROOT Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/TEST.ROOT Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2005, 2018, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2005, 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
@@ -59,6 +59,7 @@
vm.rtm.cpu \
vm.rtm.compiler \
vm.aot \
+ vm.aot.enabled \
vm.cds \
vm.cds.custom.loaders \
vm.cds.archived.java.heap \
--- a/test/hotspot/jtreg/compiler/ciReplay/CiReplayBase.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/compiler/ciReplay/CiReplayBase.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 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
@@ -71,6 +71,11 @@
"-XX:+ReplayCompiles", REPLAY_FILE_OPTION};
protected final Optional<Boolean> runServer;
+ public static class EmptyMain {
+ public static void main(String[] args) {
+ }
+ }
+
static {
try {
CLIENT_VM_AVAILABLE = ProcessTools.executeTestJvm(CLIENT_VM_OPTION, VERSION_OPTION)
@@ -135,7 +140,7 @@
options.addAll(Arrays.asList(REPLAY_GENERATION_OPTIONS));
options.addAll(Arrays.asList(vmopts));
options.add(needCoreDump ? ENABLE_COREDUMP_ON_CRASH : DISABLE_COREDUMP_ON_CRASH);
- options.add(VERSION_OPTION);
+ options.add(EmptyMain.class.getName());
if (needCoreDump) {
crashOut = ProcessTools.executeProcess(getTestJavaCommandlineWithPrefix(
RUN_SHELL_NO_LIMIT, options.toArray(new String[0])));
--- a/test/hotspot/jtreg/compiler/intrinsics/bigInteger/TestMulAdd.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/compiler/intrinsics/bigInteger/TestMulAdd.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 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
@@ -25,6 +25,8 @@
* @test
* @bug 8081778
* @summary Add C2 x86 intrinsic for BigInteger::mulAdd() method
+ * @comment the test disables intrinsics, so it can't be run w/ AOT'ed java.base
+ * @requires !vm.aot.enabled
*
* @run main/othervm/timeout=600 -XX:-TieredCompilation -Xbatch
* -XX:+IgnoreUnrecognizedVMOptions -XX:+UnlockDiagnosticVMOptions -XX:-UseSquareToLenIntrinsic -XX:-UseMultiplyToLenIntrinsic
--- a/test/hotspot/jtreg/compiler/jsr292/NonInlinedCall/InvokeTest.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/compiler/jsr292/NonInlinedCall/InvokeTest.java Tue Jan 29 17:42:58 2019 +0000
@@ -60,6 +60,8 @@
static final MethodHandle privateMH; // invokespecial I.f4 T
static final MethodHandle basicMH;
+ static final MethodHandle intrinsicMH; // invokevirtual Object.hashCode
+
static final WhiteBox WB = WhiteBox.getWhiteBox();
static volatile boolean doDeopt = false;
@@ -75,6 +77,7 @@
specialMH = LOOKUP.findSpecial(T.class, "f4", mtype, T.class);
privateMH = LOOKUP.findSpecial(I.class, "f4", mtype, I.class);
basicMH = NonInlinedReinvoker.make(staticMH);
+ intrinsicMH = LOOKUP.findVirtual(Object.class, "hashCode", MethodType.methodType(int.class));
} catch (Exception e) {
throw new Error(e);
}
@@ -117,6 +120,10 @@
static class Q2 extends T implements J2 {}
static class Q3 extends T implements J3 {}
+ static class H {
+ public int hashCode() { return 0; }
+ }
+
@DontInline
static void linkToVirtual(T recv, Class<?> expected) {
try {
@@ -138,6 +145,16 @@
}
@DontInline
+ static void linkToVirtualIntrinsic(Object recv, int expected) {
+ try {
+ int v = (int)intrinsicMH.invokeExact(recv);
+ assertEquals(v, expected);
+ } catch (Throwable e) {
+ throw new Error(e);
+ }
+ }
+
+ @DontInline
static void linkToInterface(I recv, Class<?> expected) {
try {
Class<?> cls = (Class<?>)intfMH.invokeExact(recv);
@@ -177,7 +194,6 @@
}
}
-
@DontInline
static void invokeBasic() {
try {
@@ -215,6 +231,8 @@
run(() -> linkToVirtual(new T(), T.class));
run(() -> linkToVirtualDefault(new T(), I.class));
+ run(() -> linkToVirtualIntrinsic(new H(), 0));
+
// Megamorphic case (optimized virtual call)
run(() -> {
linkToVirtual(new T() {}, T.class);
--- a/test/hotspot/jtreg/compiler/jvmci/compilerToVM/MaterializeVirtualObjectTest.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/compiler/jvmci/compilerToVM/MaterializeVirtualObjectTest.java Tue Jan 29 17:42:58 2019 +0000
@@ -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
@@ -24,9 +24,13 @@
/*
* @test
* @bug 8136421
+ *
* @requires vm.jvmci
- * & (vm.compMode != "Xcomp" | vm.opt.TieredCompilation == null | vm.opt.TieredCompilation == true)
- * @summary no "-Xcomp -XX:-TieredCompilation" combination allowed until JDK-8140018 is resolved
+ * @requires vm.opt.final.EliminateAllocations == true
+ *
+ * @comment no "-Xcomp -XX:-TieredCompilation" combination allowed until JDK-8140018 is resolved
+ * @requires vm.compMode != "Xcomp" | vm.opt.TieredCompilation == null | vm.opt.TieredCompilation == true
+ *
* @library / /test/lib
* @library ../common/patches
* @modules java.base/jdk.internal.misc
--- a/test/hotspot/jtreg/gc/CondCardMark/Basic.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/CondCardMark/Basic.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, 2016, 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
@@ -21,20 +21,22 @@
* questions.
*/
+package gc.CondCardMark;
+
/**
* @test
* @bug 8076987
* @bug 8078438
* @summary Verify UseCondCardMark works
* @modules java.base/jdk.internal.misc
- * @run main/othervm -Xint Basic
- * @run main/othervm -Xint -XX:+UseCondCardMark Basic
- * @run main/othervm -XX:TieredStopAtLevel=1 Basic
- * @run main/othervm -XX:TieredStopAtLevel=1 -XX:+UseCondCardMark Basic
- * @run main/othervm -XX:TieredStopAtLevel=4 Basic
- * @run main/othervm -XX:TieredStopAtLevel=4 -XX:+UseCondCardMark Basic
- * @run main/othervm -XX:-TieredCompilation Basic
- * @run main/othervm -XX:-TieredCompilation -XX:+UseCondCardMark Basic
+ * @run main/othervm -Xint gc.CondCardMark.Basic
+ * @run main/othervm -Xint -XX:+UseCondCardMark gc.CondCardMark.Basic
+ * @run main/othervm -XX:TieredStopAtLevel=1 gc.CondCardMark.Basic
+ * @run main/othervm -XX:TieredStopAtLevel=1 -XX:+UseCondCardMark gc.CondCardMark.Basic
+ * @run main/othervm -XX:TieredStopAtLevel=4 gc.CondCardMark.Basic
+ * @run main/othervm -XX:TieredStopAtLevel=4 -XX:+UseCondCardMark gc.CondCardMark.Basic
+ * @run main/othervm -XX:-TieredCompilation gc.CondCardMark.Basic
+ * @run main/othervm -XX:-TieredCompilation -XX:+UseCondCardMark gc.CondCardMark.Basic
*/
public class Basic {
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/gc/CriticalNative.java Tue Jan 29 17:42:58 2019 +0000
@@ -0,0 +1,36 @@
+/*
+ * Copyright (c) 2019, Red Hat, Inc. and/or its affiliates. All rights reserved.
+ * Copyright (c) 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
+ * 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.
+ */
+
+package gc;
+
+public class CriticalNative {
+ static {
+ System.loadLibrary("CriticalNative");
+ }
+
+ public static native boolean isNull(int[] a);
+ public static native long sum1(long[] a);
+ // More than 6 parameters
+ public static native long sum2(long a1, int[] a2, int[] a3, long[] a4, int[] a5);
+}
--- a/test/hotspot/jtreg/gc/CriticalNativeArgs.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/CriticalNativeArgs.java Tue Jan 29 17:42:58 2019 +0000
@@ -21,45 +21,42 @@
*
*/
+package gc;
/*
* @test CriticalNativeStressEpsilon
* @key gc
* @bug 8199868
+ * @library /
* @requires (os.arch =="x86_64" | os.arch == "amd64") & vm.gc.Epsilon & !vm.graal.enabled
* @summary test argument unpacking nmethod wrapper of critical native method
- * @run main/othervm/native -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC -Xcomp -Xmx256M -XX:+CriticalJNINatives CriticalNativeArgs
+ * @run main/othervm/native -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC -Xcomp -Xmx256M -XX:+CriticalJNINatives gc.CriticalNativeArgs
*/
/*
* @test CriticalNativeStressShenandoah
* @key gc
* @bug 8199868
+ * @library /
* @requires (os.arch =="x86_64" | os.arch == "amd64") & vm.gc.Shenandoah & !vm.graal.enabled
* @summary test argument unpacking nmethod wrapper of critical native method
- * @run main/othervm/native -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=passive -XX:+ShenandoahDegeneratedGC -Xcomp -Xmx512M -XX:+CriticalJNINatives CriticalNativeArgs
- * @run main/othervm/native -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=passive -XX:-ShenandoahDegeneratedGC -Xcomp -Xmx512M -XX:+CriticalJNINatives CriticalNativeArgs
+ * @run main/othervm/native -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=passive -XX:+ShenandoahDegeneratedGC -Xcomp -Xmx512M -XX:+CriticalJNINatives gc.CriticalNativeArgs
+ * @run main/othervm/native -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=passive -XX:-ShenandoahDegeneratedGC -Xcomp -Xmx512M -XX:+CriticalJNINatives gc.CriticalNativeArgs
*
- * @run main/othervm/native -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=aggressive -Xcomp -Xmx512M -XX:+CriticalJNINatives CriticalNativeArgs
+ * @run main/othervm/native -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=aggressive -Xcomp -Xmx512M -XX:+CriticalJNINatives gc.CriticalNativeArgs
*
- * @run main/othervm/native -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -Xcomp -Xmx256M -XX:+CriticalJNINatives CriticalNativeArgs
- * @run main/othervm/native -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -XX:+UnlockExperimentalVMOptions -XX:ShenandoahGCHeuristics=traversal -Xcomp -Xmx512M -XX:+CriticalJNINatives CriticalNativeArgs
+ * @run main/othervm/native -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -Xcomp -Xmx256M -XX:+CriticalJNINatives gc.CriticalNativeArgs
+ * @run main/othervm/native -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -XX:+UnlockExperimentalVMOptions -XX:ShenandoahGCHeuristics=traversal -Xcomp -Xmx512M -XX:+CriticalJNINatives gc.CriticalNativeArgs
*/
public class CriticalNativeArgs {
- static {
- System.loadLibrary("CriticalNative");
- }
-
- static native boolean isNull(int[] a);
-
public static void main(String[] args) {
int[] arr = new int[2];
- if (isNull(arr)) {
+ if (CriticalNative.isNull(arr)) {
throw new RuntimeException("Should not be null");
}
- if (!isNull(null)) {
+ if (!CriticalNative.isNull(null)) {
throw new RuntimeException("Should be null");
}
}
--- a/test/hotspot/jtreg/gc/TestAgeOutput.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/TestAgeOutput.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 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
@@ -21,6 +21,8 @@
* questions.
*/
+package gc;
+
/*
* @test TestAgeOutput
* @bug 8164936
@@ -31,8 +33,8 @@
* @library /test/lib
* @build sun.hotspot.WhiteBox
* @run driver ClassFileInstaller sun.hotspot.WhiteBox
- * @run main/othervm -XX:+UseSerialGC TestAgeOutput UseSerialGC
- * @run main/othervm -XX:+UseG1GC TestAgeOutput UseG1GC
+ * @run main/othervm -XX:+UseSerialGC gc.TestAgeOutput UseSerialGC
+ * @run main/othervm -XX:+UseG1GC gc.TestAgeOutput UseG1GC
*/
/*
@@ -45,7 +47,7 @@
* @library /test/lib
* @build sun.hotspot.WhiteBox
* @run driver ClassFileInstaller sun.hotspot.WhiteBox
- * @run main/othervm -XX:+UseConcMarkSweepGC TestAgeOutput UseConcMarkSweepGC
+ * @run main/othervm -XX:+UseConcMarkSweepGC gc.TestAgeOutput UseConcMarkSweepGC
*/
import sun.hotspot.WhiteBox;
--- a/test/hotspot/jtreg/gc/TestAllocateHeapAt.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/TestAllocateHeapAt.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 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
@@ -21,12 +21,15 @@
* questions.
*/
+package gc;
+
/* @test TestAllocateHeapAt.java
* @key gc
* @summary Test to check allocation of Java Heap with AllocateHeapAt option
* @requires vm.gc != "Z" & os.family != "aix"
* @library /test/lib
* @modules java.base/jdk.internal.misc
+ * @run main gc.TestAllocateHeapAt
*/
import jdk.test.lib.JDKToolFinder;
--- a/test/hotspot/jtreg/gc/TestAllocateHeapAtError.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/TestAllocateHeapAtError.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 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
@@ -21,12 +21,15 @@
* questions.
*/
+package gc;
+
/* @test TestAllocateHeapAtError.java
* @key gc
* @summary Test to check correct handling of non-existent directory passed to AllocateHeapAt option
* @requires vm.gc != "Z" & os.family != "aix"
* @library /test/lib
* @modules java.base/jdk.internal.misc
+ * @run main gc.TestAllocateHeapAtError
*/
import java.io.File;
--- a/test/hotspot/jtreg/gc/TestAllocateHeapAtMultiple.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/TestAllocateHeapAtMultiple.java Tue Jan 29 17:42:58 2019 +0000
@@ -21,13 +21,15 @@
* questions.
*/
+package gc;
+
/* @test TestAllocateHeapAtMultiple.java
* @key gc
* @summary Test to check allocation of Java Heap with AllocateHeapAt option. Has multiple sub-tests to cover different code paths.
* @library /test/lib
* @modules java.base/jdk.internal.misc
* @requires vm.bits == "64" & vm.gc != "Z" & os.family != "aix"
- * @run main/timeout=360 TestAllocateHeapAtMultiple
+ * @run main/timeout=360 gc.TestAllocateHeapAtMultiple
*/
import jdk.test.lib.JDKToolFinder;
--- a/test/hotspot/jtreg/gc/TestBigObj.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/TestBigObj.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2009, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 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
@@ -21,11 +21,13 @@
* questions.
*/
+package gc;
+
/*
* @test TestBigObj
* @bug 6845368
* @summary ensure gc updates references > 64K bytes from the start of the obj
- * @run main/othervm/timeout=720 -Xmx256m -verbose:gc TestBigObj
+ * @run main/othervm/timeout=720 -Xmx256m -verbose:gc gc.TestBigObj
*/
// Allocate an object with a block of reference fields that starts more
--- a/test/hotspot/jtreg/gc/TestCardTablePageCommits.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/TestCardTablePageCommits.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, 2016, 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
@@ -21,6 +21,8 @@
* questions.
*/
+package gc;
+
import jdk.test.lib.JDKToolFinder;
import jdk.test.lib.process.ProcessTools;
import jdk.test.lib.process.OutputAnalyzer;
@@ -34,7 +36,7 @@
* @requires vm.gc.Parallel
* @library /test/lib
* @modules java.base/jdk.internal.misc
- * @run driver TestCardTablePageCommits
+ * @run driver gc.TestCardTablePageCommits
*/
public class TestCardTablePageCommits {
public static void main(String args[]) throws Exception {
--- a/test/hotspot/jtreg/gc/TestDisableExplicitGC.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/TestDisableExplicitGC.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2016, 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
@@ -21,6 +21,8 @@
* questions.
*/
+package gc;
+
/*
* @test TestDisableExplicitGC
* @requires vm.opt.DisableExplicitGC == null
@@ -28,9 +30,9 @@
* @library /test/lib
* @modules java.base/jdk.internal.misc
* @modules jdk.management/com.sun.management.internal
- * @run main/othervm -Xlog:gc=debug TestDisableExplicitGC
- * @run main/othervm/fail -XX:+DisableExplicitGC -Xlog:gc=debug TestDisableExplicitGC
- * @run main/othervm -XX:-DisableExplicitGC -Xlog:gc=debug TestDisableExplicitGC
+ * @run main/othervm -Xlog:gc=debug gc.TestDisableExplicitGC
+ * @run main/othervm/fail -XX:+DisableExplicitGC -Xlog:gc=debug gc.TestDisableExplicitGC
+ * @run main/othervm -XX:-DisableExplicitGC -Xlog:gc=debug gc.TestDisableExplicitGC
*/
import java.lang.management.GarbageCollectorMXBean;
import java.util.List;
--- a/test/hotspot/jtreg/gc/TestFullGCALot.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/TestFullGCALot.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 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
@@ -21,13 +21,15 @@
* questions.
*/
+package gc;
+
/*
* @test TestFullGCALot
* @key gc
* @bug 4187687 8187819
* @summary Ensure no access violation when using FullGCALot
* @requires vm.debug
- * @run main/othervm -XX:NewSize=10m -XX:+FullGCALot -XX:FullGCALotInterval=120 TestFullGCALot
+ * @run main/othervm -XX:NewSize=10m -XX:+FullGCALot -XX:FullGCALotInterval=120 gc.TestFullGCALot
*/
public class TestFullGCALot {
--- a/test/hotspot/jtreg/gc/TestFullGCCount.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/TestFullGCCount.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 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
@@ -21,6 +21,8 @@
* questions.
*/
+package gc;
+
/**
* @test TestFullGCCount.java
* @bug 7072527
@@ -29,7 +31,7 @@
* @comment Shenandoah has "ExplicitGCInvokesConcurrent" on by default
* @requires !(vm.gc == "Shenandoah" & vm.opt.ExplicitGCInvokesConcurrent != false)
* @modules java.management
- * @run main/othervm -Xlog:gc TestFullGCCount
+ * @run main/othervm -Xlog:gc gc.TestFullGCCount
*/
import java.lang.management.GarbageCollectorMXBean;
--- a/test/hotspot/jtreg/gc/TestGenerationPerfCounter.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/TestGenerationPerfCounter.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 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
@@ -21,6 +21,8 @@
* questions.
*/
+package gc;
+
import static jdk.test.lib.Asserts.*;
import gc.testlibrary.PerfCounter;
import gc.testlibrary.PerfCounters;
@@ -35,9 +37,9 @@
* java.compiler
* java.management/sun.management
* jdk.internal.jvmstat/sun.jvmstat.monitor
- * @run main/othervm -XX:+UsePerfData -XX:+UseSerialGC TestGenerationPerfCounter
- * @run main/othervm -XX:+UsePerfData -XX:+UseParallelGC TestGenerationPerfCounter
- * @run main/othervm -XX:+UsePerfData -XX:+UseG1GC TestGenerationPerfCounter
+ * @run main/othervm -XX:+UsePerfData -XX:+UseSerialGC gc.TestGenerationPerfCounter
+ * @run main/othervm -XX:+UsePerfData -XX:+UseParallelGC gc.TestGenerationPerfCounter
+ * @run main/othervm -XX:+UsePerfData -XX:+UseG1GC gc.TestGenerationPerfCounter
*/
/* @test TestGenerationPerfCounterCMS
@@ -50,7 +52,7 @@
* java.compiler
* java.management/sun.management
* jdk.internal.jvmstat/sun.jvmstat.monitor
- * @run main/othervm -XX:+UsePerfData -XX:+UseConcMarkSweepGC TestGenerationPerfCounter
+ * @run main/othervm -XX:+UsePerfData -XX:+UseConcMarkSweepGC gc.TestGenerationPerfCounter
*/
public class TestGenerationPerfCounter {
--- a/test/hotspot/jtreg/gc/TestHumongousReferenceObject.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/TestHumongousReferenceObject.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 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
@@ -21,6 +21,8 @@
* questions.
*/
+package gc;
+
import jdk.internal.vm.annotation.Contended;
/*
@@ -29,11 +31,11 @@
* @requires vm.gc == "null"
* @bug 8151499 8153734
* @modules java.base/jdk.internal.vm.annotation
- * @run main/othervm -XX:+EnableContended -XX:-RestrictContended -Xmx128m -XX:+UseParallelGC -XX:ContendedPaddingWidth=8192 TestHumongousReferenceObject
- * @run main/othervm -XX:+EnableContended -XX:-RestrictContended -Xmx128m -XX:+UseG1GC -XX:G1HeapRegionSize=1M -XX:ContendedPaddingWidth=8192 TestHumongousReferenceObject
- * @run main/othervm -XX:+EnableContended -XX:-RestrictContended -Xmx128m -XX:+UseG1GC -XX:G1HeapRegionSize=2M -XX:ContendedPaddingWidth=8192 TestHumongousReferenceObject
- * @run main/othervm -XX:+EnableContended -XX:-RestrictContended -Xmx128m -XX:+UseG1GC -XX:G1HeapRegionSize=4M -XX:ContendedPaddingWidth=8192 TestHumongousReferenceObject
- * @run main/othervm -XX:+EnableContended -XX:-RestrictContended -Xmx128m -XX:+UseG1GC -XX:G1HeapRegionSize=8M -XX:ContendedPaddingWidth=8192 TestHumongousReferenceObject
+ * @run main/othervm -XX:+EnableContended -XX:-RestrictContended -Xmx128m -XX:+UseParallelGC -XX:ContendedPaddingWidth=8192 gc.TestHumongousReferenceObject
+ * @run main/othervm -XX:+EnableContended -XX:-RestrictContended -Xmx128m -XX:+UseG1GC -XX:G1HeapRegionSize=1M -XX:ContendedPaddingWidth=8192 gc.TestHumongousReferenceObject
+ * @run main/othervm -XX:+EnableContended -XX:-RestrictContended -Xmx128m -XX:+UseG1GC -XX:G1HeapRegionSize=2M -XX:ContendedPaddingWidth=8192 gc.TestHumongousReferenceObject
+ * @run main/othervm -XX:+EnableContended -XX:-RestrictContended -Xmx128m -XX:+UseG1GC -XX:G1HeapRegionSize=4M -XX:ContendedPaddingWidth=8192 gc.TestHumongousReferenceObject
+ * @run main/othervm -XX:+EnableContended -XX:-RestrictContended -Xmx128m -XX:+UseG1GC -XX:G1HeapRegionSize=8M -XX:ContendedPaddingWidth=8192 gc.TestHumongousReferenceObject
*/
/*
@@ -42,8 +44,8 @@
* @requires vm.gc.Shenandoah
* @bug 8151499 8153734
* @modules java.base/jdk.internal.vm.annotation
- * @run main/othervm -XX:+EnableContended -XX:-RestrictContended -Xmx128m -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -XX:ShenandoahHeapRegionSize=8M -XX:ContendedPaddingWidth=8192 TestHumongousReferenceObject
- * @run main/othervm -XX:+EnableContended -XX:-RestrictContended -Xmx128m -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -XX:ShenandoahHeapRegionSize=8M -XX:ContendedPaddingWidth=8192 -XX:+UnlockDiagnosticVMOptions -XX:+ShenandoahVerify TestHumongousReferenceObject
+ * @run main/othervm -XX:+EnableContended -XX:-RestrictContended -Xmx128m -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -XX:ShenandoahHeapRegionSize=8M -XX:ContendedPaddingWidth=8192 gc.TestHumongousReferenceObject
+ * @run main/othervm -XX:+EnableContended -XX:-RestrictContended -Xmx128m -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -XX:ShenandoahHeapRegionSize=8M -XX:ContendedPaddingWidth=8192 -XX:+UnlockDiagnosticVMOptions -XX:+ShenandoahVerify gc.TestHumongousReferenceObject
*/
public class TestHumongousReferenceObject {
--- a/test/hotspot/jtreg/gc/TestMemoryInitialization.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/TestMemoryInitialization.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,6 +1,6 @@
/*
- * Copyright (c) 2002, 2017 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 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
@@ -22,6 +22,8 @@
* questions.
*/
+package gc;
+
/*
* test TestMemoryInitialization
* bug 4668531
--- a/test/hotspot/jtreg/gc/TestMemoryInitializationWithCMS.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/TestMemoryInitializationWithCMS.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2018 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 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
@@ -21,13 +21,16 @@
* questions.
*/
+package gc;
+
/*
* @test TestMemoryInitializationWithCMS
* @key gc
* @bug 4668531
+ * @library /
* @requires vm.debug & vm.gc.ConcMarkSweep & !vm.graal.enabled
* @summary Simple test for -XX:+CheckMemoryInitialization doesn't crash VM
- * @run main/othervm -XX:+UseConcMarkSweepGC -XX:+CheckMemoryInitialization TestMemoryInitializationWithCMS
+ * @run main/othervm -XX:+UseConcMarkSweepGC -XX:+CheckMemoryInitialization gc.TestMemoryInitializationWithCMS
*/
public class TestMemoryInitializationWithCMS {
--- a/test/hotspot/jtreg/gc/TestMemoryInitializationWithSerial.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/TestMemoryInitializationWithSerial.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,6 +1,6 @@
/*
- * Copyright (c) 2002, 2017 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 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
@@ -22,13 +22,16 @@
* questions.
*/
+package gc;
+
/*
- * @test TestMemoryInitializationWithSerial`
+ * @test TestMemoryInitializationWithSerial
* @key gc
* @bug 4668531
+ * @library /
* @requires vm.debug & vm.gc.Serial
* @summary Simple test for -XX:+CheckMemoryInitialization doesn't crash VM
- * @run main/othervm -XX:+UseSerialGC -XX:+CheckMemoryInitialization TestMemoryInitializationWithSerial
+ * @run main/othervm -XX:+UseSerialGC -XX:+CheckMemoryInitialization gc.TestMemoryInitializationWithSerial
*/
public class TestMemoryInitializationWithSerial {
--- a/test/hotspot/jtreg/gc/TestMemoryMXBeansAndPoolsPresence.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/TestMemoryMXBeansAndPoolsPresence.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 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
@@ -21,6 +21,8 @@
* questions.
*/
+package gc;
+
import java.util.List;
import java.util.ArrayList;
import java.lang.management.*;
@@ -34,9 +36,9 @@
* @modules java.base/jdk.internal.misc
* java.management
* @requires vm.gc == null
- * @run main/othervm -XX:+UseG1GC TestMemoryMXBeansAndPoolsPresence G1
- * @run main/othervm -XX:+UseParallelGC TestMemoryMXBeansAndPoolsPresence Parallel
- * @run main/othervm -XX:+UseSerialGC TestMemoryMXBeansAndPoolsPresence Serial
+ * @run main/othervm -XX:+UseG1GC gc.TestMemoryMXBeansAndPoolsPresence G1
+ * @run main/othervm -XX:+UseParallelGC gc.TestMemoryMXBeansAndPoolsPresence Parallel
+ * @run main/othervm -XX:+UseSerialGC gc.TestMemoryMXBeansAndPoolsPresence Serial
*/
/* @test TestMemoryMXBeansAndPoolsPresenceCMS
@@ -46,7 +48,7 @@
* java.management
* @comment Graal does not support CMS
* @requires vm.gc == null & !vm.graal.enabled
- * @run main/othervm -XX:+UseConcMarkSweepGC TestMemoryMXBeansAndPoolsPresence CMS
+ * @run main/othervm -XX:+UseConcMarkSweepGC gc.TestMemoryMXBeansAndPoolsPresence CMS
*/
class GCBeanDescription {
--- a/test/hotspot/jtreg/gc/TestNUMAPageSize.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/TestNUMAPageSize.java Tue Jan 29 17:42:58 2019 +0000
@@ -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
@@ -21,13 +21,15 @@
* questions.
*/
+package gc;
+
/**
* @test TestNUMAPageSize
* @key gc regression
* @summary Make sure that start up with NUMA support does not cause problems.
* @bug 8061467
* @requires vm.gc != "Z"
- * @run main/othervm -Xmx128m -XX:+UseNUMA -XX:+UseLargePages TestNUMAPageSize
+ * @run main/othervm -Xmx128m -XX:+UseNUMA -XX:+UseLargePages gc.TestNUMAPageSize
*/
public class TestNUMAPageSize {
--- a/test/hotspot/jtreg/gc/TestNoPerfCounter.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/TestNoPerfCounter.java Tue Jan 29 17:42:58 2019 +0000
@@ -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
@@ -21,12 +21,14 @@
* questions.
*/
+package gc;
+
/* @test TestNoPerfCounter
* @bug 8210265
* @requires vm.gc=="null"
* @library /test/lib /
* @summary Tests that disabling perf counters does not crash the VM
- * @run main/othervm -XX:-UsePerfData TestNoPerfCounter
+ * @run main/othervm -XX:-UsePerfData gc.TestNoPerfCounter
*/
public class TestNoPerfCounter {
--- a/test/hotspot/jtreg/gc/TestNumWorkerOutput.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/TestNumWorkerOutput.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 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
@@ -21,6 +21,8 @@
* questions.
*/
+package gc;
+
/*
* @test TestNumWorkerOutput
* @bug 8165292
@@ -31,7 +33,7 @@
* @library /test/lib
* @build sun.hotspot.WhiteBox
* @run driver ClassFileInstaller sun.hotspot.WhiteBox
- * @run main/othervm -XX:+UseG1GC TestNumWorkerOutput UseG1GC
+ * @run main/othervm -XX:+UseG1GC gc.TestNumWorkerOutput UseG1GC
*/
/*
@@ -44,7 +46,7 @@
* @library /test/lib
* @build sun.hotspot.WhiteBox
* @run driver ClassFileInstaller sun.hotspot.WhiteBox
- * @run main/othervm -XX:+UseConcMarkSweepGC TestNumWorkerOutput UseConcMarkSweepGC
+ * @run main/othervm -XX:+UseConcMarkSweepGC gc.TestNumWorkerOutput UseConcMarkSweepGC
*/
import sun.hotspot.WhiteBox;
--- a/test/hotspot/jtreg/gc/TestObjectAlignment.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/TestObjectAlignment.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 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
@@ -21,6 +21,8 @@
* questions.
*/
+package gc;
+
/**
* @test TestObjectAlignment
* @key gc
@@ -28,18 +30,18 @@
* @summary G1: Concurrent marking crashes with -XX:ObjectAlignmentInBytes>=32 in 64bit VMs
* @library /test/lib
* @modules java.base/jdk.internal.misc
- * @run main/othervm TestObjectAlignment -Xmx20M -XX:+ExplicitGCInvokesConcurrent -XX:+IgnoreUnrecognizedVMOptions -XX:ObjectAlignmentInBytes=8
- * @run main/othervm TestObjectAlignment -Xmx20M -XX:+ExplicitGCInvokesConcurrent -XX:+IgnoreUnrecognizedVMOptions -XX:ObjectAlignmentInBytes=16
- * @run main/othervm TestObjectAlignment -Xmx20M -XX:+ExplicitGCInvokesConcurrent -XX:+IgnoreUnrecognizedVMOptions -XX:ObjectAlignmentInBytes=32
- * @run main/othervm TestObjectAlignment -Xmx20M -XX:+ExplicitGCInvokesConcurrent -XX:+IgnoreUnrecognizedVMOptions -XX:ObjectAlignmentInBytes=64
- * @run main/othervm TestObjectAlignment -Xmx20M -XX:+ExplicitGCInvokesConcurrent -XX:+IgnoreUnrecognizedVMOptions -XX:ObjectAlignmentInBytes=128
- * @run main/othervm TestObjectAlignment -Xmx20M -XX:+ExplicitGCInvokesConcurrent -XX:+IgnoreUnrecognizedVMOptions -XX:ObjectAlignmentInBytes=256
- * @run main/othervm TestObjectAlignment -Xmx20M -XX:-ExplicitGCInvokesConcurrent -XX:+IgnoreUnrecognizedVMOptions -XX:ObjectAlignmentInBytes=8
- * @run main/othervm TestObjectAlignment -Xmx20M -XX:-ExplicitGCInvokesConcurrent -XX:+IgnoreUnrecognizedVMOptions -XX:ObjectAlignmentInBytes=16
- * @run main/othervm TestObjectAlignment -Xmx20M -XX:-ExplicitGCInvokesConcurrent -XX:+IgnoreUnrecognizedVMOptions -XX:ObjectAlignmentInBytes=32
- * @run main/othervm TestObjectAlignment -Xmx20M -XX:-ExplicitGCInvokesConcurrent -XX:+IgnoreUnrecognizedVMOptions -XX:ObjectAlignmentInBytes=64
- * @run main/othervm TestObjectAlignment -Xmx20M -XX:-ExplicitGCInvokesConcurrent -XX:+IgnoreUnrecognizedVMOptions -XX:ObjectAlignmentInBytes=128
- * @run main/othervm TestObjectAlignment -Xmx20M -XX:-ExplicitGCInvokesConcurrent -XX:+IgnoreUnrecognizedVMOptions -XX:ObjectAlignmentInBytes=256
+ * @run main/othervm gc.TestObjectAlignment -Xmx20M -XX:+ExplicitGCInvokesConcurrent -XX:+IgnoreUnrecognizedVMOptions -XX:ObjectAlignmentInBytes=8
+ * @run main/othervm gc.TestObjectAlignment -Xmx20M -XX:+ExplicitGCInvokesConcurrent -XX:+IgnoreUnrecognizedVMOptions -XX:ObjectAlignmentInBytes=16
+ * @run main/othervm gc.TestObjectAlignment -Xmx20M -XX:+ExplicitGCInvokesConcurrent -XX:+IgnoreUnrecognizedVMOptions -XX:ObjectAlignmentInBytes=32
+ * @run main/othervm gc.TestObjectAlignment -Xmx20M -XX:+ExplicitGCInvokesConcurrent -XX:+IgnoreUnrecognizedVMOptions -XX:ObjectAlignmentInBytes=64
+ * @run main/othervm gc.TestObjectAlignment -Xmx20M -XX:+ExplicitGCInvokesConcurrent -XX:+IgnoreUnrecognizedVMOptions -XX:ObjectAlignmentInBytes=128
+ * @run main/othervm gc.TestObjectAlignment -Xmx20M -XX:+ExplicitGCInvokesConcurrent -XX:+IgnoreUnrecognizedVMOptions -XX:ObjectAlignmentInBytes=256
+ * @run main/othervm gc.TestObjectAlignment -Xmx20M -XX:-ExplicitGCInvokesConcurrent -XX:+IgnoreUnrecognizedVMOptions -XX:ObjectAlignmentInBytes=8
+ * @run main/othervm gc.TestObjectAlignment -Xmx20M -XX:-ExplicitGCInvokesConcurrent -XX:+IgnoreUnrecognizedVMOptions -XX:ObjectAlignmentInBytes=16
+ * @run main/othervm gc.TestObjectAlignment -Xmx20M -XX:-ExplicitGCInvokesConcurrent -XX:+IgnoreUnrecognizedVMOptions -XX:ObjectAlignmentInBytes=32
+ * @run main/othervm gc.TestObjectAlignment -Xmx20M -XX:-ExplicitGCInvokesConcurrent -XX:+IgnoreUnrecognizedVMOptions -XX:ObjectAlignmentInBytes=64
+ * @run main/othervm gc.TestObjectAlignment -Xmx20M -XX:-ExplicitGCInvokesConcurrent -XX:+IgnoreUnrecognizedVMOptions -XX:ObjectAlignmentInBytes=128
+ * @run main/othervm gc.TestObjectAlignment -Xmx20M -XX:-ExplicitGCInvokesConcurrent -XX:+IgnoreUnrecognizedVMOptions -XX:ObjectAlignmentInBytes=256
*/
import jdk.test.lib.process.ProcessTools;
--- a/test/hotspot/jtreg/gc/TestPolicyNamePerfCounter.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/TestPolicyNamePerfCounter.java Tue Jan 29 17:42:58 2019 +0000
@@ -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
@@ -21,6 +21,8 @@
* questions.
*/
+package gc;
+
import static jdk.test.lib.Asserts.*;
import gc.testlibrary.PerfCounter;
import gc.testlibrary.PerfCounters;
@@ -35,9 +37,9 @@
* java.compiler
* java.management/sun.management
* jdk.internal.jvmstat/sun.jvmstat.monitor
- * @run main/othervm -XX:+UsePerfData -XX:+UseSerialGC TestPolicyNamePerfCounter Copy:MSC
- * @run main/othervm -XX:+UsePerfData -XX:+UseParallelGC TestPolicyNamePerfCounter ParScav:MSC
- * @run main/othervm -XX:+UsePerfData -XX:+UseG1GC TestPolicyNamePerfCounter GarbageFirst
+ * @run main/othervm -XX:+UsePerfData -XX:+UseSerialGC gc.TestPolicyNamePerfCounter Copy:MSC
+ * @run main/othervm -XX:+UsePerfData -XX:+UseParallelGC gc.TestPolicyNamePerfCounter ParScav:MSC
+ * @run main/othervm -XX:+UsePerfData -XX:+UseG1GC gc.TestPolicyNamePerfCounter GarbageFirst
*/
/* @test TestPolicyNamePerfCounterCMS
@@ -50,7 +52,7 @@
* java.compiler
* java.management/sun.management
* jdk.internal.jvmstat/sun.jvmstat.monitor
- * @run main/othervm -XX:+UsePerfData -XX:+UseConcMarkSweepGC TestPolicyNamePerfCounter ParNew:CMS
+ * @run main/othervm -XX:+UsePerfData -XX:+UseConcMarkSweepGC gc.TestPolicyNamePerfCounter ParNew:CMS
*/
public class TestPolicyNamePerfCounter {
--- a/test/hotspot/jtreg/gc/TestSmallHeap.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/TestSmallHeap.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, 2016, 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
@@ -21,6 +21,8 @@
* questions.
*/
+package gc;
+
/**
* @test TestSmallHeap
* @bug 8067438 8152239
@@ -30,7 +32,7 @@
* @modules java.base/jdk.internal.misc
* @build sun.hotspot.WhiteBox
* @run driver ClassFileInstaller sun.hotspot.WhiteBox
- * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI TestSmallHeap
+ * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI gc.TestSmallHeap
*/
/* Note: It would be nice to verify the minimal supported heap size here,
--- a/test/hotspot/jtreg/gc/TestSoftReferencesBehaviorOnOOME.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/TestSoftReferencesBehaviorOnOOME.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, 2016, 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
@@ -21,6 +21,8 @@
* questions.
*/
+package gc;
+
/**
* @test TestSoftReferencesBehaviorOnOOME
* @key gc
@@ -28,9 +30,9 @@
* @requires vm.gc != "Z"
* @library /test/lib
* @modules java.base/jdk.internal.misc
- * @run main/othervm -Xmx128m TestSoftReferencesBehaviorOnOOME 512 2k
- * @run main/othervm -Xmx128m TestSoftReferencesBehaviorOnOOME 128k 256k
- * @run main/othervm -Xmx128m TestSoftReferencesBehaviorOnOOME 2k 32k
+ * @run main/othervm -Xmx128m gc.TestSoftReferencesBehaviorOnOOME 512 2k
+ * @run main/othervm -Xmx128m gc.TestSoftReferencesBehaviorOnOOME 128k 256k
+ * @run main/othervm -Xmx128m gc.TestSoftReferencesBehaviorOnOOME 2k 32k
*/
import jdk.test.lib.Utils;
import jdk.test.lib.Asserts;
--- a/test/hotspot/jtreg/gc/TestStackOverflow.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/TestStackOverflow.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2017 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 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
@@ -21,12 +21,14 @@
* questions.
*/
+package gc;
+
/*
* @test TestStackOverflow
* @key gc
* @bug 4396719
* @summary Test verifies only that VM doesn't crash but throw expected Error.
- * @run main/othervm TestStackOverflow
+ * @run main/othervm gc.TestStackOverflow
*/
public class TestStackOverflow {
--- a/test/hotspot/jtreg/gc/TestSystemGC.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/TestSystemGC.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 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
@@ -21,19 +21,21 @@
* questions.
*/
+package gc;
+
/*
* @test TestSystemGC
* @key gc
* @requires vm.gc=="null"
* @summary Runs System.gc() with different flags.
- * @run main/othervm TestSystemGC
- * @run main/othervm -XX:+UseSerialGC TestSystemGC
- * @run main/othervm -XX:+UseParallelGC TestSystemGC
- * @run main/othervm -XX:+UseParallelGC -XX:-UseParallelOldGC TestSystemGC
- * @run main/othervm -XX:+UseG1GC TestSystemGC
- * @run main/othervm -XX:+UseG1GC -XX:+ExplicitGCInvokesConcurrent TestSystemGC
- * @run main/othervm -XX:+UseLargePages TestSystemGC
- * @run main/othervm -XX:+UseLargePages -XX:+UseLargePagesInMetaspace TestSystemGC
+ * @run main/othervm gc.TestSystemGC
+ * @run main/othervm -XX:+UseSerialGC gc.TestSystemGC
+ * @run main/othervm -XX:+UseParallelGC gc.TestSystemGC
+ * @run main/othervm -XX:+UseParallelGC -XX:-UseParallelOldGC gc.TestSystemGC
+ * @run main/othervm -XX:+UseG1GC gc.TestSystemGC
+ * @run main/othervm -XX:+UseG1GC -XX:+ExplicitGCInvokesConcurrent gc.TestSystemGC
+ * @run main/othervm -XX:+UseLargePages gc.TestSystemGC
+ * @run main/othervm -XX:+UseLargePages -XX:+UseLargePagesInMetaspace gc.TestSystemGC
*/
/*
@@ -41,8 +43,8 @@
* @key gc
* @comment Graal does not support CMS
* @requires vm.gc=="null" & !vm.graal.enabled
- * @run main/othervm -XX:+UseConcMarkSweepGC TestSystemGC
- * @run main/othervm -XX:+UseConcMarkSweepGC -XX:+ExplicitGCInvokesConcurrent TestSystemGC
+ * @run main/othervm -XX:+UseConcMarkSweepGC gc.TestSystemGC
+ * @run main/othervm -XX:+UseConcMarkSweepGC -XX:+ExplicitGCInvokesConcurrent gc.TestSystemGC
*/
/*
@@ -50,8 +52,8 @@
* @key gc
* @requires vm.gc.Shenandoah & !vm.graal.enabled
* @summary Runs System.gc() with different flags.
- * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC TestSystemGC
- * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -XX:+ExplicitGCInvokesConcurrent TestSystemGC
+ * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC gc.TestSystemGC
+ * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -XX:+ExplicitGCInvokesConcurrent gc.TestSystemGC
*/
public class TestSystemGC {
public static void main(String args[]) throws Exception {
--- a/test/hotspot/jtreg/gc/TestVerifyDuringStartup.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/TestVerifyDuringStartup.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 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
@@ -21,6 +21,8 @@
* questions.
*/
+package gc;
+
/* @test TestVerifyDuringStartup.java
* @key gc
* @bug 8010463 8011343 8011898
@@ -28,6 +30,7 @@
* @requires vm.gc != "Z"
* @library /test/lib
* @modules java.base/jdk.internal.misc
+ * @run main gc.TestVerifyDuringStartup
*/
import jdk.test.lib.JDKToolFinder;
--- a/test/hotspot/jtreg/gc/TestVerifySilently.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/TestVerifySilently.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, 2016, 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
@@ -21,6 +21,8 @@
* questions.
*/
+package gc;
+
/* @test TestVerifySilently.java
* @key gc
* @bug 8032771
@@ -28,6 +30,7 @@
* @requires vm.gc != "Z"
* @library /test/lib
* @modules java.base/jdk.internal.misc
+ * @run main gc.TestVerifySilently
*/
import jdk.test.lib.process.ProcessTools;
@@ -36,7 +39,7 @@
import java.util.Collections;
import jdk.test.lib.Utils;
-class RunSystemGC {
+class TestVerifySilentlyRunSystemGC {
public static void main(String args[]) throws Exception {
System.gc();
}
@@ -54,7 +57,7 @@
"-XX:+VerifyBeforeGC",
"-XX:+VerifyAfterGC",
(verifySilently ? "-Xlog:gc":"-Xlog:gc+verify=debug"),
- RunSystemGC.class.getName()});
+ TestVerifySilentlyRunSystemGC.class.getName()});
ProcessBuilder pb =
ProcessTools.createJavaProcessBuilder(vmOpts.toArray(new String[vmOpts.size()]));
OutputAnalyzer output = new OutputAnalyzer(pb.start());
--- a/test/hotspot/jtreg/gc/TestVerifySubSet.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/TestVerifySubSet.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 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
@@ -21,12 +21,15 @@
* questions.
*/
+package gc;
+
/* @test TestVerifySubSet.java
* @key gc
* @bug 8072725
* @summary Test VerifySubSet option
* @library /test/lib
* @modules java.base/jdk.internal.misc
+ * @run main gc.TestVerifySubSet
*/
import jdk.test.lib.process.ProcessTools;
@@ -35,7 +38,7 @@
import java.util.Collections;
import jdk.test.lib.Utils;
-class RunSystemGC {
+class TestVerifySubSetRunSystemGC {
public static void main(String args[]) throws Exception {
System.gc();
}
@@ -52,7 +55,7 @@
"-XX:+VerifyAfterGC",
"-Xlog:gc+verify=debug",
"-XX:VerifySubSet="+subset,
- RunSystemGC.class.getName()});
+ TestVerifySubSetRunSystemGC.class.getName()});
ProcessBuilder pb =
ProcessTools.createJavaProcessBuilder(vmOpts.toArray(new String[vmOpts.size()]));
OutputAnalyzer output = new OutputAnalyzer(pb.start());
--- a/test/hotspot/jtreg/gc/arguments/AllocationHelper.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/arguments/AllocationHelper.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2016, 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
@@ -21,6 +21,8 @@
* questions.
*/
+package gc.arguments;
+
import java.util.LinkedList;
import java.util.concurrent.Callable;
--- a/test/hotspot/jtreg/gc/arguments/FlagsValue.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/arguments/FlagsValue.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, 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
@@ -21,6 +21,8 @@
* questions.
*/
+package gc.arguments;
+
import java.util.regex.*;
public class FlagsValue {
--- a/test/hotspot/jtreg/gc/arguments/GCTypes.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/arguments/GCTypes.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 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
@@ -21,6 +21,8 @@
* questions.
*/
+package gc.arguments;
+
import java.lang.management.GarbageCollectorMXBean;
import java.lang.management.ManagementFactory;
import java.util.Arrays;
--- a/test/hotspot/jtreg/gc/arguments/HeapRegionUsageTool.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/arguments/HeapRegionUsageTool.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2016, 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
@@ -21,6 +21,8 @@
* questions.
*/
+package gc.arguments;
+
import java.lang.management.ManagementFactory;
import java.lang.management.MemoryPoolMXBean;
import java.lang.management.MemoryUsage;
--- a/test/hotspot/jtreg/gc/arguments/TestAggressiveHeap.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/arguments/TestAggressiveHeap.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 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
@@ -21,6 +21,8 @@
* questions.
*/
+package gc.arguments;
+
/*
* @test TestAggressiveHeap
* @key gc
@@ -29,7 +31,7 @@
* @summary Test argument processing for -XX:+AggressiveHeap.
* @library /test/lib
* @modules java.base java.management
- * @run driver TestAggressiveHeap
+ * @run driver gc.arguments.TestAggressiveHeap
*/
import java.lang.management.ManagementFactory;
--- a/test/hotspot/jtreg/gc/arguments/TestAlignmentToUseLargePages.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/arguments/TestAlignmentToUseLargePages.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 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
@@ -21,6 +21,8 @@
* questions.
*/
+package gc.arguments;
+
/**
* @test TestAlignmentToUseLargePages
* @key gc regression
@@ -28,14 +30,14 @@
* heap alignment is large page aligned. Other collectors also need to start up with odd sized heaps.
* @bug 8024396
* @requires vm.gc=="null"
- * @run main/othervm -Xms71M -Xmx91M -XX:+UseParallelGC -XX:-UseParallelOldGC -XX:+UseLargePages TestAlignmentToUseLargePages
- * @run main/othervm -Xms71M -Xmx91M -XX:+UseParallelGC -XX:-UseParallelOldGC -XX:-UseLargePages TestAlignmentToUseLargePages
- * @run main/othervm -Xms71M -Xmx91M -XX:+UseParallelGC -XX:+UseParallelOldGC -XX:+UseLargePages TestAlignmentToUseLargePages
- * @run main/othervm -Xms71M -Xmx91M -XX:+UseParallelGC -XX:+UseParallelOldGC -XX:-UseLargePages TestAlignmentToUseLargePages
- * @run main/othervm -Xms71M -Xmx91M -XX:+UseSerialGC -XX:+UseLargePages TestAlignmentToUseLargePages
- * @run main/othervm -Xms71M -Xmx91M -XX:+UseSerialGC -XX:-UseLargePages TestAlignmentToUseLargePages
- * @run main/othervm -Xms71M -Xmx91M -XX:+UseG1GC -XX:+UseLargePages TestAlignmentToUseLargePages
- * @run main/othervm -Xms71M -Xmx91M -XX:+UseG1GC -XX:-UseLargePages TestAlignmentToUseLargePages
+ * @run main/othervm -Xms71M -Xmx91M -XX:+UseParallelGC -XX:-UseParallelOldGC -XX:+UseLargePages gc.arguments.TestAlignmentToUseLargePages
+ * @run main/othervm -Xms71M -Xmx91M -XX:+UseParallelGC -XX:-UseParallelOldGC -XX:-UseLargePages gc.arguments.TestAlignmentToUseLargePages
+ * @run main/othervm -Xms71M -Xmx91M -XX:+UseParallelGC -XX:+UseParallelOldGC -XX:+UseLargePages gc.arguments.TestAlignmentToUseLargePages
+ * @run main/othervm -Xms71M -Xmx91M -XX:+UseParallelGC -XX:+UseParallelOldGC -XX:-UseLargePages gc.arguments.TestAlignmentToUseLargePages
+ * @run main/othervm -Xms71M -Xmx91M -XX:+UseSerialGC -XX:+UseLargePages gc.arguments.TestAlignmentToUseLargePages
+ * @run main/othervm -Xms71M -Xmx91M -XX:+UseSerialGC -XX:-UseLargePages gc.arguments.TestAlignmentToUseLargePages
+ * @run main/othervm -Xms71M -Xmx91M -XX:+UseG1GC -XX:+UseLargePages gc.arguments.TestAlignmentToUseLargePages
+ * @run main/othervm -Xms71M -Xmx91M -XX:+UseG1GC -XX:-UseLargePages gc.arguments.TestAlignmentToUseLargePages
*/
/**
@@ -44,8 +46,8 @@
* @bug 8024396
* @comment Graal does not support CMS
* @requires vm.gc=="null" & !vm.graal.enabled
- * @run main/othervm -Xms71M -Xmx91M -XX:+UseConcMarkSweepGC -XX:+UseLargePages TestAlignmentToUseLargePages
- * @run main/othervm -Xms71M -Xmx91M -XX:+UseConcMarkSweepGC -XX:-UseLargePages TestAlignmentToUseLargePages
+ * @run main/othervm -Xms71M -Xmx91M -XX:+UseConcMarkSweepGC -XX:+UseLargePages gc.arguments.TestAlignmentToUseLargePages
+ * @run main/othervm -Xms71M -Xmx91M -XX:+UseConcMarkSweepGC -XX:-UseLargePages gc.arguments.TestAlignmentToUseLargePages
*/
/**
@@ -54,8 +56,8 @@
* @bug 8024396
* @comment Graal does not support Shenandoah
* @requires vm.gc.Shenandoah & !vm.graal.enabled
- * @run main/othervm -Xms71M -Xmx91M -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -XX:+UseLargePages TestAlignmentToUseLargePages
- * @run main/othervm -Xms71M -Xmx91M -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -XX:-UseLargePages TestAlignmentToUseLargePages
+ * @run main/othervm -Xms71M -Xmx91M -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -XX:+UseLargePages gc.arguments.TestAlignmentToUseLargePages
+ * @run main/othervm -Xms71M -Xmx91M -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -XX:-UseLargePages gc.arguments.TestAlignmentToUseLargePages
*/
public class TestAlignmentToUseLargePages {
--- a/test/hotspot/jtreg/gc/arguments/TestArrayAllocatorMallocLimit.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/arguments/TestArrayAllocatorMallocLimit.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, 2016, 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
@@ -21,6 +21,8 @@
* questions.
*/
+package gc.arguments;
+
/*
* @test TestArrayAllocatorMallocLimit
* @summary Sanity check that the ArrayAllocatorMallocLimit flag can be set.
@@ -30,7 +32,7 @@
* @library /test/lib
* @modules java.base/jdk.internal.misc
* java.management
- * @run driver TestArrayAllocatorMallocLimit
+ * @run driver gc.arguments.TestArrayAllocatorMallocLimit
*/
import jdk.test.lib.Asserts;
--- a/test/hotspot/jtreg/gc/arguments/TestCMSHeapSizeFlags.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/arguments/TestCMSHeapSizeFlags.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 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
@@ -21,6 +21,8 @@
* questions.
*/
+package gc.arguments;
+
/*
* @test TestCMSHeapSizeFlags
* @key gc
@@ -28,12 +30,13 @@
* @requires vm.gc.ConcMarkSweep & !vm.graal.enabled
* @summary Tests argument processing for initial and maximum heap size for the CMS collector
* @library /test/lib
+ * @library /
* @modules java.base/jdk.internal.misc
* java.management
* @build sun.hotspot.WhiteBox
* @run driver ClassFileInstaller sun.hotspot.WhiteBox
* sun.hotspot.WhiteBox$WhiteBoxPermission
- * @run main/othervm TestCMSHeapSizeFlags
+ * @run main/othervm gc.arguments.TestCMSHeapSizeFlags
* @author thomas.schatzl@oracle.com
*/
--- a/test/hotspot/jtreg/gc/arguments/TestCompressedClassFlags.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/arguments/TestCompressedClassFlags.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 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
@@ -21,6 +21,8 @@
* questions.
*/
+package gc.arguments;
+
import jdk.test.lib.process.OutputAnalyzer;
import jdk.test.lib.process.ProcessTools;
import jdk.test.lib.Platform;
@@ -33,6 +35,7 @@
* @library /test/lib
* @modules java.base/jdk.internal.misc
* java.management
+ * @run main gc.arguments.TestCompressedClassFlags
*/
public class TestCompressedClassFlags {
public static void main(String[] args) throws Exception {
--- a/test/hotspot/jtreg/gc/arguments/TestDisableDefaultGC.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/arguments/TestDisableDefaultGC.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 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
@@ -21,6 +21,8 @@
* questions.
*/
+package gc.arguments;
+
/*
* @test TestDisableDefaultGC
* @summary Test that the VM complains when the default GC is disabled and no other GC is specified
@@ -30,7 +32,7 @@
* @requires vm.gc=="null"
* @modules java.base/jdk.internal.misc
* java.management
- * @run driver TestDisableDefaultGC
+ * @run driver gc.arguments.TestDisableDefaultGC
*/
import jdk.test.lib.process.ProcessTools;
--- a/test/hotspot/jtreg/gc/arguments/TestDynMaxHeapFreeRatio.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/arguments/TestDynMaxHeapFreeRatio.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, 2016, 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
@@ -21,6 +21,8 @@
* questions.
*/
+package gc.arguments;
+
import static jdk.test.lib.Asserts.assertEQ;
import static jdk.test.lib.Asserts.assertFalse;
import static jdk.test.lib.Asserts.assertTrue;
@@ -33,12 +35,12 @@
* @library /test/lib
* @modules java.base/jdk.internal.misc
* @modules java.management
- * @run main TestDynMaxHeapFreeRatio
- * @run main/othervm -XX:MinHeapFreeRatio=0 -XX:MaxHeapFreeRatio=100 TestDynMaxHeapFreeRatio
- * @run main/othervm -XX:MinHeapFreeRatio=10 -XX:MaxHeapFreeRatio=50 -XX:-UseAdaptiveSizePolicy TestDynMaxHeapFreeRatio
- * @run main/othervm -XX:MinHeapFreeRatio=10 -XX:MaxHeapFreeRatio=50 TestDynMaxHeapFreeRatio
- * @run main/othervm -XX:MinHeapFreeRatio=51 -XX:MaxHeapFreeRatio=52 TestDynMaxHeapFreeRatio
- * @run main/othervm -XX:MinHeapFreeRatio=75 -XX:MaxHeapFreeRatio=100 TestDynMaxHeapFreeRatio
+ * @run main gc.arguments.TestDynMaxHeapFreeRatio
+ * @run main/othervm -XX:MinHeapFreeRatio=0 -XX:MaxHeapFreeRatio=100 gc.arguments.TestDynMaxHeapFreeRatio
+ * @run main/othervm -XX:MinHeapFreeRatio=10 -XX:MaxHeapFreeRatio=50 -XX:-UseAdaptiveSizePolicy gc.arguments.TestDynMaxHeapFreeRatio
+ * @run main/othervm -XX:MinHeapFreeRatio=10 -XX:MaxHeapFreeRatio=50 gc.arguments.TestDynMaxHeapFreeRatio
+ * @run main/othervm -XX:MinHeapFreeRatio=51 -XX:MaxHeapFreeRatio=52 gc.arguments.TestDynMaxHeapFreeRatio
+ * @run main/othervm -XX:MinHeapFreeRatio=75 -XX:MaxHeapFreeRatio=100 gc.arguments.TestDynMaxHeapFreeRatio
*/
public class TestDynMaxHeapFreeRatio {
--- a/test/hotspot/jtreg/gc/arguments/TestDynMinHeapFreeRatio.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/arguments/TestDynMinHeapFreeRatio.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, 2016, 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
@@ -21,6 +21,8 @@
* questions.
*/
+package gc.arguments;
+
/**
* @test TestDynMinHeapFreeRatio
* @bug 8028391
@@ -28,12 +30,12 @@
* @library /test/lib
* @modules java.base/jdk.internal.misc
* @modules java.management
- * @run main TestDynMinHeapFreeRatio
- * @run main/othervm -XX:MinHeapFreeRatio=0 -XX:MaxHeapFreeRatio=100 TestDynMinHeapFreeRatio
- * @run main/othervm -XX:MinHeapFreeRatio=10 -XX:MaxHeapFreeRatio=50 -XX:-UseAdaptiveSizePolicy TestDynMinHeapFreeRatio
- * @run main/othervm -XX:MinHeapFreeRatio=10 -XX:MaxHeapFreeRatio=50 TestDynMinHeapFreeRatio
- * @run main/othervm -XX:MinHeapFreeRatio=51 -XX:MaxHeapFreeRatio=52 TestDynMinHeapFreeRatio
- * @run main/othervm -XX:MinHeapFreeRatio=75 -XX:MaxHeapFreeRatio=100 TestDynMinHeapFreeRatio
+ * @run main gc.arguments.TestDynMinHeapFreeRatio
+ * @run main/othervm -XX:MinHeapFreeRatio=0 -XX:MaxHeapFreeRatio=100 gc.arguments.TestDynMinHeapFreeRatio
+ * @run main/othervm -XX:MinHeapFreeRatio=10 -XX:MaxHeapFreeRatio=50 -XX:-UseAdaptiveSizePolicy gc.arguments.TestDynMinHeapFreeRatio
+ * @run main/othervm -XX:MinHeapFreeRatio=10 -XX:MaxHeapFreeRatio=50 gc.arguments.TestDynMinHeapFreeRatio
+ * @run main/othervm -XX:MinHeapFreeRatio=51 -XX:MaxHeapFreeRatio=52 gc.arguments.TestDynMinHeapFreeRatio
+ * @run main/othervm -XX:MinHeapFreeRatio=75 -XX:MaxHeapFreeRatio=100 gc.arguments.TestDynMinHeapFreeRatio
*/
import static jdk.test.lib.Asserts.assertEQ;
import static jdk.test.lib.Asserts.assertFalse;
--- a/test/hotspot/jtreg/gc/arguments/TestG1ConcMarkStepDurationMillis.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/arguments/TestG1ConcMarkStepDurationMillis.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2016, 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
@@ -21,6 +21,8 @@
* questions.
*/
+package gc.arguments;
+
/*
* @test TestG1ConcMarkStepDurationMillis
* @key gc
@@ -29,6 +31,7 @@
* @library /test/lib
* @modules java.base/jdk.internal.misc
* java.management
+ * @run main gc.arguments.TestG1ConcMarkStepDurationMillis
*/
import jdk.test.lib.process.ProcessTools;
--- a/test/hotspot/jtreg/gc/arguments/TestG1ConcRefinementThreads.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/arguments/TestG1ConcRefinementThreads.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, 2016, 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
@@ -21,6 +21,8 @@
* questions.
*/
+package gc.arguments;
+
/*
* @test TestG1ConcRefinementThreads
* @key gc
@@ -30,6 +32,7 @@
* @library /test/lib
* @modules java.base/jdk.internal.misc
* java.management
+ * @run main gc.arguments.TestG1ConcRefinementThreads
*/
import jdk.test.lib.process.OutputAnalyzer;
--- a/test/hotspot/jtreg/gc/arguments/TestG1HeapRegionSize.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/arguments/TestG1HeapRegionSize.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 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
@@ -21,6 +21,8 @@
* questions.
*/
+package gc.arguments;
+
/*
* @test TestG1HeapRegionSize
* @key gc
@@ -30,7 +32,7 @@
* @modules java.base/jdk.internal.misc
* @modules java.management/sun.management
* @library /test/lib
- * @run main TestG1HeapRegionSize
+ * @run main gc.arguments.TestG1HeapRegionSize
*/
import java.util.regex.Matcher;
--- a/test/hotspot/jtreg/gc/arguments/TestG1HeapSizeFlags.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/arguments/TestG1HeapSizeFlags.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 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
@@ -21,6 +21,8 @@
* questions.
*/
+package gc.arguments;
+
/*
* @test TestG1HeapSizeFlags
* @key gc
@@ -28,12 +30,13 @@
* @requires vm.gc.G1
* @summary Tests argument processing for initial and maximum heap size for the G1 collector
* @library /test/lib
+ * @library /
* @modules java.base/jdk.internal.misc
* java.management
* @build sun.hotspot.WhiteBox
* @run driver ClassFileInstaller sun.hotspot.WhiteBox
* sun.hotspot.WhiteBox$WhiteBoxPermission
- * @run main/othervm TestG1HeapSizeFlags
+ * @run main/othervm gc.arguments.TestG1HeapSizeFlags
* @author thomas.schatzl@oracle.com
*/
--- a/test/hotspot/jtreg/gc/arguments/TestG1PercentageOptions.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/arguments/TestG1PercentageOptions.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 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
@@ -21,6 +21,8 @@
* questions.
*/
+package gc.arguments;
+
/*
* @test TestG1PercentageOptions
* @key gc
@@ -30,7 +32,7 @@
* @library /test/lib
* @modules java.base/jdk.internal.misc
* java.management
- * @run driver TestG1PercentageOptions
+ * @run driver gc.arguments.TestG1PercentageOptions
*/
import jdk.test.lib.process.OutputAnalyzer;
--- a/test/hotspot/jtreg/gc/arguments/TestHeapFreeRatio.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/arguments/TestHeapFreeRatio.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 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
@@ -21,6 +21,8 @@
* questions.
*/
+package gc.arguments;
+
/*
* @test TestHeapFreeRatio
* @key gc
@@ -29,7 +31,7 @@
* @library /test/lib
* @modules java.base/jdk.internal.misc
* java.management
- * @run main/othervm TestHeapFreeRatio
+ * @run main/othervm gc.arguments.TestHeapFreeRatio
*/
import jdk.test.lib.process.OutputAnalyzer;
--- a/test/hotspot/jtreg/gc/arguments/TestInitialTenuringThreshold.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/arguments/TestInitialTenuringThreshold.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 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
@@ -21,6 +21,8 @@
* questions.
*/
+package gc.arguments;
+
/*
* @test TestInitialTenuringThreshold
* @key gc
@@ -30,7 +32,7 @@
* @library /test/lib
* @modules java.base/jdk.internal.misc
* java.management
- * @run main/othervm TestInitialTenuringThreshold
+ * @run main/othervm gc.arguments.TestInitialTenuringThreshold
* @author thomas.schatzl@oracle.com
*/
--- a/test/hotspot/jtreg/gc/arguments/TestMaxHeapSizeTools.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/arguments/TestMaxHeapSizeTools.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 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
@@ -21,6 +21,8 @@
* questions.
*/
+package gc.arguments;
+
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.util.ArrayList;
--- a/test/hotspot/jtreg/gc/arguments/TestMaxMinHeapFreeRatioFlags.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/arguments/TestMaxMinHeapFreeRatioFlags.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 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
@@ -21,15 +21,18 @@
* questions.
*/
+package gc.arguments;
+
/*
* @test TestMaxMinHeapFreeRatioFlags
* @key gc
* @summary Verify that heap size changes according to max and min heap free ratios.
* @requires vm.gc != "Z" & vm.gc != "Shenandoah"
* @library /test/lib
+ * @library /
* @modules java.base/jdk.internal.misc
* java.management
- * @run driver/timeout=240 TestMaxMinHeapFreeRatioFlags
+ * @run driver/timeout=240 gc.arguments.TestMaxMinHeapFreeRatioFlags
*/
import java.util.LinkedList;
--- a/test/hotspot/jtreg/gc/arguments/TestMaxNewSize.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/arguments/TestMaxNewSize.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 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
@@ -21,6 +21,8 @@
* questions.
*/
+package gc.arguments;
+
/*
* @test TestMaxNewSize
* @key gc
@@ -31,9 +33,9 @@
* @library /test/lib
* @modules java.base/jdk.internal.misc
* java.management
- * @run main TestMaxNewSize -XX:+UseSerialGC
- * @run main TestMaxNewSize -XX:+UseParallelGC
- * @run main TestMaxNewSize -XX:+UseG1GC
+ * @run main gc.arguments.TestMaxNewSize -XX:+UseSerialGC
+ * @run main gc.arguments.TestMaxNewSize -XX:+UseParallelGC
+ * @run main gc.arguments.TestMaxNewSize -XX:+UseG1GC
* @author thomas.schatzl@oracle.com, jesper.wilhelmsson@oracle.com
*/
@@ -46,7 +48,7 @@
* @library /test/lib
* @modules java.base/jdk.internal.misc
* java.management
- * @run main TestMaxNewSize -XX:+UseConcMarkSweepGC
+ * @run main gc.arguments.TestMaxNewSize -XX:+UseConcMarkSweepGC
*/
import java.util.regex.Matcher;
--- a/test/hotspot/jtreg/gc/arguments/TestMinAndInitialSurvivorRatioFlags.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/arguments/TestMinAndInitialSurvivorRatioFlags.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2016, 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
@@ -21,16 +21,19 @@
* questions.
*/
+package gc.arguments;
+
/*
* @test TestMinAndInitialSurvivorRatioFlags
* @key gc
* @summary Verify that MinSurvivorRatio and InitialSurvivorRatio flags work
* @library /test/lib
+ * @library /
* @modules java.base/jdk.internal.misc
* java.management
* @build sun.hotspot.WhiteBox
* @run driver ClassFileInstaller sun.hotspot.WhiteBox
- * @run driver/timeout=240 TestMinAndInitialSurvivorRatioFlags
+ * @run driver/timeout=240 gc.arguments.TestMinAndInitialSurvivorRatioFlags
*/
import java.lang.management.MemoryUsage;
--- a/test/hotspot/jtreg/gc/arguments/TestMinInitialErgonomics.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/arguments/TestMinInitialErgonomics.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 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
@@ -21,18 +21,21 @@
* questions.
*/
+package gc.arguments;
+
/**
* @test TestMinInitialErgonomics
* @key gc
* @bug 8006088
* @summary Test ergonomics decisions related to minimum and initial heap size.
* @library /test/lib
+ * @library /
* @modules java.base/jdk.internal.misc
* java.management
* @build sun.hotspot.WhiteBox
* @run driver ClassFileInstaller sun.hotspot.WhiteBox
* sun.hotspot.WhiteBox$WhiteBoxPermission
- * @run main/othervm TestMinInitialErgonomics
+ * @run main/othervm gc.arguments.TestMinInitialErgonomics
* @author thomas.schatzl@oracle.com
*/
--- a/test/hotspot/jtreg/gc/arguments/TestNewRatioFlag.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/arguments/TestNewRatioFlag.java Tue Jan 29 17:42:58 2019 +0000
@@ -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
@@ -21,6 +21,8 @@
* questions.
*/
+package gc.arguments;
+
/*
* @test TestNewRatioFlag
* @key gc
@@ -28,11 +30,12 @@
* @summary Verify that heap devided among generations according to NewRatio
* @requires vm.gc != "Z" & vm.gc != "Shenandoah"
* @library /test/lib
+ * @library /
* @modules java.base/jdk.internal.misc
* java.management
* @build sun.hotspot.WhiteBox
* @run driver ClassFileInstaller sun.hotspot.WhiteBox
- * @run driver TestNewRatioFlag
+ * @run driver gc.arguments.TestNewRatioFlag
*/
import java.util.Arrays;
--- a/test/hotspot/jtreg/gc/arguments/TestNewSizeFlags.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/arguments/TestNewSizeFlags.java Tue Jan 29 17:42:58 2019 +0000
@@ -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
@@ -21,6 +21,8 @@
* questions.
*/
+package gc.arguments;
+
/*
* @test TestNewSizeFlags
* @key gc
@@ -28,11 +30,12 @@
* @summary Verify that young gen size conforms values specified by NewSize, MaxNewSize and Xmn options
* @requires vm.gc != "Z" & vm.gc != "Shenandoah"
* @library /test/lib
+ * @library /
* @modules java.base/jdk.internal.misc
* java.management
* @build sun.hotspot.WhiteBox
* @run driver ClassFileInstaller sun.hotspot.WhiteBox
- * @run driver/timeout=240 TestNewSizeFlags
+ * @run driver/timeout=240 gc.arguments.TestNewSizeFlags
*/
import java.io.IOException;
--- a/test/hotspot/jtreg/gc/arguments/TestNewSizeThreadIncrease.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/arguments/TestNewSizeThreadIncrease.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2016, 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
@@ -21,6 +21,8 @@
* questions.
*/
+package gc.arguments;
+
/*
* @test TestNewSizeThreadIncrease
* @key gc
@@ -30,6 +32,7 @@
* @requires vm.gc.Serial
* @modules java.base/jdk.internal.misc
* java.management
+ * @run main gc.arguments.TestNewSizeThreadIncrease
*/
--- a/test/hotspot/jtreg/gc/arguments/TestObjectTenuringFlags.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/arguments/TestObjectTenuringFlags.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, 2016, 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
@@ -21,6 +21,8 @@
* questions.
*/
+package gc.arguments;
+
/*
* @test TestObjectTenuringFlags
* @key gc
@@ -29,9 +31,10 @@
* @summary Tests argument processing for NeverTenure, AlwaysTenure,
* and MaxTenuringThreshold
* @library /test/lib
+ * @library /
* @modules java.base/jdk.internal.misc
* java.management
- * @run main/othervm TestObjectTenuringFlags
+ * @run main/othervm gc.arguments.TestObjectTenuringFlags
*/
import jdk.test.lib.process.OutputAnalyzer;
--- a/test/hotspot/jtreg/gc/arguments/TestParallelGCThreads.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/arguments/TestParallelGCThreads.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, 2016, 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
@@ -21,15 +21,18 @@
* questions.
*/
+package gc.arguments;
+
/*
* @test TestParallelGCThreads
* @key gc
* @bug 8059527 8081382
* @summary Tests argument processing for ParallelGCThreads
* @library /test/lib
+ * @library /
* @modules java.base/jdk.internal.misc
* java.management
- * @run driver TestParallelGCThreads
+ * @run driver gc.arguments.TestParallelGCThreads
*/
import jdk.test.lib.Asserts;
--- a/test/hotspot/jtreg/gc/arguments/TestParallelHeapSizeFlags.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/arguments/TestParallelHeapSizeFlags.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 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
@@ -21,6 +21,8 @@
* questions.
*/
+package gc.arguments;
+
/*
* @test TestParallelHeapSizeFlags
* @key gc
@@ -29,12 +31,13 @@
* parallel collectors.
* @requires vm.gc=="null"
* @library /test/lib
+ * @library /
* @modules java.base/jdk.internal.misc
* java.management
* @build sun.hotspot.WhiteBox
* @run driver ClassFileInstaller sun.hotspot.WhiteBox
* sun.hotspot.WhiteBox$WhiteBoxPermission
- * @run main/othervm TestParallelHeapSizeFlags
+ * @run main/othervm gc.arguments.TestParallelHeapSizeFlags
* @author thomas.schatzl@oracle.com
*/
--- a/test/hotspot/jtreg/gc/arguments/TestParallelRefProc.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/arguments/TestParallelRefProc.java Tue Jan 29 17:42:58 2019 +0000
@@ -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
@@ -21,12 +21,14 @@
* questions.
*/
+package gc.arguments;
+
/*
* @test TestParallelRefProc
* @key gc
* @summary Test defaults processing for -XX:+ParallelRefProcEnabled.
* @library /test/lib
- * @run driver TestParallelRefProc
+ * @run driver gc.arguments.TestParallelRefProc
*/
import java.util.Arrays;
--- a/test/hotspot/jtreg/gc/arguments/TestSelectDefaultGC.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/arguments/TestSelectDefaultGC.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2017, 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
@@ -21,6 +21,8 @@
* questions.
*/
+package gc.arguments;
+
/*
* @test TestSelectDefaultGC
* @summary Test selection of GC when no GC option is specified
@@ -30,7 +32,7 @@
* @requires vm.gc=="null"
* @modules java.base/jdk.internal.misc
* java.management
- * @run driver TestSelectDefaultGC
+ * @run driver gc.arguments.TestSelectDefaultGC
*/
import jdk.test.lib.Platform;
--- a/test/hotspot/jtreg/gc/arguments/TestSerialHeapSizeFlags.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/arguments/TestSerialHeapSizeFlags.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 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
@@ -21,18 +21,21 @@
* questions.
*/
+package gc.arguments;
+
/*
* @test TestSerialHeapSizeFlags
* @key gc
* @bug 8006088
* @summary Tests argument processing for initial and maximum heap size for the Serial collector
* @library /test/lib
+ * @library /
* @modules java.base/jdk.internal.misc
* java.management
* @build sun.hotspot.WhiteBox
* @run driver ClassFileInstaller sun.hotspot.WhiteBox
* sun.hotspot.WhiteBox$WhiteBoxPermission
- * @run main/othervm TestSerialHeapSizeFlags
+ * @run main/othervm gc.arguments.TestSerialHeapSizeFlags
* @author thomas.schatzl@oracle.com
*/
--- a/test/hotspot/jtreg/gc/arguments/TestShrinkHeapInSteps.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/arguments/TestShrinkHeapInSteps.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 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
@@ -21,15 +21,18 @@
* questions.
*/
+package gc.arguments;
+
/*
* @test TestShrinkHeapInSteps
* @key gc
* @summary Verify that -XX:-ShrinkHeapInSteps works properly.
* @requires vm.gc != "Z" & vm.gc != "Shenandoah"
* @library /test/lib
+ * @library /
* @modules java.base/jdk.internal.misc
* java.management
- * @run driver/timeout=240 TestShrinkHeapInSteps
+ * @run driver/timeout=240 gc.arguments.TestShrinkHeapInSteps
*/
import java.util.LinkedList;
--- a/test/hotspot/jtreg/gc/arguments/TestSmallInitialHeapWithLargePageAndNUMA.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/arguments/TestSmallInitialHeapWithLargePageAndNUMA.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 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
@@ -21,6 +21,8 @@
* questions.
*/
+package gc.arguments;
+
/*
* @test TestSmallInitialHeapWithLargePageAndNUMA
* @bug 8023905
@@ -32,7 +34,7 @@
* @modules java.management/sun.management
* @build TestSmallInitialHeapWithLargePageAndNUMA
* @run driver ClassFileInstaller sun.hotspot.WhiteBox
- * @run main/othervm -Xbootclasspath/a:. -XX:+UseHugeTLBFS -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI TestSmallInitialHeapWithLargePageAndNUMA
+ * @run main/othervm -Xbootclasspath/a:. -XX:+UseHugeTLBFS -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI gc.arguments.TestSmallInitialHeapWithLargePageAndNUMA
*/
import jdk.test.lib.process.ProcessTools;
--- a/test/hotspot/jtreg/gc/arguments/TestSurvivorAlignmentInBytesOption.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/arguments/TestSurvivorAlignmentInBytesOption.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, 2016, 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
@@ -21,6 +21,8 @@
* questions.
*/
+package gc.arguments;
+
import jdk.test.lib.process.ExitCode;
import jdk.test.lib.cli.CommandLineOptionTest;
@@ -36,7 +38,7 @@
* | vm.opt.IgnoreUnrecognizedVMOptions == "false")
* @modules java.base/jdk.internal.misc
* java.management
- * @run main TestSurvivorAlignmentInBytesOption
+ * @run main gc.arguments.TestSurvivorAlignmentInBytesOption
*/
public class TestSurvivorAlignmentInBytesOption {
public static void main(String args[]) throws Throwable {
--- a/test/hotspot/jtreg/gc/arguments/TestSurvivorRatioFlag.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/arguments/TestSurvivorRatioFlag.java Tue Jan 29 17:42:58 2019 +0000
@@ -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
@@ -21,17 +21,20 @@
* questions.
*/
+package gc.arguments;
+
/*
* @test TestSurvivorRatioFlag
* @key gc
* @summary Verify that actual survivor ratio is equal to specified SurvivorRatio value
* @requires vm.gc != "Z" & vm.gc != "Shenandoah"
* @library /test/lib
+ * @library /
* @modules java.base/jdk.internal.misc
* java.management
* @build sun.hotspot.WhiteBox
* @run driver ClassFileInstaller sun.hotspot.WhiteBox
- * @run driver TestSurvivorRatioFlag
+ * @run driver gc.arguments.TestSurvivorRatioFlag
*/
import java.lang.management.MemoryUsage;
--- a/test/hotspot/jtreg/gc/arguments/TestTargetSurvivorRatioFlag.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/arguments/TestTargetSurvivorRatioFlag.java Tue Jan 29 17:42:58 2019 +0000
@@ -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
@@ -21,6 +21,8 @@
* questions.
*/
+package gc.arguments;
+
/*
* @test TestTargetSurvivorRatioFlag
* @key gc
@@ -29,11 +31,12 @@
* @requires vm.opt.UseJVMCICompiler != true
* @requires vm.gc != "Z" & vm.gc != "Shenandoah"
* @library /test/lib
+ * @library /
* @modules java.base/jdk.internal.misc
* java.management
* @build sun.hotspot.WhiteBox
* @run driver ClassFileInstaller sun.hotspot.WhiteBox
- * @run driver TestTargetSurvivorRatioFlag
+ * @run driver gc.arguments.TestTargetSurvivorRatioFlag
*/
import java.lang.management.GarbageCollectorMXBean;
--- a/test/hotspot/jtreg/gc/arguments/TestUnrecognizedVMOptionsHandling.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/arguments/TestUnrecognizedVMOptionsHandling.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 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
@@ -21,6 +21,8 @@
* questions.
*/
+package gc.arguments;
+
/*
* @test TestUnrecognizedVMOptionsHandling
* @key gc
@@ -29,7 +31,7 @@
* @library /test/lib
* @modules java.base/jdk.internal.misc
* java.management
- * @run main/othervm TestUnrecognizedVMOptionsHandling
+ * @run main/othervm gc.arguments.TestUnrecognizedVMOptionsHandling
*/
import jdk.test.lib.process.OutputAnalyzer;
--- a/test/hotspot/jtreg/gc/arguments/TestUseCompressedOopsErgo.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/arguments/TestUseCompressedOopsErgo.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 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
@@ -21,6 +21,8 @@
* questions.
*/
+package gc.arguments;
+
/*
* @test TestUseCompressedOopsErgo
* @key gc
@@ -28,15 +30,16 @@
* @summary Tests ergonomics for UseCompressedOops.
* @requires vm.gc=="null"
* @library /test/lib
+ * @library /
* @modules java.base/jdk.internal.misc
* java.management/sun.management
* @build sun.hotspot.WhiteBox
* @run driver ClassFileInstaller sun.hotspot.WhiteBox
* sun.hotspot.WhiteBox$WhiteBoxPermission
- * @run main/othervm TestUseCompressedOopsErgo -XX:+UseG1GC
- * @run main/othervm TestUseCompressedOopsErgo -XX:+UseParallelGC
- * @run main/othervm TestUseCompressedOopsErgo -XX:+UseParallelGC -XX:-UseParallelOldGC
- * @run main/othervm TestUseCompressedOopsErgo -XX:+UseSerialGC
+ * @run main/othervm gc.arguments.TestUseCompressedOopsErgo -XX:+UseG1GC
+ * @run main/othervm gc.arguments.TestUseCompressedOopsErgo -XX:+UseParallelGC
+ * @run main/othervm gc.arguments.TestUseCompressedOopsErgo -XX:+UseParallelGC -XX:-UseParallelOldGC
+ * @run main/othervm gc.arguments.TestUseCompressedOopsErgo -XX:+UseSerialGC
*/
/*
@@ -46,12 +49,13 @@
* @comment Graal does not support CMS
* @requires vm.gc=="null" & !vm.graal.enabled
* @library /test/lib
+ * @library /
* @modules java.base/jdk.internal.misc
* java.management/sun.management
* @build sun.hotspot.WhiteBox
* @run driver ClassFileInstaller sun.hotspot.WhiteBox
* sun.hotspot.WhiteBox$WhiteBoxPermission
- * @run main/othervm TestUseCompressedOopsErgo -XX:+UseConcMarkSweepGC
+ * @run main/othervm gc.arguments.TestUseCompressedOopsErgo -XX:+UseConcMarkSweepGC
*/
/*
@@ -61,12 +65,13 @@
* @comment Graal does not support Shenandoah
* @requires vm.gc.Shenandoah & !vm.graal.enabled
* @library /test/lib
+ * @library /
* @modules java.base/jdk.internal.misc
* java.management/sun.management
* @build sun.hotspot.WhiteBox
* @run driver ClassFileInstaller sun.hotspot.WhiteBox
* sun.hotspot.WhiteBox$WhiteBoxPermission
- * @run main/othervm TestUseCompressedOopsErgo -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC
+ * @run main/othervm gc.arguments.TestUseCompressedOopsErgo -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC
*/
public class TestUseCompressedOopsErgo {
--- a/test/hotspot/jtreg/gc/arguments/TestUseCompressedOopsErgoTools.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/arguments/TestUseCompressedOopsErgoTools.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 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
@@ -21,6 +21,8 @@
* questions.
*/
+package gc.arguments;
+
import com.sun.management.HotSpotDiagnosticMXBean;
import com.sun.management.VMOption;
--- a/test/hotspot/jtreg/gc/arguments/TestUseNUMAInterleaving.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/arguments/TestUseNUMAInterleaving.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, 2016, 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
@@ -21,6 +21,8 @@
* questions.
*/
+package gc.arguments;
+
/**
* @test TestUseNUMAInterleaving
* @summary Tests that UseNUMAInterleaving enabled for all collectors by
@@ -30,7 +32,7 @@
* @library /test/lib
* @modules java.base/jdk.internal.misc
* java.management
- * @run driver TestUseNUMAInterleaving
+ * @run driver gc.arguments.TestUseNUMAInterleaving
*/
import jdk.test.lib.process.OutputAnalyzer;
import jdk.test.lib.process.ProcessTools;
--- a/test/hotspot/jtreg/gc/arguments/TestVerifyBeforeAndAfterGCFlags.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/arguments/TestVerifyBeforeAndAfterGCFlags.java Tue Jan 29 17:42:58 2019 +0000
@@ -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
@@ -21,6 +21,8 @@
* questions.
*/
+package gc.arguments;
+
/*
* @test TestVerifyBeforeAndAfterGCFlags
* @key gc
@@ -32,7 +34,7 @@
* @modules java.base/jdk.internal.misc
* @modules java.management
* @library /test/lib
- * @run driver TestVerifyBeforeAndAfterGCFlags
+ * @run driver gc.arguments.TestVerifyBeforeAndAfterGCFlags
*/
import java.util.ArrayList;
--- a/test/hotspot/jtreg/gc/class_unloading/TestCMSClassUnloadingEnabledHWM.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/class_unloading/TestCMSClassUnloadingEnabledHWM.java Tue Jan 29 17:42:58 2019 +0000
@@ -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
@@ -21,6 +21,8 @@
* questions.
*/
+package gc.class_unloading;
+
/*
* @test
* @key gc
@@ -32,7 +34,7 @@
* @build sun.hotspot.WhiteBox
* @run driver ClassFileInstaller sun.hotspot.WhiteBox
* sun.hotspot.WhiteBox$WhiteBoxPermission
- * @run driver TestCMSClassUnloadingEnabledHWM
+ * @run driver gc.class_unloading.TestCMSClassUnloadingEnabledHWM
* @summary Test that -XX:-CMSClassUnloadingEnabled will trigger a Full GC when more than MetaspaceSize metadata is allocated.
*/
--- a/test/hotspot/jtreg/gc/class_unloading/TestClassUnloadingDisabled.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/class_unloading/TestClassUnloadingDisabled.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 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
@@ -21,6 +21,8 @@
* questions.
*/
+package gc.class_unloading;
+
/*
* @test
* @key gc
@@ -36,13 +38,13 @@
* sun.hotspot.WhiteBox$WhiteBoxPermission
*
* @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
- * -XX:-ClassUnloading -XX:+UseG1GC TestClassUnloadingDisabled
+ * -XX:-ClassUnloading -XX:+UseG1GC gc.class_unloading.TestClassUnloadingDisabled
*
* @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
- * -XX:-ClassUnloading -XX:+UseSerialGC TestClassUnloadingDisabled
+ * -XX:-ClassUnloading -XX:+UseSerialGC gc.class_unloading.TestClassUnloadingDisabled
*
* @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
- * -XX:-ClassUnloading -XX:+UseParallelGC TestClassUnloadingDisabled
+ * -XX:-ClassUnloading -XX:+UseParallelGC gc.class_unloading.TestClassUnloadingDisabled
*
*/
@@ -61,7 +63,7 @@
* @run driver ClassFileInstaller sun.hotspot.WhiteBox
* sun.hotspot.WhiteBox$WhiteBoxPermission
* @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
- * -XX:-ClassUnloading -XX:+UseConcMarkSweepGC TestClassUnloadingDisabled
+ * -XX:-ClassUnloading -XX:+UseConcMarkSweepGC gc.class_unloading.TestClassUnloadingDisabled
*/
/*
@@ -79,7 +81,7 @@
* @run driver ClassFileInstaller sun.hotspot.WhiteBox
* sun.hotspot.WhiteBox$WhiteBoxPermission
* @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
- * -XX:-ClassUnloading -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC TestClassUnloadingDisabled
+ * -XX:-ClassUnloading -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC gc.class_unloading.TestClassUnloadingDisabled
*/
import java.io.File;
@@ -98,7 +100,7 @@
// Fetch the dir where the test class and the class
// to be loaded resides.
String classDir = TestClassUnloadingDisabled.class.getProtectionDomain().getCodeSource().getLocation().getPath();
- String className = "ClassToLoadUnload";
+ String className = "gc.class_unloading.ClassToLoadUnload"; // can not use ClassToLoadUnload.class.getName() as that would load the class
assertFalse(wb.isClassAlive(className), "Should not be loaded yet");
--- a/test/hotspot/jtreg/gc/class_unloading/TestG1ClassUnloadingHWM.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/class_unloading/TestG1ClassUnloadingHWM.java Tue Jan 29 17:42:58 2019 +0000
@@ -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
@@ -21,6 +21,8 @@
* questions.
*/
+package gc.class_unloading;
+
/*
* @test
* @key gc
@@ -31,7 +33,7 @@
* @build sun.hotspot.WhiteBox
* @run driver ClassFileInstaller sun.hotspot.WhiteBox
* sun.hotspot.WhiteBox$WhiteBoxPermission
- * @run driver TestG1ClassUnloadingHWM
+ * @run driver gc.class_unloading.TestG1ClassUnloadingHWM
* @summary Test that -XX:-ClassUnloadingWithConcurrentMark will trigger a Full GC when more than MetaspaceSize metadata is allocated.
*/
--- a/test/hotspot/jtreg/gc/cms/DisableResizePLAB.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/cms/DisableResizePLAB.java Tue Jan 29 17:42:58 2019 +0000
@@ -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
@@ -21,6 +21,8 @@
* questions.
*/
+package gc.cms;
+
/*
* @test DisableResizePLAB
* @key gc
@@ -28,7 +30,7 @@
* @author filipp.zhinkin@oracle.com, john.coomes@oracle.com
* @requires vm.gc.ConcMarkSweep & !vm.graal.enabled
* @summary Run CMS with PLAB resizing disabled and a small OldPLABSize
- * @run main/othervm -XX:+UseConcMarkSweepGC -XX:-ResizePLAB -XX:OldPLABSize=1k -Xmx256m -Xlog:gc=debug DisableResizePLAB
+ * @run main/othervm -XX:+UseConcMarkSweepGC -XX:-ResizePLAB -XX:OldPLABSize=1k -Xmx256m -Xlog:gc=debug gc.cms.DisableResizePLAB
*/
public class DisableResizePLAB {
--- a/test/hotspot/jtreg/gc/cms/GuardShrinkWarning.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/cms/GuardShrinkWarning.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 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
@@ -21,6 +21,8 @@
* questions.
*/
+package gc.cms;
+
/**
* @test GuardShrinkWarning
* @key gc regression
@@ -30,7 +32,7 @@
* @library /test/lib
* @modules java.base/jdk.internal.misc
* java.management
- * @run main/othervm GuardShrinkWarning
+ * @run main/othervm gc.cms.GuardShrinkWarning
* @author jon.masamitsu@oracle.com
*/
@@ -44,7 +46,7 @@
"-showversion",
"-XX:+UseConcMarkSweepGC",
"-XX:+ExplicitGCInvokesConcurrent",
- "GuardShrinkWarning$SystemGCCaller"
+ SystemGCCaller.class.getName()
);
OutputAnalyzer output = new OutputAnalyzer(pb.start());
--- a/test/hotspot/jtreg/gc/cms/TestBubbleUpRef.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/cms/TestBubbleUpRef.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 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
@@ -21,6 +21,8 @@
* questions.
*/
+package gc.cms;
+
import java.lang.ref.ReferenceQueue;
import java.lang.ref.WeakReference;
import java.util.LinkedList;
@@ -35,7 +37,7 @@
* stays nearly full.
* @run main/othervm
* -XX:+UseConcMarkSweepGC -XX:-CMSYield -XX:-CMSPrecleanRefLists1
- * -XX:CMSInitiatingOccupancyFraction=0 -Xmx80m TestBubbleUpRef 16000 50 10000
+ * -XX:CMSInitiatingOccupancyFraction=0 -Xmx80m gc.cms.TestBubbleUpRef 16000 50 10000
*/
/**
--- a/test/hotspot/jtreg/gc/cms/TestCMSScavengeBeforeRemark.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/cms/TestCMSScavengeBeforeRemark.java Tue Jan 29 17:42:58 2019 +0000
@@ -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
@@ -21,13 +21,15 @@
* questions.
*/
+package gc.cms;
+
/*
* @test TestCMSScavengeBeforeRemark
* @key gc
* @bug 8139868
* @requires vm.gc.ConcMarkSweep & !vm.graal.enabled
* @summary Run CMS with CMSScavengeBeforeRemark
- * @run main/othervm -XX:+UseConcMarkSweepGC -XX:+CMSScavengeBeforeRemark -XX:+ExplicitGCInvokesConcurrent -Xmx256m -Xlog:gc=debug TestCMSScavengeBeforeRemark
+ * @run main/othervm -XX:+UseConcMarkSweepGC -XX:+CMSScavengeBeforeRemark -XX:+ExplicitGCInvokesConcurrent -Xmx256m -Xlog:gc=debug gc.cms.TestCMSScavengeBeforeRemark
*/
public class TestCMSScavengeBeforeRemark {
--- a/test/hotspot/jtreg/gc/cms/TestCriticalPriority.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/cms/TestCriticalPriority.java Tue Jan 29 17:42:58 2019 +0000
@@ -21,13 +21,15 @@
* questions.
*/
+package gc.cms;
+
/*
* @test TestCriticalPriority
* @key gc
* @bug 8217378
* @requires vm.gc.ConcMarkSweep & !vm.graal.enabled
* @summary Test critical priority is accepted
- * @run main/othervm -XX:+UseConcMarkSweepGC -XX:+UnlockExperimentalVMOptions -XX:+UseCriticalCMSThreadPriority TestCriticalPriority
+ * @run main/othervm -XX:+UseConcMarkSweepGC -XX:+UnlockExperimentalVMOptions -XX:+UseCriticalCMSThreadPriority gc.cms.TestCriticalPriority
*/
public class TestCriticalPriority {
--- a/test/hotspot/jtreg/gc/cms/TestMBeanCMS.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/cms/TestMBeanCMS.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 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
@@ -21,13 +21,15 @@
* questions.
*/
+package gc.cms;
+
/*
* @test TestMBeanCMS.java
* @bug 6581734
* @requires vm.gc.ConcMarkSweep & !vm.graal.enabled
* @summary CMS Old Gen's collection usage is zero after GC which is incorrect
* @modules java.management
- * @run main/othervm -Xmx512m -verbose:gc -XX:+UseConcMarkSweepGC TestMBeanCMS
+ * @run main/othervm -Xmx512m -verbose:gc -XX:+UseConcMarkSweepGC gc.cms.TestMBeanCMS
*
*/
--- a/test/hotspot/jtreg/gc/concurrent_phase_control/TestConcurrentPhaseControlCMS.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/concurrent_phase_control/TestConcurrentPhaseControlCMS.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 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
@@ -21,6 +21,8 @@
* questions.
*/
+package gc.concurrent_phase_control;
+
/*
* @test TestConcurrentPhaseControlCMS
* @bug 8169517
@@ -35,7 +37,7 @@
* @run main/othervm -XX:+UseConcMarkSweepGC
* -Xbootclasspath/a:.
* -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
- * TestConcurrentPhaseControlCMS
+ * gc.concurrent_phase_control.TestConcurrentPhaseControlCMS
*/
import gc.concurrent_phase_control.CheckUnsupported;
--- a/test/hotspot/jtreg/gc/concurrent_phase_control/TestConcurrentPhaseControlG1.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/concurrent_phase_control/TestConcurrentPhaseControlG1.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 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
@@ -21,6 +21,8 @@
* questions.
*/
+package gc.concurrent_phase_control;
+
/*
* @test TestConcurrentPhaseControlG1
* @bug 8169517
@@ -32,7 +34,7 @@
* @build sun.hotspot.WhiteBox
* @run driver ClassFileInstaller sun.hotspot.WhiteBox
* sun.hotspot.WhiteBox$WhiteBoxPermission
- * @run driver TestConcurrentPhaseControlG1
+ * @run driver gc.concurrent_phase_control.TestConcurrentPhaseControlG1
*/
import gc.concurrent_phase_control.CheckControl;
--- a/test/hotspot/jtreg/gc/concurrent_phase_control/TestConcurrentPhaseControlG1Basics.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/concurrent_phase_control/TestConcurrentPhaseControlG1Basics.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 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
@@ -21,6 +21,8 @@
* questions.
*/
+package gc.concurrent_phase_control;
+
/*
* @test TestConcurrentPhaseControlG1Basics
* @bug 8169517
@@ -36,7 +38,7 @@
* @run main/othervm -XX:+UseG1GC
* -Xbootclasspath/a:.
* -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
- * TestConcurrentPhaseControlG1Basics
+ * gc.concurrent_phase_control.TestConcurrentPhaseControlG1Basics
*/
import gc.concurrent_phase_control.CheckSupported;
--- a/test/hotspot/jtreg/gc/concurrent_phase_control/TestConcurrentPhaseControlParallel.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/concurrent_phase_control/TestConcurrentPhaseControlParallel.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 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
@@ -21,6 +21,8 @@
* questions.
*/
+package gc.concurrent_phase_control;
+
/*
* @test TestConcurrentPhaseControlParallel
* @bug 8169517
@@ -35,7 +37,7 @@
* @run main/othervm -XX:+UseParallelGC
* -Xbootclasspath/a:.
* -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
- * TestConcurrentPhaseControlParallel
+ * gc.concurrent_phase_control.TestConcurrentPhaseControlParallel
*/
import gc.concurrent_phase_control.CheckUnsupported;
--- a/test/hotspot/jtreg/gc/concurrent_phase_control/TestConcurrentPhaseControlSerial.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/concurrent_phase_control/TestConcurrentPhaseControlSerial.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 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
@@ -21,6 +21,8 @@
* questions.
*/
+package gc.concurrent_phase_control;
+
/*
* @test TestConcurrentPhaseControlSerial
* @bug 8169517
@@ -35,7 +37,7 @@
* @run main/othervm -XX:+UseSerialGC
* -Xbootclasspath/a:.
* -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
- * TestConcurrentPhaseControlSerial
+ * gc.concurrent_phase_control.TestConcurrentPhaseControlSerial
*/
import gc.concurrent_phase_control.CheckUnsupported;
--- a/test/hotspot/jtreg/gc/cslocker/TestCSLocker.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/cslocker/TestCSLocker.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2017 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 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
@@ -21,6 +21,8 @@
* questions.
*/
+package gc.cslocker;
+
/*
* @test TestCSLocker
* @key gc
@@ -28,7 +30,7 @@
* @summary This short test check RFE 6186200 changes. One thread locked
* @summary completely in JNI CS, while other is trying to allocate memory
* @summary provoking GC. OOM means FAIL, deadlock means PASS.
- * @run main/native/othervm -Xmx256m TestCSLocker
+ * @run main/native/othervm -Xmx256m gc.cslocker.TestCSLocker
*/
public class TestCSLocker extends Thread
--- a/test/hotspot/jtreg/gc/cslocker/libTestCSLocker.c Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/cslocker/libTestCSLocker.c Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2017 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 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
@@ -25,7 +25,7 @@
static volatile int release_critical = 0;
-JNIEXPORT jboolean JNICALL Java_CSLocker_lock
+JNIEXPORT jboolean JNICALL Java_gc_cslocker_CSLocker_lock
(JNIEnv *env, jobject obj, jintArray array)
{
jboolean retval = JNI_TRUE;
@@ -42,7 +42,7 @@
return retval;
}
-JNIEXPORT void JNICALL Java_CSLocker_unlock
+JNIEXPORT void JNICALL Java_gc_cslocker_CSLocker_unlock
(JNIEnv *env, jobject obj)
{
release_critical = 1;
--- a/test/hotspot/jtreg/gc/epsilon/TestAlignment.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/epsilon/TestAlignment.java Tue Jan 29 17:42:58 2019 +0000
@@ -21,16 +21,18 @@
* questions.
*/
+package gc.epsilon;
+
/**
* @test TestAlignment
* @key gc
* @requires vm.gc.Epsilon & !vm.graal.enabled
* @summary Check Epsilon runs fine with (un)usual alignments
* @bug 8212005
- * @run main/othervm -XX:+UnlockExperimentalVMOptions -Xmx128m -XX:+UseEpsilonGC -XX:+UseTLAB TestAlignment
- * @run main/othervm -XX:+UnlockExperimentalVMOptions -Xmx128m -XX:+UseEpsilonGC -XX:-UseTLAB TestAlignment
- * @run main/othervm -XX:+UnlockExperimentalVMOptions -Xmx128m -XX:+UseEpsilonGC -XX:+UseTLAB -XX:+IgnoreUnrecognizedVMOptions -XX:ObjectAlignmentInBytes=16 TestAlignment
- * @run main/othervm -XX:+UnlockExperimentalVMOptions -Xmx128m -XX:+UseEpsilonGC -XX:-UseTLAB -XX:+IgnoreUnrecognizedVMOptions -XX:ObjectAlignmentInBytes=16 TestAlignment
+ * @run main/othervm -XX:+UnlockExperimentalVMOptions -Xmx128m -XX:+UseEpsilonGC -XX:+UseTLAB gc.epsilon.TestAlignment
+ * @run main/othervm -XX:+UnlockExperimentalVMOptions -Xmx128m -XX:+UseEpsilonGC -XX:-UseTLAB gc.epsilon.TestAlignment
+ * @run main/othervm -XX:+UnlockExperimentalVMOptions -Xmx128m -XX:+UseEpsilonGC -XX:+UseTLAB -XX:+IgnoreUnrecognizedVMOptions -XX:ObjectAlignmentInBytes=16 gc.epsilon.TestAlignment
+ * @run main/othervm -XX:+UnlockExperimentalVMOptions -Xmx128m -XX:+UseEpsilonGC -XX:-UseTLAB -XX:+IgnoreUnrecognizedVMOptions -XX:ObjectAlignmentInBytes=16 gc.epsilon.TestAlignment
*/
public class TestAlignment {
--- a/test/hotspot/jtreg/gc/epsilon/TestAlwaysPretouch.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/epsilon/TestAlwaysPretouch.java Tue Jan 29 17:42:58 2019 +0000
@@ -26,9 +26,11 @@
* @key gc
* @requires vm.gc.Epsilon & !vm.graal.enabled
* @summary Basic sanity test for Epsilon
- * @run main/othervm -Xmx1g -XX:+AlwaysPreTouch -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC TestAlwaysPretouch
+ * @run main/othervm -Xmx1g -XX:+AlwaysPreTouch -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC gc.epsilon.TestAlwaysPretouch
*/
+package gc.epsilon;
+
public class TestAlwaysPretouch {
public static void main(String[] args) throws Exception {
// everything should happen before entry point
--- a/test/hotspot/jtreg/gc/epsilon/TestArraycopyCheckcast.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/epsilon/TestArraycopyCheckcast.java Tue Jan 29 17:42:58 2019 +0000
@@ -21,6 +21,8 @@
* questions.
*/
+package gc.epsilon;
+
/**
* @test TestArraycopyCheckcast
* @key gc
@@ -29,11 +31,11 @@
* @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
+ * @run main/othervm -Xmx1g -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC gc.epsilon.TestArraycopyCheckcast
+ * @run main/othervm -Xmx1g -Xint -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC gc.epsilon.TestArraycopyCheckcast
+ * @run main/othervm -Xmx1g -Xbatch -Xcomp -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC gc.epsilon.TestArraycopyCheckcast
+ * @run main/othervm -Xmx1g -Xbatch -Xcomp -XX:TieredStopAtLevel=1 -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC gc.epsilon.TestArraycopyCheckcast
+ * @run main/othervm -Xmx1g -Xbatch -Xcomp -XX:-TieredCompilation -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC gc.epsilon.TestArraycopyCheckcast
*/
import java.util.Random;
--- a/test/hotspot/jtreg/gc/epsilon/TestByteArrays.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/epsilon/TestByteArrays.java Tue Jan 29 17:42:58 2019 +0000
@@ -21,23 +21,25 @@
* questions.
*/
+package gc.epsilon;
+
/**
* @test TestByteArrays
* @key gc
* @requires vm.gc.Epsilon & !vm.graal.enabled
* @summary Epsilon is able to allocate arrays, and does not corrupt their state
*
- * @run main/othervm -Xmx1g -XX:+UseTLAB -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC TestByteArrays
- * @run main/othervm -Xmx1g -Xint -XX:+UseTLAB -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC TestByteArrays
- * @run main/othervm -Xmx1g -Xbatch -Xcomp -XX:+UseTLAB -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC TestByteArrays
- * @run main/othervm -Xmx1g -Xbatch -Xcomp -XX:TieredStopAtLevel=1 -XX:+UseTLAB -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC TestByteArrays
- * @run main/othervm -Xmx1g -Xbatch -Xcomp -XX:-TieredCompilation -XX:+UseTLAB -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC TestByteArrays
+ * @run main/othervm -Xmx1g -XX:+UseTLAB -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC gc.epsilon.TestByteArrays
+ * @run main/othervm -Xmx1g -Xint -XX:+UseTLAB -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC gc.epsilon.TestByteArrays
+ * @run main/othervm -Xmx1g -Xbatch -Xcomp -XX:+UseTLAB -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC gc.epsilon.TestByteArrays
+ * @run main/othervm -Xmx1g -Xbatch -Xcomp -XX:TieredStopAtLevel=1 -XX:+UseTLAB -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC gc.epsilon.TestByteArrays
+ * @run main/othervm -Xmx1g -Xbatch -Xcomp -XX:-TieredCompilation -XX:+UseTLAB -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC gc.epsilon.TestByteArrays
*
- * @run main/othervm -Xmx1g -XX:-UseTLAB -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC TestByteArrays
- * @run main/othervm -Xmx1g -Xint -XX:-UseTLAB -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC TestByteArrays
- * @run main/othervm -Xmx1g -Xbatch -Xcomp -XX:-UseTLAB -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC TestByteArrays
- * @run main/othervm -Xmx1g -Xbatch -Xcomp -XX:TieredStopAtLevel=1 -XX:-UseTLAB -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC TestByteArrays
- * @run main/othervm -Xmx1g -Xbatch -Xcomp -XX:-TieredCompilation -XX:-UseTLAB -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC TestByteArrays
+ * @run main/othervm -Xmx1g -XX:-UseTLAB -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC gc.epsilon.TestByteArrays
+ * @run main/othervm -Xmx1g -Xint -XX:-UseTLAB -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC gc.epsilon.TestByteArrays
+ * @run main/othervm -Xmx1g -Xbatch -Xcomp -XX:-UseTLAB -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC gc.epsilon.TestByteArrays
+ * @run main/othervm -Xmx1g -Xbatch -Xcomp -XX:TieredStopAtLevel=1 -XX:-UseTLAB -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC gc.epsilon.TestByteArrays
+ * @run main/othervm -Xmx1g -Xbatch -Xcomp -XX:-TieredCompilation -XX:-UseTLAB -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC gc.epsilon.TestByteArrays
*/
import java.util.Random;
--- a/test/hotspot/jtreg/gc/epsilon/TestClasses.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/epsilon/TestClasses.java Tue Jan 29 17:42:58 2019 +0000
@@ -21,6 +21,8 @@
* questions.
*/
+package gc.epsilon;
+
/**
* @test TestClasses
* @key gc
@@ -30,7 +32,7 @@
* @modules java.base/jdk.internal.org.objectweb.asm
* java.base/jdk.internal.misc
*
- * @run main/othervm -Xmx128m -XX:MetaspaceSize=1m -XX:MaxMetaspaceSize=32m -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC -Xlog:gc -Xlog:gc+metaspace TestClasses
+ * @run main/othervm -Xmx128m -XX:MetaspaceSize=1m -XX:MaxMetaspaceSize=64m -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC -Xlog:gc -Xlog:gc+metaspace gc.epsilon.TestClasses
*/
import jdk.internal.org.objectweb.asm.ClassWriter;
--- a/test/hotspot/jtreg/gc/epsilon/TestDieDefault.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/epsilon/TestDieDefault.java Tue Jan 29 17:42:58 2019 +0000
@@ -21,13 +21,15 @@
* questions.
*/
+package gc.epsilon;
+
/**
* @test TestDieDefault
* @key gc
* @requires vm.gc.Epsilon & !vm.graal.enabled
* @summary Epsilon GC should die on heap exhaustion
* @library /test/lib
- * @run main TestDieDefault
+ * @run main gc.epsilon.TestDieDefault
*/
import jdk.test.lib.process.OutputAnalyzer;
--- a/test/hotspot/jtreg/gc/epsilon/TestDieWithHeapDump.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/epsilon/TestDieWithHeapDump.java Tue Jan 29 17:42:58 2019 +0000
@@ -21,13 +21,15 @@
* questions.
*/
+package gc.epsilon;
+
/**
* @test TestDieWithHeapDump
* @key gc
* @requires vm.gc.Epsilon & !vm.graal.enabled
* @summary Epsilon GC should die on heap exhaustion with error handler attached
* @library /test/lib
- * @run main TestDieWithHeapDump
+ * @run main gc.epsilon.TestDieWithHeapDump
*/
import java.io.*;
--- a/test/hotspot/jtreg/gc/epsilon/TestDieWithOnError.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/epsilon/TestDieWithOnError.java Tue Jan 29 17:42:58 2019 +0000
@@ -21,13 +21,15 @@
* questions.
*/
+package gc.epsilon;
+
/**
* @test TestDieWithOnError
* @key gc
* @requires vm.gc.Epsilon & !vm.graal.enabled
* @summary Epsilon GC should die on heap exhaustion with error handler attached
* @library /test/lib
- * @run main TestDieWithOnError
+ * @run main gc.epsilon.TestDieWithOnError
*/
import jdk.test.lib.process.OutputAnalyzer;
--- a/test/hotspot/jtreg/gc/epsilon/TestElasticTLAB.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/epsilon/TestElasticTLAB.java Tue Jan 29 17:42:58 2019 +0000
@@ -21,18 +21,20 @@
* questions.
*/
+package gc.epsilon;
+
/**
* @test TestElasticTLAB
* @key gc
* @requires vm.gc.Epsilon & !vm.graal.enabled
* @summary Epsilon is able to work with/without elastic TLABs
*
- * @run main/othervm -Xmx1g -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC -XX:-EpsilonElasticTLAB TestElasticTLAB
- * @run main/othervm -Xmx1g -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC -XX:+EpsilonElasticTLAB -XX:EpsilonTLABElasticity=1 TestElasticTLAB
- * @run main/othervm -Xmx1g -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC -XX:+EpsilonElasticTLAB -XX:EpsilonTLABElasticity=1.1 TestElasticTLAB
- * @run main/othervm -Xmx1g -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC -XX:+EpsilonElasticTLAB -XX:EpsilonTLABElasticity=2.0 TestElasticTLAB
- * @run main/othervm -Xmx1g -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC -XX:+EpsilonElasticTLAB -XX:EpsilonTLABElasticity=42 TestElasticTLAB
- * @run main/othervm -Xmx1g -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC -XX:+EpsilonElasticTLAB -XX:EpsilonTLABElasticity=100 TestElasticTLAB
+ * @run main/othervm -Xmx1g -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC -XX:-EpsilonElasticTLAB gc.epsilon.TestElasticTLAB
+ * @run main/othervm -Xmx1g -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC -XX:+EpsilonElasticTLAB -XX:EpsilonTLABElasticity=1 gc.epsilon.TestElasticTLAB
+ * @run main/othervm -Xmx1g -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC -XX:+EpsilonElasticTLAB -XX:EpsilonTLABElasticity=1.1 gc.epsilon.TestElasticTLAB
+ * @run main/othervm -Xmx1g -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC -XX:+EpsilonElasticTLAB -XX:EpsilonTLABElasticity=2.0 gc.epsilon.TestElasticTLAB
+ * @run main/othervm -Xmx1g -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC -XX:+EpsilonElasticTLAB -XX:EpsilonTLABElasticity=42 gc.epsilon.TestElasticTLAB
+ * @run main/othervm -Xmx1g -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC -XX:+EpsilonElasticTLAB -XX:EpsilonTLABElasticity=100 gc.epsilon.TestElasticTLAB
*/
import java.util.Random;
--- a/test/hotspot/jtreg/gc/epsilon/TestElasticTLABDecay.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/epsilon/TestElasticTLABDecay.java Tue Jan 29 17:42:58 2019 +0000
@@ -21,15 +21,17 @@
* questions.
*/
+package gc.epsilon;
+
/**
* @test TestElasticTLABDecay
* @key gc
* @requires vm.gc.Epsilon & !vm.graal.enabled
* @summary Epsilon is able to work with/without elastic TLABs
*
- * @run main/othervm -Xmx1g -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC -XX:+EpsilonElasticTLAB -XX:-EpsilonElasticTLABDecay TestElasticTLABDecay
- * @run main/othervm -Xmx1g -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC -XX:+EpsilonElasticTLAB -XX:+EpsilonElasticTLABDecay -XX:EpsilonTLABDecayTime=1 TestElasticTLABDecay
- * @run main/othervm -Xmx1g -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC -XX:+EpsilonElasticTLAB -XX:+EpsilonElasticTLABDecay -XX:EpsilonTLABDecayTime=100 TestElasticTLABDecay
+ * @run main/othervm -Xmx1g -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC -XX:+EpsilonElasticTLAB -XX:-EpsilonElasticTLABDecay gc.epsilon.TestElasticTLABDecay
+ * @run main/othervm -Xmx1g -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC -XX:+EpsilonElasticTLAB -XX:+EpsilonElasticTLABDecay -XX:EpsilonTLABDecayTime=1 gc.epsilon.TestElasticTLABDecay
+ * @run main/othervm -Xmx1g -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC -XX:+EpsilonElasticTLAB -XX:+EpsilonElasticTLABDecay -XX:EpsilonTLABDecayTime=100 gc.epsilon.TestElasticTLABDecay
*/
import java.util.Random;
--- a/test/hotspot/jtreg/gc/epsilon/TestEpsilonEnabled.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/epsilon/TestEpsilonEnabled.java Tue Jan 29 17:42:58 2019 +0000
@@ -21,13 +21,15 @@
* questions.
*/
+package gc.epsilon;
+
/**
* @test TestAlwaysPretouch
* @key gc
* @requires vm.gc.Epsilon & !vm.graal.enabled
* @summary Basic sanity test for Epsilon
* @library /test/lib
- * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC TestEpsilonEnabled
+ * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC gc.epsilon.TestEpsilonEnabled
*/
import jdk.test.lib.Platform;
--- a/test/hotspot/jtreg/gc/epsilon/TestHelloWorld.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/epsilon/TestHelloWorld.java Tue Jan 29 17:42:58 2019 +0000
@@ -21,12 +21,14 @@
* questions.
*/
+package gc.epsilon;
+
/**
* @test TestHelloWorld
* @key gc
* @requires vm.gc.Epsilon & !vm.graal.enabled
* @summary Basic sanity test for Epsilon
- * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC TestHelloWorld
+ * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC gc.epsilon.TestHelloWorld
*/
public class TestHelloWorld {
--- a/test/hotspot/jtreg/gc/epsilon/TestLogTrace.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/epsilon/TestLogTrace.java Tue Jan 29 17:42:58 2019 +0000
@@ -21,12 +21,15 @@
* questions.
*/
+
+package gc.epsilon;
+
/**
* @test TestLogTrace
* @key gc
* @requires vm.gc.Epsilon & !vm.graal.enabled
* @summary Test that tracing does not crash Epsilon
- * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC -Xlog:gc*=trace TestLogTrace
+ * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC -Xlog:gc*=trace gc.epsilon.TestLogTrace
*/
public class TestLogTrace {
--- a/test/hotspot/jtreg/gc/epsilon/TestManyThreads.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/epsilon/TestManyThreads.java Tue Jan 29 17:42:58 2019 +0000
@@ -21,23 +21,25 @@
* questions.
*/
+package gc.epsilon;
+
/**
* @test TestManyThreads
* @key gc
* @requires vm.gc.Epsilon & !vm.graal.enabled
* @summary Test allocations from many threads
*
- * @run main/othervm -Xmx128m -Xss512k -XX:-UseTLAB -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC TestManyThreads
- * @run main/othervm -Xmx128m -Xss512k -Xint -XX:-UseTLAB -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC TestManyThreads
- * @run main/othervm -Xmx128m -Xss512k -Xbatch -Xcomp -XX:-UseTLAB -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC TestManyThreads
- * @run main/othervm -Xmx128m -Xss512k -Xbatch -Xcomp -XX:TieredStopAtLevel=1 -XX:-UseTLAB -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC TestManyThreads
- * @run main/othervm -Xmx128m -Xss512k -Xbatch -Xcomp -XX:-TieredCompilation -XX:-UseTLAB -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC TestManyThreads
+ * @run main/othervm -Xmx128m -Xss512k -XX:-UseTLAB -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC gc.epsilon.TestManyThreads
+ * @run main/othervm -Xmx128m -Xss512k -Xint -XX:-UseTLAB -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC gc.epsilon.TestManyThreads
+ * @run main/othervm -Xmx128m -Xss512k -Xbatch -Xcomp -XX:-UseTLAB -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC gc.epsilon.TestManyThreads
+ * @run main/othervm -Xmx128m -Xss512k -Xbatch -Xcomp -XX:TieredStopAtLevel=1 -XX:-UseTLAB -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC gc.epsilon.TestManyThreads
+ * @run main/othervm -Xmx128m -Xss512k -Xbatch -Xcomp -XX:-TieredCompilation -XX:-UseTLAB -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC gc.epsilon.TestManyThreads
*
- * @run main/othervm -Xmx128m -Xss512k -XX:+UseTLAB -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC TestManyThreads
- * @run main/othervm -Xmx128m -Xss512k -Xint -XX:+UseTLAB -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC TestManyThreads
- * @run main/othervm -Xmx128m -Xss512k -Xbatch -Xcomp -XX:+UseTLAB -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC TestManyThreads
- * @run main/othervm -Xmx128m -Xss512k -Xbatch -Xcomp -XX:TieredStopAtLevel=1 -XX:+UseTLAB -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC TestManyThreads
- * @run main/othervm -Xmx128m -Xss512k -Xbatch -Xcomp -XX:-TieredCompilation -XX:+UseTLAB -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC TestManyThreads
+ * @run main/othervm -Xmx128m -Xss512k -XX:+UseTLAB -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC gc.epsilon.TestManyThreads
+ * @run main/othervm -Xmx128m -Xss512k -Xint -XX:+UseTLAB -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC gc.epsilon.TestManyThreads
+ * @run main/othervm -Xmx128m -Xss512k -Xbatch -Xcomp -XX:+UseTLAB -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC gc.epsilon.TestManyThreads
+ * @run main/othervm -Xmx128m -Xss512k -Xbatch -Xcomp -XX:TieredStopAtLevel=1 -XX:+UseTLAB -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC gc.epsilon.TestManyThreads
+ * @run main/othervm -Xmx128m -Xss512k -Xbatch -Xcomp -XX:-TieredCompilation -XX:+UseTLAB -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC gc.epsilon.TestManyThreads
*/
import java.util.concurrent.atomic.*;
--- a/test/hotspot/jtreg/gc/epsilon/TestMaxTLAB.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/epsilon/TestMaxTLAB.java Tue Jan 29 17:42:58 2019 +0000
@@ -21,6 +21,8 @@
* questions.
*/
+package gc.epsilon;
+
/**
* @test TestMaxTLAB
* @key gc
@@ -28,15 +30,15 @@
* @summary Check EpsilonMaxTLAB options
* @bug 8212177
*
- * @run main/othervm -XX:+UnlockExperimentalVMOptions -Xmx128m -XX:+UseEpsilonGC -XX:EpsilonMaxTLABSize=1 TestMaxTLAB
- * @run main/othervm -XX:+UnlockExperimentalVMOptions -Xmx128m -XX:+UseEpsilonGC -XX:EpsilonMaxTLABSize=1K TestMaxTLAB
- * @run main/othervm -XX:+UnlockExperimentalVMOptions -Xmx128m -XX:+UseEpsilonGC -XX:EpsilonMaxTLABSize=1M TestMaxTLAB
- * @run main/othervm -XX:+UnlockExperimentalVMOptions -Xmx128m -XX:+UseEpsilonGC -XX:EpsilonMaxTLABSize=12345 TestMaxTLAB
+ * @run main/othervm -XX:+UnlockExperimentalVMOptions -Xmx128m -XX:+UseEpsilonGC -XX:EpsilonMaxTLABSize=1 gc.epsilon.TestMaxTLAB
+ * @run main/othervm -XX:+UnlockExperimentalVMOptions -Xmx128m -XX:+UseEpsilonGC -XX:EpsilonMaxTLABSize=1K gc.epsilon.TestMaxTLAB
+ * @run main/othervm -XX:+UnlockExperimentalVMOptions -Xmx128m -XX:+UseEpsilonGC -XX:EpsilonMaxTLABSize=1M gc.epsilon.TestMaxTLAB
+ * @run main/othervm -XX:+UnlockExperimentalVMOptions -Xmx128m -XX:+UseEpsilonGC -XX:EpsilonMaxTLABSize=12345 gc.epsilon.TestMaxTLAB
*
- * @run main/othervm -XX:+UnlockExperimentalVMOptions -Xmx128m -XX:+UseEpsilonGC -XX:EpsilonMaxTLABSize=1 -XX:+IgnoreUnrecognizedVMOptions -XX:ObjectAlignmentInBytes=16 TestMaxTLAB
- * @run main/othervm -XX:+UnlockExperimentalVMOptions -Xmx128m -XX:+UseEpsilonGC -XX:EpsilonMaxTLABSize=1K -XX:+IgnoreUnrecognizedVMOptions -XX:ObjectAlignmentInBytes=16 TestMaxTLAB
- * @run main/othervm -XX:+UnlockExperimentalVMOptions -Xmx128m -XX:+UseEpsilonGC -XX:EpsilonMaxTLABSize=1M -XX:+IgnoreUnrecognizedVMOptions -XX:ObjectAlignmentInBytes=16 TestMaxTLAB
- * @run main/othervm -XX:+UnlockExperimentalVMOptions -Xmx128m -XX:+UseEpsilonGC -XX:EpsilonMaxTLABSize=12345 -XX:+IgnoreUnrecognizedVMOptions -XX:ObjectAlignmentInBytes=16 TestMaxTLAB
+ * @run main/othervm -XX:+UnlockExperimentalVMOptions -Xmx128m -XX:+UseEpsilonGC -XX:EpsilonMaxTLABSize=1 -XX:+IgnoreUnrecognizedVMOptions -XX:ObjectAlignmentInBytes=16 gc.epsilon.TestMaxTLAB
+ * @run main/othervm -XX:+UnlockExperimentalVMOptions -Xmx128m -XX:+UseEpsilonGC -XX:EpsilonMaxTLABSize=1K -XX:+IgnoreUnrecognizedVMOptions -XX:ObjectAlignmentInBytes=16 gc.epsilon.TestMaxTLAB
+ * @run main/othervm -XX:+UnlockExperimentalVMOptions -Xmx128m -XX:+UseEpsilonGC -XX:EpsilonMaxTLABSize=1M -XX:+IgnoreUnrecognizedVMOptions -XX:ObjectAlignmentInBytes=16 gc.epsilon.TestMaxTLAB
+ * @run main/othervm -XX:+UnlockExperimentalVMOptions -Xmx128m -XX:+UseEpsilonGC -XX:EpsilonMaxTLABSize=12345 -XX:+IgnoreUnrecognizedVMOptions -XX:ObjectAlignmentInBytes=16 gc.epsilon.TestMaxTLAB
*/
public class TestMaxTLAB {
--- a/test/hotspot/jtreg/gc/epsilon/TestMemoryMXBeans.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/epsilon/TestMemoryMXBeans.java Tue Jan 29 17:42:58 2019 +0000
@@ -21,6 +21,8 @@
*
*/
+package gc.epsilon;
+
/**
* @test TestMemoryMXBeans
* @key gc
@@ -28,9 +30,9 @@
* @summary Test JMX memory beans
* @modules java.base/jdk.internal.misc
* java.management
- * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC -Xmx1g TestMemoryMXBeans -1 1024
- * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC -Xms1g -Xmx1g TestMemoryMXBeans 1024 1024
- * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC -Xms128m -Xmx1g TestMemoryMXBeans 128 1024
+ * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC -Xmx1g gc.epsilon.TestMemoryMXBeans -1 1024
+ * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC -Xms1g -Xmx1g gc.epsilon.TestMemoryMXBeans 1024 1024
+ * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC -Xms128m -Xmx1g gc.epsilon.TestMemoryMXBeans 128 1024
*/
import java.lang.management.*;
--- a/test/hotspot/jtreg/gc/epsilon/TestMemoryPools.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/epsilon/TestMemoryPools.java Tue Jan 29 17:42:58 2019 +0000
@@ -22,6 +22,8 @@
*
*/
+package gc.epsilon;
+
/**
* @test TestMemoryPools
* @key gc
@@ -29,7 +31,7 @@
* @summary Test JMX memory pools
* @modules java.base/jdk.internal.misc
* java.management
- * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC -Xmx1g -Xms1g TestMemoryPools
+ * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC -Xmx1g -Xms1g gc.epsilon.TestMemoryPools
*/
import java.lang.management.*;
--- a/test/hotspot/jtreg/gc/epsilon/TestObjects.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/epsilon/TestObjects.java Tue Jan 29 17:42:58 2019 +0000
@@ -21,23 +21,25 @@
* questions.
*/
+package gc.epsilon;
+
/**
* @test TestObjects
* @key gc
* @requires vm.gc.Epsilon & !vm.graal.enabled
* @summary Epsilon is able to allocate objects, and does not corrupt their state
*
- * @run main/othervm -Xmx128m -XX:+UseTLAB -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC TestObjects
- * @run main/othervm -Xmx128m -Xint -XX:+UseTLAB -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC TestObjects
- * @run main/othervm -Xmx128m -Xbatch -Xcomp -XX:+UseTLAB -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC TestObjects
- * @run main/othervm -Xmx128m -Xbatch -Xcomp -XX:TieredStopAtLevel=1 -XX:+UseTLAB -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC TestObjects
- * @run main/othervm -Xmx128m -Xbatch -Xcomp -XX:-TieredCompilation -XX:+UseTLAB -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC TestObjects
+ * @run main/othervm -Xmx128m -XX:+UseTLAB -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC gc.epsilon.TestObjects
+ * @run main/othervm -Xmx128m -Xint -XX:+UseTLAB -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC gc.epsilon.TestObjects
+ * @run main/othervm -Xmx128m -Xbatch -Xcomp -XX:+UseTLAB -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC gc.epsilon.TestObjects
+ * @run main/othervm -Xmx128m -Xbatch -Xcomp -XX:TieredStopAtLevel=1 -XX:+UseTLAB -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC gc.epsilon.TestObjects
+ * @run main/othervm -Xmx128m -Xbatch -Xcomp -XX:-TieredCompilation -XX:+UseTLAB -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC gc.epsilon.TestObjects
*
- * @run main/othervm -Xmx128m -XX:-UseTLAB -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC TestObjects
- * @run main/othervm -Xmx128m -Xint -XX:-UseTLAB -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC TestObjects
- * @run main/othervm -Xmx128m -Xbatch -Xcomp -XX:-UseTLAB -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC TestObjects
- * @run main/othervm -Xmx128m -Xbatch -Xcomp -XX:TieredStopAtLevel=1 -XX:-UseTLAB -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC TestObjects
- * @run main/othervm -Xmx128m -Xbatch -Xcomp -XX:-TieredCompilation -XX:-UseTLAB -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC TestObjects
+ * @run main/othervm -Xmx128m -XX:-UseTLAB -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC gc.epsilon.TestObjects
+ * @run main/othervm -Xmx128m -Xint -XX:-UseTLAB -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC gc.epsilon.TestObjects
+ * @run main/othervm -Xmx128m -Xbatch -Xcomp -XX:-UseTLAB -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC gc.epsilon.TestObjects
+ * @run main/othervm -Xmx128m -Xbatch -Xcomp -XX:TieredStopAtLevel=1 -XX:-UseTLAB -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC gc.epsilon.TestObjects
+ * @run main/othervm -Xmx128m -Xbatch -Xcomp -XX:-TieredCompilation -XX:-UseTLAB -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC gc.epsilon.TestObjects
*/
import java.util.Random;
--- a/test/hotspot/jtreg/gc/epsilon/TestPrintHeapSteps.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/epsilon/TestPrintHeapSteps.java Tue Jan 29 17:42:58 2019 +0000
@@ -21,14 +21,16 @@
* questions.
*/
+package gc.epsilon;
+
/**
* @test TestPrintSteps
* @key gc
* @requires vm.gc.Epsilon & !vm.graal.enabled
* @summary Tests -XX:EpsilonPrintHeapSteps works
- * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC -Xlog:gc -XX:EpsilonPrintHeapSteps=0 TestPrintHeapSteps
- * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC -Xlog:gc -XX:EpsilonPrintHeapSteps=1 TestPrintHeapSteps
- * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC -Xlog:gc -XX:EpsilonPrintHeapSteps=1000 TestPrintHeapSteps
+ * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC -Xlog:gc -XX:EpsilonPrintHeapSteps=0 gc.epsilon.TestPrintHeapSteps
+ * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC -Xlog:gc -XX:EpsilonPrintHeapSteps=1 gc.epsilon.TestPrintHeapSteps
+ * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC -Xlog:gc -XX:EpsilonPrintHeapSteps=1000 gc.epsilon.TestPrintHeapSteps
*/
public class TestPrintHeapSteps {
--- a/test/hotspot/jtreg/gc/epsilon/TestRefArrays.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/epsilon/TestRefArrays.java Tue Jan 29 17:42:58 2019 +0000
@@ -21,6 +21,8 @@
* questions.
*/
+package gc.epsilon;
+
/**
* @test TestRefArrays
* @key gc
@@ -28,17 +30,17 @@
* @summary Epsilon is able to allocate arrays, and does not corrupt their state
* @library /test/lib
*
- * @run main/othervm -Xmx1g -XX:+UseTLAB -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC TestRefArrays
- * @run main/othervm -Xmx1g -Xint -XX:+UseTLAB -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC TestRefArrays
- * @run main/othervm -Xmx1g -Xbatch -Xcomp -XX:+UseTLAB -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC TestRefArrays
- * @run main/othervm -Xmx1g -Xbatch -Xcomp -XX:TieredStopAtLevel=1 -XX:+UseTLAB -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC TestRefArrays
- * @run main/othervm -Xmx1g -Xbatch -Xcomp -XX:-TieredCompilation -XX:+UseTLAB -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC TestRefArrays
+ * @run main/othervm -Xmx1g -XX:+UseTLAB -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC gc.epsilon.TestRefArrays
+ * @run main/othervm -Xmx1g -Xint -XX:+UseTLAB -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC gc.epsilon.TestRefArrays
+ * @run main/othervm -Xmx1g -Xbatch -Xcomp -XX:+UseTLAB -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC gc.epsilon.TestRefArrays
+ * @run main/othervm -Xmx1g -Xbatch -Xcomp -XX:TieredStopAtLevel=1 -XX:+UseTLAB -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC gc.epsilon.TestRefArrays
+ * @run main/othervm -Xmx1g -Xbatch -Xcomp -XX:-TieredCompilation -XX:+UseTLAB -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC gc.epsilon.TestRefArrays
*
- * @run main/othervm -Xmx1g -XX:-UseTLAB -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC TestRefArrays
- * @run main/othervm -Xmx1g -Xint -XX:-UseTLAB -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC TestRefArrays
- * @run main/othervm -Xmx1g -Xbatch -Xcomp -XX:-UseTLAB -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC TestRefArrays
- * @run main/othervm -Xmx1g -Xbatch -Xcomp -XX:TieredStopAtLevel=1 -XX:-UseTLAB -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC TestRefArrays
- * @run main/othervm -Xmx1g -Xbatch -Xcomp -XX:-TieredCompilation -XX:-UseTLAB -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC TestRefArrays
+ * @run main/othervm -Xmx1g -XX:-UseTLAB -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC gc.epsilon.TestRefArrays
+ * @run main/othervm -Xmx1g -Xint -XX:-UseTLAB -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC gc.epsilon.TestRefArrays
+ * @run main/othervm -Xmx1g -Xbatch -Xcomp -XX:-UseTLAB -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC gc.epsilon.TestRefArrays
+ * @run main/othervm -Xmx1g -Xbatch -Xcomp -XX:TieredStopAtLevel=1 -XX:-UseTLAB -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC gc.epsilon.TestRefArrays
+ * @run main/othervm -Xmx1g -Xbatch -Xcomp -XX:-TieredCompilation -XX:-UseTLAB -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC gc.epsilon.TestRefArrays
*/
import java.util.Random;
--- a/test/hotspot/jtreg/gc/epsilon/TestUpdateCountersSteps.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/epsilon/TestUpdateCountersSteps.java Tue Jan 29 17:42:58 2019 +0000
@@ -21,15 +21,17 @@
* questions.
*/
+package gc.epsilon;
+
/**
* @test TestUpdateCountersSteps
* @key gc
* @requires vm.gc.Epsilon & !vm.graal.enabled
* @summary Test EpsilonUpdateCountersStep works
- * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC -Xlog:gc -XX:EpsilonUpdateCountersStep=1 TestUpdateCountersSteps
- * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC -Xlog:gc -XX:EpsilonUpdateCountersStep=10 TestUpdateCountersSteps
- * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC -Xlog:gc -XX:EpsilonUpdateCountersStep=100 TestUpdateCountersSteps
- * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC -Xlog:gc -XX:EpsilonUpdateCountersStep=1000 TestUpdateCountersSteps
+ * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC -Xlog:gc -XX:EpsilonUpdateCountersStep=1 gc.epsilon.TestUpdateCountersSteps
+ * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC -Xlog:gc -XX:EpsilonUpdateCountersStep=10 gc.epsilon.TestUpdateCountersSteps
+ * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC -Xlog:gc -XX:EpsilonUpdateCountersStep=100 gc.epsilon.TestUpdateCountersSteps
+ * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC -Xlog:gc -XX:EpsilonUpdateCountersStep=1000 gc.epsilon.TestUpdateCountersSteps
*/
public class TestUpdateCountersSteps {
--- a/test/hotspot/jtreg/gc/ergonomics/TestDynamicNumberOfGCThreads.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/ergonomics/TestDynamicNumberOfGCThreads.java Tue Jan 29 17:42:58 2019 +0000
@@ -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
@@ -21,6 +21,8 @@
* questions.
*/
+package gc.ergonomics;
+
/*
* @test TestDynamicNumberOfGCThreads
* @bug 8017462
@@ -31,7 +33,7 @@
* @library /test/lib
* @build sun.hotspot.WhiteBox
* @run driver ClassFileInstaller sun.hotspot.WhiteBox sun.hotspot.WhiteBox$WhiteBoxPermission
- * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI TestDynamicNumberOfGCThreads
+ * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI gc.ergonomics.TestDynamicNumberOfGCThreads
*/
import jdk.test.lib.process.OutputAnalyzer;
--- a/test/hotspot/jtreg/gc/ergonomics/TestInitialGCThreadLogging.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/ergonomics/TestInitialGCThreadLogging.java Tue Jan 29 17:42:58 2019 +0000
@@ -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
@@ -21,6 +21,8 @@
* questions.
*/
+package gc.ergonomics;
+
/*
* @test TestInitialGCThreadLogging
* @bug 8157240
@@ -31,7 +33,7 @@
* @library /test/lib
* @build sun.hotspot.WhiteBox
* @run driver ClassFileInstaller sun.hotspot.WhiteBox sun.hotspot.WhiteBox$WhiteBoxPermission
- * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI TestInitialGCThreadLogging
+ * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI gc.ergonomics.TestInitialGCThreadLogging
*/
import jdk.test.lib.process.ProcessTools;
--- a/test/hotspot/jtreg/gc/g1/Test2GbHeap.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/g1/Test2GbHeap.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, 2016, 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
@@ -21,6 +21,8 @@
* questions.
*/
+package gc.g1;
+
/*
* @test Test2GbHeap
* @key gc regression
@@ -32,6 +34,7 @@
* @library /test/lib
* @modules java.base/jdk.internal.misc
* java.management
+ * @run main gc.g1.Test2GbHeap
*/
import java.util.ArrayList;
--- a/test/hotspot/jtreg/gc/g1/TestConcurrentSystemGC.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/g1/TestConcurrentSystemGC.java Tue Jan 29 17:42:58 2019 +0000
@@ -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
@@ -21,6 +21,8 @@
* questions.
*/
+package gc.g1;
+
/*
* @test TestConcurrentSystemGC
* @bug 8195158
@@ -31,7 +33,7 @@
* @library /test/lib
* @modules java.base/jdk.internal.misc
* java.management
- * @run main/othervm -XX:+UseG1GC -XX:+ExplicitGCInvokesConcurrent -Xmx8m -Xms8m -XX:G1HeapRegionSize=1m TestConcurrentSystemGC
+ * @run main/othervm -XX:+UseG1GC -XX:+ExplicitGCInvokesConcurrent -Xmx8m -Xms8m -XX:G1HeapRegionSize=1m gc.g1.TestConcurrentSystemGC
*/
import java.util.ArrayList;
--- a/test/hotspot/jtreg/gc/g1/TestEagerReclaimHumongousRegions.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/g1/TestEagerReclaimHumongousRegions.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, 2016, 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
@@ -21,6 +21,8 @@
* questions.
*/
+package gc.g1;
+
/*
* @test TestEagerReclaimHumongousRegions
* @bug 8027959
@@ -31,6 +33,7 @@
* @library /test/lib
* @modules java.base/jdk.internal.misc
* java.management
+ * @run main gc.g1.TestEagerReclaimHumongousRegions
*/
import java.util.regex.Pattern;
@@ -41,7 +44,7 @@
import jdk.test.lib.process.ProcessTools;
import jdk.test.lib.Asserts;
-class ReclaimRegionFast {
+class TestEagerReclaimHumongousRegionsReclaimRegionFast {
public static final int M = 1024*1024;
public static LinkedList<Object> garbageList = new LinkedList<Object>();
@@ -84,7 +87,7 @@
"-Xmx128M",
"-Xmn16M",
"-Xlog:gc",
- ReclaimRegionFast.class.getName());
+ TestEagerReclaimHumongousRegionsReclaimRegionFast.class.getName());
Pattern p = Pattern.compile("Full GC");
--- a/test/hotspot/jtreg/gc/g1/TestEagerReclaimHumongousRegionsClearMarkBits.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/g1/TestEagerReclaimHumongousRegionsClearMarkBits.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, 2016, 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
@@ -21,6 +21,8 @@
* questions.
*/
+package gc.g1;
+
/*
* @test TestEagerReclaimHumongousRegionsClearMarkBits
* @bug 8051973
@@ -31,6 +33,7 @@
* @library /test/lib
* @modules java.base/jdk.internal.misc
* java.management
+ * @run main gc.g1.TestEagerReclaimHumongousRegionsClearMarkBits
*/
import java.util.ArrayList;
@@ -48,7 +51,7 @@
public ObjectWithSomeRefs other4;
}
-class ReclaimRegionFast {
+class TestEagerReclaimHumongousRegionsClearMarkBitsReclaimRegionFast {
public static final long MAX_MILLIS_FOR_RUN = 50 * 1000; // The maximum runtime for the actual test.
public static final int M = 1024*1024;
@@ -127,7 +130,7 @@
"-XX:ConcGCThreads=1", // Want to make marking as slow as possible.
"-XX:+IgnoreUnrecognizedVMOptions", // G1VerifyBitmaps is develop only.
"-XX:+G1VerifyBitmaps",
- ReclaimRegionFast.class.getName());
+ TestEagerReclaimHumongousRegionsClearMarkBitsReclaimRegionFast.class.getName());
OutputAnalyzer output = new OutputAnalyzer(pb.start());
output.shouldHaveExitValue(0);
}
--- a/test/hotspot/jtreg/gc/g1/TestEagerReclaimHumongousRegionsLog.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/g1/TestEagerReclaimHumongousRegionsLog.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 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
@@ -21,6 +21,8 @@
* questions.
*/
+package gc.g1;
+
/*
* @test TestEagerReclaimHumongousRegionsLog
* @summary Check that G1 reports humongous eager reclaim statistics correctly.
@@ -31,7 +33,7 @@
* java.management
* @build sun.hotspot.WhiteBox
* @run driver ClassFileInstaller sun.hotspot.WhiteBox
- * @run driver TestEagerReclaimHumongousRegionsLog
+ * @run driver gc.g1.TestEagerReclaimHumongousRegionsLog
*/
import sun.hotspot.WhiteBox;
--- a/test/hotspot/jtreg/gc/g1/TestEagerReclaimHumongousRegionsWithRefs.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/g1/TestEagerReclaimHumongousRegionsWithRefs.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, 2016, 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
@@ -21,6 +21,8 @@
* questions.
*/
+package gc.g1;
+
/*
* @test TestEagerReclaimHumongousRegionsWithRefs
* @bug 8048179
@@ -34,6 +36,7 @@
* @library /test/lib
* @modules java.base/jdk.internal.misc
* java.management
+ * @run main gc.g1.TestEagerReclaimHumongousRegionsWithRefs
*/
import java.util.regex.Pattern;
@@ -48,7 +51,7 @@
Object ref;
}
-class ReclaimRegionFast {
+class TestEagerReclaimHumongousRegionsWithRefsReclaimRegionFast {
public static final int M = 1024*1024;
@@ -96,7 +99,7 @@
"-Xmx128M",
"-Xmn16M",
"-Xlog:gc",
- ReclaimRegionFast.class.getName());
+ TestEagerReclaimHumongousRegionsWithRefsReclaimRegionFast.class.getName());
Pattern p = Pattern.compile("Full GC");
--- a/test/hotspot/jtreg/gc/g1/TestEdenSurvivorLessThanMax.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/g1/TestEdenSurvivorLessThanMax.java Tue Jan 29 17:42:58 2019 +0000
@@ -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
@@ -21,6 +21,8 @@
* questions.
*/
+package gc.g1;
+
/*
* @test TestEdenSurvivorLessThanMax
* @bug 8152724
@@ -30,7 +32,7 @@
* @library /test/lib
* @build sun.hotspot.WhiteBox
* @run driver ClassFileInstaller sun.hotspot.WhiteBox
- * @run main/othervm -Xbootclasspath/a:. -Xlog:gc+heap=debug -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -XX:+UseG1GC -Xmx64M -Xms64M -Xmn50M -XX:SurvivorRatio=1 TestEdenSurvivorLessThanMax
+ * @run main/othervm -Xbootclasspath/a:. -Xlog:gc+heap=debug -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -XX:+UseG1GC -Xmx64M -Xms64M -Xmn50M -XX:SurvivorRatio=1 gc.g1.TestEdenSurvivorLessThanMax
*/
import sun.hotspot.WhiteBox;
--- a/test/hotspot/jtreg/gc/g1/TestFromCardCacheIndex.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/g1/TestFromCardCacheIndex.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,3 +1,26 @@
+/*
+ * 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
+ * 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 TestFromCardCacheIndex.java
* @bug 8196485
@@ -11,8 +34,9 @@
* java.management
* @build sun.hotspot.WhiteBox
* @run driver ClassFileInstaller sun.hotspot.WhiteBox
- * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. -Xms20M -Xmx20M -XX:+UseCompressedOops -XX:G1HeapRegionSize=1M -XX:HeapBaseMinAddress=2199011721216 -XX:+UseG1GC -verbose:gc TestFromCardCacheIndex
+ * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. -Xms20M -Xmx20M -XX:+UseCompressedOops -XX:G1HeapRegionSize=1M -XX:HeapBaseMinAddress=2199011721216 -XX:+UseG1GC -verbose:gc gc.g1.TestFromCardCacheIndex
*/
+package gc.g1;
import sun.hotspot.WhiteBox;
--- a/test/hotspot/jtreg/gc/g1/TestG1TraceEagerReclaimHumongousObjects.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/g1/TestG1TraceEagerReclaimHumongousObjects.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, 2016, 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
@@ -21,6 +21,8 @@
* questions.
*/
+package gc.g1;
+
/*
* @test TestG1TraceEagerReclaimHumongousObjects
* @bug 8058801 8048179
@@ -31,6 +33,7 @@
* @library /test/lib
* @modules java.base/jdk.internal.misc
* java.management
+ * @run main gc.g1.TestG1TraceEagerReclaimHumongousObjects
*/
import jdk.test.lib.process.OutputAnalyzer;
--- a/test/hotspot/jtreg/gc/g1/TestGCLogMessages.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/g1/TestGCLogMessages.java Tue Jan 29 17:42:58 2019 +0000
@@ -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
@@ -21,6 +21,8 @@
* questions.
*/
+package gc.g1;
+
/*
* @test TestGCLogMessages
* @bug 8035406 8027295 8035398 8019342 8027959 8048179 8027962 8069330 8076463 8150630 8160055 8177059 8166191
@@ -33,7 +35,7 @@
* java.management
* @build sun.hotspot.WhiteBox
* @run driver ClassFileInstaller sun.hotspot.WhiteBox
- * @run main TestGCLogMessages
+ * @run main gc.g1.TestGCLogMessages
*/
import jdk.test.lib.process.OutputAnalyzer;
@@ -106,7 +108,6 @@
new LogMessageWithLevel("Skipped Cards", Level.DEBUG),
// Ext Root Scan
new LogMessageWithLevel("Thread Roots", Level.TRACE),
- new LogMessageWithLevel("StringTable Roots", Level.TRACE),
new LogMessageWithLevel("Universe Roots", Level.TRACE),
new LogMessageWithLevel("JNI Handles Roots", Level.TRACE),
new LogMessageWithLevel("ObjectSynchronizer Roots", Level.TRACE),
@@ -124,7 +125,9 @@
new LogMessageWithLevel("Redirtied Cards", Level.TRACE),
// Misc Top-level
new LogMessageWithLevel("Code Roots Purge", Level.DEBUG),
- new LogMessageWithLevel("String Dedup Fixup", Level.DEBUG),
+ new LogMessageWithLevel("String Deduplication", Level.DEBUG),
+ new LogMessageWithLevel("Queue Fixup", Level.DEBUG),
+ new LogMessageWithLevel("Table Fixup", Level.DEBUG),
new LogMessageWithLevel("Expand Heap After Collection", Level.DEBUG),
// Free CSet
new LogMessageWithLevel("Free Collection Set", Level.DEBUG),
@@ -143,6 +146,9 @@
new LogMessageWithLevel("Reference Processing", Level.DEBUG),
// VM internal reference processing
new LogMessageWithLevel("Weak Processing", Level.DEBUG),
+ new LogMessageWithLevel("JNI weak processing", Level.DEBUG),
+ new LogMessageWithLevel("StringTable weak processing", Level.DEBUG),
+ new LogMessageWithLevel("VM weak processing", Level.DEBUG),
new LogMessageWithLevelC2OrJVMCIOnly("DerivedPointerTable Update", Level.DEBUG),
new LogMessageWithLevel("Start New Collection Set", Level.DEBUG),
--- a/test/hotspot/jtreg/gc/g1/TestGreyReclaimedHumongousObjects.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/g1/TestGreyReclaimedHumongousObjects.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2017, 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
@@ -21,6 +21,8 @@
* questions.
*/
+package gc.g1;
+
/*
* @test TestGreyReclaimedHumongousObjects.java
* @bug 8069367 8185278
@@ -32,7 +34,7 @@
* -XX:+UnlockExperimentalVMOptions
* -XX:+G1EagerReclaimHumongousObjects
* -XX:+G1EagerReclaimHumongousObjectsWithStaleRefs
- * TestGreyReclaimedHumongousObjects 1048576 90
+ * gc.g1.TestGreyReclaimedHumongousObjects 1048576 90
*/
// This test spawns a bunch of threads, each of them rapidly
--- a/test/hotspot/jtreg/gc/g1/TestHumongousAllocInitialMark.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/g1/TestHumongousAllocInitialMark.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 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
@@ -21,6 +21,8 @@
* questions.
*/
+package gc.g1;
+
/*
* @test TestHumongousAllocInitialMark
* @bug 7168848
@@ -29,6 +31,7 @@
* @library /test/lib
* @modules java.base/jdk.internal.misc
* java.management
+ * @run main gc.g1.TestHumongousAllocInitialMark
*/
import jdk.test.lib.process.OutputAnalyzer;
--- a/test/hotspot/jtreg/gc/g1/TestHumongousAllocNearlyFullRegion.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/g1/TestHumongousAllocNearlyFullRegion.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 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
@@ -21,6 +21,8 @@
* questions.
*/
+package gc.g1;
+
/*
* @test TestHumongousAllocNearlyFullRegion
* @bug 8143587
@@ -29,7 +31,7 @@
* @requires vm.gc.G1
* @modules java.base/jdk.internal.misc
* @library /test/lib
- * @run driver TestHumongousAllocNearlyFullRegion
+ * @run driver gc.g1.TestHumongousAllocNearlyFullRegion
*/
import jdk.test.lib.process.OutputAnalyzer;
--- a/test/hotspot/jtreg/gc/g1/TestHumongousCodeCacheRoots.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/g1/TestHumongousCodeCacheRoots.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 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
@@ -21,6 +21,8 @@
* questions.
*/
+package gc.g1;
+
/*
* @test
* @key regression gc
@@ -33,7 +35,7 @@
* @run driver ClassFileInstaller sun.hotspot.WhiteBox
* sun.hotspot.WhiteBox$WhiteBoxPermission
* @summary Humongous objects may have references from the code cache
- * @run main TestHumongousCodeCacheRoots
+ * @run main gc.g1.TestHumongousCodeCacheRoots
*/
import jdk.test.lib.process.OutputAnalyzer;
--- a/test/hotspot/jtreg/gc/g1/TestHumongousRemsetsMatch.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/g1/TestHumongousRemsetsMatch.java Tue Jan 29 17:42:58 2019 +0000
@@ -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
@@ -21,6 +21,8 @@
* questions.
*/
+package gc.g1;
+
/*
* @test TestHumongousRemSetsMatch
* @bug 8205426
@@ -30,7 +32,7 @@
* @library /test/lib
* @build sun.hotspot.WhiteBox
* @run driver ClassFileInstaller sun.hotspot.WhiteBox
- * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -Xmx512M -Xms512M -Xmn10M -XX:ParallelGCThreads=2 -XX:-UseDynamicNumberOfGCThreads -XX:+UseG1GC -XX:+WhiteBoxAPI -XX:G1HeapRegionSize=1M -XX:+VerifyAfterGC -Xlog:gc,gc+remset+tracking=trace TestHumongousRemsetsMatch
+ * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -Xmx512M -Xms512M -Xmn10M -XX:ParallelGCThreads=2 -XX:-UseDynamicNumberOfGCThreads -XX:+UseG1GC -XX:+WhiteBoxAPI -XX:G1HeapRegionSize=1M -XX:+VerifyAfterGC -Xlog:gc,gc+remset+tracking=trace gc.g1.TestHumongousRemsetsMatch
*/
import sun.hotspot.WhiteBox;
--- a/test/hotspot/jtreg/gc/g1/TestHumongousShrinkHeap.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/g1/TestHumongousShrinkHeap.java Tue Jan 29 17:42:58 2019 +0000
@@ -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
@@ -21,6 +21,8 @@
* questions.
*/
+package gc.g1;
+
/**
* @test TestHumongousShrinkHeap
* @bug 8036025 8056043
@@ -32,7 +34,7 @@
* @modules java.management/sun.management
* @run main/othervm -XX:-ExplicitGCInvokesConcurrent -XX:MinHeapFreeRatio=10
* -XX:MaxHeapFreeRatio=12 -XX:+UseG1GC -XX:G1HeapRegionSize=1M -verbose:gc
- * TestHumongousShrinkHeap
+ * gc.g1.TestHumongousShrinkHeap
*/
import com.sun.management.HotSpotDiagnosticMXBean;
--- a/test/hotspot/jtreg/gc/g1/TestInvalidateArrayCopy.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/g1/TestInvalidateArrayCopy.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 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
@@ -21,6 +21,8 @@
* questions.
*/
+package gc.g1;
+
/*
* @test TestInvalidateArrayCopy
* @bug 8182050
@@ -28,7 +30,7 @@
* @requires vm.gc.G1
* @requires vm.debug
* @key gc
- * @run main/othervm -XX:NewSize=1M -Xlog:gc -XX:MaxNewSize=1m -XX:-UseTLAB -XX:OldSize=63M -XX:MaxHeapSize=64M TestInvalidateArrayCopy
+ * @run main/othervm -XX:NewSize=1M -Xlog:gc -XX:MaxNewSize=1m -XX:-UseTLAB -XX:OldSize=63M -XX:MaxHeapSize=64M gc.g1.TestInvalidateArrayCopy
*/
// The test allocates zero-sized arrays of j.l.O and tries to arraycopy random data into it so
--- a/test/hotspot/jtreg/gc/g1/TestJNIWeakG1/TestJNIWeakG1.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/g1/TestJNIWeakG1/TestJNIWeakG1.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 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
@@ -21,6 +21,8 @@
* questions.
*/
+package gc.g1.TestJNIWeakG1;
+
/* @test
* @bug 8166188 8178813
* @summary Test return of JNI weak global refs during concurrent
@@ -38,13 +40,13 @@
* -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
* -XX:+UseG1GC -XX:MaxTenuringThreshold=2
* -Xint
- * TestJNIWeakG1
+ * gc.g1.TestJNIWeakG1.TestJNIWeakG1
* @run main/othervm/native
* -Xbootclasspath/a:.
* -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
* -XX:+UseG1GC -XX:MaxTenuringThreshold=2
* -Xcomp
- * TestJNIWeakG1
+ * gc.g1.TestJNIWeakG1.TestJNIWeakG1
*/
import sun.hotspot.WhiteBox;
--- a/test/hotspot/jtreg/gc/g1/TestJNIWeakG1/libTestJNIWeakG1.c Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/g1/TestJNIWeakG1/libTestJNIWeakG1.c Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 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
@@ -30,13 +30,13 @@
static jweak registered = NULL;
JNIEXPORT void JNICALL
-Java_TestJNIWeakG1_registerObject(JNIEnv* env, jclass jclazz, jobject value) {
+Java_gc_g1_TestJNIWeakG1_TestJNIWeakG1_registerObject(JNIEnv* env, jclass jclazz, jobject value) {
// assert registered == NULL
registered = (*env)->NewWeakGlobalRef(env, value);
}
JNIEXPORT void JNICALL
-Java_TestJNIWeakG1_unregisterObject(JNIEnv* env, jclass jclazz) {
+Java_gc_g1_TestJNIWeakG1_TestJNIWeakG1_unregisterObject(JNIEnv* env, jclass jclazz) {
if (registered != NULL) {
(*env)->DeleteWeakGlobalRef(env, registered);
registered = NULL;
@@ -45,14 +45,14 @@
// Directly return jweak, to be resolved by native call's return value handling.
JNIEXPORT jobject JNICALL
-Java_TestJNIWeakG1_getReturnedWeak(JNIEnv* env, jclass jclazz) {
+Java_gc_g1_TestJNIWeakG1_TestJNIWeakG1_getReturnedWeak(JNIEnv* env, jclass jclazz) {
// assert registered != NULL
return registered;
}
// Directly resolve jweak and return the result.
JNIEXPORT jobject JNICALL
-Java_TestJNIWeakG1_getResolvedWeak(JNIEnv* env, jclass jclazz) {
+Java_gc_g1_TestJNIWeakG1_TestJNIWeakG1_getResolvedWeak(JNIEnv* env, jclass jclazz) {
// assert registered != NULL
return (*env)->NewLocalRef(env, registered);
}
--- a/test/hotspot/jtreg/gc/g1/TestLargePageUseForAuxMemory.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/g1/TestLargePageUseForAuxMemory.java Tue Jan 29 17:42:58 2019 +0000
@@ -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
@@ -21,6 +21,8 @@
* questions.
*/
+package gc.g1;
+
/*
* @test TestLargePageUseForAuxMemory.java
* @summary Test that auxiliary data structures are allocated using large pages if available.
@@ -32,7 +34,7 @@
* @build sun.hotspot.WhiteBox
* @run driver ClassFileInstaller sun.hotspot.WhiteBox
* sun.hotspot.WhiteBox$WhiteBoxPermission
- * @run main/othervm -Xbootclasspath/a:. -XX:+UseG1GC -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -XX:+IgnoreUnrecognizedVMOptions -XX:+UseLargePages TestLargePageUseForAuxMemory
+ * @run main/othervm -Xbootclasspath/a:. -XX:+UseG1GC -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -XX:+IgnoreUnrecognizedVMOptions -XX:+UseLargePages gc.g1.TestLargePageUseForAuxMemory
*/
import java.lang.Math;
--- a/test/hotspot/jtreg/gc/g1/TestNoEagerReclaimOfHumongousRegions.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/g1/TestNoEagerReclaimOfHumongousRegions.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2016, 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
@@ -21,6 +21,8 @@
* questions.
*/
+package gc.g1;
+
/*
* @test TestNoEagerReclaimOfHumongousRegions
* @bug 8139424
@@ -34,7 +36,7 @@
* @build sun.hotspot.WhiteBox
* @run driver ClassFileInstaller sun.hotspot.WhiteBox
* sun.hotspot.WhiteBox$WhiteBoxPermission
- * @run main/othervm -Xbootclasspath/a:. -Xlog:gc,gc+humongous=debug -XX:+UseG1GC -XX:MaxTenuringThreshold=0 -XX:G1RSetSparseRegionEntries=32 -XX:G1HeapRegionSize=1m -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI TestNoEagerReclaimOfHumongousRegions
+ * @run main/othervm -Xbootclasspath/a:. -Xlog:gc,gc+humongous=debug -XX:+UseG1GC -XX:MaxTenuringThreshold=0 -XX:G1RSetSparseRegionEntries=32 -XX:G1HeapRegionSize=1m -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI gc.g1.TestNoEagerReclaimOfHumongousRegions
*/
import java.util.LinkedList;
--- a/test/hotspot/jtreg/gc/g1/TestPLABOutput.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/g1/TestPLABOutput.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2016, 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
@@ -21,6 +21,8 @@
* questions.
*/
+package gc.g1;
+
/*
* @test TestPLABOutput
* @bug 8140585
@@ -31,7 +33,7 @@
* @library /test/lib
* @build sun.hotspot.WhiteBox
* @run driver ClassFileInstaller sun.hotspot.WhiteBox
- * @run driver TestPLABOutput
+ * @run driver gc.g1.TestPLABOutput
*/
import sun.hotspot.WhiteBox;
--- a/test/hotspot/jtreg/gc/g1/TestPLABSizeBounds.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/g1/TestPLABSizeBounds.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2016, 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
@@ -21,6 +21,8 @@
* questions.
*/
+package gc.g1;
+
/*
* @test TestPLABSizeBounds
* @bug 8134857
@@ -30,6 +32,7 @@
* @library /test/lib
* @modules java.base/jdk.internal.misc
* java.management
+ * @run main gc.g1.TestPLABSizeBounds
*/
import java.util.ArrayList;
--- a/test/hotspot/jtreg/gc/g1/TestParallelAlwaysPreTouch.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/g1/TestParallelAlwaysPreTouch.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 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
@@ -21,6 +21,8 @@
* questions.
*/
+package gc.g1;
+
/*
* @test
* @key gc regression
@@ -29,7 +31,7 @@
* Allocates a few humongous objects that will be allocated by expanding the heap, causing concurrent parallel
* pre-touch.
* @requires vm.gc.G1
- * @run main/othervm -XX:+UseG1GC -Xms10M -Xmx100m -XX:G1HeapRegionSize=1M -XX:+AlwaysPreTouch -XX:PreTouchParallelChunkSize=512k -Xlog:gc+ergo+heap=debug,gc+heap=debug,gc=debug TestParallelAlwaysPreTouch
+ * @run main/othervm -XX:+UseG1GC -Xms10M -Xmx100m -XX:G1HeapRegionSize=1M -XX:+AlwaysPreTouch -XX:PreTouchParallelChunkSize=512k -Xlog:gc+ergo+heap=debug,gc+heap=debug,gc=debug gc.g1.TestParallelAlwaysPreTouch
*/
public class TestParallelAlwaysPreTouch {
--- a/test/hotspot/jtreg/gc/g1/TestPeriodicCollection.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/g1/TestPeriodicCollection.java Tue Jan 29 17:42:58 2019 +0000
@@ -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
@@ -21,6 +21,8 @@
* questions.
*/
+package gc.g1;
+
/**
* @test TestPeriodicCollection
* @requires vm.gc.G1
@@ -29,8 +31,8 @@
* @library /test/lib /
* @modules java.base/jdk.internal.misc
* @modules java.management/sun.management
- * @run main/othervm -XX:MaxNewSize=32M -XX:InitialHeapSize=48M -Xmx128M -XX:MinHeapFreeRatio=5 -XX:MaxHeapFreeRatio=25 -XX:+UseG1GC -XX:G1PeriodicGCInterval=3000 -XX:+G1PeriodicGCInvokesConcurrent -Xlog:gc,gc+periodic=debug,gc+ergo+heap=debug TestPeriodicCollection
- * @run main/othervm -XX:MaxNewSize=32M -XX:InitialHeapSize=48M -Xmx128M -XX:MinHeapFreeRatio=5 -XX:MaxHeapFreeRatio=25 -XX:+UseG1GC -XX:G1PeriodicGCInterval=3000 -XX:-G1PeriodicGCInvokesConcurrent -Xlog:gc,gc+periodic=debug,gc+ergo+heap=debug TestPeriodicCollection
+ * @run main/othervm -XX:MaxNewSize=32M -XX:InitialHeapSize=48M -Xmx128M -XX:MinHeapFreeRatio=5 -XX:MaxHeapFreeRatio=25 -XX:+UseG1GC -XX:G1PeriodicGCInterval=3000 -XX:+G1PeriodicGCInvokesConcurrent -Xlog:gc,gc+periodic=debug,gc+ergo+heap=debug gc.g1.TestPeriodicCollection
+ * @run main/othervm -XX:MaxNewSize=32M -XX:InitialHeapSize=48M -Xmx128M -XX:MinHeapFreeRatio=5 -XX:MaxHeapFreeRatio=25 -XX:+UseG1GC -XX:G1PeriodicGCInterval=3000 -XX:-G1PeriodicGCInvokesConcurrent -Xlog:gc,gc+periodic=debug,gc+ergo+heap=debug gc.g1.TestPeriodicCollection
*/
import com.sun.management.HotSpotDiagnosticMXBean;
@@ -61,7 +63,7 @@
public static void main(String[] args) {
MemoryUsage muInitial = ManagementFactory.getMemoryMXBean().getHeapMemoryUsage();
- MemoryUsagePrinter.printMemoryUsage("initial", muInitial);
+ printMemoryUsage("initial", muInitial);
if (gcOccurred()) {
System.out.println("At least one garbage collection occurred. Exiting as this may have already shrunk the heap.");
@@ -75,7 +77,7 @@
}
MemoryUsage muAfter = ManagementFactory.getMemoryMXBean().getHeapMemoryUsage();
- MemoryUsagePrinter.printMemoryUsage("after", muAfter);
+ printMemoryUsage("after", muAfter);
assertLessThan(muAfter.getCommitted(), muInitial.getCommitted(), String.format(
"committed free heap size is not less than committed full heap size, heap hasn't been shrunk?%n"
@@ -88,12 +90,6 @@
.getVMOption(MAX_FREE_RATIO_FLAG_NAME).getValue()
));
}
-}
-
-/**
- * Prints memory usage to standard output
- */
-class MemoryUsagePrinter {
public static final NumberFormat NF = Helpers.numberFormatter();
--- a/test/hotspot/jtreg/gc/g1/TestPeriodicLogMessages.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/g1/TestPeriodicLogMessages.java Tue Jan 29 17:42:58 2019 +0000
@@ -21,6 +21,8 @@
* questions.
*/
+package gc.g1;
+
/**
* @test TestPeriodicLogMessages
* @bug 8216490
@@ -29,6 +31,7 @@
* @library /test/lib /
* @modules java.base/jdk.internal.misc
* @modules java.management/sun.management
+ * @run main gc.g1.TestPeriodicLogMessages
*/
import jdk.test.lib.process.OutputAnalyzer;
--- a/test/hotspot/jtreg/gc/g1/TestPrintRegionRememberedSetInfo.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/g1/TestPrintRegionRememberedSetInfo.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 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
@@ -21,6 +21,8 @@
* questions.
*/
+package gc.g1;
+
/**
* @test TestPrintRegionRememberedSetInfo
* @key gc
@@ -30,7 +32,7 @@
* @library /test/lib
* @modules java.base/jdk.internal.misc
* java.management
- * @run main TestPrintRegionRememberedSetInfo
+ * @run main gc.g1.TestPrintRegionRememberedSetInfo
* @author thomas.schatzl@oracle.com
*/
--- a/test/hotspot/jtreg/gc/g1/TestRegionAlignment.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/g1/TestRegionAlignment.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 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
@@ -21,12 +21,14 @@
* questions.
*/
+package gc.g1;
+
/*
* @test TestRegionAlignment.java
* @bug 8013791
* @requires vm.gc.G1
* @summary Make sure that G1 ergonomics pick a heap size that is aligned with the region size
- * @run main/othervm -XX:+UseG1GC -XX:G1HeapRegionSize=32m -XX:MaxRAM=555m TestRegionAlignment
+ * @run main/othervm -XX:+UseG1GC -XX:G1HeapRegionSize=32m -XX:MaxRAM=555m gc.g1.TestRegionAlignment
*
* When G1 ergonomically picks a maximum heap size it must be aligned to the region size.
* This test tries to get the VM to pick a small and unaligned heap size (by using MaxRAM=555) and a
--- a/test/hotspot/jtreg/gc/g1/TestRegionLivenessPrint.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/g1/TestRegionLivenessPrint.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 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
@@ -21,6 +21,8 @@
* questions.
*/
+package gc.g1;
+
/*
* @test TestRegionLivenessPrint.java
* @bug 8151920
@@ -32,7 +34,7 @@
* @build sun.hotspot.WhiteBox
* @run driver ClassFileInstaller sun.hotspot.WhiteBox
* sun.hotspot.WhiteBox$WhiteBoxPermission
- * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -XX:+UseG1GC -Xmx128M -XX:G1HeapRegionSize=1m -Xlog:gc+liveness=trace TestRegionLivenessPrint
+ * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -XX:+UseG1GC -Xmx128M -XX:G1HeapRegionSize=1m -Xlog:gc+liveness=trace gc.g1.TestRegionLivenessPrint
*/
import sun.hotspot.WhiteBox;
--- a/test/hotspot/jtreg/gc/g1/TestRemsetLogging.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/g1/TestRemsetLogging.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 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
@@ -21,18 +21,21 @@
* questions.
*/
+package gc.g1;
+
/*
* @test TestRemsetLogging.java
* @requires vm.gc.G1
* @bug 8013895 8129977 8145534
* @library /test/lib
+ * @library /
* @modules java.base/jdk.internal.misc
* java.management/sun.management
* @build sun.hotspot.WhiteBox
* @run driver ClassFileInstaller sun.hotspot.WhiteBox
* sun.hotspot.WhiteBox$WhiteBoxPermission
* @summary Verify output of -Xlog:gc+remset*=trace
- * @run main TestRemsetLogging
+ * @run main gc.g1.TestRemsetLogging
*
* Test the output of -Xlog:gc+remset*=trace in conjunction with G1SummarizeRSetStatsPeriod.
*/
--- a/test/hotspot/jtreg/gc/g1/TestRemsetLoggingPerRegion.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/g1/TestRemsetLoggingPerRegion.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 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
@@ -21,18 +21,21 @@
* questions.
*/
+package gc.g1;
+
/*
* @test TestRemsetLoggingPerRegion.java
* @requires vm.gc.G1
* @bug 8014078 8129977 8145534
* @library /test/lib
+ * @library /
* @modules java.base/jdk.internal.misc
* java.management/sun.management
* @build sun.hotspot.WhiteBox
* @run driver ClassFileInstaller sun.hotspot.WhiteBox
* sun.hotspot.WhiteBox$WhiteBoxPermission
* @summary Verify output of -Xlog:gc+remset*=trace in regards to per-region type output
- * @run main TestRemsetLoggingPerRegion
+ * @run main gc.g1.TestRemsetLoggingPerRegion
*/
public class TestRemsetLoggingPerRegion {
--- a/test/hotspot/jtreg/gc/g1/TestRemsetLoggingThreads.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/g1/TestRemsetLoggingThreads.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 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
@@ -21,6 +21,8 @@
* questions.
*/
+package gc.g1;
+
/*
* @test TestRemsetLoggingThreads
* @requires vm.gc.G1
@@ -31,6 +33,7 @@
* java.management/sun.management
* @summary Ensure that various values of worker threads/concurrent
* refinement threads do not crash the VM.
+ * @run main gc.g1.TestRemsetLoggingThreads
*/
import java.util.regex.Matcher;
--- a/test/hotspot/jtreg/gc/g1/TestRemsetLoggingTools.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/g1/TestRemsetLoggingTools.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 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
@@ -21,6 +21,8 @@
* questions.
*/
+package gc.g1;
+
/*
* Common helpers for TestRemsetLogging* tests
*/
--- a/test/hotspot/jtreg/gc/g1/TestSharedArchiveWithPreTouch.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/g1/TestSharedArchiveWithPreTouch.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 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
@@ -21,6 +21,8 @@
* questions.
*/
+package gc.g1;
+
/**
* @test
* @bug 8169703
@@ -31,7 +33,7 @@
* @library /test/lib
* @modules java.base/jdk.internal.misc
* java.management
- * @run main TestSharedArchiveWithPreTouch
+ * @run main gc.g1.TestSharedArchiveWithPreTouch
*/
import java.util.List;
--- a/test/hotspot/jtreg/gc/g1/TestShrinkAuxiliaryData.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/g1/TestShrinkAuxiliaryData.java Tue Jan 29 17:42:58 2019 +0000
@@ -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
@@ -21,6 +21,8 @@
* questions.
*/
+package gc.g1;
+
import jdk.test.lib.Asserts;
import jdk.test.lib.Platform;
import jdk.test.lib.process.ProcessTools;
--- a/test/hotspot/jtreg/gc/g1/TestShrinkAuxiliaryData00.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/g1/TestShrinkAuxiliaryData00.java Tue Jan 29 17:42:58 2019 +0000
@@ -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
@@ -21,6 +21,8 @@
* questions.
*/
+package gc.g1;
+
/**
* @test TestShrinkAuxiliaryData00
* @bug 8038423 8061715
@@ -28,12 +30,13 @@
* G1ConcRSLogCacheSize and ObjectAlignmentInBytes options values
* @requires vm.gc.G1
* @library /test/lib
+ * @library /
* @modules java.base/jdk.internal.misc
* java.management
* @build sun.hotspot.WhiteBox
* @run driver ClassFileInstaller sun.hotspot.WhiteBox
* sun.hotspot.WhiteBox$WhiteBoxPermission
- * @run main/timeout=720 TestShrinkAuxiliaryData00
+ * @run main/timeout=720 gc.g1.TestShrinkAuxiliaryData00
*/
public class TestShrinkAuxiliaryData00 {
--- a/test/hotspot/jtreg/gc/g1/TestShrinkAuxiliaryData05.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/g1/TestShrinkAuxiliaryData05.java Tue Jan 29 17:42:58 2019 +0000
@@ -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
@@ -21,6 +21,8 @@
* questions.
*/
+package gc.g1;
+
/**
* @test TestShrinkAuxiliaryData05
* @bug 8038423 8061715 8078405
@@ -28,12 +30,13 @@
* G1ConcRSLogCacheSize and ObjectAlignmentInBytes options values
* @requires vm.gc.G1
* @library /test/lib
+ * @library /
* @modules java.base/jdk.internal.misc
* java.management
* @build sun.hotspot.WhiteBox
* @run driver ClassFileInstaller sun.hotspot.WhiteBox
* sun.hotspot.WhiteBox$WhiteBoxPermission
- * @run main/timeout=720 TestShrinkAuxiliaryData05
+ * @run main/timeout=720 gc.g1.TestShrinkAuxiliaryData05
*/
public class TestShrinkAuxiliaryData05 {
--- a/test/hotspot/jtreg/gc/g1/TestShrinkAuxiliaryData10.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/g1/TestShrinkAuxiliaryData10.java Tue Jan 29 17:42:58 2019 +0000
@@ -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
@@ -21,6 +21,8 @@
* questions.
*/
+package gc.g1;
+
/**
* @test TestShrinkAuxiliaryData10
* @bug 8038423 8061715 8078405
@@ -28,12 +30,13 @@
* G1ConcRSLogCacheSize and ObjectAlignmentInBytes options values
* @requires vm.gc.G1
* @library /test/lib
+ * @library /
* @modules java.base/jdk.internal.misc
* java.management
* @build sun.hotspot.WhiteBox
* @run driver ClassFileInstaller sun.hotspot.WhiteBox
* sun.hotspot.WhiteBox$WhiteBoxPermission
- * @run main/timeout=720 TestShrinkAuxiliaryData10
+ * @run main/timeout=720 gc.g1.TestShrinkAuxiliaryData10
*/
public class TestShrinkAuxiliaryData10 {
--- a/test/hotspot/jtreg/gc/g1/TestShrinkAuxiliaryData15.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/g1/TestShrinkAuxiliaryData15.java Tue Jan 29 17:42:58 2019 +0000
@@ -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
@@ -21,6 +21,8 @@
* questions.
*/
+package gc.g1;
+
/**
* @test TestShrinkAuxiliaryData15
* @bug 8038423 8061715 8078405
@@ -28,12 +30,13 @@
* G1ConcRSLogCacheSize and ObjectAlignmentInBytes options values
* @requires vm.gc.G1
* @library /test/lib
+ * @library /
* @modules java.base/jdk.internal.misc
* java.management
* @build sun.hotspot.WhiteBox
* @run driver ClassFileInstaller sun.hotspot.WhiteBox
* sun.hotspot.WhiteBox$WhiteBoxPermission
- * @run main/timeout=720 TestShrinkAuxiliaryData15
+ * @run main/timeout=720 gc.g1.TestShrinkAuxiliaryData15
*/
public class TestShrinkAuxiliaryData15 {
--- a/test/hotspot/jtreg/gc/g1/TestShrinkAuxiliaryData20.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/g1/TestShrinkAuxiliaryData20.java Tue Jan 29 17:42:58 2019 +0000
@@ -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
@@ -21,6 +21,8 @@
* questions.
*/
+package gc.g1;
+
/**
* @test TestShrinkAuxiliaryData20
* @bug 8038423 8061715 8078405
@@ -28,12 +30,13 @@
* G1ConcRSLogCacheSize and ObjectAlignmentInBytes options values
* @requires vm.gc.G1
* @library /test/lib
+ * @library /
* @modules java.base/jdk.internal.misc
* java.management
* @build sun.hotspot.WhiteBox
* @run driver ClassFileInstaller sun.hotspot.WhiteBox
* sun.hotspot.WhiteBox$WhiteBoxPermission
- * @run main/timeout=720 TestShrinkAuxiliaryData20
+ * @run main/timeout=720 gc.g1.TestShrinkAuxiliaryData20
*/
public class TestShrinkAuxiliaryData20 {
--- a/test/hotspot/jtreg/gc/g1/TestShrinkAuxiliaryData25.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/g1/TestShrinkAuxiliaryData25.java Tue Jan 29 17:42:58 2019 +0000
@@ -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
@@ -21,6 +21,8 @@
* questions.
*/
+package gc.g1;
+
/**
* @test TestShrinkAuxiliaryData25
* @bug 8038423 8061715 8078405
@@ -28,12 +30,13 @@
* G1ConcRSLogCacheSize and ObjectAlignmentInBytes options values
* @requires vm.gc.G1
* @library /test/lib
+ * @library /
* @modules java.base/jdk.internal.misc
* java.management
* @build sun.hotspot.WhiteBox
* @run driver ClassFileInstaller sun.hotspot.WhiteBox
* sun.hotspot.WhiteBox$WhiteBoxPermission
- * @run main/timeout=720 TestShrinkAuxiliaryData25
+ * @run main/timeout=720 gc.g1.TestShrinkAuxiliaryData25
*/
public class TestShrinkAuxiliaryData25 {
--- a/test/hotspot/jtreg/gc/g1/TestShrinkAuxiliaryData30.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/g1/TestShrinkAuxiliaryData30.java Tue Jan 29 17:42:58 2019 +0000
@@ -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
@@ -21,6 +21,8 @@
* questions.
*/
+package gc.g1;
+
/**
* @test TestShrinkAuxiliaryData30
* @bug 8038423 8061715 8078405
@@ -28,12 +30,13 @@
* G1ConcRSLogCacheSize and ObjectAlignmentInBytes options values
* @requires vm.gc.G1
* @library /test/lib
+ * @library /
* @modules java.base/jdk.internal.misc
* java.management
* @build sun.hotspot.WhiteBox
* @run driver ClassFileInstaller sun.hotspot.WhiteBox
* sun.hotspot.WhiteBox$WhiteBoxPermission
- * @run main/timeout=720 TestShrinkAuxiliaryData30
+ * @run main/timeout=720 gc.g1.TestShrinkAuxiliaryData30
*/
public class TestShrinkAuxiliaryData30 {
--- a/test/hotspot/jtreg/gc/g1/TestShrinkDefragmentedHeap.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/g1/TestShrinkDefragmentedHeap.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, 2016, 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
@@ -21,6 +21,8 @@
* questions.
*/
+package gc.g1;
+
/**
* @test TestShrinkDefragmentedHeap
* @bug 8038423 8129590
@@ -34,6 +36,7 @@
* @library /test/lib /
* @modules java.base/jdk.internal.misc
* java.management/sun.management
+ * @run main gc.g1.TestShrinkDefragmentedHeap
*/
import java.lang.management.ManagementFactory;
import java.lang.management.MemoryUsage;
--- a/test/hotspot/jtreg/gc/g1/TestShrinkToOneRegion.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/g1/TestShrinkToOneRegion.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 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
@@ -21,12 +21,14 @@
* questions.
*/
+package gc.g1;
+
/*
* @test TestShrinkToOneRegion.java
* @bug 8013872
* @requires vm.gc.G1
* @summary Shrinking the heap down to one region used to hit an assert
- * @run main/othervm -XX:+UseG1GC -XX:G1HeapRegionSize=32m -Xmx256m TestShrinkToOneRegion
+ * @run main/othervm -XX:+UseG1GC -XX:G1HeapRegionSize=32m -Xmx256m gc.g1.TestShrinkToOneRegion
*
* Doing a System.gc() without having allocated many objects will shrink the heap.
* With a large region size we will shrink the heap to one region.
--- a/test/hotspot/jtreg/gc/g1/TestStringDeduplicationAgeThreshold.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/g1/TestStringDeduplicationAgeThreshold.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, 2016, 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
@@ -21,6 +21,8 @@
* questions.
*/
+package gc.g1;
+
/*
* @test TestStringDeduplicationAgeThreshold
* @summary Test string deduplication age threshold
@@ -28,9 +30,11 @@
* @key gc
* @requires vm.gc.G1
* @library /test/lib
+ * @library /
* @modules java.base/jdk.internal.misc:open
* @modules java.base/java.lang:open
* java.management
+ * @run main gc.g1.TestStringDeduplicationAgeThreshold
*/
public class TestStringDeduplicationAgeThreshold {
--- a/test/hotspot/jtreg/gc/g1/TestStringDeduplicationFullGC.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/g1/TestStringDeduplicationFullGC.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, 2016, 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
@@ -21,6 +21,8 @@
* questions.
*/
+package gc.g1;
+
/*
* @test TestStringDeduplicationFullGC
* @summary Test string deduplication during full GC
@@ -28,9 +30,11 @@
* @key gc
* @requires vm.gc.G1
* @library /test/lib
+ * @library /
* @modules java.base/jdk.internal.misc:open
* @modules java.base/java.lang:open
* java.management
+ * @run main gc.g1.TestStringDeduplicationFullGC
*/
public class TestStringDeduplicationFullGC {
--- a/test/hotspot/jtreg/gc/g1/TestStringDeduplicationInterned.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/g1/TestStringDeduplicationInterned.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, 2016, 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
@@ -21,6 +21,8 @@
* questions.
*/
+package gc.g1;
+
/*
* @test TestStringDeduplicationInterned
* @summary Test string deduplication of interned strings
@@ -28,9 +30,11 @@
* @key gc
* @requires vm.gc.G1
* @library /test/lib
+ * @library /
* @modules java.base/jdk.internal.misc:open
* @modules java.base/java.lang:open
* java.management
+ * @run main gc.g1.TestStringDeduplicationInterned
*/
public class TestStringDeduplicationInterned {
--- a/test/hotspot/jtreg/gc/g1/TestStringDeduplicationPrintOptions.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/g1/TestStringDeduplicationPrintOptions.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, 2016, 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
@@ -21,6 +21,8 @@
* questions.
*/
+package gc.g1;
+
/*
* @test TestStringDeduplicationPrintOptions
* @summary Test string deduplication print options
@@ -28,9 +30,11 @@
* @key gc
* @requires vm.gc.G1
* @library /test/lib
+ * @library /
* @modules java.base/jdk.internal.misc:open
* @modules java.base/java.lang:open
* java.management
+ * @run main gc.g1.TestStringDeduplicationPrintOptions
*/
public class TestStringDeduplicationPrintOptions {
--- a/test/hotspot/jtreg/gc/g1/TestStringDeduplicationTableRehash.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/g1/TestStringDeduplicationTableRehash.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, 2016, 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
@@ -21,6 +21,8 @@
* questions.
*/
+package gc.g1;
+
/*
* @test TestStringDeduplicationTableRehash
* @summary Test string deduplication table rehash
@@ -28,9 +30,11 @@
* @key gc
* @requires vm.gc.G1
* @library /test/lib
+ * @library /
* @modules java.base/jdk.internal.misc:open
* @modules java.base/java.lang:open
* java.management
+ * @run main gc.g1.TestStringDeduplicationTableRehash
*/
public class TestStringDeduplicationTableRehash {
--- a/test/hotspot/jtreg/gc/g1/TestStringDeduplicationTableResize.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/g1/TestStringDeduplicationTableResize.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, 2016, 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
@@ -21,6 +21,8 @@
* questions.
*/
+package gc.g1;
+
/*
* @test TestStringDeduplicationTableResize
* @summary Test string deduplication table resize
@@ -28,9 +30,11 @@
* @key gc
* @requires vm.gc.G1
* @library /test/lib
+ * @library /
* @modules java.base/jdk.internal.misc:open
* @modules java.base/java.lang:open
* java.management
+ * @run main gc.g1.TestStringDeduplicationTableResize
*/
public class TestStringDeduplicationTableResize {
--- a/test/hotspot/jtreg/gc/g1/TestStringDeduplicationTools.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/g1/TestStringDeduplicationTools.java Tue Jan 29 17:42:58 2019 +0000
@@ -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
@@ -21,6 +21,8 @@
* questions.
*/
+package gc.g1;
+
/*
* Common code for string deduplication tests
*/
--- a/test/hotspot/jtreg/gc/g1/TestStringDeduplicationYoungGC.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/g1/TestStringDeduplicationYoungGC.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, 2016, 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
@@ -21,6 +21,8 @@
* questions.
*/
+package gc.g1;
+
/*
* @test TestStringDeduplicationYoungGC
* @summary Test string deduplication during young GC
@@ -28,9 +30,11 @@
* @key gc
* @requires vm.gc.G1
* @library /test/lib
+ * @library /
* @modules java.base/jdk.internal.misc:open
* @modules java.base/java.lang:open
* java.management
+ * @run main gc.g1.TestStringDeduplicationYoungGC
*/
public class TestStringDeduplicationYoungGC {
--- a/test/hotspot/jtreg/gc/g1/TestStringTableStats.java Fri Jan 25 13:50:44 2019 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,60 +0,0 @@
-/*
- * Copyright (c) 2013, 2016, 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
- * 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 TestStringTableStats.java
- * @bug 8027476 8027455
- * @summary Ensure that the G1TraceStringTableScrubbing prints the expected message.
- * @key gc
- * @requires vm.gc.G1
- * @library /test/lib
- * @modules java.base/jdk.internal.misc
- * java.management
- */
-
-import jdk.test.lib.process.OutputAnalyzer;
-import jdk.test.lib.process.ProcessTools;
-
-public class TestStringTableStats {
- public static void main(String[] args) throws Exception {
-
- ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("-XX:+UseG1GC",
- "-XX:+UnlockExperimentalVMOptions",
- "-Xlog:gc+stringtable=trace",
- SystemGCTest.class.getName());
-
- OutputAnalyzer output = new OutputAnalyzer(pb.start());
-
- System.out.println("Output:\n" + output.getOutput());
-
- output.shouldMatch("GC\\(\\d+\\) Cleaned string table");
- output.shouldHaveExitValue(0);
- }
-
- static class SystemGCTest {
- public static void main(String [] args) {
- System.out.println("Calling System.gc()");
- System.gc();
- }
- }
-}
--- a/test/hotspot/jtreg/gc/g1/TestVerifyGCType.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/g1/TestVerifyGCType.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 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
@@ -21,6 +21,8 @@
* questions.
*/
+package gc.g1;
+
/*
* @test TestVerifyGCType
* @summary Test the VerifyGCType flag to ensure basic functionality.
@@ -29,7 +31,7 @@
* @library /test/lib
* @build sun.hotspot.WhiteBox
* @run driver ClassFileInstaller sun.hotspot.WhiteBox
- * @run driver TestVerifyGCType
+ * @run driver gc.g1.TestVerifyGCType
*/
import java.util.ArrayList;
--- a/test/hotspot/jtreg/gc/g1/mixedgc/TestOldGenCollectionUsage.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/g1/mixedgc/TestOldGenCollectionUsage.java Tue Jan 29 17:42:58 2019 +0000
@@ -21,6 +21,8 @@
* questions.
*/
+package gc.g1.mixedgc;
+
/*
* @test TestOldGenCollectionUsage.java
* @bug 8195115
@@ -32,7 +34,7 @@
* @modules java.management
* @build sun.hotspot.WhiteBox
* @run driver ClassFileInstaller sun.hotspot.WhiteBox
- * @run main/othervm -Xbootclasspath/a:. -XX:+UseG1GC -XX:+UnlockExperimentalVMOptions -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -verbose:gc -XX:SurvivorRatio=1 -Xmx14m -Xms14m -XX:MaxTenuringThreshold=1 -XX:InitiatingHeapOccupancyPercent=100 -XX:-G1UseAdaptiveIHOP -XX:G1MixedGCCountTarget=4 -XX:MaxGCPauseMillis=30000 -XX:G1HeapRegionSize=1m -XX:G1HeapWastePercent=0 -XX:G1MixedGCLiveThresholdPercent=100 TestOldGenCollectionUsage
+ * @run main/othervm -Xbootclasspath/a:. -XX:+UseG1GC -XX:+UnlockExperimentalVMOptions -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -verbose:gc -XX:SurvivorRatio=1 -Xmx14m -Xms14m -XX:MaxTenuringThreshold=1 -XX:InitiatingHeapOccupancyPercent=100 -XX:-G1UseAdaptiveIHOP -XX:G1MixedGCCountTarget=4 -XX:MaxGCPauseMillis=30000 -XX:G1HeapRegionSize=1m -XX:G1HeapWastePercent=0 -XX:G1MixedGCLiveThresholdPercent=100 gc.g1.mixedgc.TestOldGenCollectionUsage
*/
import jdk.test.lib.Asserts;
--- a/test/hotspot/jtreg/gc/libCriticalNative.c Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/libCriticalNative.c Tue Jan 29 17:42:58 2019 +0000
@@ -23,7 +23,7 @@
#include "jni.h"
-JNIEXPORT jlong JNICALL JavaCritical_CriticalNativeStress_sum1
+JNIEXPORT jlong JNICALL JavaCritical_gc_CriticalNative_sum1
(jint length, jlong* a) {
jlong sum = 0;
jint index;
@@ -34,7 +34,7 @@
return sum;
}
-JNIEXPORT jlong JNICALL JavaCritical_CriticalNativeStress_sum2
+JNIEXPORT jlong JNICALL JavaCritical_gc_CriticalNative_sum2
(jlong a1, jint a2_length, jint* a2, jint a4_length, jint* a4, jint a6_length, jlong* a6, jint a8_length, jint* a8) {
jlong sum = a1;
jint index;
@@ -56,7 +56,7 @@
return sum;
}
-JNIEXPORT jlong JNICALL Java_CriticalNativeStress_sum1
+JNIEXPORT jlong JNICALL Java_gc_CriticalNative_sum1
(JNIEnv *env, jclass jclazz, jlongArray a) {
jlong sum = 0;
jsize len = (*env)->GetArrayLength(env, a);
@@ -70,7 +70,7 @@
return sum;
}
-JNIEXPORT jlong JNICALL Java_CriticalNativeStress_sum2
+JNIEXPORT jlong JNICALL Java_gc_CriticalNative_sum2
(JNIEnv *env, jclass jclazz, jlong a1, jintArray a2, jintArray a3, jlongArray a4, jintArray a5) {
jlong sum = a1;
jsize index;
@@ -112,12 +112,12 @@
}
-JNIEXPORT jboolean JNICALL JavaCritical_CriticalNativeArgs_isNull
+JNIEXPORT jboolean JNICALL JavaCritical_gc_CriticalNative_isNull
(jint length, jint* a) {
return (a == NULL) && (length == 0);
}
-JNIEXPORT jboolean JNICALL Java_CriticalNativeArgs_isNull
+JNIEXPORT jboolean JNICALL Java_gc_CriticalNative_isNull
(JNIEnv *env, jclass jclazz, jintArray a) {
jboolean is_null;
jsize len = (*env)->GetArrayLength(env, a);
--- a/test/hotspot/jtreg/gc/logging/TestDeprecatedPrintFlags.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/logging/TestDeprecatedPrintFlags.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 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
@@ -21,6 +21,8 @@
* questions.
*/
+package gc.logging;
+
/*
* @test TestDeprecatedPrintFlags
* @bug 8145180
@@ -29,6 +31,7 @@
* @library /test/lib
* @modules java.base/jdk.internal.misc
* java.management
+ * @run main gc.logging.TestDeprecatedPrintFlags
*/
import jdk.test.lib.process.OutputAnalyzer;
@@ -42,7 +45,7 @@
public class TestDeprecatedPrintFlags {
public static void testPrintGC() throws Exception {
- ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("-XX:+PrintGC", "DoGC");
+ ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("-XX:+PrintGC", DoGC.class.getName());
OutputAnalyzer output = new OutputAnalyzer(pb.start());
output.shouldContain("-XX:+PrintGC is deprecated. Will use -Xlog:gc instead.");
output.shouldNotContain("PrintGCDetails");
@@ -52,7 +55,7 @@
}
public static void testPrintGCDetails() throws Exception {
- ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("-XX:+PrintGCDetails", "DoGC");
+ ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("-XX:+PrintGCDetails", DoGC.class.getName());
OutputAnalyzer output = new OutputAnalyzer(pb.start());
output.shouldContain("-XX:+PrintGCDetails is deprecated. Will use -Xlog:gc* instead.");
output.shouldNotContain("PrintGC is deprecated");
@@ -63,7 +66,7 @@
public static void testXloggc() throws Exception {
String fileName = "gc-test.log";
- ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("-Xloggc:" + fileName, "DoGC");
+ ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("-Xloggc:" + fileName, DoGC.class.getName());
OutputAnalyzer output = new OutputAnalyzer(pb.start());
output.shouldContain("-Xloggc is deprecated. Will use -Xlog:gc:gc-test.log instead.");
output.shouldNotContain("PrintGCDetails");
@@ -80,7 +83,7 @@
public static void testXloggcWithPrintGCDetails() throws Exception {
String fileName = "gc-test.log";
- ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("-XX:+PrintGCDetails", "-Xloggc:" + fileName, "DoGC");
+ ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("-XX:+PrintGCDetails", "-Xloggc:" + fileName, DoGC.class.getName());
OutputAnalyzer output = new OutputAnalyzer(pb.start());
output.shouldContain("-XX:+PrintGCDetails is deprecated. Will use -Xlog:gc* instead.");
output.shouldContain("-Xloggc is deprecated. Will use -Xlog:gc:gc-test.log instead.");
--- a/test/hotspot/jtreg/gc/logging/TestGCId.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/logging/TestGCId.java Tue Jan 29 17:42:58 2019 +0000
@@ -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
@@ -21,6 +21,8 @@
* questions.
*/
+package gc.logging;
+
/*
* @test TestGCId
* @bug 8043607
@@ -32,7 +34,7 @@
* java.management
* @build sun.hotspot.WhiteBox
* @run driver ClassFileInstaller sun.hotspot.WhiteBox sun.hotspot.WhiteBox$WhiteBoxPermission
- * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI TestGCId
+ * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI gc.logging.TestGCId
*/
import jdk.test.lib.process.OutputAnalyzer;
--- a/test/hotspot/jtreg/gc/logging/TestMetaSpaceLog.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/logging/TestMetaSpaceLog.java Tue Jan 29 17:42:58 2019 +0000
@@ -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.
* Copyright (c) 2018, Google and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@@ -22,6 +22,8 @@
* questions.
*/
+package gc.logging;
+
import java.io.File;
import java.net.URL;
import java.net.URLClassLoader;
@@ -47,7 +49,7 @@
*
* @compile TestMetaSpaceLog.java
* @run driver ClassFileInstaller sun.hotspot.WhiteBox
- * @run main TestMetaSpaceLog
+ * @run main gc.logging.TestMetaSpaceLog
*/
public class TestMetaSpaceLog {
--- a/test/hotspot/jtreg/gc/logging/TestPrintReferences.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/logging/TestPrintReferences.java Tue Jan 29 17:42:58 2019 +0000
@@ -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
@@ -21,6 +21,8 @@
* questions.
*/
+package gc.logging;
+
/*
* @test TestPrintReferences
* @bug 8136991 8186402 8186465 8188245
@@ -29,6 +31,7 @@
* @library /test/lib
* @modules java.base/jdk.internal.misc
* java.management
+ * @run main gc.logging.TestPrintReferences
*/
import java.lang.ref.SoftReference;
--- a/test/hotspot/jtreg/gc/metaspace/CompressedClassSpaceSizeInJmapHeap.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/metaspace/CompressedClassSpaceSizeInJmapHeap.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 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
@@ -21,6 +21,8 @@
* questions.
*/
+package gc.metaspace;
+
/**
* @test CompressedClassSpaceSizeInJmapHeap
* @bug 8004924
@@ -30,7 +32,7 @@
* @library /test/lib
* @modules java.base/jdk.internal.misc
* java.management
- * @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:CompressedClassSpaceSize=50m CompressedClassSpaceSizeInJmapHeap
+ * @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:CompressedClassSpaceSize=50m gc.metaspace.CompressedClassSpaceSizeInJmapHeap
*/
import jdk.test.lib.JDKToolLauncher;
--- a/test/hotspot/jtreg/gc/metaspace/G1AddMetaspaceDependency.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/metaspace/G1AddMetaspaceDependency.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 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
@@ -21,12 +21,15 @@
* questions.
*/
+package gc.metaspace;
+
/*
* @test G1AddMetaspaceDependency
* @bug 8010196
* @requires vm.gc.G1
+ * @library /
* @summary Checks that we don't get locking problems when adding metaspace dependencies with the G1 update buffer monitor
- * @run main/othervm -XX:+UseG1GC -XX:G1UpdateBufferSize=1 G1AddMetaspaceDependency
+ * @run main/othervm -XX:+UseG1GC -XX:G1UpdateBufferSize=1 gc.metaspace.G1AddMetaspaceDependency
*/
import java.io.InputStream;
@@ -47,12 +50,12 @@
}
}
- static final String a_name = G1AddMetaspaceDependency.class.getName() + "$A";
- static final String b_name = G1AddMetaspaceDependency.class.getName() + "$B";
+ static final String a_name = A.class.getName();
+ static final String b_name = B.class.getName();
public static void main(String... args) throws Exception {
- final byte[] a_bytes = getClassBytes(a_name + ".class");
- final byte[] b_bytes = getClassBytes(b_name + ".class");
+ final byte[] a_bytes = getClassBytes(a_name.replace('.', '/') + ".class");
+ final byte[] b_bytes = getClassBytes(b_name.replace('.', '/') + ".class");
for (int i = 0; i < 1000; i += 1) {
runTest(a_bytes, b_bytes);
--- a/test/hotspot/jtreg/gc/metaspace/InputArguments.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/metaspace/InputArguments.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 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
@@ -21,6 +21,8 @@
* questions.
*/
+package gc.metaspace;
+
import java.lang.management.RuntimeMXBean;
import java.lang.management.ManagementFactory;
import java.util.List;
--- a/test/hotspot/jtreg/gc/metaspace/TestCapacityUntilGCWrapAround.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/metaspace/TestCapacityUntilGCWrapAround.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, 2016, 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
@@ -21,6 +21,8 @@
* questions.
*/
+package gc.metaspace;
+
/*
* @test
* @key gc
@@ -31,7 +33,7 @@
* @build sun.hotspot.WhiteBox
* @run driver ClassFileInstaller sun.hotspot.WhiteBox
* sun.hotspot.WhiteBox$WhiteBoxPermission
- * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI TestCapacityUntilGCWrapAround
+ * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI gc.metaspace.TestCapacityUntilGCWrapAround
*/
import sun.hotspot.WhiteBox;
--- a/test/hotspot/jtreg/gc/metaspace/TestMetaspaceCMSCancel.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/metaspace/TestMetaspaceCMSCancel.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 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
@@ -20,6 +20,8 @@
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
+
+package gc.metaspace;
import jdk.test.lib.process.ProcessTools;
import jdk.test.lib.process.OutputAnalyzer;
import jdk.test.lib.Asserts;
@@ -33,7 +35,7 @@
* @modules java.base/jdk.internal.misc
* @build sun.hotspot.WhiteBox
* @run driver ClassFileInstaller sun.hotspot.WhiteBox
- * @run main/othervm TestMetaspaceCMSCancel
+ * @run main/othervm gc.metaspace.TestMetaspaceCMSCancel
*/
--- a/test/hotspot/jtreg/gc/metaspace/TestMetaspaceInitialization.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/metaspace/TestMetaspaceInitialization.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 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
@@ -21,13 +21,15 @@
* questions.
*/
+package gc.metaspace;
+
import java.util.ArrayList;
/* @test TestMetaspaceInitialization
* @bug 8024945
* @summary Tests to initialize metaspace with a very low MetaspaceSize
* @modules java.base/jdk.internal.misc
- * @run main/othervm -XX:MetaspaceSize=0 TestMetaspaceInitialization
+ * @run main/othervm -XX:MetaspaceSize=0 gc.metaspace.TestMetaspaceInitialization
*/
public class TestMetaspaceInitialization {
private class Internal {
--- a/test/hotspot/jtreg/gc/metaspace/TestMetaspaceMemoryPool.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/metaspace/TestMetaspaceMemoryPool.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 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
@@ -21,6 +21,8 @@
* questions.
*/
+package gc.metaspace;
+
import java.util.List;
import java.lang.management.*;
import jdk.test.lib.Platform;
@@ -34,12 +36,13 @@
* MemoryManagerMXBean is created.
* @requires vm.bits == 64 & vm.opt.final.UseCompressedOops == true
* @library /test/lib
+ * @library /
* @modules java.base/jdk.internal.misc
* java.management
- * @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:-UseCompressedOops TestMetaspaceMemoryPool
- * @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:-UseCompressedOops -XX:MaxMetaspaceSize=60m TestMetaspaceMemoryPool
- * @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:+UseCompressedOops -XX:+UseCompressedClassPointers TestMetaspaceMemoryPool
- * @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:+UseCompressedOops -XX:+UseCompressedClassPointers -XX:CompressedClassSpaceSize=60m TestMetaspaceMemoryPool
+ * @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:-UseCompressedOops gc.metaspace.TestMetaspaceMemoryPool
+ * @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:-UseCompressedOops -XX:MaxMetaspaceSize=60m gc.metaspace.TestMetaspaceMemoryPool
+ * @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:+UseCompressedOops -XX:+UseCompressedClassPointers gc.metaspace.TestMetaspaceMemoryPool
+ * @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:+UseCompressedOops -XX:+UseCompressedClassPointers -XX:CompressedClassSpaceSize=60m gc.metaspace.TestMetaspaceMemoryPool
*/
public class TestMetaspaceMemoryPool {
public static void main(String[] args) {
--- a/test/hotspot/jtreg/gc/metaspace/TestMetaspacePerfCounters.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/metaspace/TestMetaspacePerfCounters.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 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
@@ -21,6 +21,8 @@
* questions.
*/
+package gc.metaspace;
+
import java.lang.management.GarbageCollectorMXBean;
import java.util.List;
import java.util.ArrayList;
@@ -45,13 +47,13 @@
* java.compiler
* java.management/sun.management
* jdk.internal.jvmstat/sun.jvmstat.monitor
- * @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:-UseCompressedOops -XX:-UseCompressedClassPointers -XX:+UsePerfData -XX:+UseSerialGC TestMetaspacePerfCounters
- * @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:-UseCompressedOops -XX:-UseCompressedClassPointers -XX:+UsePerfData -XX:+UseParallelGC -XX:+UseParallelOldGC TestMetaspacePerfCounters
- * @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:-UseCompressedOops -XX:-UseCompressedClassPointers -XX:+UsePerfData -XX:+UseG1GC TestMetaspacePerfCounters
+ * @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:-UseCompressedOops -XX:-UseCompressedClassPointers -XX:+UsePerfData -XX:+UseSerialGC gc.metaspace.TestMetaspacePerfCounters
+ * @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:-UseCompressedOops -XX:-UseCompressedClassPointers -XX:+UsePerfData -XX:+UseParallelGC -XX:+UseParallelOldGC gc.metaspace.TestMetaspacePerfCounters
+ * @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:-UseCompressedOops -XX:-UseCompressedClassPointers -XX:+UsePerfData -XX:+UseG1GC gc.metaspace.TestMetaspacePerfCounters
*
- * @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:+UseCompressedOops -XX:+UseCompressedClassPointers -XX:+UsePerfData -XX:+UseSerialGC TestMetaspacePerfCounters
- * @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:+UseCompressedOops -XX:+UseCompressedClassPointers -XX:+UsePerfData -XX:+UseParallelGC -XX:+UseParallelOldGC TestMetaspacePerfCounters
- * @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:+UseCompressedOops -XX:+UseCompressedClassPointers -XX:+UsePerfData -XX:+UseG1GC TestMetaspacePerfCounters
+ * @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:+UseCompressedOops -XX:+UseCompressedClassPointers -XX:+UsePerfData -XX:+UseSerialGC gc.metaspace.TestMetaspacePerfCounters
+ * @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:+UseCompressedOops -XX:+UseCompressedClassPointers -XX:+UsePerfData -XX:+UseParallelGC -XX:+UseParallelOldGC gc.metaspace.TestMetaspacePerfCounters
+ * @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:+UseCompressedOops -XX:+UseCompressedClassPointers -XX:+UsePerfData -XX:+UseG1GC gc.metaspace.TestMetaspacePerfCounters
*/
/* @test TestMetaspacePerfCountersShenandoah
@@ -64,8 +66,8 @@
* java.compiler
* java.management/sun.management
* jdk.internal.jvmstat/sun.jvmstat.monitor
- * @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:-UseCompressedOops -XX:-UseCompressedClassPointers -XX:+UsePerfData -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC TestMetaspacePerfCounters
- * @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:+UseCompressedOops -XX:+UseCompressedClassPointers -XX:+UsePerfData -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC TestMetaspacePerfCounters
+ * @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:-UseCompressedOops -XX:-UseCompressedClassPointers -XX:+UsePerfData -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC gc.metaspace.TestMetaspacePerfCounters
+ * @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:+UseCompressedOops -XX:+UseCompressedClassPointers -XX:+UsePerfData -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC gc.metaspace.TestMetaspacePerfCounters
*/
public class TestMetaspacePerfCounters {
public static Class fooClass = null;
--- a/test/hotspot/jtreg/gc/metaspace/TestMetaspaceSizeFlags.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/metaspace/TestMetaspaceSizeFlags.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 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
@@ -21,6 +21,8 @@
* questions.
*/
+package gc.metaspace;
+
import jdk.test.lib.Asserts;
import jdk.test.lib.process.ProcessTools;
import jdk.test.lib.process.OutputAnalyzer;
@@ -33,6 +35,7 @@
* @library /test/lib
* @modules java.base/jdk.internal.misc
* java.management
+ * @run main gc.metaspace.TestMetaspaceSizeFlags
*/
public class TestMetaspaceSizeFlags {
public static final long K = 1024L;
--- a/test/hotspot/jtreg/gc/metaspace/TestPerfCountersAndMemoryPools.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/metaspace/TestPerfCountersAndMemoryPools.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 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
@@ -21,6 +21,8 @@
* questions.
*/
+package gc.metaspace;
+
import java.util.List;
import java.lang.management.*;
@@ -38,8 +40,8 @@
* @modules java.base/jdk.internal.misc
* java.management
* jdk.internal.jvmstat/sun.jvmstat.monitor
- * @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:-UseCompressedOops -XX:-UseCompressedClassPointers -XX:+UseSerialGC -XX:+UsePerfData -Xint TestPerfCountersAndMemoryPools
- * @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:+UseCompressedOops -XX:+UseCompressedClassPointers -XX:+UseSerialGC -XX:+UsePerfData -Xint TestPerfCountersAndMemoryPools
+ * @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:-UseCompressedOops -XX:-UseCompressedClassPointers -XX:+UseSerialGC -XX:+UsePerfData -Xint gc.metaspace.TestPerfCountersAndMemoryPools
+ * @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:+UseCompressedOops -XX:+UseCompressedClassPointers -XX:+UseSerialGC -XX:+UsePerfData -Xint gc.metaspace.TestPerfCountersAndMemoryPools
*/
public class TestPerfCountersAndMemoryPools {
public static void main(String[] args) throws Exception {
--- a/test/hotspot/jtreg/gc/nvdimm/TestAllocateOldGenAt.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/nvdimm/TestAllocateOldGenAt.java Tue Jan 29 17:42:58 2019 +0000
@@ -21,12 +21,15 @@
* questions.
*/
+package gc.nvdimm;
+
/* @test TestAllocateOldGenAt.java
* @key gc
* @summary Test to check allocation of Java Heap with AllocateOldGenAt option
* @requires vm.gc=="null" & os.family != "aix"
* @library /test/lib
* @modules java.base/jdk.internal.misc
+ * @run main gc.nvdimm.TestAllocateOldGenAt
*/
import jdk.test.lib.JDKToolFinder;
--- a/test/hotspot/jtreg/gc/nvdimm/TestAllocateOldGenAtError.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/nvdimm/TestAllocateOldGenAtError.java Tue Jan 29 17:42:58 2019 +0000
@@ -21,12 +21,15 @@
* questions.
*/
+package gc.nvdimm;
+
/* @test TestAllocateOldGenAtError.java
* @key gc
* @summary Test to check correct handling of non-existent directory passed to AllocateOldGenAt option
* @requires vm.gc=="null" & os.family != "aix"
* @library /test/lib
* @modules java.base/jdk.internal.misc
+ * @run main gc.nvdimm.TestAllocateOldGenAtError
*/
import java.io.File;
--- a/test/hotspot/jtreg/gc/nvdimm/TestAllocateOldGenAtMultiple.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/nvdimm/TestAllocateOldGenAtMultiple.java Tue Jan 29 17:42:58 2019 +0000
@@ -21,6 +21,8 @@
* questions.
*/
+package gc.nvdimm;
+
/* @test TestAllocateOldGenAtMultiple.java
* @key gc
* @summary Test to check allocation of Java Heap with AllocateOldGenAt option. Has multiple sub-tests to cover different code paths.
@@ -28,7 +30,7 @@
* @library /test/lib
* @modules java.base/jdk.internal.misc
* @requires vm.bits == "64"
- * @run main TestAllocateOldGenAtMultiple -XX:+UseG1GC
+ * @run main gc.nvdimm.TestAllocateOldGenAtMultiple -XX:+UseG1GC
*/
import jdk.test.lib.JDKToolFinder;
--- a/test/hotspot/jtreg/gc/nvdimm/TestHumongousObjectsOnNvdimm.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/nvdimm/TestHumongousObjectsOnNvdimm.java Tue Jan 29 17:42:58 2019 +0000
@@ -21,6 +21,8 @@
* questions.
*/
+package gc.nvdimm;
+
/*
* @test TestHumongousObjectsOnNvdimm
* @summary Check that humongous objects reside in nv-dimm
@@ -28,7 +30,7 @@
* @requires vm.gc=="null" & os.family != "aix"
* @build sun.hotspot.WhiteBox
* @run driver ClassFileInstaller sun.hotspot.WhiteBox
- * @run main TestHumongousObjectsOnNvdimm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
+ * @run main gc.nvdimm.TestHumongousObjectsOnNvdimm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
* -XX:+WhiteBoxAPI
*/
--- a/test/hotspot/jtreg/gc/nvdimm/TestOldObjectsOnNvdimm.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/nvdimm/TestOldObjectsOnNvdimm.java Tue Jan 29 17:42:58 2019 +0000
@@ -21,6 +21,8 @@
* questions.
*/
+package gc.nvdimm;
+
/*
* @test TestOldObjectsOnNvdimm
* @summary Check that objects in old generation reside in dram.
@@ -28,7 +30,7 @@
* @library /test/lib
* @build sun.hotspot.WhiteBox
* @run driver ClassFileInstaller sun.hotspot.WhiteBox
- * @run main TestOldObjectsOnNvdimm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
+ * @run main gc.nvdimm.TestOldObjectsOnNvdimm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
* -XX:+WhiteBoxAPI
*/
--- a/test/hotspot/jtreg/gc/nvdimm/TestYoungObjectsOnDram.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/nvdimm/TestYoungObjectsOnDram.java Tue Jan 29 17:42:58 2019 +0000
@@ -21,6 +21,8 @@
* questions.
*/
+package gc.nvdimm;
+
/*
* @test TestYoungObjectsOnDram
* @summary Check that objects in young generation reside in dram.
@@ -28,7 +30,7 @@
* @library /test/lib
* @build sun.hotspot.WhiteBox
* @run driver ClassFileInstaller sun.hotspot.WhiteBox
- * @run main TestYoungObjectsOnDram -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
+ * @run main gc.nvdimm.TestYoungObjectsOnDram -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
* -XX:+WhiteBoxAPI
*/
--- a/test/hotspot/jtreg/gc/parallel/AdaptiveGCBoundary.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/parallel/AdaptiveGCBoundary.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 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
@@ -21,6 +21,8 @@
* questions.
*/
+package gc.parallel;
+
/**
* @test AdaptiveGCBoundary
* @key gc regression
@@ -29,7 +31,7 @@
* @library /test/lib
* @modules java.base/jdk.internal.misc
* java.management
- * @run main/othervm AdaptiveGCBoundary
+ * @run main/othervm gc.parallel.AdaptiveGCBoundary
* @author jon.masamitsu@oracle.com
*/
--- a/test/hotspot/jtreg/gc/parallel/TestDynShrinkHeap.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/parallel/TestDynShrinkHeap.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, 2016, 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
@@ -21,6 +21,8 @@
* questions.
*/
+package gc.parallel;
+
/**
* @test TestDynShrinkHeap
* @bug 8016479
@@ -29,7 +31,7 @@
* @modules java.base/jdk.internal.misc
* @modules jdk.management
* @library /test/lib /
- * @run main/othervm -XX:+UseAdaptiveSizePolicyWithSystemGC -XX:+UseParallelGC -XX:MinHeapFreeRatio=0 -XX:MaxHeapFreeRatio=100 -Xmx1g -verbose:gc TestDynShrinkHeap
+ * @run main/othervm -XX:+UseAdaptiveSizePolicyWithSystemGC -XX:+UseParallelGC -XX:MinHeapFreeRatio=0 -XX:MaxHeapFreeRatio=100 -Xmx1g -verbose:gc gc.parallel.TestDynShrinkHeap
*/
import jdk.test.lib.management.DynamicVMOption;
import java.lang.management.ManagementFactory;
--- a/test/hotspot/jtreg/gc/parallel/TestPrintGCDetailsVerbose.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/parallel/TestPrintGCDetailsVerbose.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2017, 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
@@ -21,6 +21,8 @@
* questions.
*/
+package gc.parallel;
+
/*
* @test TestPrintGCDetailsVerbose
* @bug 8016740 8177963
@@ -28,8 +30,8 @@
* @key gc
* @requires vm.gc.Parallel
* @modules java.base/jdk.internal.misc
- * @run main/othervm -Xmx50m -XX:+UseParallelGC -Xlog:gc*=trace TestPrintGCDetailsVerbose
- * @run main/othervm -Xmx50m -XX:+UseParallelGC -XX:GCTaskTimeStampEntries=1 -Xlog:gc*=trace TestPrintGCDetailsVerbose
+ * @run main/othervm -Xmx50m -XX:+UseParallelGC -Xlog:gc*=trace gc.parallel.TestPrintGCDetailsVerbose
+ * @run main/othervm -Xmx50m -XX:+UseParallelGC -XX:GCTaskTimeStampEntries=1 -Xlog:gc*=trace gc.parallel.TestPrintGCDetailsVerbose
*/
public class TestPrintGCDetailsVerbose {
--- a/test/hotspot/jtreg/gc/serial/HeapChangeLogging.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/serial/HeapChangeLogging.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 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
@@ -21,6 +21,8 @@
* questions.
*/
+package gc.serial;
+
/*
* @test HeapChangeLogging.java
* @bug 8027440
@@ -28,7 +30,7 @@
* @library /test/lib
* @modules java.base/jdk.internal.misc
* @summary Allocate to get a promotion failure and verify that that heap change logging is present.
- * @run main HeapChangeLogging
+ * @run main gc.serial.HeapChangeLogging
*/
import java.util.regex.Matcher;
@@ -39,7 +41,7 @@
public class HeapChangeLogging {
public static void main(String[] args) throws Exception {
- ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("-Xmx128m", "-Xmn100m", "-XX:+UseSerialGC", "-Xlog:gc", "HeapFiller");
+ ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("-Xmx128m", "-Xmn100m", "-XX:+UseSerialGC", "-Xlog:gc", HeapFiller.class.getName());
OutputAnalyzer output = new OutputAnalyzer(pb.start());
String stdout = output.getStdout();
System.out.println(stdout);
--- a/test/hotspot/jtreg/gc/startup_warnings/TestCMS.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/startup_warnings/TestCMS.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 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
@@ -21,6 +21,8 @@
* questions.
*/
+package gc.startup_warnings;
+
/*
* @test TestCMS
* @key gc
@@ -30,6 +32,7 @@
* @library /test/lib
* @modules java.base/jdk.internal.misc
* java.management
+ * @run main gc.startup_warnings.TestCMS
*/
import jdk.test.lib.process.ProcessTools;
--- a/test/hotspot/jtreg/gc/startup_warnings/TestG1.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/startup_warnings/TestG1.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 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
@@ -21,6 +21,8 @@
* questions.
*/
+package gc.startup_warnings;
+
/*
* @test TestG1
* @key gc
@@ -29,6 +31,7 @@
* @library /test/lib
* @modules java.base/jdk.internal.misc
* java.management
+* @run main gc.startup_warnings.TestG1
*/
import jdk.test.lib.process.ProcessTools;
--- a/test/hotspot/jtreg/gc/startup_warnings/TestParallelGC.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/startup_warnings/TestParallelGC.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 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
@@ -21,6 +21,8 @@
* questions.
*/
+package gc.startup_warnings;
+
/*
* @test TestParallelGC
* @key gc
@@ -29,6 +31,7 @@
* @library /test/lib
* @modules java.base/jdk.internal.misc
* java.management
+* @run main gc.startup_warnings.TestParallelGC
*/
import jdk.test.lib.process.ProcessTools;
--- a/test/hotspot/jtreg/gc/startup_warnings/TestParallelScavengeSerialOld.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/startup_warnings/TestParallelScavengeSerialOld.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 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
@@ -21,6 +21,8 @@
* questions.
*/
+package gc.startup_warnings;
+
/*
* @test TestParallelScavengeSerialOld
* @key gc
@@ -29,6 +31,7 @@
* @library /test/lib
* @modules java.base/jdk.internal.misc
* java.management
+* @run main gc.startup_warnings.TestParallelScavengeSerialOld
*/
import jdk.test.lib.process.ProcessTools;
--- a/test/hotspot/jtreg/gc/startup_warnings/TestSerialGC.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/startup_warnings/TestSerialGC.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 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
@@ -21,6 +21,8 @@
* questions.
*/
+package gc.startup_warnings;
+
/*
* @test TestSerialGC
* @key gc
@@ -29,6 +31,7 @@
* @library /test/lib
* @modules java.base/jdk.internal.misc
* java.management
+* @run main gc.startup_warnings.TestSerialGC
*/
import jdk.test.lib.process.ProcessTools;
--- a/test/hotspot/jtreg/gc/startup_warnings/TestShenandoah.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/startup_warnings/TestShenandoah.java Tue Jan 29 17:42:58 2019 +0000
@@ -21,6 +21,8 @@
* questions.
*/
+package gc.startup_warnings;
+
/*
* @test TestShenandoah
* @key gc
@@ -30,6 +32,7 @@
* @library /test/lib
* @modules java.base/jdk.internal.misc
* java.management
+* @run main gc.startup_warnings.TestShenandoah
*/
import jdk.test.lib.process.ProcessTools;
--- a/test/hotspot/jtreg/gc/stress/CriticalNativeStress.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/stress/CriticalNativeStress.java Tue Jan 29 17:42:58 2019 +0000
@@ -20,47 +20,44 @@
* questions.
*
*/
+package gc.stress;
import java.util.Random;
+import gc.CriticalNative;
+
/*
* @test CriticalNativeStressEpsilon
* @key gc
* @bug 8199868
+ * @library /
* @requires (os.arch =="x86_64" | os.arch == "amd64") & vm.gc.Epsilon & !vm.graal.enabled
* @summary test argument pinning by nmethod wrapper of critical native method
- * @run main/othervm/native -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC -Xcomp -Xmx1G -XX:+CriticalJNINatives CriticalNativeStress
+ * @run main/othervm/native -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC -Xcomp -Xmx1G -XX:+CriticalJNINatives gc.stress.CriticalNativeStress
*/
/*
* @test CriticalNativeStressShenandoah
* @key gc
* @bug 8199868
+ * @library /
* @requires (os.arch =="x86_64" | os.arch == "amd64") & vm.gc.Shenandoah & !vm.graal.enabled
* @summary test argument pinning by nmethod wrapper of critical native method
- * @run main/othervm/native -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=passive -XX:-ShenandoahDegeneratedGC -Xcomp -Xmx512M -XX:+CriticalJNINatives CriticalNativeStress
- * @run main/othervm/native -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=passive -XX:+ShenandoahDegeneratedGC -Xcomp -Xmx512M -XX:+CriticalJNINatives CriticalNativeStress
+ * @run main/othervm/native -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=passive -XX:-ShenandoahDegeneratedGC -Xcomp -Xmx512M -XX:+CriticalJNINatives gc.stress.CriticalNativeStress
+ * @run main/othervm/native -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=passive -XX:+ShenandoahDegeneratedGC -Xcomp -Xmx512M -XX:+CriticalJNINatives gc.stress.CriticalNativeStress
*
- * @run main/othervm/native -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=aggressive -Xcomp -Xmx512M -XX:+CriticalJNINatives CriticalNativeStress
- * @run main/othervm/native -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -Xcomp -Xmx256M -XX:+CriticalJNINatives CriticalNativeStress
- * @run main/othervm/native -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=traversal -Xcomp -Xmx512M -XX:+CriticalJNINatives CriticalNativeStress
+ * @run main/othervm/native -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=aggressive -Xcomp -Xmx512M -XX:+CriticalJNINatives gc.stress.CriticalNativeStress
+ * @run main/othervm/native -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -Xcomp -Xmx256M -XX:+CriticalJNINatives gc.stress.CriticalNativeStress
+ * @run main/othervm/native -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=traversal -Xcomp -Xmx512M -XX:+CriticalJNINatives gc.stress.CriticalNativeStress
*/
public class CriticalNativeStress {
private static Random rand = new Random();
- static {
- System.loadLibrary("CriticalNative");
- }
// CYCLES and THREAD_PER_CASE are used to tune the tests for different GC settings,
// so that they can execrise enough GC cycles and not OOM
private static int CYCLES = Integer.getInteger("cycles", 3);
private static int THREAD_PER_CASE = Integer.getInteger("threadPerCase", 1);
- static native long sum1(long[] a);
-
- // More than 6 parameters
- static native long sum2(long a1, int[] a2, int[] a3, long[] a4, int[] a5);
-
static long sum(long[] a) {
long sum = 0;
for (int index = 0; index < a.length; index ++) {
@@ -112,7 +109,7 @@
}
// Compare results for correctness.
- long native_sum = sum1(arr);
+ long native_sum = CriticalNative.sum1(arr);
long java_sum = sum(arr);
if (native_sum != java_sum) {
StringBuffer sb = new StringBuffer("Sums do not match: native = ")
@@ -158,7 +155,7 @@
}
// Compare results for correctness.
- long native_sum = sum2(a1, a2, a3, a4, a5);
+ long native_sum = CriticalNative.sum2(a1, a2, a3, a4, a5);
long java_sum = a1 + sum(a2) + sum(a3) + sum(a4) + sum(a5);
if (native_sum != java_sum) {
StringBuffer sb = new StringBuffer("Sums do not match: native = ")
--- a/test/hotspot/jtreg/gc/stress/TestJNIBlockFullGC/TestJNIBlockFullGC.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/stress/TestJNIBlockFullGC/TestJNIBlockFullGC.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2017, SAP SE and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@@ -22,12 +22,14 @@
* questions.
*/
+package gc.stress.TestJNIBlockFullGC;
+
/*
* @test TestJNIBlockFullGC
* @summary Check that in G1 a Full GC to reclaim space can not be blocked out by the GC locker.
* @key gc
* @requires vm.gc.G1
- * @run main/othervm/native -Xmx64m -XX:+UseG1GC -Xlog:gc=info,gc+alloc=trace -XX:MaxGCPauseMillis=10 TestJNIBlockFullGC 10 10000 10000 10000 30000 10000 0.7
+ * @run main/othervm/native -Xmx64m -XX:+UseG1GC -Xlog:gc=info,gc+alloc=trace -XX:MaxGCPauseMillis=10 gc.stress.TestJNIBlockFullGC.TestJNIBlockFullGC 10 10000 10000 10000 30000 10000 0.7
*/
import java.lang.ref.SoftReference;
--- a/test/hotspot/jtreg/gc/stress/TestMultiThreadStressRSet.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/stress/TestMultiThreadStressRSet.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 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
@@ -21,6 +21,8 @@
* questions.
*/
+package gc.stress;
+
import java.io.PrintStream;
import java.util.ArrayList;
import java.util.List;
@@ -43,15 +45,15 @@
* sun.hotspot.WhiteBox$WhiteBoxPermission
* @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
* -XX:+UseG1GC -XX:G1SummarizeRSetStatsPeriod=1 -Xlog:gc
- * -Xmx500m -XX:G1HeapRegionSize=1m -XX:MaxGCPauseMillis=1000 TestMultiThreadStressRSet 10 4
+ * -Xmx500m -XX:G1HeapRegionSize=1m -XX:MaxGCPauseMillis=1000 gc.stress.TestMultiThreadStressRSet 10 4
*
* @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
* -XX:+UseG1GC -XX:G1SummarizeRSetStatsPeriod=100 -Xlog:gc
- * -Xmx1G -XX:G1HeapRegionSize=8m -XX:MaxGCPauseMillis=1000 TestMultiThreadStressRSet 60 16
+ * -Xmx1G -XX:G1HeapRegionSize=8m -XX:MaxGCPauseMillis=1000 gc.stress.TestMultiThreadStressRSet 60 16
*
* @run main/othervm/timeout=700 -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
* -XX:+UseG1GC -XX:G1SummarizeRSetStatsPeriod=100 -Xlog:gc
- * -Xmx500m -XX:G1HeapRegionSize=1m -XX:MaxGCPauseMillis=1000 TestMultiThreadStressRSet 600 32
+ * -Xmx500m -XX:G1HeapRegionSize=1m -XX:MaxGCPauseMillis=1000 gc.stress.TestMultiThreadStressRSet 600 32
*/
public class TestMultiThreadStressRSet {
--- a/test/hotspot/jtreg/gc/stress/TestReclaimStringsLeaksMemory.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/stress/TestReclaimStringsLeaksMemory.java Tue Jan 29 17:42:58 2019 +0000
@@ -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
@@ -21,6 +21,8 @@
* questions.
*/
+package gc.stress;
+
/*
* @test TestReclaimStringsLeaksMemory
* @bug 8180048
@@ -29,12 +31,12 @@
* @key gc
* @library /test/lib
* @modules java.base/jdk.internal.misc
- * @run main/othervm TestReclaimStringsLeaksMemory
- * @run main/othervm TestReclaimStringsLeaksMemory -XX:+UseSerialGC
- * @run main/othervm TestReclaimStringsLeaksMemory -XX:+UseParallelGC
- * @run main/othervm TestReclaimStringsLeaksMemory -XX:+UseParallelGC -XX:-UseParallelOldGC
- * @run main/othervm TestReclaimStringsLeaksMemory -XX:+UseConcMarkSweepGC
- * @run main/othervm TestReclaimStringsLeaksMemory -XX:+UseG1GC
+ * @run main/othervm gc.stress.TestReclaimStringsLeaksMemory
+ * @run main/othervm gc.stress.TestReclaimStringsLeaksMemory -XX:+UseSerialGC
+ * @run main/othervm gc.stress.TestReclaimStringsLeaksMemory -XX:+UseParallelGC
+ * @run main/othervm gc.stress.TestReclaimStringsLeaksMemory -XX:+UseParallelGC -XX:-UseParallelOldGC
+ * @run main/othervm gc.stress.TestReclaimStringsLeaksMemory -XX:+UseConcMarkSweepGC
+ * @run main/othervm gc.stress.TestReclaimStringsLeaksMemory -XX:+UseG1GC
*/
import java.util.Arrays;
--- a/test/hotspot/jtreg/gc/stress/TestStressG1Humongous.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/stress/TestStressG1Humongous.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 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
@@ -21,6 +21,8 @@
* questions.
*/
+package gc.stress;
+
/*
* @test TestStressG1Humongous
* @key gc stress
@@ -29,7 +31,7 @@
* @requires !vm.flightRecorder
* @library /test/lib
* @modules java.base/jdk.internal.misc
- * @run driver/timeout=1300 TestStressG1Humongous
+ * @run driver/timeout=1300 gc.stress.TestStressG1Humongous
*/
import java.util.ArrayList;
--- a/test/hotspot/jtreg/gc/stress/TestStressIHOPMultiThread.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/stress/TestStressIHOPMultiThread.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 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
@@ -21,6 +21,8 @@
* questions.
*/
+package gc.stress;
+
/*
* @test TestStressIHOPMultiThread
* @bug 8148397
@@ -31,27 +33,27 @@
* -XX:+UseG1GC -XX:G1HeapRegionSize=1m -XX:+G1UseAdaptiveIHOP
* -Xlog:gc+ihop=debug,gc+ihop+ergo=debug,gc+ergo=debug:TestStressIHOPMultiThread1.log
* -Dtimeout=2 -DheapUsageMinBound=30 -DheapUsageMaxBound=80
- * -Dthreads=2 TestStressIHOPMultiThread
+ * -Dthreads=2 gc.stress.TestStressIHOPMultiThread
* @run main/othervm/timeout=200 -Xmx256m -XX:G1HeapWastePercent=0 -XX:G1MixedGCCountTarget=1
* -XX:+UseG1GC -XX:G1HeapRegionSize=2m -XX:+G1UseAdaptiveIHOP
* -Xlog:gc+ihop=debug,gc+ihop+ergo=debug,gc+ergo=debug:TestStressIHOPMultiThread2.log
* -Dtimeout=2 -DheapUsageMinBound=60 -DheapUsageMaxBound=90
- * -Dthreads=3 TestStressIHOPMultiThread
+ * -Dthreads=3 gc.stress.TestStressIHOPMultiThread
* @run main/othervm/timeout=200 -Xmx256m -XX:G1HeapWastePercent=0 -XX:G1MixedGCCountTarget=1
* -XX:+UseG1GC -XX:G1HeapRegionSize=4m -XX:-G1UseAdaptiveIHOP
* -Xlog:gc+ihop=debug,gc+ihop+ergo=debug,gc+ergo=debug:TestStressIHOPMultiThread3.log
* -Dtimeout=2 -DheapUsageMinBound=40 -DheapUsageMaxBound=90
- * -Dthreads=5 TestStressIHOPMultiThread
+ * -Dthreads=5 gc.stress.TestStressIHOPMultiThread
* @run main/othervm/timeout=200 -Xmx128m -XX:G1HeapWastePercent=0 -XX:G1MixedGCCountTarget=1
* -XX:+UseG1GC -XX:G1HeapRegionSize=8m -XX:+G1UseAdaptiveIHOP
* -Xlog:gc+ihop=debug,gc+ihop+ergo=debug,gc+ergo=debug:TestStressIHOPMultiThread4.log
* -Dtimeout=2 -DheapUsageMinBound=20 -DheapUsageMaxBound=90
- * -Dthreads=10 TestStressIHOPMultiThread
+ * -Dthreads=10 gc.stress.TestStressIHOPMultiThread
* @run main/othervm/timeout=200 -Xmx512m -XX:G1HeapWastePercent=0 -XX:G1MixedGCCountTarget=1
* -XX:+UseG1GC -XX:G1HeapRegionSize=16m -XX:+G1UseAdaptiveIHOP
* -Xlog:gc+ihop=debug,gc+ihop+ergo=debug,gc+ergo=debug:TestStressIHOPMultiThread5.log
* -Dtimeout=2 -DheapUsageMinBound=20 -DheapUsageMaxBound=90
- * -Dthreads=17 TestStressIHOPMultiThread
+ * -Dthreads=17 gc.stress.TestStressIHOPMultiThread
*/
import java.util.ArrayList;
--- a/test/hotspot/jtreg/gc/stress/TestStressRSetCoarsening.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/stress/TestStressRSetCoarsening.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 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
@@ -21,6 +21,8 @@
* questions.
*/
+package gc.stress;
+
import java.util.concurrent.TimeoutException;
import sun.hotspot.WhiteBox;
@@ -41,27 +43,27 @@
* @run main/othervm/timeout=300
* -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
* -XX:+UseG1GC -Xlog:gc* -XX:MaxGCPauseMillis=1000
- * -Xmx500m -XX:G1HeapRegionSize=1m TestStressRSetCoarsening 1 0 300
+ * -Xmx500m -XX:G1HeapRegionSize=1m gc.stress.TestStressRSetCoarsening 1 0 300
* @run main/othervm/timeout=300
* -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
* -XX:+UseG1GC -Xlog:gc* -XX:MaxGCPauseMillis=1000
- * -Xmx500m -XX:G1HeapRegionSize=8m TestStressRSetCoarsening 1 10 300
+ * -Xmx500m -XX:G1HeapRegionSize=8m gc.stress.TestStressRSetCoarsening 1 10 300
* @run main/othervm/timeout=300
* -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
* -XX:+UseG1GC -Xlog:gc* -XX:MaxGCPauseMillis=1000
- * -Xmx500m -XX:G1HeapRegionSize=32m TestStressRSetCoarsening 42 10 300
+ * -Xmx500m -XX:G1HeapRegionSize=32m gc.stress.TestStressRSetCoarsening 42 10 300
* @run main/othervm/timeout=300
* -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
* -XX:+UseG1GC -Xlog:gc* -XX:MaxGCPauseMillis=1000
- * -Xmx500m -XX:G1HeapRegionSize=1m TestStressRSetCoarsening 2 0 300
+ * -Xmx500m -XX:G1HeapRegionSize=1m gc.stress.TestStressRSetCoarsening 2 0 300
* @run main/othervm/timeout=1800
* -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
* -XX:+UseG1GC -Xlog:gc* -XX:MaxGCPauseMillis=1000
- * -Xmx1G -XX:G1HeapRegionSize=1m TestStressRSetCoarsening 500 0 1800
+ * -Xmx1G -XX:G1HeapRegionSize=1m gc.stress.TestStressRSetCoarsening 500 0 1800
* @run main/othervm/timeout=1800
* -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
* -XX:+UseG1GC -Xlog:gc* -XX:MaxGCPauseMillis=1000
- * -Xmx1G -XX:G1HeapRegionSize=1m TestStressRSetCoarsening 10 10 1800
+ * -Xmx1G -XX:G1HeapRegionSize=1m gc.stress.TestStressRSetCoarsening 10 10 1800
*/
/**
--- a/test/hotspot/jtreg/gc/stress/gcbasher/ByteCursor.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/stress/gcbasher/ByteCursor.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 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
@@ -22,6 +22,8 @@
*
*/
+package gc.stress.gcbasher;
+
class ByteCursor {
private int offset;
private byte[] data;
--- a/test/hotspot/jtreg/gc/stress/gcbasher/Bytecode.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/stress/gcbasher/Bytecode.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 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
@@ -22,6 +22,8 @@
*
*/
+package gc.stress.gcbasher;
+
class Bytecode {
public static final int IINC = 132;
public static final int TABLESWITCH = 170;
--- a/test/hotspot/jtreg/gc/stress/gcbasher/ClassInfo.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/stress/gcbasher/ClassInfo.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 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
@@ -22,6 +22,8 @@
*
*/
+package gc.stress.gcbasher;
+
import java.util.HashSet;
import java.util.Set;
--- a/test/hotspot/jtreg/gc/stress/gcbasher/ConstantPoolEntry.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/stress/gcbasher/ConstantPoolEntry.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 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
@@ -22,6 +22,8 @@
*
*/
+package gc.stress.gcbasher;
+
class ConstantPoolEntry {
private int index;
private String value;
--- a/test/hotspot/jtreg/gc/stress/gcbasher/Decompiler.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/stress/gcbasher/Decompiler.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 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
@@ -22,6 +22,8 @@
*
*/
+package gc.stress.gcbasher;
+
class Decompiler {
private ByteCursor cursor;
private ClassInfo ci;
--- a/test/hotspot/jtreg/gc/stress/gcbasher/Dependency.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/stress/gcbasher/Dependency.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 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
@@ -22,6 +22,8 @@
*
*/
+package gc.stress.gcbasher;
+
class Dependency {
private String methodName;
private String methodDescriptor;
--- a/test/hotspot/jtreg/gc/stress/gcbasher/MethodInfo.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/stress/gcbasher/MethodInfo.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 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
@@ -22,6 +22,8 @@
*
*/
+package gc.stress.gcbasher;
+
class MethodInfo {
private String name;
private String descriptor;
--- a/test/hotspot/jtreg/gc/stress/gcbasher/TestGCBasher.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/stress/gcbasher/TestGCBasher.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 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
@@ -22,6 +22,8 @@
*
*/
+package gc.stress.gcbasher;
+
import java.io.IOException;
import java.net.URI;
import java.nio.file.FileSystems;
--- a/test/hotspot/jtreg/gc/stress/gcbasher/TestGCBasherWithAllocateHeapAt.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/stress/gcbasher/TestGCBasherWithAllocateHeapAt.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 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
@@ -22,15 +22,18 @@
*
*/
+package gc.stress.gcbasher;
+
import java.io.IOException;
/*
* @test TestGCBasherWithAllocateHeapAt
* @key gc stress
+ * @library /
* @requires vm.gc.G1
* @requires vm.flavor == "server" & !vm.emulatedClient & os.family != "aix"
* @summary Stress Java heap allocation with AllocateHeapAt flag using GC basher.
- * @run main/othervm/timeout=500 -Xlog:gc*=info -Xmx256m -server -XX:+UseG1GC -XX:AllocateHeapAt=. TestGCBasherWithAllocateHeapAt 120000
+ * @run main/othervm/timeout=500 -Xlog:gc*=info -Xmx256m -server -XX:+UseG1GC -XX:AllocateHeapAt=. gc.stress.gcbasher.TestGCBasherWithAllocateHeapAt 120000
*/
public class TestGCBasherWithAllocateHeapAt {
public static void main(String[] args) throws IOException {
--- a/test/hotspot/jtreg/gc/stress/gcbasher/TestGCBasherWithCMS.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/stress/gcbasher/TestGCBasherWithCMS.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 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
@@ -22,15 +22,18 @@
*
*/
+package gc.stress.gcbasher;
+
import java.io.IOException;
/*
* @test TestGCBasherWithCMS
* @key gc stress
+ * @library /
* @requires vm.gc.ConcMarkSweep
* @requires vm.flavor == "server" & !vm.emulatedClient & !vm.graal.enabled
* @summary Stress the CMS GC by trying to make old objects more likely to be garbage than young objects.
- * @run main/othervm/timeout=200 -Xlog:gc*=info -Xmx256m -server -XX:+UseConcMarkSweepGC TestGCBasherWithCMS 120000
+ * @run main/othervm/timeout=200 -Xlog:gc*=info -Xmx256m -server -XX:+UseConcMarkSweepGC gc.stress.gcbasher.TestGCBasherWithCMS 120000
*/
public class TestGCBasherWithCMS {
public static void main(String[] args) throws IOException {
--- a/test/hotspot/jtreg/gc/stress/gcbasher/TestGCBasherWithG1.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/stress/gcbasher/TestGCBasherWithG1.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 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
@@ -22,15 +22,18 @@
*
*/
+package gc.stress.gcbasher;
+
import java.io.IOException;
/*
* @test TestGCBasherWithG1
* @key gc stress
+ * @library /
* @requires vm.gc.G1
* @requires vm.flavor == "server" & !vm.emulatedClient
* @summary Stress the G1 GC by trying to make old objects more likely to be garbage than young objects.
- * @run main/othervm/timeout=200 -Xlog:gc*=info -Xmx256m -server -XX:+UseG1GC TestGCBasherWithG1 120000
+ * @run main/othervm/timeout=200 -Xlog:gc*=info -Xmx256m -server -XX:+UseG1GC gc.stress.gcbasher.TestGCBasherWithG1 120000
*/
public class TestGCBasherWithG1 {
public static void main(String[] args) throws IOException {
--- a/test/hotspot/jtreg/gc/stress/gcbasher/TestGCBasherWithParallel.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/stress/gcbasher/TestGCBasherWithParallel.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 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
@@ -22,15 +22,18 @@
*
*/
+package gc.stress.gcbasher;
+
import java.io.IOException;
/*
* @test TestGCBasherWithParallel
* @key gc stress
+ * @library /
* @requires vm.gc.Parallel
* @requires vm.flavor == "server" & !vm.emulatedClient
* @summary Stress the Parallel GC by trying to make old objects more likely to be garbage than young objects.
- * @run main/othervm/timeout=200 -Xlog:gc*=info -Xmx256m -server -XX:+UseParallelGC -XX:-UseGCOverheadLimit TestGCBasherWithParallel 120000
+ * @run main/othervm/timeout=200 -Xlog:gc*=info -Xmx256m -server -XX:+UseParallelGC -XX:-UseGCOverheadLimit gc.stress.gcbasher.TestGCBasherWithParallel 120000
*/
public class TestGCBasherWithParallel {
public static void main(String[] args) throws IOException {
--- a/test/hotspot/jtreg/gc/stress/gcbasher/TestGCBasherWithSerial.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/stress/gcbasher/TestGCBasherWithSerial.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 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
@@ -22,15 +22,18 @@
*
*/
+package gc.stress.gcbasher;
+
import java.io.IOException;
/*
* @test TestGCBasherWithSerial
* @key gc stress
+ * @library /
* @requires vm.gc.Serial
* @requires vm.flavor == "server" & !vm.emulatedClient
* @summary Stress the Serial GC by trying to make old objects more likely to be garbage than young objects.
- * @run main/othervm/timeout=200 -Xlog:gc*=info -Xmx256m -server -XX:+UseSerialGC TestGCBasherWithSerial 120000
+ * @run main/othervm/timeout=200 -Xlog:gc*=info -Xmx256m -server -XX:+UseSerialGC gc.stress.gcbasher.TestGCBasherWithSerial 120000
*/
public class TestGCBasherWithSerial {
public static void main(String[] args) throws IOException {
--- a/test/hotspot/jtreg/gc/stress/gcbasher/TestGCBasherWithShenandoah.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/stress/gcbasher/TestGCBasherWithShenandoah.java Tue Jan 29 17:42:58 2019 +0000
@@ -21,29 +21,32 @@
*
*/
+package gc.stress.gcbasher;
+
import java.io.IOException;
/*
* @test TestGCBasherWithShenandoah
* @key gc
* @key stress
+ * @library /
* @requires vm.gc.Shenandoah
* @requires vm.flavor == "server" & !vm.emulatedClient & !vm.graal.enabled
* @summary Stress the Shenandoah GC by trying to make old objects more likely to be garbage than young objects.
*
- * @run main/othervm/timeout=200 -Xlog:gc*=info -Xmx1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=passive -XX:+ShenandoahVerify -XX:+ShenandoahDegeneratedGC TestGCBasherWithShenandoah 120000
- * @run main/othervm/timeout=200 -Xlog:gc*=info -Xmx1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=passive -XX:+ShenandoahVerify -XX:-ShenandoahDegeneratedGC TestGCBasherWithShenandoah 120000
+ * @run main/othervm/timeout=200 -Xlog:gc*=info -Xmx1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=passive -XX:+ShenandoahVerify -XX:+ShenandoahDegeneratedGC gc.stress.gcbasher.TestGCBasherWithShenandoah 120000
+ * @run main/othervm/timeout=200 -Xlog:gc*=info -Xmx1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=passive -XX:+ShenandoahVerify -XX:-ShenandoahDegeneratedGC gc.stress.gcbasher.TestGCBasherWithShenandoah 120000
*
- * @run main/othervm/timeout=200 -Xlog:gc*=info -Xmx1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=aggressive -XX:+ShenandoahOOMDuringEvacALot TestGCBasherWithShenandoah 120000
- * @run main/othervm/timeout=200 -Xlog:gc*=info -Xmx1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=aggressive -XX:+ShenandoahAllocFailureALot TestGCBasherWithShenandoah 120000
- * @run main/othervm/timeout=200 -Xlog:gc*=info -Xmx1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=aggressive TestGCBasherWithShenandoah 120000
+ * @run main/othervm/timeout=200 -Xlog:gc*=info -Xmx1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=aggressive -XX:+ShenandoahOOMDuringEvacALot gc.stress.gcbasher.TestGCBasherWithShenandoah 120000
+ * @run main/othervm/timeout=200 -Xlog:gc*=info -Xmx1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=aggressive -XX:+ShenandoahAllocFailureALot gc.stress.gcbasher.TestGCBasherWithShenandoah 120000
+ * @run main/othervm/timeout=200 -Xlog:gc*=info -Xmx1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=aggressive gc.stress.gcbasher.TestGCBasherWithShenandoah 120000
*
- * @run main/othervm/timeout=200 -Xlog:gc*=info -Xmx1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=adaptive -XX:+ShenandoahVerify TestGCBasherWithShenandoah 120000
- * @run main/othervm/timeout=200 -Xlog:gc*=info -Xmx1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=traversal -XX:+ShenandoahVerify TestGCBasherWithShenandoah 120000
+ * @run main/othervm/timeout=200 -Xlog:gc*=info -Xmx1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=adaptive -XX:+ShenandoahVerify gc.stress.gcbasher.TestGCBasherWithShenandoah 120000
+ * @run main/othervm/timeout=200 -Xlog:gc*=info -Xmx1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=traversal -XX:+ShenandoahVerify gc.stress.gcbasher.TestGCBasherWithShenandoah 120000
*
- * @run main/othervm/timeout=200 -Xlog:gc*=info -Xmx1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=adaptive TestGCBasherWithShenandoah 120000
- * @run main/othervm/timeout=200 -Xlog:gc*=info -Xmx1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=traversal TestGCBasherWithShenandoah 120000
- * @run main/othervm/timeout=200 -Xlog:gc*=info -Xmx1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=compact TestGCBasherWithShenandoah 120000
+ * @run main/othervm/timeout=200 -Xlog:gc*=info -Xmx1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=adaptive gc.stress.gcbasher.TestGCBasherWithShenandoah 120000
+ * @run main/othervm/timeout=200 -Xlog:gc*=info -Xmx1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=traversal gc.stress.gcbasher.TestGCBasherWithShenandoah 120000
+ * @run main/othervm/timeout=200 -Xlog:gc*=info -Xmx1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=compact gc.stress.gcbasher.TestGCBasherWithShenandoah 120000
*/
public class TestGCBasherWithShenandoah {
public static void main(String[] args) throws IOException {
--- a/test/hotspot/jtreg/gc/stress/gcbasher/TestGCBasherWithZ.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/stress/gcbasher/TestGCBasherWithZ.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 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
@@ -22,15 +22,18 @@
*
*/
+package gc.stress.gcbasher;
+
import java.io.IOException;
/*
* @test TestGCBasherWithZ
* @key gc stress
+ * @library /
* @requires vm.gc.Z
* @requires vm.flavor == "server" & !vm.emulatedClient & !vm.graal.enabled
* @summary Stress ZGC
- * @run main/othervm/timeout=200 -Xlog:gc*=info -Xmx384m -server -XX:+UnlockExperimentalVMOptions -XX:+UseZGC TestGCBasherWithZ 120000
+ * @run main/othervm/timeout=200 -Xlog:gc*=info -Xmx384m -server -XX:+UnlockExperimentalVMOptions -XX:+UseZGC gc.stress.gcbasher.TestGCBasherWithZ 120000
*/
public class TestGCBasherWithZ {
public static void main(String[] args) throws IOException {
--- a/test/hotspot/jtreg/gc/stress/gclocker/TestGCLocker.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/stress/gclocker/TestGCLocker.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 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
@@ -22,6 +22,8 @@
*
*/
+package gc.stress.gclocker;
+
// Stress the GC locker by calling GetPrimitiveArrayCritical while
// concurrently filling up old gen.
--- a/test/hotspot/jtreg/gc/stress/gclocker/TestGCLockerWithCMS.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/stress/gclocker/TestGCLockerWithCMS.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 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
@@ -22,12 +22,15 @@
*
*/
+package gc.stress.gclocker;
+
/*
* @test TestGCLockerWithCMS
* @key gc
+ * @library /
* @requires vm.gc.ConcMarkSweep & !vm.graal.enabled
* @summary Stress CMS' GC locker by calling GetPrimitiveArrayCritical while concurrently filling up old gen.
- * @run main/native/othervm/timeout=200 -Xlog:gc*=info -Xms1500m -Xmx1500m -XX:+UseConcMarkSweepGC TestGCLockerWithCMS
+ * @run main/native/othervm/timeout=200 -Xlog:gc*=info -Xms1500m -Xmx1500m -XX:+UseConcMarkSweepGC gc.stress.gclocker.TestGCLockerWithCMS
*/
public class TestGCLockerWithCMS {
public static void main(String[] args) {
--- a/test/hotspot/jtreg/gc/stress/gclocker/TestGCLockerWithG1.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/stress/gclocker/TestGCLockerWithG1.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 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
@@ -22,12 +22,15 @@
*
*/
+package gc.stress.gclocker;
+
/*
* @test TestGCLockerWithG1
* @key gc
+ * @library /
* @requires vm.gc.G1
* @summary Stress G1's GC locker by calling GetPrimitiveArrayCritical while concurrently filling up old gen.
- * @run main/native/othervm/timeout=200 -Xlog:gc*=info -Xms1500m -Xmx1500m -XX:+UseG1GC TestGCLockerWithG1
+ * @run main/native/othervm/timeout=200 -Xlog:gc*=info -Xms1500m -Xmx1500m -XX:+UseG1GC gc.stress.gclocker.TestGCLockerWithG1
*/
public class TestGCLockerWithG1 {
public static void main(String[] args) {
--- a/test/hotspot/jtreg/gc/stress/gclocker/TestGCLockerWithParallel.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/stress/gclocker/TestGCLockerWithParallel.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 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
@@ -22,12 +22,15 @@
*
*/
+package gc.stress.gclocker;
+
/*
* @test TestGCLockerWithParallel
* @key gc
+ * @library /
* @requires vm.gc.Parallel
* @summary Stress Parallel's GC locker by calling GetPrimitiveArrayCritical while concurrently filling up old gen.
- * @run main/native/othervm/timeout=200 -Xlog:gc*=info -Xms1500m -Xmx1500m -XX:+UseParallelGC TestGCLockerWithParallel
+ * @run main/native/othervm/timeout=200 -Xlog:gc*=info -Xms1500m -Xmx1500m -XX:+UseParallelGC gc.stress.gclocker.TestGCLockerWithParallel
*/
public class TestGCLockerWithParallel {
public static void main(String[] args) {
--- a/test/hotspot/jtreg/gc/stress/gclocker/TestGCLockerWithSerial.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/stress/gclocker/TestGCLockerWithSerial.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 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
@@ -22,13 +22,16 @@
*
*/
+package gc.stress.gclocker;
+
/*
* @test TestGCLockerWithSerial
* @key gc
+ * @library /
* @requires vm.gc.Serial
* @requires vm.flavor != "minimal"
* @summary Stress Serial's GC locker by calling GetPrimitiveArrayCritical while concurrently filling up old gen.
- * @run main/native/othervm/timeout=200 -Xlog:gc*=info -Xmx1500m -Xmx1500m -XX:+UseSerialGC TestGCLockerWithSerial
+ * @run main/native/othervm/timeout=200 -Xlog:gc*=info -Xmx1500m -Xmx1500m -XX:+UseSerialGC gc.stress.gclocker.TestGCLockerWithSerial
*/
public class TestGCLockerWithSerial {
public static void main(String[] args) {
--- a/test/hotspot/jtreg/gc/stress/gclocker/TestGCLockerWithShenandoah.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/stress/gclocker/TestGCLockerWithShenandoah.java Tue Jan 29 17:42:58 2019 +0000
@@ -22,15 +22,18 @@
*
*/
+package gc.stress.gclocker;
+
/*
* @test TestGCLockerWithShenandoah
* @key gc
+ * @library /
* @requires vm.gc.Shenandoah
* @summary Stress Shenandoah's JNI handling by calling GetPrimitiveArrayCritical while concurrently filling up old gen.
- * @run main/native/othervm/timeout=200 -Xlog:gc*=info -Xms1500m -Xmx1500m -XX:+UnlockExperimentalVMOptions -XX:+UnlockDiagnosticVMOptions -XX:+ShenandoahVerify -XX:+UseShenandoahGC TestGCLockerWithShenandoah
- * @run main/native/othervm/timeout=200 -Xlog:gc*=info -Xms1500m -Xmx1500m -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC TestGCLockerWithShenandoah
- * @run main/native/othervm/timeout=200 -Xlog:gc*=info -Xms1500m -Xmx1500m -XX:+UnlockExperimentalVMOptions -XX:+UnlockDiagnosticVMOptions -XX:+UseShenandoahGC -XX:+ShenandoahOOMDuringEvacALot -XX:ShenandoahGCHeuristics=aggressive TestGCLockerWithShenandoah
- * @run main/native/othervm/timeout=200 -Xlog:gc*=info -Xms1500m -Xmx1500m -XX:+UnlockExperimentalVMOptions -XX:+UnlockDiagnosticVMOptions -XX:+UseShenandoahGC -XX:+ShenandoahAllocFailureALot -XX:ShenandoahGCHeuristics=aggressive TestGCLockerWithShenandoah
+ * @run main/native/othervm/timeout=200 -Xlog:gc*=info -Xms1500m -Xmx1500m -XX:+UnlockExperimentalVMOptions -XX:+UnlockDiagnosticVMOptions -XX:+ShenandoahVerify -XX:+UseShenandoahGC gc.stress.gclocker.TestGCLockerWithShenandoah
+ * @run main/native/othervm/timeout=200 -Xlog:gc*=info -Xms1500m -Xmx1500m -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC gc.stress.gclocker.TestGCLockerWithShenandoah
+ * @run main/native/othervm/timeout=200 -Xlog:gc*=info -Xms1500m -Xmx1500m -XX:+UnlockExperimentalVMOptions -XX:+UnlockDiagnosticVMOptions -XX:+UseShenandoahGC -XX:+ShenandoahOOMDuringEvacALot -XX:ShenandoahGCHeuristics=aggressive gc.stress.gclocker.TestGCLockerWithShenandoah
+ * @run main/native/othervm/timeout=200 -Xlog:gc*=info -Xms1500m -Xmx1500m -XX:+UnlockExperimentalVMOptions -XX:+UnlockDiagnosticVMOptions -XX:+UseShenandoahGC -XX:+ShenandoahAllocFailureALot -XX:ShenandoahGCHeuristics=aggressive gc.stress.gclocker.TestGCLockerWithShenandoah
*/
public class TestGCLockerWithShenandoah {
public static void main(String[] args) {
--- a/test/hotspot/jtreg/gc/stress/gclocker/libTestGCLocker.c Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/stress/gclocker/libTestGCLocker.c Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 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
@@ -24,7 +24,7 @@
#include <jni.h>
JNIEXPORT void JNICALL
-Java_GCLockerStresser_fillWithRandomValues(JNIEnv* env, jclass clz, jbyteArray arr) {
+Java_gc_stress_gclocker_GCLockerStresser_fillWithRandomValues(JNIEnv* env, jclass clz, jbyteArray arr) {
jsize size = (*env)->GetArrayLength(env, arr);
jbyte* p = (*env)->GetPrimitiveArrayCritical(env, arr, NULL);
jsize i;
--- a/test/hotspot/jtreg/gc/stress/gcold/TestGCOld.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/stress/gcold/TestGCOld.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2017, 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
@@ -21,6 +21,8 @@
* questions.
*/
+package gc.stress.gcold;
+
import java.text.*;
import java.util.Random;
--- a/test/hotspot/jtreg/gc/stress/gcold/TestGCOldWithCMS.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/stress/gcold/TestGCOldWithCMS.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 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
@@ -22,12 +22,15 @@
*
*/
+package gc.stress.gcold;
+
/*
* @test TestGCOldWithCMS
* @key gc
+ * @library /
* @requires vm.gc.ConcMarkSweep & !vm.graal.enabled
* @summary Stress the CMS GC by trying to make old objects more likely to be garbage than young objects.
- * @run main/othervm -Xmx384M -XX:+UseConcMarkSweepGC TestGCOldWithCMS 50 1 20 10 10000
+ * @run main/othervm -Xmx384M -XX:+UseConcMarkSweepGC gc.stress.gcold.TestGCOldWithCMS 50 1 20 10 10000
*/
public class TestGCOldWithCMS {
public static void main(String[] args) {
--- a/test/hotspot/jtreg/gc/stress/gcold/TestGCOldWithG1.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/stress/gcold/TestGCOldWithG1.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 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
@@ -22,14 +22,17 @@
*
*/
+package gc.stress.gcold;
+
/*
* @test TestGCOldWithG1
* @key gc
+ * @library /
* @requires vm.gc.G1
* @summary Stress the G1 GC by trying to make old objects more likely to be garbage than young objects.
- * @run main/othervm -Xmx384M -XX:+UseG1GC TestGCOldWithG1 50 1 20 10 10000
- * @run main/othervm -Xms64m -Xmx128m -XX:+UseG1GC -XX:+UseDynamicNumberOfGCThreads -Xlog:gc,gc+task=trace TestGCOldWithG1 50 5 20 1 5000
- * @run main/othervm -Xms64m -Xmx128m -XX:+UseG1GC -XX:+UseDynamicNumberOfGCThreads -XX:+UnlockDiagnosticVMOptions -XX:+InjectGCWorkerCreationFailure -Xlog:gc,gc+task=trace TestGCOldWithG1 50 5 20 1 5000
+ * @run main/othervm -Xmx384M -XX:+UseG1GC gc.stress.gcold.TestGCOldWithG1 50 1 20 10 10000
+ * @run main/othervm -Xms64m -Xmx128m -XX:+UseG1GC -XX:+UseDynamicNumberOfGCThreads -Xlog:gc,gc+task=trace gc.stress.gcold.TestGCOldWithG1 50 5 20 1 5000
+ * @run main/othervm -Xms64m -Xmx128m -XX:+UseG1GC -XX:+UseDynamicNumberOfGCThreads -XX:+UnlockDiagnosticVMOptions -XX:+InjectGCWorkerCreationFailure -Xlog:gc,gc+task=trace gc.stress.gcold.TestGCOldWithG1 50 5 20 1 5000
*/
public class TestGCOldWithG1 {
public static void main(String[] args) {
--- a/test/hotspot/jtreg/gc/stress/gcold/TestGCOldWithParallel.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/stress/gcold/TestGCOldWithParallel.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 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
@@ -22,13 +22,16 @@
*
*/
+package gc.stress.gcold;
+
/*
* @test TestGCOldWithParallel
* @key gc
+ * @library /
* @requires vm.gc.Parallel
* @summary Stress the Parallel GC by trying to make old objects more likely to be garbage than young objects.
- * @run main/othervm -Xmx384M -XX:+UseParallelGC TestGCOld 50 1 20 10 10000
- * @run main/othervm -Xmx384M -XX:+UseParallelGC -XX:-UseParallelOldGC TestGCOld 50 1 20 10 10000
+ * @run main/othervm -Xmx384M -XX:+UseParallelGC gc.stress.gcold.TestGCOld 50 1 20 10 10000
+ * @run main/othervm -Xmx384M -XX:+UseParallelGC -XX:-UseParallelOldGC gc.stress.gcold.TestGCOld 50 1 20 10 10000
*/
public class TestGCOldWithParallel {
public static void main(String[] args) {
--- a/test/hotspot/jtreg/gc/stress/gcold/TestGCOldWithSerial.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/stress/gcold/TestGCOldWithSerial.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 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
@@ -22,12 +22,15 @@
*
*/
+package gc.stress.gcold;
+
/*
* @test TestGCOldWithSerial
* @key gc
+ * @library /
* @requires vm.gc.Serial
* @summary Stress the Serial GC by trying to make old objects more likely to be garbage than young objects.
- * @run main/othervm -Xmx384M -XX:+UseSerialGC TestGCOldWithSerial 50 1 20 10 10000
+ * @run main/othervm -Xmx384M -XX:+UseSerialGC gc.stress.gcold.TestGCOldWithSerial 50 1 20 10 10000
*/
public class TestGCOldWithSerial {
public static void main(String[] args) {
--- a/test/hotspot/jtreg/gc/stress/gcold/TestGCOldWithShenandoah.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/stress/gcold/TestGCOldWithShenandoah.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
+* Copyright (c) 2016, 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
@@ -21,29 +21,32 @@
* questions.
*/
+package gc.stress.gcold;
+
/*
* @test TestGCOldWithShenandoah
* @key gc
* @key stress
+ * @library /
* @requires vm.gc.Shenandoah & !vm.graal.enabled
* @summary Stress the GC by trying to make old objects more likely to be garbage than young objects.
*
- * @run main/othervm/timeout=600 -Xmx384M -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=passive -XX:+ShenandoahDegeneratedGC -XX:+ShenandoahVerify TestGCOld 50 1 20 10 10000
- * @run main/othervm/timeout=600 -Xmx384M -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=passive -XX:-ShenandoahDegeneratedGC -XX:+ShenandoahVerify TestGCOld 50 1 20 10 10000
- * @run main/othervm/timeout=600 -Xmx384M -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=passive -XX:+ShenandoahDegeneratedGC TestGCOld 50 1 20 10 10000
- * @run main/othervm/timeout=600 -Xmx384M -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=passive -XX:-ShenandoahDegeneratedGC TestGCOld 50 1 20 10 10000
+ * @run main/othervm/timeout=600 -Xmx384M -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=passive -XX:+ShenandoahDegeneratedGC -XX:+ShenandoahVerify gc.stress.gcold.TestGCOld 50 1 20 10 10000
+ * @run main/othervm/timeout=600 -Xmx384M -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=passive -XX:-ShenandoahDegeneratedGC -XX:+ShenandoahVerify gc.stress.gcold.TestGCOld 50 1 20 10 10000
+ * @run main/othervm/timeout=600 -Xmx384M -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=passive -XX:+ShenandoahDegeneratedGC gc.stress.gcold.TestGCOld 50 1 20 10 10000
+ * @run main/othervm/timeout=600 -Xmx384M -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=passive -XX:-ShenandoahDegeneratedGC gc.stress.gcold.TestGCOld 50 1 20 10 10000
*
- * @run main/othervm -Xmx384M -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=aggressive -XX:+ShenandoahOOMDuringEvacALot TestGCOld 50 1 20 10 10000
- * @run main/othervm -Xmx384M -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=aggressive -XX:+ShenandoahAllocFailureALot TestGCOld 50 1 20 10 10000
- * @run main/othervm -Xmx384M -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=aggressive TestGCOld 50 1 20 10 10000
+ * @run main/othervm -Xmx384M -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=aggressive -XX:+ShenandoahOOMDuringEvacALot gc.stress.gcold.TestGCOld 50 1 20 10 10000
+ * @run main/othervm -Xmx384M -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=aggressive -XX:+ShenandoahAllocFailureALot gc.stress.gcold.TestGCOld 50 1 20 10 10000
+ * @run main/othervm -Xmx384M -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=aggressive gc.stress.gcold.TestGCOld 50 1 20 10 10000
*
- * @run main/othervm/timeout=600 -Xmx384M -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=adaptive -XX:+ShenandoahVerify TestGCOld 50 1 20 10 10000
- * @run main/othervm/timeout=600 -Xmx384M -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=traversal -XX:+ShenandoahVerify TestGCOld 50 1 20 10 10000
+ * @run main/othervm/timeout=600 -Xmx384M -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=adaptive -XX:+ShenandoahVerify gc.stress.gcold.TestGCOld 50 1 20 10 10000
+ * @run main/othervm/timeout=600 -Xmx384M -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=traversal -XX:+ShenandoahVerify gc.stress.gcold.TestGCOld 50 1 20 10 10000
*
- * @run main/othervm -Xmx384M -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=adaptive TestGCOld 50 1 20 10 10000
- * @run main/othervm -Xmx384M -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=static TestGCOld 50 1 20 10 10000
- * @run main/othervm -Xmx384M -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=compact TestGCOld 50 1 20 10 10000
- * @run main/othervm -Xmx384M -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=traversal TestGCOld 50 1 20 10 10000
+ * @run main/othervm -Xmx384M -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=adaptive gc.stress.gcold.TestGCOld 50 1 20 10 10000
+ * @run main/othervm -Xmx384M -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=static gc.stress.gcold.TestGCOld 50 1 20 10 10000
+ * @run main/othervm -Xmx384M -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=compact gc.stress.gcold.TestGCOld 50 1 20 10 10000
+ * @run main/othervm -Xmx384M -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=traversal gc.stress.gcold.TestGCOld 50 1 20 10 10000
*/
public class TestGCOldWithShenandoah {
--- a/test/hotspot/jtreg/gc/stress/gcold/TestGCOldWithZ.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/stress/gcold/TestGCOldWithZ.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 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
@@ -22,13 +22,16 @@
*
*/
+package gc.stress.gcold;
+
/*
* @test TestGCOldWithZ
* @key gc
+ * @library /
* @requires vm.gc.Z & !vm.graal.enabled
* @summary Stress the Z
- * @run main/othervm -Xmx384M -XX:+UnlockExperimentalVMOptions -XX:+UseZGC TestGCOldWithZ 50 1 20 10 10000
- * @run main/othervm -Xmx256m -XX:+UnlockExperimentalVMOptions -XX:+UseZGC TestGCOldWithZ 50 5 20 1 5000
+ * @run main/othervm -Xmx384M -XX:+UnlockExperimentalVMOptions -XX:+UseZGC gc.stress.gcold.TestGCOldWithZ 50 1 20 10 10000
+ * @run main/othervm -Xmx256m -XX:+UnlockExperimentalVMOptions -XX:+UseZGC gc.stress.gcold.TestGCOldWithZ 50 5 20 1 5000
*/
public class TestGCOldWithZ {
public static void main(String[] args) {
--- a/test/hotspot/jtreg/gc/stress/systemgc/TestSystemGC.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/stress/systemgc/TestSystemGC.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 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
@@ -21,6 +21,8 @@
* questions.
*/
+package gc.stress.systemgc;
+
// A test that stresses a full GC by allocating objects of different lifetimes
// and concurrently calling System.gc().
--- a/test/hotspot/jtreg/gc/stress/systemgc/TestSystemGCWithCMS.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/stress/systemgc/TestSystemGCWithCMS.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 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
@@ -22,13 +22,16 @@
*
*/
+package gc.stress.systemgc;
+
/*
* @test TestSystemGCWithCMS
* @key gc stress
* @bug 8190703
+ * @library /
* @requires vm.gc.ConcMarkSweep & !vm.graal.enabled
* @summary Stress the CMS GC full GC by allocating objects of different lifetimes concurrently with System.gc().
- * @run main/othervm/timeout=300 -Xlog:gc*=info -Xmx512m -XX:+UseConcMarkSweepGC TestSystemGCWithCMS 270
+ * @run main/othervm/timeout=300 -Xlog:gc*=info -Xmx512m -XX:+UseConcMarkSweepGC gc.stress.systemgc.TestSystemGCWithCMS 270
*/
public class TestSystemGCWithCMS {
public static void main(String[] args) throws Exception {
--- a/test/hotspot/jtreg/gc/stress/systemgc/TestSystemGCWithG1.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/stress/systemgc/TestSystemGCWithG1.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 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
@@ -22,13 +22,16 @@
*
*/
+package gc.stress.systemgc;
+
/*
* @test TestSystemGCWithG1
* @key gc stress
* @bug 8190703
+ * @library /
* @requires vm.gc.G1
* @summary Stress the G1 GC full GC by allocating objects of different lifetimes concurrently with System.gc().
- * @run main/othervm/timeout=300 -Xlog:gc*=info -Xmx512m -XX:+UseG1GC TestSystemGCWithG1 270
+ * @run main/othervm/timeout=300 -Xlog:gc*=info -Xmx512m -XX:+UseG1GC gc.stress.systemgc.TestSystemGCWithG1 270
*/
public class TestSystemGCWithG1 {
public static void main(String[] args) throws Exception {
--- a/test/hotspot/jtreg/gc/stress/systemgc/TestSystemGCWithParallel.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/stress/systemgc/TestSystemGCWithParallel.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 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
@@ -22,13 +22,16 @@
*
*/
+package gc.stress.systemgc;
+
/*
* @test TestSystemGCWithParallel
* @key gc stress
* @bug 8190703
+ * @library /
* @requires vm.gc.Parallel
* @summary Stress the Parallel GC full GC by allocating objects of different lifetimes concurrently with System.gc().
- * @run main/othervm/timeout=300 -Xlog:gc=info -Xmx512m -XX:+UseParallelGC TestSystemGCWithParallel 270
+ * @run main/othervm/timeout=300 -Xlog:gc=info -Xmx512m -XX:+UseParallelGC gc.stress.systemgc.TestSystemGCWithParallel 270
*/
public class TestSystemGCWithParallel {
public static void main(String[] args) throws Exception {
--- a/test/hotspot/jtreg/gc/stress/systemgc/TestSystemGCWithSerial.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/stress/systemgc/TestSystemGCWithSerial.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 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
@@ -22,13 +22,16 @@
*
*/
+package gc.stress.systemgc;
+
/*
* @test TestSystemGCWithSerial
* @key gc stress
* @bug 8190703
+ * @library /
* @requires vm.gc.Serial
* @summary Stress the Serial GC full GC by allocating objects of different lifetimes concurrently with System.gc().
- * @run main/othervm/timeout=300 -Xlog:gc*=info -Xmx512m -XX:+UseSerialGC TestSystemGCWithSerial 270
+ * @run main/othervm/timeout=300 -Xlog:gc*=info -Xmx512m -XX:+UseSerialGC gc.stress.systemgc.TestSystemGCWithSerial 270
*/
public class TestSystemGCWithSerial {
public static void main(String[] args) throws Exception {
--- a/test/hotspot/jtreg/gc/stress/systemgc/TestSystemGCWithShenandoah.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/stress/systemgc/TestSystemGCWithShenandoah.java Tue Jan 29 17:42:58 2019 +0000
@@ -22,15 +22,18 @@
*
*/
+package gc.stress.systemgc;
+
/*
* @test TestSystemGCWithShenandoah
* @key gc
* @key stress
+ * @library /
* @requires vm.gc.Shenandoah
* @summary Stress the Shenandoah GC full GC by allocating objects of different lifetimes concurrently with System.gc().
- * @run main/othervm/timeout=300 -Xlog:gc*=info -Xmx512m -XX:+UnlockExperimentalVMOptions -XX:+UnlockDiagnosticVMOptions -XX:+ShenandoahVerify -XX:+UseShenandoahGC TestSystemGCWithShenandoah 270
- * @run main/othervm/timeout=300 -Xlog:gc*=info -Xmx512m -XX:+UnlockExperimentalVMOptions -XX:+UnlockDiagnosticVMOptions -XX:+ShenandoahVerify -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=traversal TestSystemGCWithShenandoah 270
- * @run main/othervm/timeout=300 -Xlog:gc*=info -Xmx512m -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC TestSystemGCWithShenandoah 270
+ * @run main/othervm/timeout=300 -Xlog:gc*=info -Xmx512m -XX:+UnlockExperimentalVMOptions -XX:+UnlockDiagnosticVMOptions -XX:+ShenandoahVerify -XX:+UseShenandoahGC gc.stress.systemgc.TestSystemGCWithShenandoah 270
+ * @run main/othervm/timeout=300 -Xlog:gc*=info -Xmx512m -XX:+UnlockExperimentalVMOptions -XX:+UnlockDiagnosticVMOptions -XX:+ShenandoahVerify -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=traversal gc.stress.systemgc.TestSystemGCWithShenandoah 270
+ * @run main/othervm/timeout=300 -Xlog:gc*=info -Xmx512m -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC gc.stress.systemgc.TestSystemGCWithShenandoah 270
*/
public class TestSystemGCWithShenandoah {
public static void main(String[] args) throws Exception {
--- a/test/hotspot/jtreg/gc/survivorAlignment/AlignmentHelper.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/survivorAlignment/AlignmentHelper.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, 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
@@ -21,6 +21,8 @@
* questions.
*/
+package gc.survivorAlignment;
+
import java.lang.management.MemoryPoolMXBean;
import java.util.Optional;
--- a/test/hotspot/jtreg/gc/survivorAlignment/SurvivorAlignmentTestMain.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/survivorAlignment/SurvivorAlignmentTestMain.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, 2015, 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
@@ -21,6 +21,8 @@
* questions.
*/
+package gc.survivorAlignment;
+
import java.lang.management.ManagementFactory;
import java.lang.management.MemoryPoolMXBean;
import java.util.Objects;
--- a/test/hotspot/jtreg/gc/survivorAlignment/TestAllocationInEden.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/survivorAlignment/TestAllocationInEden.java Tue Jan 29 17:42:58 2019 +0000
@@ -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
@@ -21,6 +21,8 @@
* questions.
*/
+package gc.survivorAlignment;
+
/**
* @test
* @bug 8031323
@@ -28,6 +30,7 @@
* SurvivorAlignmentInBytes option.
* @requires vm.gc != "Z" & vm.gc != "Shenandoah"
* @library /test/lib
+ * @library /
* @modules java.base/jdk.internal.misc
* java.management
* @build sun.hotspot.WhiteBox
@@ -39,42 +42,42 @@
* -XX:SurvivorAlignmentInBytes=32 -XX:-UseTLAB -XX:-ResizePLAB
* -XX:OldSize=128m -XX:MaxHeapSize=192m
* -XX:-ExplicitGCInvokesConcurrent
- * TestAllocationInEden 10m 9 EDEN
+ * gc.survivorAlignment.TestAllocationInEden 10m 9 EDEN
* @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
* -XX:+WhiteBoxAPI -XX:NewSize=64m -XX:MaxNewSize=64m
* -XX:SurvivorRatio=1 -XX:+UnlockExperimentalVMOptions
* -XX:SurvivorAlignmentInBytes=32 -XX:-UseTLAB -XX:-ResizePLAB
* -XX:OldSize=128m -XX:MaxHeapSize=192m
* -XX:-ExplicitGCInvokesConcurrent
- * TestAllocationInEden 10m 47 EDEN
+ * gc.survivorAlignment.TestAllocationInEden 10m 47 EDEN
* @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
* -XX:+WhiteBoxAPI -XX:NewSize=64m -XX:MaxNewSize=64m
* -XX:SurvivorRatio=1 -XX:+UnlockExperimentalVMOptions
* -XX:SurvivorAlignmentInBytes=64 -XX:-UseTLAB -XX:-ResizePLAB
* -XX:OldSize=128m -XX:MaxHeapSize=192m
* -XX:-ExplicitGCInvokesConcurrent
- * TestAllocationInEden 10m 9 EDEN
+ * gc.survivorAlignment.TestAllocationInEden 10m 9 EDEN
* @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
* -XX:+WhiteBoxAPI -XX:NewSize=64m -XX:MaxNewSize=64m
* -XX:SurvivorRatio=1 -XX:+UnlockExperimentalVMOptions
* -XX:SurvivorAlignmentInBytes=64 -XX:-UseTLAB -XX:-ResizePLAB
* -XX:OldSize=128m -XX:MaxHeapSize=192m
* -XX:-ExplicitGCInvokesConcurrent
- * TestAllocationInEden 10m 87 EDEN
+ * gc.survivorAlignment.TestAllocationInEden 10m 87 EDEN
* @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
* -XX:+WhiteBoxAPI -XX:NewSize=64m -XX:MaxNewSize=64m
* -XX:SurvivorRatio=1 -XX:+UnlockExperimentalVMOptions
* -XX:SurvivorAlignmentInBytes=128 -XX:-UseTLAB -XX:-ResizePLAB
* -XX:OldSize=128m -XX:MaxHeapSize=192m
* -XX:-ExplicitGCInvokesConcurrent
- * TestAllocationInEden 10m 9 EDEN
+ * gc.survivorAlignment.TestAllocationInEden 10m 9 EDEN
* @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
* -XX:+WhiteBoxAPI -XX:NewSize=64m -XX:MaxNewSize=64m
* -XX:SurvivorRatio=1 -XX:+UnlockExperimentalVMOptions
* -XX:SurvivorAlignmentInBytes=128 -XX:-UseTLAB -XX:-ResizePLAB
* -XX:OldSize=128m -XX:MaxHeapSize=192m
* -XX:-ExplicitGCInvokesConcurrent
- * TestAllocationInEden 10m 147 EDEN
+ * gc.survivorAlignment.TestAllocationInEden 10m 147 EDEN
*/
public class TestAllocationInEden {
public static void main(String args[]) {
--- a/test/hotspot/jtreg/gc/survivorAlignment/TestPromotionFromEdenToTenured.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/survivorAlignment/TestPromotionFromEdenToTenured.java Tue Jan 29 17:42:58 2019 +0000
@@ -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
@@ -21,6 +21,8 @@
* questions.
*/
+package gc.survivorAlignment;
+
/**
* @test
* @bug 8031323
@@ -28,6 +30,7 @@
* full GC are not aligned to SurvivorAlignmentInBytes value.
* @requires vm.gc != "Z" & vm.gc != "Shenandoah"
* @library /test/lib
+ * @library /
* @modules java.base/jdk.internal.misc
* java.management
* @build sun.hotspot.WhiteBox
@@ -39,42 +42,42 @@
* -XX:-ExplicitGCInvokesConcurrent -XX:-ResizePLAB
* -XX:+UnlockExperimentalVMOptions
* -XX:SurvivorAlignmentInBytes=32
- * TestPromotionFromEdenToTenured 10m 9 TENURED
+ * gc.survivorAlignment.TestPromotionFromEdenToTenured 10m 9 TENURED
* @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
* -XX:+WhiteBoxAPI -XX:NewSize=64m -XX:MaxNewSize=64m
* -XX:OldSize=32m -XX:MaxHeapSize=96m -XX:SurvivorRatio=1
* -XX:-ExplicitGCInvokesConcurrent -XX:-ResizePLAB
* -XX:+UnlockExperimentalVMOptions
* -XX:SurvivorAlignmentInBytes=32
- * TestPromotionFromEdenToTenured 10m 47 TENURED
+ * gc.survivorAlignment.TestPromotionFromEdenToTenured 10m 47 TENURED
* @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
* -XX:+WhiteBoxAPI -XX:NewSize=64m -XX:MaxNewSize=64m
* -XX:OldSize=32m -XX:MaxHeapSize=96m
* -XX:SurvivorRatio=1 -XX:-ExplicitGCInvokesConcurrent -XX:-ResizePLAB
* -XX:+UnlockExperimentalVMOptions
* -XX:SurvivorAlignmentInBytes=64
- * TestPromotionFromEdenToTenured 10m 9 TENURED
+ * gc.survivorAlignment.TestPromotionFromEdenToTenured 10m 9 TENURED
* @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
* -XX:+WhiteBoxAPI -XX:NewSize=64m -XX:MaxNewSize=64m
* -XX:OldSize=32m -XX:MaxHeapSize=128m
* -XX:SurvivorRatio=1 -XX:-ExplicitGCInvokesConcurrent -XX:-ResizePLAB
* -XX:+UnlockExperimentalVMOptions
* -XX:SurvivorAlignmentInBytes=64
- * TestPromotionFromEdenToTenured 10m 87 TENURED
+ * gc.survivorAlignment.TestPromotionFromEdenToTenured 10m 87 TENURED
* @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
* -XX:+WhiteBoxAPI -XX:NewSize=64m -XX:MaxNewSize=64m
* -XX:OldSize=32M -XX:MaxHeapSize=96m -XX:SurvivorRatio=1
* -XX:-ExplicitGCInvokesConcurrent -XX:-ResizePLAB
* -XX:+UnlockExperimentalVMOptions
* -XX:SurvivorAlignmentInBytes=128
- * TestPromotionFromEdenToTenured 10m 9 TENURED
+ * gc.survivorAlignment.TestPromotionFromEdenToTenured 10m 9 TENURED
* @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
* -XX:+WhiteBoxAPI -XX:NewSize=64m -XX:MaxNewSize=64m
* -XX:OldSize=32m -XX:MaxHeapSize=96m -XX:SurvivorRatio=1
* -XX:-ExplicitGCInvokesConcurrent -XX:-ResizePLAB
* -XX:+UnlockExperimentalVMOptions
* -XX:SurvivorAlignmentInBytes=128
- * TestPromotionFromEdenToTenured 10m 147 TENURED
+ * gc.survivorAlignment.TestPromotionFromEdenToTenured 10m 147 TENURED
*/
public class TestPromotionFromEdenToTenured {
public static void main(String args[]) {
--- a/test/hotspot/jtreg/gc/survivorAlignment/TestPromotionFromSurvivorToTenuredAfterFullGC.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/survivorAlignment/TestPromotionFromSurvivorToTenuredAfterFullGC.java Tue Jan 29 17:42:58 2019 +0000
@@ -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
@@ -21,6 +21,8 @@
* questions.
*/
+package gc.survivorAlignment;
+
/**
* @test
* @bug 8031323
@@ -28,6 +30,7 @@
* during full GC are not aligned to SurvivorAlignmentInBytes value.
* @requires vm.gc != "Z" & vm.gc != "Shenandoah"
* @library /test/lib
+ * @library /
* @modules java.base/jdk.internal.misc
* java.management
* @build sun.hotspot.WhiteBox
@@ -39,14 +42,14 @@
* -XX:SurvivorRatio=1 -XX:-ExplicitGCInvokesConcurrent -XX:-ResizePLAB
* -XX:+UnlockExperimentalVMOptions
* -XX:SurvivorAlignmentInBytes=32
- * TestPromotionFromSurvivorToTenuredAfterFullGC 10m 9 TENURED
+ * gc.survivorAlignment.TestPromotionFromSurvivorToTenuredAfterFullGC 10m 9 TENURED
* @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
* -XX:+WhiteBoxAPI -XX:NewSize=128m -XX:MaxNewSize=128m
* -XX:OldSize=32m -XX:MaxHeapSize=160m -XX:-ResizePLAB
* -XX:SurvivorRatio=1 -XX:-ExplicitGCInvokesConcurrent
* -XX:+UnlockExperimentalVMOptions
* -XX:SurvivorAlignmentInBytes=32
- * TestPromotionFromSurvivorToTenuredAfterFullGC 20m 47
+ * gc.survivorAlignment.TestPromotionFromSurvivorToTenuredAfterFullGC 20m 47
* TENURED
* @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
* -XX:+WhiteBoxAPI -XX:NewSize=200m -XX:MaxNewSize=200m
@@ -54,14 +57,14 @@
* -XX:SurvivorRatio=1 -XX:-ExplicitGCInvokesConcurrent -XX:-ResizePLAB
* -XX:+UnlockExperimentalVMOptions
* -XX:SurvivorAlignmentInBytes=64
- * TestPromotionFromSurvivorToTenuredAfterFullGC 10m 9 TENURED
+ * gc.survivorAlignment.TestPromotionFromSurvivorToTenuredAfterFullGC 10m 9 TENURED
* @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
* -XX:+WhiteBoxAPI -XX:NewSize=128m -XX:MaxNewSize=128m
* -XX:OldSize=32m -XX:MaxHeapSize=160m
* -XX:SurvivorRatio=1 -XX:-ExplicitGCInvokesConcurrent -XX:-ResizePLAB
* -XX:+UnlockExperimentalVMOptions
* -XX:SurvivorAlignmentInBytes=64
- * TestPromotionFromSurvivorToTenuredAfterFullGC 20m 87
+ * gc.survivorAlignment.TestPromotionFromSurvivorToTenuredAfterFullGC 20m 87
* TENURED
* @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
* -XX:+WhiteBoxAPI -XX:NewSize=256m -XX:MaxNewSize=256m
@@ -69,7 +72,7 @@
* -XX:SurvivorRatio=1 -XX:-ExplicitGCInvokesConcurrent -XX:-ResizePLAB
* -XX:+UnlockExperimentalVMOptions
* -XX:SurvivorAlignmentInBytes=128
- * TestPromotionFromSurvivorToTenuredAfterFullGC 10m 9
+ * gc.survivorAlignment.TestPromotionFromSurvivorToTenuredAfterFullGC 10m 9
* TENURED
* @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
* -XX:+WhiteBoxAPI -XX:NewSize=128m -XX:MaxNewSize=128m
@@ -77,7 +80,7 @@
* -XX:SurvivorRatio=1 -XX:-ExplicitGCInvokesConcurrent -XX:-ResizePLAB
* -XX:+UnlockExperimentalVMOptions
* -XX:SurvivorAlignmentInBytes=128
- * TestPromotionFromSurvivorToTenuredAfterFullGC 20m 147
+ * gc.survivorAlignment.TestPromotionFromSurvivorToTenuredAfterFullGC 20m 147
* TENURED
*/
public class TestPromotionFromSurvivorToTenuredAfterFullGC {
--- a/test/hotspot/jtreg/gc/survivorAlignment/TestPromotionFromSurvivorToTenuredAfterMinorGC.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/survivorAlignment/TestPromotionFromSurvivorToTenuredAfterMinorGC.java Tue Jan 29 17:42:58 2019 +0000
@@ -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
@@ -21,6 +21,8 @@
* questions.
*/
+package gc.survivorAlignment;
+
/**
* @test
* @bug 8031323
@@ -40,7 +42,7 @@
* -XX:-ExplicitGCInvokesConcurrent
* -XX:+UnlockExperimentalVMOptions
* -XX:SurvivorAlignmentInBytes=32
- * TestPromotionFromSurvivorToTenuredAfterMinorGC 10m 9
+ * gc.survivorAlignment.TestPromotionFromSurvivorToTenuredAfterMinorGC 10m 9
* TENURED
* @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
* -XX:+WhiteBoxAPI -XX:NewSize=128m -XX:MaxNewSize=128m
@@ -48,7 +50,7 @@
* -XX:-ExplicitGCInvokesConcurrent
* -XX:+UnlockExperimentalVMOptions
* -XX:SurvivorAlignmentInBytes=32
- * TestPromotionFromSurvivorToTenuredAfterMinorGC 20m 47
+ * gc.survivorAlignment.TestPromotionFromSurvivorToTenuredAfterMinorGC 20m 47
* TENURED
* @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
* -XX:+WhiteBoxAPI -XX:NewSize=200m -XX:MaxNewSize=200m
@@ -56,7 +58,7 @@
* -XX:-ExplicitGCInvokesConcurrent
* -XX:+UnlockExperimentalVMOptions
* -XX:SurvivorAlignmentInBytes=64
- * TestPromotionFromSurvivorToTenuredAfterMinorGC 10m 9
+ * gc.survivorAlignment.TestPromotionFromSurvivorToTenuredAfterMinorGC 10m 9
* TENURED
* @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
* -XX:+WhiteBoxAPI -XX:NewSize=128m -XX:MaxNewSize=128m
@@ -64,7 +66,7 @@
* -XX:-ExplicitGCInvokesConcurrent
* -XX:+UnlockExperimentalVMOptions
* -XX:SurvivorAlignmentInBytes=64
- * TestPromotionFromSurvivorToTenuredAfterMinorGC 20m 87
+ * gc.survivorAlignment.TestPromotionFromSurvivorToTenuredAfterMinorGC 20m 87
* TENURED
* @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
* -XX:+WhiteBoxAPI -XX:NewSize=256m -XX:MaxNewSize=256m
@@ -72,7 +74,7 @@
* -XX:-ExplicitGCInvokesConcurrent
* -XX:+UnlockExperimentalVMOptions
* -XX:SurvivorAlignmentInBytes=128
- * TestPromotionFromSurvivorToTenuredAfterMinorGC 10m 9
+ * gc.survivorAlignment.TestPromotionFromSurvivorToTenuredAfterMinorGC 10m 9
* TENURED
* @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
* -XX:+WhiteBoxAPI -XX:NewSize=128m -XX:MaxNewSize=128m
@@ -80,7 +82,7 @@
* -XX:-ExplicitGCInvokesConcurrent
* -XX:+UnlockExperimentalVMOptions
* -XX:SurvivorAlignmentInBytes=128
- * TestPromotionFromSurvivorToTenuredAfterMinorGC 20m 147
+ * gc.survivorAlignment.TestPromotionFromSurvivorToTenuredAfterMinorGC 20m 147
* TENURED
*/
public class TestPromotionFromSurvivorToTenuredAfterMinorGC {
--- a/test/hotspot/jtreg/gc/survivorAlignment/TestPromotionLABLargeSurvivorAlignment.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/survivorAlignment/TestPromotionLABLargeSurvivorAlignment.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 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
@@ -21,6 +21,8 @@
* questions.
*/
+package gc.survivorAlignment;
+
/**
* @test
* @bug 8060463
@@ -31,32 +33,32 @@
* -XX:+UnlockExperimentalVMOptions
* -XX:SurvivorAlignmentInBytes=8 -XX:SurvivorRatio=1
* -XX:-ExplicitGCInvokesConcurrent -XX:-ResizePLAB
- * TestPromotionLABLargeSurvivorAlignment
+ * gc.survivorAlignment.TestPromotionLABLargeSurvivorAlignment
* @run main/othervm -Xmx128m
* -XX:+UnlockExperimentalVMOptions
* -XX:SurvivorAlignmentInBytes=16 -XX:SurvivorRatio=1
* -XX:-ExplicitGCInvokesConcurrent -XX:-ResizePLAB
- * TestPromotionLABLargeSurvivorAlignment
+ * gc.survivorAlignment.TestPromotionLABLargeSurvivorAlignment
* @run main/othervm -Xmx128m
* -XX:+UnlockExperimentalVMOptions
* -XX:SurvivorAlignmentInBytes=512 -XX:SurvivorRatio=1
* -XX:-ExplicitGCInvokesConcurrent -XX:-ResizePLAB
- * TestPromotionLABLargeSurvivorAlignment
+ * gc.survivorAlignment.TestPromotionLABLargeSurvivorAlignment
* @run main/othervm -Xmx128m
* -XX:+UnlockExperimentalVMOptions
* -XX:SurvivorAlignmentInBytes=1k -XX:SurvivorRatio=1
* -XX:-ExplicitGCInvokesConcurrent -XX:-ResizePLAB
- * TestPromotionLABLargeSurvivorAlignment
+ * gc.survivorAlignment.TestPromotionLABLargeSurvivorAlignment
* @run main/othervm -Xmx128m
* -XX:+UnlockExperimentalVMOptions
* -XX:SurvivorAlignmentInBytes=4k -XX:SurvivorRatio=1
* -XX:-ExplicitGCInvokesConcurrent -XX:-ResizePLAB
- * TestPromotionLABLargeSurvivorAlignment
+ * gc.survivorAlignment.TestPromotionLABLargeSurvivorAlignment
* @run main/othervm -Xmx128m
* -XX:+UnlockExperimentalVMOptions
* -XX:SurvivorAlignmentInBytes=16k -XX:SurvivorRatio=1
* -XX:-ExplicitGCInvokesConcurrent -XX:-ResizePLAB
- * TestPromotionLABLargeSurvivorAlignment
+ * gc.survivorAlignment.TestPromotionLABLargeSurvivorAlignment
*/
public class TestPromotionLABLargeSurvivorAlignment {
public static void main(String args[]) {
--- a/test/hotspot/jtreg/gc/survivorAlignment/TestPromotionToSurvivor.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/survivorAlignment/TestPromotionToSurvivor.java Tue Jan 29 17:42:58 2019 +0000
@@ -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
@@ -21,6 +21,8 @@
* questions.
*/
+package gc.survivorAlignment;
+
/**
* @test
* @bug 8031323
@@ -38,37 +40,37 @@
* -XX:SurvivorRatio=1 -XX:+UnlockExperimentalVMOptions
* -XX:SurvivorAlignmentInBytes=32 -XX:OldSize=128m
* -XX:MaxHeapSize=256m -XX:-ExplicitGCInvokesConcurrent -XX:-ResizePLAB
- * TestPromotionToSurvivor 10m 9 SURVIVOR
+ * gc.survivorAlignment.TestPromotionToSurvivor 10m 9 SURVIVOR
* @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
* -XX:+WhiteBoxAPI -XX:NewSize=128m -XX:MaxNewSize=128m
* -XX:SurvivorRatio=1 -XX:+UnlockExperimentalVMOptions
* -XX:SurvivorAlignmentInBytes=32 -XX:OldSize=128m
* -XX:MaxHeapSize=256m -XX:-ExplicitGCInvokesConcurrent -XX:-ResizePLAB
- * TestPromotionToSurvivor 20m 47 SURVIVOR
+ * gc.survivorAlignment.TestPromotionToSurvivor 20m 47 SURVIVOR
* @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
* -XX:+WhiteBoxAPI -XX:NewSize=128m -XX:MaxNewSize=128m
* -XX:SurvivorRatio=1 -XX:+UnlockExperimentalVMOptions
* -XX:SurvivorAlignmentInBytes=64 -XX:OldSize=128m
* -XX:MaxHeapSize=256m -XX:-ExplicitGCInvokesConcurrent -XX:-ResizePLAB
- * TestPromotionToSurvivor 8m 9 SURVIVOR
+ * gc.survivorAlignment.TestPromotionToSurvivor 8m 9 SURVIVOR
* @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
* -XX:+WhiteBoxAPI -XX:NewSize=128m -XX:MaxNewSize=128m
* -XX:SurvivorRatio=1 -XX:+UnlockExperimentalVMOptions
* -XX:SurvivorAlignmentInBytes=64 -XX:OldSize=128m
* -XX:MaxHeapSize=256m -XX:-ExplicitGCInvokesConcurrent -XX:-ResizePLAB
- * TestPromotionToSurvivor 20m 87 SURVIVOR
+ * gc.survivorAlignment.TestPromotionToSurvivor 20m 87 SURVIVOR
* @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
* -XX:+WhiteBoxAPI -XX:NewSize=256m -XX:MaxNewSize=256m
* -XX:SurvivorRatio=1 -XX:+UnlockExperimentalVMOptions
* -XX:SurvivorAlignmentInBytes=128 -XX:OldSize=128m
* -XX:MaxHeapSize=384m -XX:-ExplicitGCInvokesConcurrent -XX:-ResizePLAB
- * TestPromotionToSurvivor 10m 9 SURVIVOR
+ * gc.survivorAlignment.TestPromotionToSurvivor 10m 9 SURVIVOR
* @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
* -XX:+WhiteBoxAPI -XX:NewSize=128m -XX:MaxNewSize=128m
* -XX:SurvivorRatio=1 -XX:+UnlockExperimentalVMOptions
* -XX:SurvivorAlignmentInBytes=128 -XX:OldSize=128m
* -XX:MaxHeapSize=256m -XX:-ExplicitGCInvokesConcurrent -XX:-ResizePLAB
- * TestPromotionToSurvivor 20m 147 SURVIVOR
+ * gc.survivorAlignment.TestPromotionToSurvivor 20m 147 SURVIVOR
*/
public class TestPromotionToSurvivor {
public static void main(String args[]) {
--- a/test/hotspot/jtreg/gc/whitebox/TestConcMarkCycleWB.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/whitebox/TestConcMarkCycleWB.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, 2017, 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
@@ -21,6 +21,8 @@
* questions.
*/
+package gc.whitebox;
+
/*
* @test TestConMarkCycleWB
* @bug 8065579
@@ -33,7 +35,7 @@
* @build sun.hotspot.WhiteBox
* @run driver ClassFileInstaller sun.hotspot.WhiteBox
* sun.hotspot.WhiteBox$WhiteBoxPermission
- * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -XX:+UseG1GC TestConcMarkCycleWB
+ * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -XX:+UseG1GC gc.whitebox.TestConcMarkCycleWB
* @summary Verifies that ConcurrentMarking-related WB works properly
*/
import static jdk.test.lib.Asserts.assertFalse;
--- a/test/hotspot/jtreg/gc/whitebox/TestWBGC.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/gc/whitebox/TestWBGC.java Tue Jan 29 17:42:58 2019 +0000
@@ -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
@@ -21,6 +21,8 @@
* questions.
*/
+package gc.whitebox;
+
/*
* @test TestWBGC
* @bug 8055098
@@ -31,7 +33,7 @@
* java.management
* @build sun.hotspot.WhiteBox
* @run driver ClassFileInstaller sun.hotspot.WhiteBox
- * @run driver TestWBGC
+ * @run driver gc.whitebox.TestWBGC
*/
import jdk.test.lib.Asserts;
import jdk.test.lib.process.ProcessTools;
--- a/test/hotspot/jtreg/runtime/CompressedOops/UseCompressedOops.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/runtime/CompressedOops/UseCompressedOops.java Tue Jan 29 17:42:58 2019 +0000
@@ -63,7 +63,7 @@
testCompressedOopsModes(args, "-XX:+UseParallelGC");
testCompressedOopsModes(args, "-XX:+UseParallelOldGC");
if (GC.Shenandoah.isSupported()) {
- testCompressedOopsModes(args, "-XX:+UseShenandoahGC");
+ testCompressedOopsModes(args, "-XX:+UnlockExperimentalVMOptions", "-XX:+UseShenandoahGC");
}
}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/runtime/condy/escapeAnalysis/TestEscapeCondy.java Tue Jan 29 17:42:58 2019 +0000
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 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
+ * 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
+ * @bug 8216970
+ * @summary Ensure escape analysis can handle an ldc of a dynamic
+ * constant whose return type is an array of boolean.
+ * @modules java.base/jdk.internal.misc
+ * @library /test/lib
+ * @compile TestEscapeThroughInvokeWithCondy$A.jasm
+ * @compile TestEscapeThroughInvokeWithCondy.jasm
+ * @compile TestEscapeCondy.java
+ * @run main/othervm TestEscapeCondy
+ */
+
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.compiler.InMemoryJavaCompiler;
+
+public class TestEscapeCondy {
+ public static void main(String args[]) throws Throwable {
+ // 1. Test escape analysis of a method that contains
+ // a ldc instruction of a condy whose return type is an array of boolean
+ ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
+ "-XX:CompileCommand=dontinline,runtime.condy.TestEscapeThroughInvokeWithCondy::create",
+ "runtime.condy.TestEscapeThroughInvokeWithCondy");
+ OutputAnalyzer oa = new OutputAnalyzer(pb.start());
+ oa.shouldContain("Test has successfully analyzed ldc bytecode within method create");
+ oa.shouldHaveExitValue(0);
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/runtime/condy/escapeAnalysis/TestEscapeThroughInvokeWithCondy$A.jasm Tue Jan 29 17:42:58 2019 +0000
@@ -0,0 +1,69 @@
+/*
+ * Copyright (c) 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
+ * 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.
+ *
+ */
+
+package runtime/condy;
+
+super class TestEscapeThroughInvokeWithCondy$A
+ version 55:0
+{
+
+private Field saved:"Lruntime/condy/TestEscapeThroughInvokeWithCondy$A;";
+
+public Method "<init>":"(Ljava/lang/Integer;)V"
+ stack 1 locals 2
+{
+ aload_0;
+ invokespecial Method java/lang/Object."<init>":"()V";
+ return;
+}
+
+public Method saveInto:"(Lruntime/condy/TestEscapeThroughInvokeWithCondy$A;Ljava/lang/Integer;)V"
+ stack 2 locals 3
+{
+ aload_1;
+ aload_0;
+ putfield Field saved:"Lruntime/condy/TestEscapeThroughInvokeWithCondy$A;";
+ return;
+}
+
+public Method check:"(Lruntime/condy/TestEscapeThroughInvokeWithCondy$A;)V"
+ stack 3 locals 2
+{
+ aload_0;
+ getfield Field saved:"Lruntime/condy/TestEscapeThroughInvokeWithCondy$A;";
+ aload_1;
+ if_acmpeq L18;
+ new class java/lang/RuntimeException;
+ dup;
+ ldc String "TEST FAILED: Objects not equal.";
+ invokespecial Method java/lang/RuntimeException."<init>":"(Ljava/lang/String;)V";
+ athrow;
+ L18: stack_frame_type same;
+ return;
+}
+
+NestHost TestEscapeThroughInvokeWithCondy;
+static InnerClass A=class TestEscapeThroughInvokeWithCondy$A of class TestEscapeThroughInvokeWithCondy;
+
+} // end Class TestEscapeThroughInvokeWithCondy$A
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/runtime/condy/escapeAnalysis/TestEscapeThroughInvokeWithCondy.jasm Tue Jan 29 17:42:58 2019 +0000
@@ -0,0 +1,141 @@
+/*
+ * Copyright (c) 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
+ * 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.
+ *
+ */
+
+// The below .jasm code implements the same java code as test
+// compiler/escapeAnalysis/TestEscapeThrowInvoke.java with the addition
+// of an ldc bytecode of a dynamic constant whose return type is an array of boolean.
+// The method bsmArray is the bootstrap method for the dynamic constant.
+// The ldc has been added to the method create.
+
+package runtime/condy;
+
+super public class TestEscapeThroughInvokeWithCondy
+ version 55:0
+{
+
+private Field a:"Lruntime/condy/TestEscapeThroughInvokeWithCondy$A;";
+
+public Method "<init>":"()V"
+ stack 1 locals 1
+{
+ aload_0;
+ invokespecial Method java/lang/Object."<init>":"()V";
+ return;
+}
+
+public static Method main:"([Ljava/lang/String;)V"
+ stack 4 locals 3
+{
+ new class TestEscapeThroughInvokeWithCondy;
+ dup;
+ invokespecial Method "<init>":"()V";
+ astore_1;
+ aload_1;
+ new class TestEscapeThroughInvokeWithCondy$A;
+ dup;
+ bipush 42;
+ invokestatic Method java/lang/Integer.valueOf:"(I)Ljava/lang/Integer;";
+ invokespecial Method TestEscapeThroughInvokeWithCondy$A."<init>":"(Ljava/lang/Integer;)V";
+ putfield Field a:"Lruntime/condy/TestEscapeThroughInvokeWithCondy$A;";
+ iconst_0;
+ istore_2;
+ L26: stack_frame_type append;
+ locals_map class TestEscapeThroughInvokeWithCondy, int;
+ iload_2;
+ ldc int 100000;
+ if_icmpge L42;
+ aload_1;
+ invokevirtual Method run:"()V";
+ iinc 2, 1;
+ goto L26;
+ L42: stack_frame_type chop1;
+ getstatic Field java/lang/System.out:"Ljava/io/PrintStream;";
+ ldc String "Test has successfully analyzed ldc bytecode within method create";
+ invokevirtual Method java/io/PrintStream.println:"(Ljava/lang/String;)V";
+ return;
+}
+public static Method bsmArray:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Class;)[Z"
+ stack 5 locals 6
+{
+ iconst_2;
+ newarray boolean;
+ astore_3;
+ aload_3;
+ iconst_0;
+ iconst_1;
+ bastore;
+ aload_3;
+ iconst_1;
+ iconst_1;
+ bastore;
+ aload_3;
+ areturn;
+}
+
+private Method run:"()V"
+ stack 2 locals 2
+{
+ new class java/lang/Object;
+ dup;
+ invokespecial Method java/lang/Object."<init>":"()V";
+ pop;
+ aload_0;
+ bipush 42;
+ invokestatic Method java/lang/Integer.valueOf:"(I)Ljava/lang/Integer;";
+ invokevirtual Method create:"(Ljava/lang/Integer;)Lruntime/condy/TestEscapeThroughInvokeWithCondy$A;";
+ astore_1;
+ aload_0;
+ getfield Field a:"Lruntime/condy/TestEscapeThroughInvokeWithCondy$A;";
+ aload_1;
+ invokevirtual Method TestEscapeThroughInvokeWithCondy$A.check:"(Lruntime/condy/TestEscapeThroughInvokeWithCondy$A;)V";
+ return;
+}
+
+private Method create:"(Ljava/lang/Integer;)Lruntime/condy/TestEscapeThroughInvokeWithCondy$A;"
+ stack 5 locals 4
+{
+ ldc Dynamic REF_invokeStatic:TestEscapeThroughInvokeWithCondy.bsmArray:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Class;)[Z":name:"[Z";
+ astore_2;
+ aload_2;
+ iconst_1;
+ iconst_1;
+ bastore;
+ new class TestEscapeThroughInvokeWithCondy$A;
+ dup;
+ aload_1;
+ invokespecial Method TestEscapeThroughInvokeWithCondy$A."<init>":"(Ljava/lang/Integer;)V";
+ astore_3;
+ aload_3;
+ aload_0;
+ getfield Field a:"Lruntime/condy/TestEscapeThroughInvokeWithCondy$A;";
+ aload_1;
+ invokevirtual Method TestEscapeThroughInvokeWithCondy$A.saveInto:"(Lruntime/condy/TestEscapeThroughInvokeWithCondy$A;Ljava/lang/Integer;)V";
+ aload_3;
+ areturn;
+}
+
+NestMembers TestEscapeThroughInvokeWithCondy$A;
+static InnerClass A=class TestEscapeThroughInvokeWithCondy$A of class TestEscapeThroughInvokeWithCondy;
+
+} // end Class TestEscapeThroughInvokeWithCondy
--- a/test/hotspot/jtreg/runtime/exceptionMsgs/ArrayIndexOutOfBoundsException/ArrayIndexOutOfBoundsExceptionTest.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/runtime/exceptionMsgs/ArrayIndexOutOfBoundsException/ArrayIndexOutOfBoundsExceptionTest.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,6 +1,6 @@
/*
- * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
- * Copyright (c) 2018 SAP SE. All rights reserved.
+ * Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2018, 2019 SAP SE. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -51,6 +51,10 @@
*/
public class ArrayIndexOutOfBoundsExceptionTest {
+ static {
+ System.loadLibrary("ArrayIndexOutOfBoundsExceptionTest");
+ }
+
// Some fields used in the test.
static int[] staticArray = new int[0];
static long[][] staticLongArray = new long[0][0];
@@ -88,6 +92,26 @@
}
}
+ static native void doNativeArrayStore(Object[] dst, Object element, int index);
+ static native Object doNativeArrayLoad(Object[] src, int index);
+
+ static native void doNativeBooleanArrayRegionLoad (boolean[] source, int start, int len);
+ static native void doNativeBooleanArrayRegionStore(boolean[] source, int start, int len);
+ static native void doNativeByteArrayRegionLoad (byte[] source, int start, int len);
+ static native void doNativeByteArrayRegionStore (byte[] source, int start, int len);
+ static native void doNativeShortArrayRegionLoad (short[] source, int start, int len);
+ static native void doNativeShortArrayRegionStore (short[] source, int start, int len);
+ static native void doNativeCharArrayRegionLoad (char[] source, int start, int len);
+ static native void doNativeCharArrayRegionStore (char[] source, int start, int len);
+ static native void doNativeIntArrayRegionLoad (int[] source, int start, int len);
+ static native void doNativeIntArrayRegionStore (int[] source, int start, int len);
+ static native void doNativeLongArrayRegionLoad (long[] source, int start, int len);
+ static native void doNativeLongArrayRegionStore (long[] source, int start, int len);
+ static native void doNativeFloatArrayRegionLoad (float[] source, int start, int len);
+ static native void doNativeFloatArrayRegionStore (float[] source, int start, int len);
+ static native void doNativeDoubleArrayRegionLoad (double[] source, int start, int len);
+ static native void doNativeDoubleArrayRegionStore (double[] source, int start, int len);
+
/**
*
*/
@@ -439,5 +463,463 @@
assertEquals(e.getMessage(),
"arraycopy: last destination index 7 out of bounds for float[5]");
}
+
+
+ // Test native array access.
+
+
+ try {
+ System.out.println(doNativeArrayLoad(oa2, 77));
+ fail();
+ } catch (ArrayIndexOutOfBoundsException e) {
+ assertEquals(e.getMessage(),
+ "Index 77 out of bounds for length 5");
+ }
+ try {
+ System.out.println(doNativeArrayLoad(oa1, -1));
+ fail();
+ } catch (ArrayIndexOutOfBoundsException e) {
+ assertEquals(e.getMessage(),
+ "Index -1 out of bounds for length 10");
+ }
+
+ try {
+ doNativeArrayStore(oa1, "Some String", Integer.MIN_VALUE);
+ fail();
+ } catch (ArrayIndexOutOfBoundsException e) {
+ assertEquals(e.getMessage(),
+ "Index -2147483648 out of bounds for length 10");
+ }
+ try {
+ doNativeArrayStore(oa1, "Some String", 13);
+ fail();
+ } catch (ArrayIndexOutOfBoundsException e) {
+ assertEquals(e.getMessage(),
+ "Index 13 out of bounds for length 10");
+ }
+
+ // Boolean
+
+ // Native array region loads.
+ // Boolean, len negative.
+ try {
+ doNativeBooleanArrayRegionLoad(za2, 3, -77);
+ fail();
+ } catch (ArrayIndexOutOfBoundsException e) {
+ assertEquals(e.getMessage(),
+ "Length -77 is negative");
+ }
+ // Boolean, index negative.
+ try {
+ doNativeBooleanArrayRegionLoad(za2, -3, 3);
+ fail();
+ } catch (ArrayIndexOutOfBoundsException e) {
+ assertEquals(e.getMessage(),
+ "Array region -3..0 out of bounds for length 10");
+ }
+ // Boolean, index+len too big.
+ try {
+ doNativeBooleanArrayRegionLoad(za2, 3, Integer.MAX_VALUE-1);
+ fail();
+ } catch (ArrayIndexOutOfBoundsException e) {
+ assertEquals(e.getMessage(),
+ "Array region 3..2147483649 out of bounds for length 10");
+ }
+ // Native array region stores
+ // Boolean, len negative.
+ try {
+ doNativeBooleanArrayRegionStore(za2, 3, -77);
+ fail();
+ } catch (ArrayIndexOutOfBoundsException e) {
+ assertEquals(e.getMessage(),
+ "Length -77 is negative");
+ }
+ // Boolean, index negative.
+ try {
+ doNativeBooleanArrayRegionStore(za2, -3, 3);
+ fail();
+ } catch (ArrayIndexOutOfBoundsException e) {
+ assertEquals(e.getMessage(),
+ "Array region -3..0 out of bounds for length 10");
+ }
+ // Boolean, index+len too big.
+ try {
+ doNativeBooleanArrayRegionStore(za2, 3, Integer.MAX_VALUE);
+ fail();
+ } catch (ArrayIndexOutOfBoundsException e) {
+ assertEquals(e.getMessage(),
+ "Array region 3..2147483650 out of bounds for length 10");
+ }
+
+ // Byte
+
+ // Native array region loads.
+ // Byte, len negative.
+ try {
+ doNativeByteArrayRegionLoad(ba1, 3, -77);
+ fail();
+ } catch (ArrayIndexOutOfBoundsException e) {
+ assertEquals(e.getMessage(),
+ "Length -77 is negative");
+ }
+ // Byte, index negative.
+ try {
+ doNativeByteArrayRegionLoad(ba1, -3, 3);
+ fail();
+ } catch (ArrayIndexOutOfBoundsException e) {
+ assertEquals(e.getMessage(),
+ "Array region -3..0 out of bounds for length 0");
+ }
+ // Byte, index+len too big.
+ try {
+ doNativeByteArrayRegionLoad(ba2, 3, Integer.MAX_VALUE-1);
+ fail();
+ } catch (ArrayIndexOutOfBoundsException e) {
+ assertEquals(e.getMessage(),
+ "Array region 3..2147483649 out of bounds for length 10");
+ }
+ // Native array region stores
+ // Byte, len negative.
+ try {
+ doNativeByteArrayRegionStore(ba2, 3, -77);
+ fail();
+ } catch (ArrayIndexOutOfBoundsException e) {
+ assertEquals(e.getMessage(),
+ "Length -77 is negative");
+ }
+ // Byte, index negative.
+ try {
+ doNativeByteArrayRegionStore(ba2, -3, 3);
+ fail();
+ } catch (ArrayIndexOutOfBoundsException e) {
+ assertEquals(e.getMessage(),
+ "Array region -3..0 out of bounds for length 10");
+ }
+ // Byte, index+len too big.
+ try {
+ doNativeByteArrayRegionStore(ba2, 3, Integer.MAX_VALUE);
+ fail();
+ } catch (ArrayIndexOutOfBoundsException e) {
+ assertEquals(e.getMessage(),
+ "Array region 3..2147483650 out of bounds for length 10");
+ }
+
+ // Short
+
+ // Native array region loads.
+ // Short, len negative.
+ try {
+ doNativeShortArrayRegionLoad(sa2, 3, -77);
+ fail();
+ } catch (ArrayIndexOutOfBoundsException e) {
+ assertEquals(e.getMessage(),
+ "Length -77 is negative");
+ }
+ // Short, index negative.
+ try {
+ doNativeShortArrayRegionLoad(sa2, -3, 3);
+ fail();
+ } catch (ArrayIndexOutOfBoundsException e) {
+ assertEquals(e.getMessage(),
+ "Array region -3..0 out of bounds for length 10");
+ }
+ // Short, index+len too big.
+ try {
+ doNativeShortArrayRegionLoad(sa2, 3, Integer.MAX_VALUE-1);
+ fail();
+ } catch (ArrayIndexOutOfBoundsException e) {
+ assertEquals(e.getMessage(),
+ "Array region 3..2147483649 out of bounds for length 10");
+ }
+ // Native array region stores
+ // Short, len negative.
+ try {
+ doNativeShortArrayRegionStore(sa2, 3, -77);
+ fail();
+ } catch (ArrayIndexOutOfBoundsException e) {
+ assertEquals(e.getMessage(),
+ "Length -77 is negative");
+ }
+ // Short, index negative.
+ try {
+ doNativeShortArrayRegionStore(sa2, -3, 3);
+ fail();
+ } catch (ArrayIndexOutOfBoundsException e) {
+ assertEquals(e.getMessage(),
+ "Array region -3..0 out of bounds for length 10");
+ }
+ // Short, index+len too big.
+ try {
+ doNativeShortArrayRegionStore(sa2, 3, Integer.MAX_VALUE);
+ fail();
+ } catch (ArrayIndexOutOfBoundsException e) {
+ assertEquals(e.getMessage(),
+ "Array region 3..2147483650 out of bounds for length 10");
+ }
+
+ // Char
+
+ // Native array region loads.
+ // Char, len negative.
+ try {
+ doNativeCharArrayRegionLoad(ca2, 3, -77);
+ fail();
+ } catch (ArrayIndexOutOfBoundsException e) {
+ assertEquals(e.getMessage(),
+ "Length -77 is negative");
+ }
+ // Char, index negative.
+ try {
+ doNativeCharArrayRegionLoad(ca2, -3, 3);
+ fail();
+ } catch (ArrayIndexOutOfBoundsException e) {
+ assertEquals(e.getMessage(),
+ "Array region -3..0 out of bounds for length 10");
+ }
+ // Char, index+len too big.
+ try {
+ doNativeCharArrayRegionLoad(ca2, 3, Integer.MAX_VALUE-1);
+ fail();
+ } catch (ArrayIndexOutOfBoundsException e) {
+ assertEquals(e.getMessage(),
+ "Array region 3..2147483649 out of bounds for length 10");
+ }
+ // Native array region stores
+ // Char, len negative.
+ try {
+ doNativeCharArrayRegionStore(ca2, 3, -77);
+ fail();
+ } catch (ArrayIndexOutOfBoundsException e) {
+ assertEquals(e.getMessage(),
+ "Length -77 is negative");
+ }
+ // Char, index negative.
+ try {
+ doNativeCharArrayRegionStore(ca2, -3, 3);
+ fail();
+ } catch (ArrayIndexOutOfBoundsException e) {
+ assertEquals(e.getMessage(),
+ "Array region -3..0 out of bounds for length 10");
+ }
+ // Char, index+len too big.
+ try {
+ doNativeCharArrayRegionStore(ca2, 3, Integer.MAX_VALUE);
+ fail();
+ } catch (ArrayIndexOutOfBoundsException e) {
+ assertEquals(e.getMessage(),
+ "Array region 3..2147483650 out of bounds for length 10");
+ }
+
+ // Int
+
+ // Native array region loads.
+ // Int, len negative.
+ try {
+ doNativeIntArrayRegionLoad(ia2, 3, -77);
+ fail();
+ } catch (ArrayIndexOutOfBoundsException e) {
+ assertEquals(e.getMessage(),
+ "Length -77 is negative");
+ }
+ // Int, index negative.
+ try {
+ doNativeIntArrayRegionLoad(ia2, -3, 3);
+ fail();
+ } catch (ArrayIndexOutOfBoundsException e) {
+ assertEquals(e.getMessage(),
+ "Array region -3..0 out of bounds for length 10");
+ }
+ // Int, index+len too big.
+ try {
+ doNativeIntArrayRegionLoad(ia2, 3, Integer.MAX_VALUE-1);
+ fail();
+ } catch (ArrayIndexOutOfBoundsException e) {
+ assertEquals(e.getMessage(),
+ "Array region 3..2147483649 out of bounds for length 10");
+ }
+ // Native array region stores
+ // Int, len negative.
+ try {
+ doNativeIntArrayRegionStore(ia2, 3, -77);
+ fail();
+ } catch (ArrayIndexOutOfBoundsException e) {
+ assertEquals(e.getMessage(),
+ "Length -77 is negative");
+ }
+ // Int, index negative.
+ try {
+ doNativeIntArrayRegionStore(ia2, -3, 3);
+ fail();
+ } catch (ArrayIndexOutOfBoundsException e) {
+ assertEquals(e.getMessage(),
+ "Array region -3..0 out of bounds for length 10");
+ }
+ // Int, index+len too big.
+ try {
+ doNativeIntArrayRegionStore(ia2, 3, Integer.MAX_VALUE);
+ fail();
+ } catch (ArrayIndexOutOfBoundsException e) {
+ assertEquals(e.getMessage(),
+ "Array region 3..2147483650 out of bounds for length 10");
+ }
+
+ // Long
+
+ // Native array region loads.
+ // Long, len negative.
+ try {
+ doNativeLongArrayRegionLoad(la2, 3, -77);
+ fail();
+ } catch (ArrayIndexOutOfBoundsException e) {
+ assertEquals(e.getMessage(),
+ "Length -77 is negative");
+ }
+ // Long, index negative.
+ try {
+ doNativeLongArrayRegionLoad(la2, -3, 3);
+ fail();
+ } catch (ArrayIndexOutOfBoundsException e) {
+ assertEquals(e.getMessage(),
+ "Array region -3..0 out of bounds for length 10");
+ }
+ // Long, index+len too big.
+ try {
+ doNativeLongArrayRegionLoad(la2, 3, Integer.MAX_VALUE-1);
+ fail();
+ } catch (ArrayIndexOutOfBoundsException e) {
+ assertEquals(e.getMessage(),
+ "Array region 3..2147483649 out of bounds for length 10");
+ }
+ // Native array region stores
+ // Long, len negative.
+ try {
+ doNativeLongArrayRegionStore(la2, 3, -77);
+ fail();
+ } catch (ArrayIndexOutOfBoundsException e) {
+ assertEquals(e.getMessage(),
+ "Length -77 is negative");
+ }
+ // Long, index negative.
+ try {
+ doNativeLongArrayRegionStore(la2, -3, 3);
+ fail();
+ } catch (ArrayIndexOutOfBoundsException e) {
+ assertEquals(e.getMessage(),
+ "Array region -3..0 out of bounds for length 10");
+ }
+ // Long, index+len too big.
+ try {
+ doNativeLongArrayRegionStore(la2, 3, Integer.MAX_VALUE);
+ fail();
+ } catch (ArrayIndexOutOfBoundsException e) {
+ assertEquals(e.getMessage(),
+ "Array region 3..2147483650 out of bounds for length 10");
+ }
+
+ // Float
+
+ // Native array region loads.
+ // Float, len negative.
+ try {
+ doNativeFloatArrayRegionLoad(fa2, 3, -77);
+ fail();
+ } catch (ArrayIndexOutOfBoundsException e) {
+ assertEquals(e.getMessage(),
+ "Length -77 is negative");
+ }
+ // Float, index negative.
+ try {
+ doNativeFloatArrayRegionLoad(fa2, -3, 3);
+ fail();
+ } catch (ArrayIndexOutOfBoundsException e) {
+ assertEquals(e.getMessage(),
+ "Array region -3..0 out of bounds for length 10");
+ }
+ // Float, index+len too big.
+ try {
+ doNativeFloatArrayRegionLoad(fa2, 3, Integer.MAX_VALUE-1);
+ fail();
+ } catch (ArrayIndexOutOfBoundsException e) {
+ assertEquals(e.getMessage(),
+ "Array region 3..2147483649 out of bounds for length 10");
+ }
+ // Native array region stores
+ // Float, len negative.
+ try {
+ doNativeFloatArrayRegionStore(fa2, 3, -77);
+ fail();
+ } catch (ArrayIndexOutOfBoundsException e) {
+ assertEquals(e.getMessage(),
+ "Length -77 is negative");
+ }
+ // Float, index negative.
+ try {
+ doNativeFloatArrayRegionStore(fa2, -3, 3);
+ fail();
+ } catch (ArrayIndexOutOfBoundsException e) {
+ assertEquals(e.getMessage(),
+ "Array region -3..0 out of bounds for length 10");
+ }
+ // Float, index+len too big.
+ try {
+ doNativeFloatArrayRegionStore(fa2, 3, Integer.MAX_VALUE);
+ fail();
+ } catch (ArrayIndexOutOfBoundsException e) {
+ assertEquals(e.getMessage(),
+ "Array region 3..2147483650 out of bounds for length 10");
+ }
+
+ // Double
+
+ // Native array region loads.
+ // Double, len negative.
+ try {
+ doNativeDoubleArrayRegionLoad(da2, 3, -77);
+ fail();
+ } catch (ArrayIndexOutOfBoundsException e) {
+ assertEquals(e.getMessage(),
+ "Length -77 is negative");
+ }
+ // Double, index negative.
+ try {
+ doNativeDoubleArrayRegionLoad(da2, -3, 3);
+ fail();
+ } catch (ArrayIndexOutOfBoundsException e) {
+ assertEquals(e.getMessage(),
+ "Array region -3..0 out of bounds for length 10");
+ }
+ // Double, index+len too big.
+ try {
+ doNativeDoubleArrayRegionLoad(da2, 3, Integer.MAX_VALUE-1);
+ fail();
+ } catch (ArrayIndexOutOfBoundsException e) {
+ assertEquals(e.getMessage(),
+ "Array region 3..2147483649 out of bounds for length 10");
+ }
+ // Native array region stores
+ // Double, len negative.
+ try {
+ doNativeDoubleArrayRegionStore(da2, 3, -77);
+ fail();
+ } catch (ArrayIndexOutOfBoundsException e) {
+ assertEquals(e.getMessage(),
+ "Length -77 is negative");
+ }
+ // Double, index negative.
+ try {
+ doNativeDoubleArrayRegionStore(da2, -3, 3);
+ fail();
+ } catch (ArrayIndexOutOfBoundsException e) {
+ assertEquals(e.getMessage(),
+ "Array region -3..0 out of bounds for length 10");
+ }
+ // Double, index+len too big.
+ try {
+ doNativeDoubleArrayRegionStore(da2, 3, Integer.MAX_VALUE);
+ fail();
+ } catch (ArrayIndexOutOfBoundsException e) {
+ assertEquals(e.getMessage(),
+ "Array region 3..2147483650 out of bounds for length 10");
+ }
}
}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/runtime/exceptionMsgs/ArrayIndexOutOfBoundsException/libArrayIndexOutOfBoundsExceptionTest.c Tue Jan 29 17:42:58 2019 +0000
@@ -0,0 +1,61 @@
+/*
+ * Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2019 SAP SE. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * 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.
+ */
+
+#include <jni.h>
+
+JNIEXPORT void JNICALL
+ Java_ArrayIndexOutOfBoundsExceptionTest_doNativeArrayStore(JNIEnv *env, jclass klass,
+ jobjectArray array, jobject element, jint index) {
+ (*env)->SetObjectArrayElement(env, array, index, element);
+}
+
+JNIEXPORT jobject JNICALL
+ Java_ArrayIndexOutOfBoundsExceptionTest_doNativeArrayLoad(JNIEnv *env, jclass klass,
+ jobjectArray array, jint index) {
+ return (*env)->GetObjectArrayElement(env, array, index);
+}
+
+
+#define REGIONACCESS(ElementType,NameType) \
+JNIEXPORT void JNICALL \
+ Java_ArrayIndexOutOfBoundsExceptionTest_doNative##NameType##ArrayRegionLoad(JNIEnv *env, jclass klass, \
+ ElementType##Array array, jint start, jint len) { \
+ ElementType clone[100]; \
+ (*env)->Get##NameType##ArrayRegion(env, array, start, len, clone); \
+} \
+JNIEXPORT void JNICALL \
+ Java_ArrayIndexOutOfBoundsExceptionTest_doNative##NameType##ArrayRegionStore(JNIEnv *env, jclass klass, \
+ ElementType##Array array, jint start, jint len) { \
+ ElementType content[100]; \
+ (*env)->Set##NameType##ArrayRegion(env, array, start, len, content); \
+}
+
+REGIONACCESS(jboolean, Boolean)
+REGIONACCESS(jbyte, Byte)
+REGIONACCESS(jshort, Short)
+REGIONACCESS(jchar, Char)
+REGIONACCESS(jint, Int)
+REGIONACCESS(jlong, Long)
+REGIONACCESS(jfloat, Float)
+REGIONACCESS(jdouble, Double)
--- a/test/hotspot/jtreg/serviceability/sa/ClhsdbFlags.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/serviceability/sa/ClhsdbFlags.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 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
@@ -33,6 +33,7 @@
/**
* @test
* @bug 8190198
+ * @bug 8217612
* @summary Test clhsdb flags command
* @requires vm.hasSA
* @library /test/lib
@@ -41,8 +42,8 @@
public class ClhsdbFlags {
- public static void main(String[] args) throws Exception {
- System.out.println("Starting ClhsdbFlags test");
+ public static void runBasicTest() throws Exception {
+ System.out.println("Starting ClhsdbFlags basic test");
LingeredApp theApp = null;
try {
@@ -88,4 +89,54 @@
}
System.out.println("Test PASSED");
}
+
+ public static void runAllTypesTest() throws Exception {
+ System.out.println("Starting ClhsdbFlags all types test");
+
+ LingeredApp theApp = null;
+ try {
+ ClhsdbLauncher test = new ClhsdbLauncher();
+ List<String> vmArgs = new ArrayList<String>();
+ vmArgs.add("-XX:+UnlockDiagnosticVMOptions"); // bool
+ vmArgs.add("-XX:ActiveProcessorCount=1"); // int
+ vmArgs.add("-XX:ParallelGCThreads=1"); // uint
+ vmArgs.add("-XX:MaxJavaStackTraceDepth=1024"); // intx
+ vmArgs.add("-XX:LogEventsBufferEntries=10"); // uintx
+ vmArgs.add("-XX:HeapSizePerGCThread=32m"); // size_t
+ vmArgs.add("-XX:NativeMemoryTracking=off"); // ccstr
+ vmArgs.add("-XX:OnError='echo error'"); // ccstrlist
+ vmArgs.add("-XX:CompileThresholdScaling=1.0"); // double
+ vmArgs.add("-XX:ErrorLogTimeout=120"); // uint64_t
+ vmArgs.addAll(Utils.getVmOptions());
+ theApp = LingeredApp.startApp(vmArgs);
+ System.out.println("Started LingeredApp with pid " + theApp.getPid());
+
+ List<String> cmds = List.of("flags");
+
+ Map<String, List<String>> expStrMap = new HashMap<>();
+ expStrMap.put("flags", List.of(
+ "UnlockDiagnosticVMOptions = true",
+ "ActiveProcessorCount = 1",
+ "ParallelGCThreads = 1",
+ "MaxJavaStackTraceDepth = 1024",
+ "LogEventsBufferEntries = 10",
+ "HeapSizePerGCThread = 3",
+ "NativeMemoryTracking = \"off\"",
+ "OnError = \"'echo error'\"",
+ "CompileThresholdScaling = 1.0",
+ "ErrorLogTimeout = 120"));
+
+ test.run(theApp.getPid(), cmds, expStrMap, null);
+ } catch (Exception ex) {
+ throw new RuntimeException("Test ERROR " + ex, ex);
+ } finally {
+ LingeredApp.stopApp(theApp);
+ }
+ System.out.println("Test PASSED");
+ }
+
+ public static void main(String[] args) throws Exception {
+ runBasicTest();
+ runAllTypesTest();
+ }
}
--- a/test/hotspot/jtreg/testlibrary/jittester/Makefile Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/testlibrary/jittester/Makefile Tue Jan 29 17:42:58 2019 +0000
@@ -83,9 +83,9 @@
.PHONY: cleantmp
-all: JAR
+all: $(DIST_JAR)
-JAR: INIT COMPILE manifest
+$(DIST_JAR): INIT COMPILE manifest
$(JAR) cfm $(DIST_JAR) $(MANIFEST) -C $(CLASSES_DIR) .
manifest:
@@ -107,7 +107,7 @@
INIT: $(DIST_DIR)
$(shell if [ ! -d $(CLASSES_DIR) ]; then mkdir -p $(CLASSES_DIR); fi)
-install: clean_testbase testgroup testroot copytestlibrary copyaot JAR cleantmp
+install: clean_testbase testgroup testroot copytestlibrary copyaot $(DIST_JAR) cleantmp
$(JAVA) --add-exports=java.base/jdk.internal.org.objectweb.asm=ALL-UNNAMED --add-opens java.base/java.util=ALL-UNNAMED -ea -jar $(DIST_JAR) $(APPLICATION_ARGS)
clean_testbase:
--- a/test/hotspot/jtreg/testlibrary/jittester/conf/default.properties Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/testlibrary/jittester/conf/default.properties Tue Jan 29 17:42:58 2019 +0000
@@ -1,6 +1,6 @@
seed=SEED2
number-of-tests=1000
-testbase-dir=ws/hotspot/test
+testbase-dir=testbase
fp-precision=7
min-cfg-depth=5
max-cfg-depth=5
--- a/test/hotspot/jtreg/testlibrary/jittester/src/jdk/test/lib/jittester/AotTestGeneratorsFactory.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/testlibrary/jittester/src/jdk/test/lib/jittester/AotTestGeneratorsFactory.java Tue Jan 29 17:42:58 2019 +0000
@@ -32,7 +32,7 @@
private static final String AOT_COMPILER_BUILD_ACTION
= "@build compiler.aot.AotCompiler";
private static final String AOT_COMPILER_RUN_ACTION_PREFIX
- = "@run driver compiler.aot.AotCompiler -libname aottest.so -class ";
+ = "@run driver compiler.aot.AotCompiler -extraopt -Xmixed -libname aottest.so -class ";
@Override
public List<TestsGenerator> apply(String[] input) {
--- a/test/hotspot/jtreg/testlibrary/jittester/src/jdk/test/lib/jittester/Automatic.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/testlibrary/jittester/src/jdk/test/lib/jittester/Automatic.java Tue Jan 29 17:42:58 2019 +0000
@@ -110,6 +110,7 @@
public static void main(String[] args) {
initializeTestGenerator(args);
int counter = 0;
+ System.out.printf("Generating %d tests...%n", ProductionParams.numberOfTests.value());
System.out.printf(" %13s | %8s | %8s | %8s |%n", "start time", "count", "generat",
"running");
System.out.printf(" %13s | %8s | %8s | %8s |%n", "---", "---", "---", "---");
--- a/test/hotspot/jtreg/testlibrary/jittester/src/jdk/test/lib/jittester/ByteCodeGenerator.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/testlibrary/jittester/src/jdk/test/lib/jittester/ByteCodeGenerator.java Tue Jan 29 17:42:58 2019 +0000
@@ -39,7 +39,7 @@
private static final String DEFAULT_SUFFIX = "bytecode_tests";
ByteCodeGenerator() {
- super(DEFAULT_SUFFIX);
+ super(DEFAULT_SUFFIX, s -> new String[0], "-Xcomp");
}
ByteCodeGenerator(String suffix, Function<String, String[]> preRunActions, String jtDriverOptions) {
--- a/test/hotspot/jtreg/testlibrary/jittester/src/jdk/test/lib/jittester/JavaCodeGenerator.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/testlibrary/jittester/src/jdk/test/lib/jittester/JavaCodeGenerator.java Tue Jan 29 17:42:58 2019 +0000
@@ -34,7 +34,7 @@
private static final String DEFAULT_SUFFIX = "java_tests";
JavaCodeGenerator() {
- this(DEFAULT_SUFFIX, JavaCodeGenerator::generatePrerunAction, "");
+ this(DEFAULT_SUFFIX, JavaCodeGenerator::generatePrerunAction, "-Xcomp");
}
JavaCodeGenerator(String prefix, Function<String, String[]> preRunActions, String jtDriverOptions) {
@@ -64,13 +64,16 @@
}
private void compileJavaFile(String mainClassName) {
- String classPath = getRoot().resolve(generatorDir)
- .toAbsolutePath()
- .toString();
- ProcessBuilder pb = new ProcessBuilder(JAVAC, "-cp", classPath,
+ String classPath = tmpDir.toString();
+ ProcessBuilder pb = new ProcessBuilder(JAVAC,
+ "-d", classPath,
+ "-cp", classPath,
generatorDir.resolve(mainClassName + ".java").toString());
try {
- runProcess(pb, generatorDir.resolve(mainClassName).toString());
+ int r = runProcess(pb, tmpDir.resolve(mainClassName + ".javac").toString());
+ if (r != 0) {
+ throw new Error("Can't compile sources, exit code = " + r);
+ }
} catch (IOException | InterruptedException e) {
throw new Error("Can't compile sources ", e);
}
--- a/test/hotspot/jtreg/testlibrary/jittester/src/jdk/test/lib/jittester/TestsGenerator.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/testlibrary/jittester/src/jdk/test/lib/jittester/TestsGenerator.java Tue Jan 29 17:42:58 2019 +0000
@@ -42,6 +42,7 @@
protected static final String JAVAC = Paths.get(JAVA_BIN, "javac").toString();
protected static final String JAVA = Paths.get(JAVA_BIN, "java").toString();
protected final Path generatorDir;
+ protected final Path tmpDir;
protected final Function<String, String[]> preRunActions;
protected final String jtDriverOptions;
private static final String DISABLE_WARNINGS = "-XX:-PrintWarnings";
@@ -52,15 +53,19 @@
protected TestsGenerator(String suffix, Function<String, String[]> preRunActions,
String jtDriverOptions) {
- generatorDir = getRoot().resolve(suffix);
+ generatorDir = getRoot().resolve(suffix).toAbsolutePath();
+ try {
+ tmpDir = Files.createTempDirectory(suffix).toAbsolutePath();
+ } catch (IOException e) {
+ throw new Error("Can't get a tmp dir for " + suffix, e);
+ }
this.preRunActions = preRunActions;
this.jtDriverOptions = jtDriverOptions;
}
protected void generateGoldenOut(String mainClassName) {
- String classPath = getRoot().resolve(generatorDir)
- .toAbsolutePath()
- .toString();
+ String classPath = tmpDir.toString() + File.pathSeparator
+ + generatorDir.toString();
ProcessBuilder pb = new ProcessBuilder(JAVA, "-Xint", DISABLE_WARNINGS, "-Xverify",
"-cp", classPath, mainClassName);
String goldFile = mainClassName + ".gold";
@@ -89,9 +94,10 @@
return -1;
}
- protected static void compilePrinter() {
+ protected void compilePrinter() {
Path root = getRoot();
ProcessBuilder pbPrinter = new ProcessBuilder(JAVAC,
+ "-d", tmpDir.toString(),
root.resolve("jdk")
.resolve("test")
.resolve("lib")
--- a/test/hotspot/jtreg/testlibrary/jittester/src/jdk/test/lib/jittester/TypeList.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/testlibrary/jittester/src/jdk/test/lib/jittester/TypeList.java Tue Jan 29 17:42:58 2019 +0000
@@ -23,11 +23,6 @@
package jdk.test.lib.jittester;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-import java.util.function.Predicate;
-
import jdk.test.lib.jittester.types.TypeBoolean;
import jdk.test.lib.jittester.types.TypeByte;
import jdk.test.lib.jittester.types.TypeChar;
@@ -39,6 +34,11 @@
import jdk.test.lib.jittester.types.TypeShort;
import jdk.test.lib.jittester.types.TypeVoid;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+import java.util.function.Predicate;
+
public class TypeList {
public static final TypeVoid VOID = new TypeVoid();
public static final TypeBoolean BOOLEAN = new TypeBoolean();
@@ -56,7 +56,7 @@
private static final List<Type> BUILTIN_TYPES = new ArrayList<>();
private static final List<Type> BUILTIN_INT_TYPES = new ArrayList<>();
private static final List<Type> BUILTIN_FP_TYPES = new ArrayList<>();
- private static final List<Type> REFERENCE_TYPES = new ArrayList<>();
+ private static final List<TypeKlass> REFERENCE_TYPES = new ArrayList<>();
static {
BUILTIN_INT_TYPES.add(BOOLEAN);
@@ -99,7 +99,7 @@
return BUILTIN_FP_TYPES;
}
- protected static Collection<Type> getReferenceTypes() {
+ protected static Collection<TypeKlass> getReferenceTypes() {
return REFERENCE_TYPES;
}
@@ -148,7 +148,7 @@
return null;
}
- public static void add(Type t) {
+ public static void add(TypeKlass t) {
REFERENCE_TYPES.add(t);
TYPES.add(t);
}
@@ -159,8 +159,12 @@
}
public static void removeAll() {
- Predicate<? super Type> isNotBasic = t -> t.getName().startsWith("Test_");
- TYPES.removeIf(isNotBasic);
- REFERENCE_TYPES.removeIf(isNotBasic);
+ Predicate<? super String> isNotBasic = s -> s.startsWith("Test_");
+ Predicate<? super Type> isNotBasicType = t -> isNotBasic.test(t.getName());
+ REFERENCE_TYPES.stream()
+ .map(TypeKlass::getChildrenNames)
+ .forEach(l -> l.removeIf(isNotBasic));
+ TYPES.removeIf(isNotBasicType);
+ REFERENCE_TYPES.removeIf(isNotBasicType);
}
}
--- a/test/hotspot/jtreg/testlibrary/jittester/src/jdk/test/lib/jittester/factories/CastOperatorFactory.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/testlibrary/jittester/src/jdk/test/lib/jittester/factories/CastOperatorFactory.java Tue Jan 29 17:42:58 2019 +0000
@@ -67,7 +67,7 @@
SymbolTable.merge();
return castOperator;
}
- throw new ProductionFailedException();
+ SymbolTable.pop();
} catch (ProductionFailedException e) {
SymbolTable.pop();
}
--- a/test/hotspot/jtreg/testlibrary/jittester/src/jdk/test/lib/jittester/types/TypeKlass.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/testlibrary/jittester/src/jdk/test/lib/jittester/types/TypeKlass.java Tue Jan 29 17:42:58 2019 +0000
@@ -25,6 +25,7 @@
import java.util.Collection;
import java.util.HashSet;
+import java.util.Objects;
import java.util.TreeSet;
import jdk.test.lib.jittester.ProductionParams;
import jdk.test.lib.jittester.Symbol;
@@ -124,26 +125,28 @@
TreeSet<TypeKlass> result = new TreeSet<>();
parentsList.stream()
.map(TypeList::find)
- .filter(parentKlass -> parentKlass != null)
- .map(parentKlass -> (TypeKlass) parentKlass)
- .forEach(parentKlass -> {
- result.add(parentKlass);
- result.addAll(parentKlass.getAllParents());
+ .filter(Objects::nonNull)
+ .map(k -> (TypeKlass) k)
+ .forEach(k -> {
+ if (result.add(k)) {
+ result.addAll(k.getAllParents());
+ }
});
return result;
}
public TreeSet<TypeKlass> getAllChildren() {
- TreeSet<TypeKlass> r = new TreeSet<>();
+ TreeSet<TypeKlass> result = new TreeSet<>();
childrenList.stream()
.map(TypeList::find)
- .filter(childKlass -> childKlass != null)
- .map(childKlass -> (TypeKlass) childKlass)
- .forEach(childKlass -> {
- r.add(childKlass);
- r.addAll(childKlass.getAllChildren());
+ .filter(Objects::nonNull)
+ .map(k -> (TypeKlass) k)
+ .forEach(k -> {
+ if (result.add(k)) {
+ result.addAll(k.getAllChildren());
+ }
});
- return r;
+ return result;
}
@Override
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/bcinstr/BI02/bi02t001/bi02t001.cpp Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/bcinstr/BI02/bi02t001/bi02t001.cpp Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 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
@@ -69,8 +69,7 @@
}
if (!NSK_JNI_VERIFY(jni_env, (*new_class_data = (unsigned char*)
- jni_env->GetByteArrayElements(classBytes, NULL))
- != NULL)) {
+ jni_env->GetByteArrayElements(classBytes, NULL)) != NULL)) {
nsk_jvmti_setFailStatus();
return;
}
@@ -97,8 +96,7 @@
return NSK_FALSE;
if (!NSK_JNI_VERIFY(jni, (classBytes = (jbyteArray)
- jni->GetStaticObjectField(debugeeClass, field))
- != NULL))
+ jni->GetStaticObjectField(debugeeClass, field)) != NULL))
return NSK_FALSE;
if (!NSK_JNI_VERIFY(jni, (classBytes = (jbyteArray)jni->NewGlobalRef(classBytes)) != NULL))
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/bcinstr/BI02/bi02t002/bi02t002.cpp Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/bcinstr/BI02/bi02t002/bi02t002.cpp Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 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,8 +63,7 @@
return NSK_FALSE;
if (!NSK_JNI_VERIFY(jni, (classBytes = (jbyteArray)
- jni->GetStaticObjectField(debugeeClass, field))
- != NULL))
+ jni->GetStaticObjectField(debugeeClass, field)) != NULL))
return NSK_FALSE;
if (!NSK_JNI_VERIFY(jni, (classBytes = (jbyteArray)jni->NewGlobalRef(classBytes)) != NULL))
@@ -91,8 +90,7 @@
return NSK_TRUE;
if (!NSK_JNI_VERIFY(jni, (class_def.class_bytes = (unsigned char*)
- jni->GetByteArrayElements(classBytes, NULL))
- != NULL))
+ jni->GetByteArrayElements(classBytes, NULL)) != NULL))
return NSK_TRUE;
class_def.klass = testedClass;
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/bcinstr/BI03/bi03t001/bi03t001.cpp Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/bcinstr/BI03/bi03t001/bi03t001.cpp Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 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
@@ -69,8 +69,7 @@
}
if (!NSK_JNI_VERIFY(jni_env, (*new_class_data = (unsigned char*)
- jni_env->GetByteArrayElements(classBytes, NULL))
- != NULL)) {
+ jni_env->GetByteArrayElements(classBytes, NULL)) != NULL)) {
nsk_jvmti_setFailStatus();
return;
}
@@ -97,8 +96,7 @@
return NSK_FALSE;
if (!NSK_JNI_VERIFY(jni, (classBytes = (jbyteArray)
- jni->GetStaticObjectField(debugeeClass, field))
- != NULL))
+ jni->GetStaticObjectField(debugeeClass, field)) != NULL))
return NSK_FALSE;
if (!NSK_JNI_VERIFY(jni, (classBytes = (jbyteArray)jni->NewGlobalRef(classBytes)) != NULL))
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/bcinstr/BI03/bi03t002/bi03t002.cpp Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/bcinstr/BI03/bi03t002/bi03t002.cpp Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 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,8 +63,7 @@
return NSK_FALSE;
if (!NSK_JNI_VERIFY(jni, (classBytes = (jbyteArray)
- jni->GetStaticObjectField(debugeeClass, field))
- != NULL))
+ jni->GetStaticObjectField(debugeeClass, field)) != NULL))
return NSK_FALSE;
if (!NSK_JNI_VERIFY(jni, (classBytes = (jbyteArray)jni->NewGlobalRef(classBytes)) != NULL))
@@ -91,8 +90,7 @@
return NSK_TRUE;
if (!NSK_JNI_VERIFY(jni, (class_def.class_bytes = (unsigned char*)
- jni->GetByteArrayElements(classBytes, NULL))
- != NULL))
+ jni->GetByteArrayElements(classBytes, NULL)) != NULL))
return NSK_TRUE;
class_def.klass = testedClass;
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS201/hs201t001/hs201t001.cpp Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS201/hs201t001/hs201t001.cpp Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 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
@@ -190,9 +190,7 @@
return;
}
- if (strcmp(className, EXPECTED_CLASS_SIGN)
- == 0) {
-
+ if (strcmp(className, EXPECTED_CLASS_SIGN) == 0) {
NSK_DISPLAY1("\n\n>>>> Class loaded: %s", className);
NSK_DISPLAY0(", activating breakpoint\n");
setBreakPoint(jvmti_env, jni_env, klass);
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS201/hs201t002/hs201t002.cpp Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS201/hs201t002/hs201t002.cpp Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 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
@@ -190,9 +190,7 @@
return;
}
- if (strcmp(className, EXPECTED_CLASS_SIGN)
- == 0) {
-
+ if (strcmp(className, EXPECTED_CLASS_SIGN) == 0) {
NSK_DISPLAY1("\n\n>>>> Class loaded: %s", className);
NSK_DISPLAY0(", activating breakpoint\n");
setBreakPoint(jvmti_env, jni_env, klass);
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS202/hs202t001/hs202t001.cpp Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS202/hs202t001/hs202t001.cpp Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 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
@@ -116,8 +116,7 @@
jlocation location) {
jvmtiError err;
err = JVMTI_ERROR_NONE;
- if (nsk_jvmti_enableNotification(jvmti,JVMTI_EVENT_SINGLE_STEP, NULL)
- == NSK_TRUE) {
+ if (nsk_jvmti_enableNotification(jvmti,JVMTI_EVENT_SINGLE_STEP, NULL) == NSK_TRUE) {
nsk_printf(" Enabled.. notification event ..");
}
err= jvmti->SetEventNotificationMode(JVMTI_DISABLE,
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS202/hs202t002/hs202t002.cpp Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS202/hs202t002/hs202t002.cpp Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 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
@@ -43,13 +43,7 @@
static jint redefineNumber = 0;
static jvmtiEnv * jvmti = NULL;
-typedef enum {
- suspend_error = -1,
- not_suspended,
- suspended
-} thread_suspend_status_t;
-
-static volatile thread_suspend_status_t thread_suspend_status = not_suspended;
+static volatile bool thread_suspend_error = false;
void JNICALL callbackMethodExit(jvmtiEnv *jvmti_env,
JNIEnv* jni_env,
@@ -75,10 +69,10 @@
nsk_printf("Agent::SUSPENDING>> \n");
err=jvmti_env->SuspendThread(thread);
if (err == JVMTI_ERROR_NONE) {
- thread_suspend_status = suspended;
- nsk_printf("Agent:: Thread successfully suspended..\n");
- } else if (err == JVMTI_ERROR_THREAD_SUSPENDED) {
- thread_suspend_status = suspend_error;
+ // we don't get here until we are resumed
+ nsk_printf("Agent:: Thread successfully suspended and was resumed\n");
+ } else {
+ thread_suspend_error = true;
nsk_printf(" ## Error occured %s \n",TranslateError(err));
}
}
@@ -175,7 +169,6 @@
err = jvmti->ResumeThread(thread);
if (err == JVMTI_ERROR_NONE) {
- thread_suspend_status = not_suspended;
retvalue = JNI_TRUE;
nsk_printf(" Agent:: Thread Resumed.. \n");
} else {
@@ -189,13 +182,21 @@
Java_nsk_jvmti_scenarios_hotswap_HS202_hs202t002_hs202t002_isThreadSuspended(JNIEnv* jni,
jclass clas,
jthread thread) {
- if (suspend_error == thread_suspend_status) {
+ if (thread_suspend_error) {
jclass ex_class = jni->FindClass("java/lang/IllegalThreadStateException");
jni->ThrowNew(ex_class, "Thread has failed to self suspend");
return JNI_FALSE;
}
- return suspended == thread_suspend_status;
+ // There is an inherent race here if the suspend fails for some reason but
+ // thread_suspend_error is not yet set. But as long as we report the suspend
+ // state correctly there is no problem as the Java code will simply loop and call
+ // this again until we see thread_suspend_error is true.
+
+ jint state = 0;
+ // No errors possible here: thread is valid, and state is not NULL
+ jvmti->GetThreadState(thread, &state);
+ return (state & JVMTI_THREAD_STATE_SUSPENDED) != 0;
}
-}
+} // extern C
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS203/hs203t003/hs203t003.cpp Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS203/hs203t003/hs203t003.cpp Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 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
@@ -155,10 +155,8 @@
nsk_printf("#error Agent :: while setting event callbacks.\n");
return JNI_ERR;
}
- if ((nsk_jvmti_enableNotification(jvmti,JVMTI_EVENT_CLASS_PREPARE, NULL)
- == NSK_TRUE) &&
- (nsk_jvmti_enableNotification(jvmti,JVMTI_EVENT_FIELD_ACCESS, NULL)
- == NSK_TRUE)) {
+ if ((nsk_jvmti_enableNotification(jvmti,JVMTI_EVENT_CLASS_PREPARE, NULL) == NSK_TRUE) &&
+ (nsk_jvmti_enableNotification(jvmti,JVMTI_EVENT_FIELD_ACCESS, NULL) == NSK_TRUE)) {
nsk_printf(" Agent :: Notifications are enabled.\n");
} else {
nsk_printf("#error Agent :: Eanableing Notifications.\n");
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/sampling/SP05/sp05t003/sp05t003.cpp Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/sampling/SP05/sp05t003/sp05t003.cpp Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 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
@@ -65,7 +65,7 @@
/* references to tested threads */
static jthread threadsList[THREADS_COUNT];
-/* events conunts */
+/* events counts */
static volatile int eventsStart = 0;
static volatile int eventsEnd = 0;
@@ -371,17 +371,18 @@
/* check if event is for tested thread */
for (i = 0; i < THREADS_COUNT; i++) {
if (jni->IsSameObject(threadsList[i], thread)) {
- NSK_DISPLAY0("SUCCESS: expected THREAD_START event\n");
+ NSK_DISPLAY0("SUCCESS: expected THREAD_START event\n");
/* suspend thread */
NSK_DISPLAY3(" suspend starting thread #%d (%s): %p\n",
i, threadsName[i], (void*)thread);
+ /* must bump the count before we suspend */
+ eventsStart++;
if (!NSK_JVMTI_VERIFY(jvmti->SuspendThread(thread))) {
nsk_jvmti_setFailStatus();
return;
}
- eventsStart++;
break;
}
@@ -406,6 +407,8 @@
for (i = 0; i < THREADS_COUNT; i++) {
if (jni->IsSameObject(threadsList[i], thread)) {
NSK_DISPLAY0("SUCCESS: expected THREAD_END event\n");
+ /* must bump the count before we suspend */
+ eventsEnd++;
/* suspend thread */
NSK_DISPLAY3(" suspend finishing thread #%d (%s): %p\n",
@@ -415,7 +418,6 @@
nsk_jvmti_setFailStatus();
return;
}
- eventsEnd++;
break;
}
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/unit/FollowReferences/followref003/followref003.cpp Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/unit/FollowReferences/followref003/followref003.cpp Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 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
@@ -533,7 +533,7 @@
for (idx = 1; idx <= curr_local_idx; idx++) {
loc = &locDesc[idx];
if (loc->frame_id == frame_id &&
- loc->slot == slot) {
+ loc->slot == slot) {
if (first_followref) {
/* Do this check on the first FollowReferences call only */
FrameDesc *fr = &frameDesc[frame_id];
--- a/test/hotspot/jtreg/vmTestbase/nsk/monitoring/share/ThreadController.cpp Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/vmTestbase/nsk/monitoring/share/ThreadController.cpp Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 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
@@ -486,20 +486,15 @@
jstring stateName;
jint state;
- if (!NSK_VERIFY(
- env->GetJavaVM(&vm) == 0)) {
+ if (!NSK_VERIFY(env->GetJavaVM(&vm) == 0)) {
return NULL;
}
- if (!NSK_VERIFY(
- vm->GetEnv((void **)&jvmti, JVMTI_VERSION_1)
- == JNI_OK)) {
+ if (!NSK_VERIFY(vm->GetEnv((void **)&jvmti, JVMTI_VERSION_1) == JNI_OK)) {
return NULL;
}
- if (!NSK_VERIFY(
- jvmti->GetThreadState((jthread)thread, &state)
- == JVMTI_ERROR_NONE)) {
+ if (!NSK_VERIFY(jvmti->GetThreadState((jthread)thread, &state) == JVMTI_ERROR_NONE)) {
return NULL;
}
--- a/test/hotspot/jtreg/vmTestbase/nsk/share/jvmti/aod/jvmti_aod.cpp Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/vmTestbase/nsk/share/jvmti/aod/jvmti_aod.cpp Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 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
@@ -166,7 +166,7 @@
return NULL;
}
if (!NSK_JNI_VERIFY(jni,
- (threadConstructor = jni->GetMethodID(klass, "<init>", "()V")) != NULL)) {
+ (threadConstructor = jni->GetMethodID(klass, "<init>", "()V")) != NULL)) {
NSK_COMPLAIN0("Failed to get java.lang.Thread constructor\n");
return NULL;
}
@@ -199,7 +199,7 @@
return NULL;
}
if (!NSK_JNI_VERIFY(jni,
- (threadConstructor = jni->GetMethodID(klass, "<init>", "(Ljava/lang/String;)V")) != NULL)) {
+ (threadConstructor = jni->GetMethodID(klass, "<init>", "(Ljava/lang/String;)V")) != NULL)) {
NSK_COMPLAIN0("Failed to get java.lang.Thread constructor\n");
return NULL;
}
--- a/test/hotspot/jtreg/vmTestbase/vm/mlvm/mixed/stress/regression/b6969574/INDIFY_Test.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/mlvm/mixed/stress/regression/b6969574/INDIFY_Test.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 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
@@ -27,8 +27,7 @@
* @bug 6969574
*
* @summary converted from VM Testbase vm/mlvm/mixed/stress/regression/b6969574.
- * VM Testbase keywords: [feature_mlvm, nonconcurrent, quarantine]
- * VM Testbase comments: 8079650
+ * VM Testbase keywords: [feature_mlvm, nonconcurrent]
*
* @library /vmTestbase
* /test/lib
@@ -313,10 +312,8 @@
private final static int REFLECTION_CALL = 1;
private final static int INVOKE_EXACT = 2;
private final static int INVOKE = 3;
- private final static int INVOKE_WITHARG = 4;
- private final static int INVOKE_WITHARG_TYPECONV = 5;
- private final static int INDY = 6;
- private final static int BENCHMARK_COUNT = 7;
+ private final static int INDY = 4;
+ private final static int BENCHMARK_COUNT = 5;
//
// Test body
@@ -356,18 +353,6 @@
}
});
- benchmarks[INVOKE_WITHARG] = new Benchmark("MH.invokeWithArguments(), exact types", new T() {
- public void run() throws Throwable {
- mhTestee.invokeWithArguments(testData, TESTEE_ARG2, TESTEE_ARG3);
- }
- });
-
- benchmarks[INVOKE_WITHARG_TYPECONV] = new Benchmark("MH.invokeWithArguments() + type conv.", new T() {
- public void run() throws Throwable {
- mhTestee.invokeWithArguments((Object) testData, null, (Short) Short.MAX_VALUE);
- }
- });
-
benchmarks[INDY] = new Benchmark("invokedynamic instruction", new T() {
public void run() throws Throwable {
indyWrapper(testData);
@@ -415,8 +400,6 @@
verifyTimeOrder(results[REFLECTION_CALL], results[INVOKE_EXACT]);
verifyTimeOrder(results[INVOKE_EXACT], results[DIRECT_CALL]);
verifyTimeOrder(results[INVOKE], results[DIRECT_CALL]);
- verifyTimeOrder(results[INVOKE_WITHARG], results[INVOKE_EXACT]);
- verifyTimeOrder(results[INVOKE_WITHARG_TYPECONV], results[INVOKE_EXACT]);
verifyTimeOrder(results[INVOKE_EXACT], results[INDY]);
return true;
--- a/test/jaxp/javax/xml/jaxp/unittest/stream/XMLStreamWriterTest/XMLStreamWriterTest.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/jaxp/javax/xml/jaxp/unittest/stream/XMLStreamWriterTest/XMLStreamWriterTest.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, 2016, 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
@@ -42,11 +42,11 @@
/*
* @test
- * @bug 6347190 8139584
+ * @bug 6347190 8139584 8216408
* @library /javax/xml/jaxp/libs /javax/xml/jaxp/unittest
* @run testng/othervm -DrunSecMngr=true stream.XMLStreamWriterTest.XMLStreamWriterTest
* @run testng/othervm stream.XMLStreamWriterTest.XMLStreamWriterTest
- * @summary Test StAX Writer won't insert comment into element inside.
+ * @summary Tests XMLStreamWriter.
*/
@Listeners({jaxp.library.BasePolicy.class})
public class XMLStreamWriterTest {
@@ -94,12 +94,14 @@
}
/**
- * Test of main method, of class TestXMLStreamWriter.
+ * Verifies that the StAX Writer won't insert comment into the element tag.
*/
@Test
public void testWriteComment() {
try {
- String xml = "<?xml version=\"1.0\" encoding=\"UTF-8\"?><a:html href=\"http://java.sun.com\"><!--This is comment-->java.sun.com</a:html>";
+ String xml = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
+ + "<a:html href=\"http://java.sun.com\">"
+ + "<!--This is comment-->java.sun.com</a:html>";
XMLOutputFactory f = XMLOutputFactory.newInstance();
// f.setProperty(XMLOutputFactory.IS_REPAIRING_NAMESPACES,
// Boolean.TRUE);
@@ -122,4 +124,18 @@
}
}
+ /**
+ * @bug 8216408
+ * Verifies that setDefaultNamespace accepts null.
+ *
+ * @throws Exception
+ */
+ @Test
+ public void testSetDefaultNamespace() throws Exception {
+ XMLOutputFactory f = XMLOutputFactory.newFactory();
+ f.setProperty(XMLOutputFactory.IS_REPAIRING_NAMESPACES, true);
+ StringWriter sw = new StringWriter();
+ XMLStreamWriter xsw = f.createXMLStreamWriter(sw);
+ xsw.setDefaultNamespace(null);
+ }
}
--- a/test/jdk/ProblemList-Xcomp.txt Fri Jan 25 13:50:44 2019 +0000
+++ b/test/jdk/ProblemList-Xcomp.txt Tue Jan 29 17:42:58 2019 +0000
@@ -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,3 +28,4 @@
#############################################################################
java/lang/invoke/MethodHandles/CatchExceptionTest.java 8146623 generic-all
+java/util/concurrent/CountDownLatch/Basic.java 8195057 generic-all
--- a/test/jdk/java/net/Socket/ExceptionText.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/jdk/java/net/Socket/ExceptionText.java Tue Jan 29 17:42:58 2019 +0000
@@ -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
@@ -25,12 +25,10 @@
* @test
* @library /test/lib
* @build jdk.test.lib.Utils
- * @bug 8204233 8207846 8208691
+ * @bug 8204233
* @summary Add configurable option for enhanced socket IOException messages
* @run main/othervm
* ExceptionText
- * @run main/othervm
- * ExceptionText
* WITHOUT_Enhanced_Text
* @run main/othervm
* -Djdk.includeInExceptions=
@@ -64,7 +62,6 @@
import java.nio.channels.AsynchronousSocketChannel;
import java.nio.channels.ClosedChannelException;
import java.nio.channels.SocketChannel;
-import java.security.Security;
import java.util.concurrent.ExecutionException;
import jdk.test.lib.Utils;
@@ -73,33 +70,20 @@
enum TestTarget {SOCKET, CHANNEL, ASYNC_CHANNEL};
public static void main(String args[]) throws Exception {
- if (args.length == 0) {
- testSecProp();
+ String passOrFail = args[0];
+ boolean expectEnhancedText;
+ if (passOrFail.equals("expectEnhancedText")) {
+ expectEnhancedText = true;
} else {
- String passOrFail = args[0];
- boolean expectEnhancedText;
- if (passOrFail.equals("expectEnhancedText")) {
- expectEnhancedText = true;
- } else {
- expectEnhancedText = false;
- }
- test(expectEnhancedText);
+ expectEnhancedText = false;
}
+ test(expectEnhancedText);
}
static final InetSocketAddress dest = Utils.refusingEndpoint();
static final String PORT = ":" + Integer.toString(dest.getPort());
static final String HOST = dest.getHostString();
- static void testSecProp() {
- String incInExc = Security.getProperty("jdk.includeInExceptions");
- if (incInExc != null) {
- throw new RuntimeException("Test failed: default value of " +
- "jdk.includeInExceptions security property is not null: " +
- incInExc);
- }
- }
-
static void test(boolean withProperty) {
// Socket
IOException e = getException(TestTarget.SOCKET);
@@ -132,10 +116,11 @@
static IOException getException(TestTarget target) {
try {
if (target == TestTarget.SOCKET) {
- Socket s = new Socket();
- s.connect(dest);
+ try (Socket s = new Socket()) {
+ s.connect(dest);
+ }
} else if (target == TestTarget.CHANNEL) {
- SocketChannel c = SocketChannel.open(dest);
+ SocketChannel.open(dest);
} else if (target == TestTarget.ASYNC_CHANNEL) {
AsynchronousSocketChannel c = AsynchronousSocketChannel.open();
try {
--- a/test/jdk/java/net/httpclient/MaxStreams.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/jdk/java/net/httpclient/MaxStreams.java Tue Jan 29 17:42:58 2019 +0000
@@ -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
@@ -105,6 +105,7 @@
@Test(dataProvider = "uris", timeOut=20000)
void testAsString(String uri) throws Exception {
+ System.err.println("Semaphore acquire");
canStartTestRun.acquire();
latch = new CountDownLatch(1);
handler.setLatch(latch);
@@ -116,16 +117,19 @@
.GET()
.build();
// send warmup to ensure we only have one Http2Connection
+ System.err.println("Sending warmup request");
HttpResponse<String> warmup = client.send(request, BodyHandlers.ofString());
if (warmup.statusCode() != 200 || !warmup.body().equals(RESPONSE))
throw new RuntimeException();
for (int i=0;i<MAX_STREAMS+1; i++) {
+ System.err.println("Sending request " + i);
responses.add(client.sendAsync(request, BodyHandlers.ofString()));
}
// wait until we get local exception before allow server to proceed
try {
+ System.err.println("Waiting for first exception");
CompletableFuture.anyOf(responses.toArray(new CompletableFuture<?>[0])).join();
} catch (Exception ee) {
System.err.println("Expected exception 1 " + ee);
@@ -135,6 +139,7 @@
// check the first MAX_STREAMS requests succeeded
try {
+ System.err.println("Waiting for second exception");
CompletableFuture.allOf(responses.toArray(new CompletableFuture<?>[0])).join();
System.err.println("Did not get Expected exception 2 ");
} catch (Exception ee) {
@@ -161,6 +166,7 @@
throw new RuntimeException(msg);
}
+ System.err.println("Sending last request");
// make sure it succeeds now as number of streams == 0 now
HttpResponse<String> warmdown = client.send(request, BodyHandlers.ofString());
if (warmdown.statusCode() != 200 || !warmdown.body().equals(RESPONSE))
@@ -183,8 +189,8 @@
http2TestServer.start();
https2TestServer = new Http2TestServer("localhost", true, 0, exec, 10, props, ctx);
- https2TestServer.addHandler(handler, "/http2/fixed");
- https2FixedURI = "https://" + https2TestServer.serverAuthority()+ "/http2/fixed";
+ https2TestServer.addHandler(handler, "/https2/fixed");
+ https2FixedURI = "https://" + https2TestServer.serverAuthority()+ "/https2/fixed";
https2TestServer.start();
}
@@ -196,7 +202,7 @@
class Http2FixedHandler implements Http2Handler {
final AtomicInteger counter = new AtomicInteger(0);
- CountDownLatch latch;
+ volatile CountDownLatch latch;
synchronized void setLatch(CountDownLatch latch) {
this.latch = latch;
@@ -218,9 +224,9 @@
// Wait for latch.
try {
// don't send any replies until all requests are sent
- System.err.println("latch await");
+ System.err.println("Latch await");
getLatch().await();
- System.err.println("latch resume");
+ System.err.println("Latch resume");
} catch (InterruptedException ee) {}
}
t.sendResponseHeaders(200, RESPONSE.length());
@@ -230,6 +236,7 @@
// but server should only see MAX_STREAMS + 2 in total. One is rejected by client
// counter c captured before increment so final value is MAX_STREAMS + 1
if (c == MAX_STREAMS + 1) {
+ System.err.println("Semaphore release");
counter.set(0);
canStartTestRun.release();
}
--- a/test/jdk/java/net/httpclient/ProxyServer.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/jdk/java/net/httpclient/ProxyServer.java Tue Jan 29 17:42:58 2019 +0000
@@ -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
@@ -25,6 +25,10 @@
import java.io.*;
import java.util.*;
import java.security.*;
+import java.util.concurrent.CopyOnWriteArrayList;
+import static java.nio.charset.StandardCharsets.UTF_8;
+import static java.util.Arrays.asList;
+import static java.util.stream.Collectors.toList;
/**
* A minimal proxy server that supports CONNECT tunneling. It does not do
@@ -37,6 +41,18 @@
ServerSocket listener;
int port;
volatile boolean debug;
+ private final Credentials credentials; // may be null
+
+ private static class Credentials {
+ private final String name;
+ private final String password;
+ private Credentials(String name, String password) {
+ this.name = name;
+ this.password = password;
+ }
+ public String name() { return name; }
+ public String password() { return password; }
+ }
/**
* Create proxy on port (zero means don't care). Call getPort()
@@ -46,19 +62,43 @@
this(port, false);
}
- public ProxyServer(Integer port, Boolean debug) throws IOException {
+ public ProxyServer(Integer port,
+ Boolean debug,
+ String username,
+ String password)
+ throws IOException
+ {
+ this(port, debug, new Credentials(username, password));
+ }
+
+ public ProxyServer(Integer port,
+ Boolean debug)
+ throws IOException
+ {
+ this(port, debug, null);
+ }
+
+ public ProxyServer(Integer port,
+ Boolean debug,
+ Credentials credentials)
+ throws IOException
+ {
this.debug = debug;
listener = new ServerSocket();
listener.setReuseAddress(false);
listener.bind(new InetSocketAddress(InetAddress.getLoopbackAddress(), port));
this.port = listener.getLocalPort();
+ this.credentials = credentials;
setName("ProxyListener");
setDaemon(true);
- connections = new LinkedList<>();
+ connections = new CopyOnWriteArrayList<Connection>();
start();
}
- public ProxyServer(String s) { }
+ public ProxyServer(String s) {
+ credentials = null;
+ connections = new CopyOnWriteArrayList<Connection>();
+ }
/**
* Returns the port number this proxy is listening on
@@ -72,15 +112,16 @@
* currently open
*/
public void close() throws IOException {
- if (debug) System.out.println("Proxy: closing");
+ if (debug) System.out.println("Proxy: closing server");
done = true;
listener.close();
for (Connection c : connections) {
c.close();
+ c.awaitCompletion();
}
}
- List<Connection> connections;
+ final CopyOnWriteArrayList<Connection> connections;
volatile boolean done;
@@ -99,17 +140,20 @@
}
public void execute() {
+ int id = 0;
try {
- while(!done) {
+ while (!done) {
Socket s = listener.accept();
+ id++;
+ Connection c = new Connection(s, id);
if (debug)
- System.out.println("Client: " + s);
- Connection c = new Connection(s);
+ System.out.println("Proxy: accepted new connection: " + s);
connections.add(c);
+ c.init();
}
} catch(Throwable e) {
if (debug && !done) {
- System.out.println("Fatal error: Listener: " + e);
+ System.out.println("Proxy: Fatal error, listener got " + e);
e.printStackTrace();
}
}
@@ -120,21 +164,20 @@
*/
class Connection {
+ private final int id;
Socket clientSocket, serverSocket;
Thread out, in;
volatile InputStream clientIn, serverIn;
volatile OutputStream clientOut, serverOut;
- boolean forwarding = false;
-
final static int CR = 13;
final static int LF = 10;
- Connection(Socket s) throws IOException {
+ Connection(Socket s, int id) throws IOException {
+ this.id = id;
this.clientSocket= s;
this.clientIn = new BufferedInputStream(s.getInputStream());
this.clientOut = s.getOutputStream();
- init();
}
byte[] readHeaders(InputStream is) throws IOException {
@@ -180,9 +223,21 @@
private volatile boolean closing;
public synchronized void close() throws IOException {
closing = true;
- if (debug) System.out.println("Closing connection (proxy)");
- if (serverSocket != null) serverSocket.close();
- if (clientSocket != null) clientSocket.close();
+ if (debug)
+ System.out.println("Proxy: closing connection {" + this + "}");
+ if (serverSocket != null)
+ serverSocket.close();
+ if (clientSocket != null)
+ clientSocket.close();
+ }
+
+ public void awaitCompletion() {
+ try {
+ if (in != null)
+ in.join();
+ if (out!= null)
+ out.join();
+ } catch (InterruptedException e) { }
}
int findCRLF(byte[] b) {
@@ -194,16 +249,72 @@
return -1;
}
+ // Checks credentials in the request against those allowable by the proxy.
+ private boolean authorized(Credentials credentials,
+ List<String> requestHeaders) {
+ List<String> authorization = requestHeaders.stream()
+ .filter(n -> n.toLowerCase(Locale.US).startsWith("proxy-authorization"))
+ .collect(toList());
+
+ if (authorization.isEmpty())
+ return false;
+
+ if (authorization.size() != 1) {
+ throw new IllegalStateException("Authorization unexpected count:" + authorization);
+ }
+ String value = authorization.get(0).substring("proxy-authorization".length()).trim();
+ if (!value.startsWith(":"))
+ throw new IllegalStateException("Authorization malformed: " + value);
+ value = value.substring(1).trim();
+
+ if (!value.startsWith("Basic "))
+ throw new IllegalStateException("Authorization not Basic: " + value);
+
+ value = value.substring("Basic ".length());
+ String values = new String(Base64.getDecoder().decode(value), UTF_8);
+ int sep = values.indexOf(':');
+ if (sep < 1) {
+ throw new IllegalStateException("Authorization no colon: " + values);
+ }
+ String name = values.substring(0, sep);
+ String password = values.substring(sep + 1);
+
+ if (name.equals(credentials.name()) && password.equals(credentials.password()))
+ return true;
+
+ return false;
+ }
+
public void init() {
try {
- byte[] buf = readHeaders(clientIn);
+ byte[] buf;
+ while (true) {
+ buf = readHeaders(clientIn);
+ if (findCRLF(buf) == -1) {
+ if (debug)
+ System.out.println("Proxy: no CRLF closing, buf contains:["
+ + new String(buf, UTF_8) + "]" );
+ close();
+ return;
+ }
+
+ List<String> headers = asList(new String(buf, UTF_8).split("\r\n"));
+ // check authorization credentials, if required by the server
+ if (credentials != null && !authorized(credentials, headers)) {
+ String resp = "HTTP/1.1 407 Proxy Authentication Required\r\n" +
+ "Content-Length: 0\r\n" +
+ "Proxy-Authenticate: Basic realm=\"proxy realm\"\r\n\r\n";
+
+ clientOut.write(resp.getBytes(UTF_8));
+ } else {
+ break;
+ }
+ }
+
int p = findCRLF(buf);
- if (p == -1) {
- close();
- return;
- }
String cmd = new String(buf, 0, p, "US-ASCII");
String[] params = cmd.split(" ");
+
if (params[0].equals("CONNECT")) {
doTunnel(params[1]);
} else {
@@ -211,7 +322,8 @@
}
} catch (Throwable e) {
if (debug) {
- System.out.println (e);
+ System.out.println("Proxy: " + e);
+ e.printStackTrace();
}
try {close(); } catch (IOException e1) {}
}
@@ -261,7 +373,8 @@
} else {
port = Integer.parseInt(hostport[1]);
}
- if (debug) System.out.printf("Server: (%s/%d)\n", hostport[0], port);
+ if (debug)
+ System.out.printf("Proxy: connecting to (%s/%d)\n", hostport[0], port);
serverSocket = new Socket(hostport[0], port);
serverOut = serverSocket.getOutputStream();
@@ -281,8 +394,9 @@
serverSocket.close();
clientSocket.close();
} catch (IOException e) {
- if (debug) {
- System.out.println (e);
+ if (!closing && debug) {
+ System.out.println("Proxy: " + e);
+ e.printStackTrace();
}
}
});
@@ -297,8 +411,8 @@
serverSocket.close();
clientSocket.close();
} catch (IOException e) {
- if (debug) {
- System.out.println(e);
+ if (!closing && debug) {
+ System.out.println("Proxy: " + e);
e.printStackTrace();
}
}
@@ -318,6 +432,11 @@
clientOut.write("HTTP/1.1 200 OK\r\n\r\n".getBytes());
proxyCommon();
}
+
+ @Override
+ public String toString() {
+ return "Proxy connection " + id + ", client sock:" + clientSocket;
+ }
}
public static void main(String[] args) throws Exception {
--- a/test/jdk/java/net/httpclient/Response204.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/jdk/java/net/httpclient/Response204.java Tue Jan 29 17:42:58 2019 +0000
@@ -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
@@ -55,14 +55,17 @@
logger.addHandler (c);
logger.setLevel (Level.WARNING);
Handler handler = new Handler();
- InetSocketAddress addr = new InetSocketAddress (0);
+ InetSocketAddress addr = new InetSocketAddress (InetAddress.getLoopbackAddress(), 0);
HttpServer server = HttpServer.create (addr, 0);
HttpContext ctx = server.createContext ("/test", handler);
ExecutorService executor = Executors.newCachedThreadPool();
server.setExecutor (executor);
server.start ();
- URI uri = new URI("http://localhost:"+server.getAddress().getPort()+"/test/foo.html");
+ URI uri = new URI("http", null,
+ server.getAddress().getHostString(),
+ server.getAddress().getPort(),
+ "/test/foo.html", null, null);
try {
HttpClient client = HttpClient.newHttpClient();
--- a/test/jdk/java/net/httpclient/UnknownBodyLengthTest.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/jdk/java/net/httpclient/UnknownBodyLengthTest.java Tue Jan 29 17:42:58 2019 +0000
@@ -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
@@ -42,10 +42,14 @@
* @bug 8207966
* @library /test/lib
* @build jdk.test.lib.net.SimpleSSLContext
- * @run main/othervm -Djdk.tls.acknowledgeCloseNotify=true UnknownBodyLengthTest plain false
- * @run main/othervm -Djdk.tls.acknowledgeCloseNotify=true UnknownBodyLengthTest SSL false
- * @run main/othervm -Djdk.tls.acknowledgeCloseNotify=true UnknownBodyLengthTest plain true
- * @run main/othervm -Djdk.tls.acknowledgeCloseNotify=true UnknownBodyLengthTest SSL true
+ * @run main/othervm -Djdk.httpclient.enableAllMethodRetry
+ * -Djdk.tls.acknowledgeCloseNotify=true UnknownBodyLengthTest plain false
+ * @run main/othervm -Djdk.httpclient.enableAllMethodRetry
+ * -Djdk.tls.acknowledgeCloseNotify=true UnknownBodyLengthTest SSL false
+ * @run main/othervm -Djdk.httpclient.enableAllMethodRetry
+ * -Djdk.tls.acknowledgeCloseNotify=true UnknownBodyLengthTest plain true
+ * @run main/othervm -Djdk.httpclient.enableAllMethodRetry
+ * -Djdk.tls.acknowledgeCloseNotify=true UnknownBodyLengthTest SSL true
*/
public class UnknownBodyLengthTest {
@@ -84,46 +88,55 @@
throw new RuntimeException("error at position " + i);
}
+ volatile boolean stopped;
+
void server(final boolean withContentLength) {
fillBuf(BUF);
try {
- Socket s = ss.accept();
- s.setTcpNoDelay(true);
- s.setSoLinger(true, 1);
- System.out.println("Accepted: "+s.getRemoteSocketAddress());
- System.out.println("Accepted: "+s);
- OutputStream os = s.getOutputStream();
- InputStream is = s.getInputStream();
- boolean done = false;
- byte[] buf = new byte[1024];
- String rsp = "";
- while (!done) {
- int c = is.read(buf);
- if (c < 0) break;
- String s1 = new String(buf, 0, c, "ISO-8859-1");
- rsp += s1;
- done = rsp.endsWith("!#!#");
+ while (!stopped) {
+ try (Socket s = ss.accept()) {
+ s.setTcpNoDelay(true);
+ s.setSoLinger(true, 1);
+ System.out.println("Accepted: " + s.getRemoteSocketAddress());
+ System.out.println("Accepted: " + s);
+ OutputStream os = s.getOutputStream();
+ InputStream is = s.getInputStream();
+ boolean done = false;
+ byte[] buf = new byte[1024];
+ String rsp = "";
+ while (!done) {
+ int c = is.read(buf);
+ if (c < 0) break;
+ String s1 = new String(buf, 0, c, "ISO-8859-1");
+ rsp += s1;
+ done = rsp.endsWith("!#!#");
+ }
+ String r = "HTTP/1.0 200 OK\r\nConnection: close\r\nContent-Type:" +
+ " text/xml; charset=UTF-8\r\n";
+ os.write(r.getBytes());
+ String chdr = "Content-Length: " + Integer.toString(BUF.length) +
+ "\r\n";
+ System.out.println(chdr);
+ if (withContentLength)
+ os.write(chdr.getBytes());
+ os.write("\r\n".getBytes());
+ os.write(BUF);
+ if (is.available() > 0)
+ is.read(buf);
+ os.flush();
+ os.close();
+ s.shutdownOutput();
+ } catch(Exception e) {
+ if (!stopped) {
+ System.out.println("Unexpected server exception: " + e);
+ e.printStackTrace();
+ }
+ }
}
- String r = "HTTP/1.0 200 OK\r\nConnection: close\r\nContent-Type:" +
- " text/xml; charset=UTF-8\r\n";
- os.write(r.getBytes());
- String chdr = "Content-Length: " + Integer.toString(BUF.length) +
- "\r\n";
- System.out.println(chdr);
- if(withContentLength)
- os.write(chdr.getBytes());
- os.write("\r\n".getBytes());
- os.write(BUF);
- if (is.available() > 0)
- is.read(buf);
- os.flush();
- os.close();
- s.shutdownOutput();
- s.close();
} catch(final Throwable t) {
- t.printStackTrace();
+ if (!stopped) t.printStackTrace();
} finally {
- try {ss.close(); } catch (Exception e) {}
+ try {stopped = true; ss.close(); } catch (Exception e) {}
}
}
@@ -154,11 +167,20 @@
boolean ssl = args[0].equals("SSL");
boolean fixedlen = args[1].equals("true");
UnknownBodyLengthTest test = new UnknownBodyLengthTest(ssl);
- test.run(ssl, fixedlen);
+ try {
+ test.run(ssl, fixedlen);
+ } finally {
+ test.stop();
+ }
}
public void run(boolean ssl, boolean fixedlen) throws Exception {
new Thread(()->server(fixedlen)).start();
client(ssl);
}
+
+ public void stop() {
+ stopped = true;
+ try { ss.close(); } catch (Throwable t) { }
+ }
}
--- a/test/jdk/java/net/httpclient/examples/JavadocExamples.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/jdk/java/net/httpclient/examples/JavadocExamples.java Tue Jan 29 17:42:58 2019 +0000
@@ -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
@@ -24,6 +24,8 @@
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintStream;
+import java.io.UncheckedIOException;
+import java.lang.reflect.UndeclaredThrowableException;
import java.net.Authenticator;
import java.net.InetSocketAddress;
import java.net.ProxySelector;
@@ -36,6 +38,7 @@
import java.net.http.HttpResponse;
import java.net.http.HttpResponse.BodyHandler;
import java.net.http.HttpResponse.BodyHandlers;
+import java.net.http.HttpResponse.BodySubscriber;
import java.net.http.HttpResponse.BodySubscribers;
import java.nio.file.Path;
import java.nio.file.Paths;
@@ -44,6 +47,7 @@
import java.util.List;
import java.util.concurrent.CopyOnWriteArrayList;
import java.util.concurrent.Flow;
+import java.util.function.Supplier;
import java.util.regex.Pattern;
import static java.nio.charset.StandardCharsets.UTF_8;
@@ -177,6 +181,11 @@
.send(request, responseInfo ->
BodySubscribers.mapping(BodySubscribers.ofString(UTF_8), String::getBytes));
+ // Maps an InputStream to a Foo object.
+ HttpResponse<Supplier<Foo>> response9 = client.send(request,
+ (resp) -> FromMappingSubscriber.asJSON(Foo.class));
+ String resp = response9.body().get().asString();
+
}
/**
@@ -290,4 +299,51 @@
}
}
+ public static class Foo {
+ byte[] bytes;
+ public Foo(byte[] bytes) {
+ this.bytes = bytes;
+ }
+ public String asString() {
+ return new String(bytes, UTF_8);
+ }
+ }
+
+ static class ObjectMapper {
+ <W> W readValue(InputStream is, Class<W> targetType)
+ throws IOException
+ {
+ byte[] bytes = is.readAllBytes();
+ return map(bytes, targetType);
+ }
+
+ static <W> W map(byte[] bytes, Class<W> targetType) {
+ try {
+ return targetType.getConstructor(byte[].class).newInstance(bytes);
+ } catch (RuntimeException | Error x) {
+ throw x;
+ } catch (Exception x) {
+ throw new UndeclaredThrowableException(x);
+ }
+ }
+ }
+
+ static class FromMappingSubscriber {
+ public static <W> BodySubscriber<Supplier<W>> asJSON(Class<W> targetType) {
+ BodySubscriber<InputStream> upstream = BodySubscribers.ofInputStream();
+
+ BodySubscriber<Supplier<W>> downstream = BodySubscribers.mapping(
+ upstream, (InputStream is) -> () -> {
+ try (InputStream stream = is) {
+ ObjectMapper objectMapper = new ObjectMapper();
+ return objectMapper.readValue(stream, targetType);
+ } catch (IOException e) {
+ throw new UncheckedIOException(e);
+ }
+ });
+ return downstream;
+ }
+
+ }
+
}
--- a/test/jdk/java/net/httpclient/websocket/DummyWebSocketServer.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/jdk/java/net/httpclient/websocket/DummyWebSocketServer.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 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
@@ -46,13 +46,14 @@
import java.util.Map;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.atomic.AtomicBoolean;
-import java.util.function.Function;
+import java.util.function.BiFunction;
import java.util.regex.Pattern;
import java.util.stream.Collectors;
import static java.lang.String.format;
import static java.lang.System.err;
import static java.nio.charset.StandardCharsets.ISO_8859_1;
+import static java.nio.charset.StandardCharsets.UTF_8;
import static java.util.Arrays.asList;
import static java.util.Objects.requireNonNull;
@@ -92,12 +93,32 @@
private ByteBuffer read = ByteBuffer.allocate(16384);
private final CountDownLatch readReady = new CountDownLatch(1);
- public DummyWebSocketServer() {
- this(defaultMapping());
+ private static class Credentials {
+ private final String name;
+ private final String password;
+ private Credentials(String name, String password) {
+ this.name = name;
+ this.password = password;
+ }
+ public String name() { return name; }
+ public String password() { return password; }
}
- public DummyWebSocketServer(Function<List<String>, List<String>> mapping) {
+ public DummyWebSocketServer() {
+ this(defaultMapping(), null, null);
+ }
+
+ public DummyWebSocketServer(String username, String password) {
+ this(defaultMapping(), username, password);
+ }
+
+ public DummyWebSocketServer(BiFunction<List<String>,Credentials,List<String>> mapping,
+ String username,
+ String password) {
requireNonNull(mapping);
+ Credentials credentials = username != null ?
+ new Credentials(username, password) : null;
+
thread = new Thread(() -> {
try {
while (!Thread.currentThread().isInterrupted()) {
@@ -107,14 +128,23 @@
try {
channel.setOption(StandardSocketOptions.TCP_NODELAY, true);
channel.configureBlocking(true);
- StringBuilder request = new StringBuilder();
- if (!readRequest(channel, request)) {
- throw new IOException("Bad request:" + request);
+ while (true) {
+ StringBuilder request = new StringBuilder();
+ if (!readRequest(channel, request)) {
+ throw new IOException("Bad request:[" + request + "]");
+ }
+ List<String> strings = asList(request.toString().split("\r\n"));
+ List<String> response = mapping.apply(strings, credentials);
+ writeResponse(channel, response);
+
+ if (response.get(0).startsWith("HTTP/1.1 401")) {
+ err.println("Sent 401 Authentication response " + channel);
+ continue;
+ } else {
+ serve(channel);
+ break;
+ }
}
- List<String> strings = asList(request.toString().split("\r\n"));
- List<String> response = mapping.apply(strings);
- writeResponse(channel, response);
- serve(channel);
} catch (IOException e) {
err.println("Error in connection: " + channel + ", " + e);
} finally {
@@ -125,7 +155,7 @@
}
} catch (ClosedByInterruptException ignored) {
} catch (Exception e) {
- err.println(e);
+ e.printStackTrace(err);
} finally {
close(ssc);
err.println("Stopped at: " + getURI());
@@ -256,8 +286,8 @@
}
}
- private static Function<List<String>, List<String>> defaultMapping() {
- return request -> {
+ private static BiFunction<List<String>,Credentials,List<String>> defaultMapping() {
+ return (request, credentials) -> {
List<String> response = new LinkedList<>();
Iterator<String> iterator = request.iterator();
if (!iterator.hasNext()) {
@@ -309,14 +339,57 @@
sha1.update(x.getBytes(ISO_8859_1));
String v = Base64.getEncoder().encodeToString(sha1.digest());
response.add("Sec-WebSocket-Accept: " + v);
+
+ // check authorization credentials, if required by the server
+ if (credentials != null && !authorized(credentials, requestHeaders)) {
+ response.clear();
+ response.add("HTTP/1.1 401 Unauthorized");
+ response.add("Content-Length: 0");
+ response.add("WWW-Authenticate: Basic realm=\"dummy server realm\"");
+ }
+
return response;
};
}
+ // Checks credentials in the request against those allowable by the server.
+ private static boolean authorized(Credentials credentials,
+ Map<String,List<String>> requestHeaders) {
+ List<String> authorization = requestHeaders.get("Authorization");
+ if (authorization == null)
+ return false;
+
+ if (authorization.size() != 1) {
+ throw new IllegalStateException("Authorization unexpected count:" + authorization);
+ }
+ String header = authorization.get(0);
+ if (!header.startsWith("Basic "))
+ throw new IllegalStateException("Authorization not Basic: " + header);
+
+ header = header.substring("Basic ".length());
+ String values = new String(Base64.getDecoder().decode(header), UTF_8);
+ int sep = values.indexOf(':');
+ if (sep < 1) {
+ throw new IllegalStateException("Authorization not colon: " + values);
+ }
+ String name = values.substring(0, sep);
+ String password = values.substring(sep + 1);
+
+ if (name.equals(credentials.name()) && password.equals(credentials.password()))
+ return true;
+
+ return false;
+ }
+
protected static String expectHeader(Map<String, List<String>> headers,
String name,
String value) {
List<String> v = headers.get(name);
+ if (v == null) {
+ throw new IllegalStateException(
+ format("Expected '%s' header, not present in %s",
+ name, headers));
+ }
if (!v.contains(value)) {
throw new IllegalStateException(
format("Expected '%s: %s', actual: '%s: %s'",
--- a/test/jdk/java/net/httpclient/websocket/Support.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/jdk/java/net/httpclient/websocket/Support.java Tue Jan 29 17:42:58 2019 +0000
@@ -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
@@ -79,16 +79,32 @@
}
public static DummyWebSocketServer serverWithCannedData(int... data) {
+ return serverWithCannedDataAndAuthentication(null, null, data);
+ }
+
+ public static DummyWebSocketServer serverWithCannedDataAndAuthentication(
+ String username,
+ String password,
+ int... data)
+ {
byte[] copy = new byte[data.length];
for (int i = 0; i < data.length; i++) {
copy[i] = (byte) data[i];
}
- return serverWithCannedData(copy);
+ return serverWithCannedDataAndAuthentication(username, password, copy);
}
public static DummyWebSocketServer serverWithCannedData(byte... data) {
+ return serverWithCannedDataAndAuthentication(null, null, data);
+ }
+
+ public static DummyWebSocketServer serverWithCannedDataAndAuthentication(
+ String username,
+ String password,
+ byte... data)
+ {
byte[] copy = Arrays.copyOf(data, data.length);
- return new DummyWebSocketServer() {
+ return new DummyWebSocketServer(username, password) {
@Override
protected void write(SocketChannel ch) throws IOException {
int off = 0; int n = 1; // 1 byte at a time
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/java/net/httpclient/websocket/WebSocketProxyTest.java Tue Jan 29 17:42:58 2019 +0000
@@ -0,0 +1,315 @@
+/*
+ * Copyright (c) 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
+ * 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
+ * @bug 8217429
+ * @summary WebSocket proxy tunneling tests
+ * @compile DummyWebSocketServer.java ../ProxyServer.java
+ * @run testng/othervm
+ * -Djdk.http.auth.tunneling.disabledSchemes=
+ * WebSocketProxyTest
+ */
+
+import java.io.IOException;
+import java.io.UncheckedIOException;
+import java.net.Authenticator;
+import java.net.InetAddress;
+import java.net.InetSocketAddress;
+import java.net.PasswordAuthentication;
+import java.net.ProxySelector;
+import java.net.http.HttpResponse;
+import java.net.http.WebSocket;
+import java.net.http.WebSocketHandshakeException;
+import java.nio.ByteBuffer;
+import java.nio.charset.StandardCharsets;
+import java.util.ArrayList;
+import java.util.Base64;
+import java.util.List;
+import java.util.concurrent.CompletableFuture;
+import java.util.concurrent.CompletionException;
+import java.util.concurrent.CompletionStage;
+import java.util.function.Function;
+import java.util.function.Supplier;
+import java.util.stream.Collectors;
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.DataProvider;
+import org.testng.annotations.Test;
+import static java.net.http.HttpClient.newBuilder;
+import static java.nio.charset.StandardCharsets.UTF_8;
+import static org.testng.Assert.assertEquals;
+import static org.testng.FileAssert.fail;
+
+public class WebSocketProxyTest {
+
+ // Used to verify a proxy/websocket server requiring Authentication
+ private static final String USERNAME = "wally";
+ private static final String PASSWORD = "xyz987";
+
+ static class WSAuthenticator extends Authenticator {
+ @Override
+ protected PasswordAuthentication getPasswordAuthentication() {
+ return new PasswordAuthentication(USERNAME, PASSWORD.toCharArray());
+ }
+ }
+
+ static final Function<int[],DummyWebSocketServer> SERVER_WITH_CANNED_DATA =
+ new Function<>() {
+ @Override public DummyWebSocketServer apply(int[] data) {
+ return Support.serverWithCannedData(data); }
+ @Override public String toString() { return "SERVER_WITH_CANNED_DATA"; }
+ };
+
+ static final Function<int[],DummyWebSocketServer> AUTH_SERVER_WITH_CANNED_DATA =
+ new Function<>() {
+ @Override public DummyWebSocketServer apply(int[] data) {
+ return Support.serverWithCannedDataAndAuthentication(USERNAME, PASSWORD, data); }
+ @Override public String toString() { return "AUTH_SERVER_WITH_CANNED_DATA"; }
+ };
+
+ static final Supplier<ProxyServer> TUNNELING_PROXY_SERVER =
+ new Supplier<>() {
+ @Override public ProxyServer get() {
+ try { return new ProxyServer(0, true);}
+ catch(IOException e) { throw new UncheckedIOException(e); } }
+ @Override public String toString() { return "TUNNELING_PROXY_SERVER"; }
+ };
+ static final Supplier<ProxyServer> AUTH_TUNNELING_PROXY_SERVER =
+ new Supplier<>() {
+ @Override public ProxyServer get() {
+ try { return new ProxyServer(0, true, USERNAME, PASSWORD);}
+ catch(IOException e) { throw new UncheckedIOException(e); } }
+ @Override public String toString() { return "AUTH_TUNNELING_PROXY_SERVER"; }
+ };
+
+ @DataProvider(name = "servers")
+ public Object[][] servers() {
+ return new Object[][] {
+ { SERVER_WITH_CANNED_DATA, TUNNELING_PROXY_SERVER },
+ { SERVER_WITH_CANNED_DATA, AUTH_TUNNELING_PROXY_SERVER },
+ { AUTH_SERVER_WITH_CANNED_DATA, TUNNELING_PROXY_SERVER },
+ };
+ }
+
+ @Test(dataProvider = "servers")
+ public void simpleAggregatingBinaryMessages
+ (Function<int[],DummyWebSocketServer> serverSupplier,
+ Supplier<ProxyServer> proxyServerSupplier)
+ throws IOException
+ {
+ List<byte[]> expected = List.of("hello", "chegar")
+ .stream()
+ .map(s -> s.getBytes(StandardCharsets.US_ASCII))
+ .collect(Collectors.toList());
+ int[] binary = new int[]{
+ 0x82, 0x05, 0x68, 0x65, 0x6C, 0x6C, 0x6F, // hello
+ 0x82, 0x06, 0x63, 0x68, 0x65, 0x67, 0x61, 0x72, // chegar
+ 0x88, 0x00 // <CLOSE>
+ };
+ CompletableFuture<List<byte[]>> actual = new CompletableFuture<>();
+
+ try (var proxyServer = proxyServerSupplier.get();
+ var server = serverSupplier.apply(binary)) {
+
+ InetSocketAddress proxyAddress = new InetSocketAddress(
+ InetAddress.getLoopbackAddress(), proxyServer.getPort());
+ server.open();
+
+ WebSocket.Listener listener = new WebSocket.Listener() {
+
+ List<byte[]> collectedBytes = new ArrayList<>();
+ ByteBuffer buffer = ByteBuffer.allocate(1024);
+
+ @Override
+ public CompletionStage<?> onBinary(WebSocket webSocket,
+ ByteBuffer message,
+ boolean last) {
+ System.out.printf("onBinary(%s, %s)%n", message, last);
+ webSocket.request(1);
+
+ append(message);
+ if (last) {
+ buffer.flip();
+ byte[] bytes = new byte[buffer.remaining()];
+ buffer.get(bytes);
+ buffer.clear();
+ processWholeBinary(bytes);
+ }
+ return null;
+ }
+
+ private void append(ByteBuffer message) {
+ if (buffer.remaining() < message.remaining()) {
+ assert message.remaining() > 0;
+ int cap = (buffer.capacity() + message.remaining()) * 2;
+ ByteBuffer b = ByteBuffer.allocate(cap);
+ b.put(buffer.flip());
+ buffer = b;
+ }
+ buffer.put(message);
+ }
+
+ private void processWholeBinary(byte[] bytes) {
+ String stringBytes = new String(bytes, UTF_8);
+ System.out.println("processWholeBinary: " + stringBytes);
+ collectedBytes.add(bytes);
+ }
+
+ @Override
+ public CompletionStage<?> onClose(WebSocket webSocket,
+ int statusCode,
+ String reason) {
+ actual.complete(collectedBytes);
+ return null;
+ }
+
+ @Override
+ public void onError(WebSocket webSocket, Throwable error) {
+ actual.completeExceptionally(error);
+ }
+ };
+
+ var webSocket = newBuilder()
+ .proxy(ProxySelector.of(proxyAddress))
+ .authenticator(new WSAuthenticator())
+ .build().newWebSocketBuilder()
+ .buildAsync(server.getURI(), listener)
+ .join();
+
+ List<byte[]> a = actual.join();
+ assertEquals(a, expected);
+ }
+ }
+
+ // -- authentication specific tests
+
+ /*
+ * Ensures authentication succeeds when an Authenticator set on client builder.
+ */
+ @Test
+ public void clientAuthenticate() throws IOException {
+ try (var proxyServer = AUTH_TUNNELING_PROXY_SERVER.get();
+ var server = new DummyWebSocketServer()){
+ server.open();
+ InetSocketAddress proxyAddress = new InetSocketAddress(
+ InetAddress.getLoopbackAddress(), proxyServer.getPort());
+
+ var webSocket = newBuilder()
+ .proxy(ProxySelector.of(proxyAddress))
+ .authenticator(new WSAuthenticator())
+ .build()
+ .newWebSocketBuilder()
+ .buildAsync(server.getURI(), new WebSocket.Listener() { })
+ .join();
+ }
+ }
+
+ /*
+ * Ensures authentication succeeds when an `Authorization` header is explicitly set.
+ */
+ @Test
+ public void explicitAuthenticate() throws IOException {
+ try (var proxyServer = AUTH_TUNNELING_PROXY_SERVER.get();
+ var server = new DummyWebSocketServer()) {
+ server.open();
+ InetSocketAddress proxyAddress = new InetSocketAddress(
+ InetAddress.getLoopbackAddress(), proxyServer.getPort());
+
+ String hv = "Basic " + Base64.getEncoder().encodeToString(
+ (USERNAME + ":" + PASSWORD).getBytes(UTF_8));
+
+ var webSocket = newBuilder()
+ .proxy(ProxySelector.of(proxyAddress)).build()
+ .newWebSocketBuilder()
+ .header("Proxy-Authorization", hv)
+ .buildAsync(server.getURI(), new WebSocket.Listener() { })
+ .join();
+ }
+ }
+
+ /*
+ * Ensures authentication does not succeed when no authenticator is present.
+ */
+ @Test
+ public void failNoAuthenticator() throws IOException {
+ try (var proxyServer = AUTH_TUNNELING_PROXY_SERVER.get();
+ var server = new DummyWebSocketServer(USERNAME, PASSWORD)) {
+ server.open();
+ InetSocketAddress proxyAddress = new InetSocketAddress(
+ InetAddress.getLoopbackAddress(), proxyServer.getPort());
+
+ CompletableFuture<WebSocket> cf = newBuilder()
+ .proxy(ProxySelector.of(proxyAddress)).build()
+ .newWebSocketBuilder()
+ .buildAsync(server.getURI(), new WebSocket.Listener() { });
+
+ try {
+ var webSocket = cf.join();
+ fail("Expected exception not thrown");
+ } catch (CompletionException expected) {
+ WebSocketHandshakeException e = (WebSocketHandshakeException)expected.getCause();
+ HttpResponse<?> response = e.getResponse();
+ assertEquals(response.statusCode(), 407);
+ }
+ }
+ }
+
+ /*
+ * Ensures authentication does not succeed when the authenticator presents
+ * unauthorized credentials.
+ */
+ @Test
+ public void failBadCredentials() throws IOException {
+ try (var proxyServer = AUTH_TUNNELING_PROXY_SERVER.get();
+ var server = new DummyWebSocketServer(USERNAME, PASSWORD)) {
+ server.open();
+ InetSocketAddress proxyAddress = new InetSocketAddress(
+ InetAddress.getLoopbackAddress(), proxyServer.getPort());
+
+ Authenticator authenticator = new Authenticator() {
+ @Override protected PasswordAuthentication getPasswordAuthentication() {
+ return new PasswordAuthentication("BAD"+USERNAME, "".toCharArray());
+ }
+ };
+
+ CompletableFuture<WebSocket> cf = newBuilder()
+ .proxy(ProxySelector.of(proxyAddress))
+ .authenticator(authenticator)
+ .build()
+ .newWebSocketBuilder()
+ .buildAsync(server.getURI(), new WebSocket.Listener() { });
+
+ try {
+ var webSocket = cf.join();
+ fail("Expected exception not thrown");
+ } catch (CompletionException expected) {
+ System.out.println("caught expected exception:" + expected);
+ }
+ }
+ }
+
+ @BeforeMethod
+ public void breakBetweenTests() {
+ System.out.println("\n-------\n");
+ }
+}
--- a/test/jdk/java/net/httpclient/websocket/WebSocketTest.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/jdk/java/net/httpclient/websocket/WebSocketTest.java Tue Jan 29 17:42:58 2019 +0000
@@ -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
@@ -23,6 +23,7 @@
/*
* @test
+ * @bug 8217429
* @build DummyWebSocketServer
* @run testng/othervm
* WebSocketTest
@@ -33,23 +34,32 @@
import org.testng.annotations.Test;
import java.io.IOException;
+import java.net.Authenticator;
+import java.net.PasswordAuthentication;
+import java.net.http.HttpResponse;
import java.net.http.WebSocket;
+import java.net.http.WebSocketHandshakeException;
import java.nio.ByteBuffer;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
+import java.util.Base64;
import java.util.List;
import java.util.concurrent.CompletableFuture;
+import java.util.concurrent.CompletionException;
import java.util.concurrent.CompletionStage;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;
+import java.util.function.Function;
import java.util.function.Supplier;
import java.util.stream.Collectors;
import static java.net.http.HttpClient.Builder.NO_PROXY;
import static java.net.http.HttpClient.newBuilder;
import static java.net.http.WebSocket.NORMAL_CLOSURE;
+import static java.nio.charset.StandardCharsets.UTF_8;
import static org.testng.Assert.assertEquals;
import static org.testng.Assert.assertThrows;
+import static org.testng.Assert.fail;
public class WebSocketTest {
@@ -68,8 +78,11 @@
@AfterTest
public void cleanup() {
- server.close();
- webSocket.abort();
+ System.out.println("AFTER TEST");
+ if (server != null)
+ server.close();
+ if (webSocket != null)
+ webSocket.abort();
}
@Test
@@ -134,6 +147,8 @@
assertThrows(IAE, () -> webSocket.request(Long.MIN_VALUE));
assertThrows(IAE, () -> webSocket.request(-1));
assertThrows(IAE, () -> webSocket.request(0));
+
+ server.close();
}
@Test
@@ -149,6 +164,7 @@
// Pings & Pongs are fine
webSocket.sendPing(ByteBuffer.allocate(125)).join();
webSocket.sendPong(ByteBuffer.allocate(125)).join();
+ server.close();
}
@Test
@@ -165,6 +181,7 @@
// Pings & Pongs are fine
webSocket.sendPing(ByteBuffer.allocate(125)).join();
webSocket.sendPong(ByteBuffer.allocate(125)).join();
+ server.close();
}
@Test
@@ -198,6 +215,8 @@
assertFails(IOE, webSocket.sendPong(ByteBuffer.allocate(124)));
assertFails(IOE, webSocket.sendPong(ByteBuffer.allocate(1)));
assertFails(IOE, webSocket.sendPong(ByteBuffer.allocate(0)));
+
+ server.close();
}
@DataProvider(name = "sequence")
@@ -318,6 +337,8 @@
listener.invocations();
violation.complete(null); // won't affect if completed exceptionally
violation.join();
+
+ server.close();
}
@Test
@@ -372,10 +393,48 @@
assertFails(IOE, webSocket.sendPong(ByteBuffer.allocate(124)));
assertFails(IOE, webSocket.sendPong(ByteBuffer.allocate(1)));
assertFails(IOE, webSocket.sendPong(ByteBuffer.allocate(0)));
+
+ server.close();
+ }
+
+ // Used to verify a server requiring Authentication
+ private static final String USERNAME = "chegar";
+ private static final String PASSWORD = "a1b2c3";
+
+ static class WSAuthenticator extends Authenticator {
+ @Override
+ protected PasswordAuthentication getPasswordAuthentication() {
+ return new PasswordAuthentication(USERNAME, PASSWORD.toCharArray());
+ }
}
- @Test
- public void simpleAggregatingBinaryMessages() throws IOException {
+ static final Function<int[],DummyWebSocketServer> SERVER_WITH_CANNED_DATA =
+ new Function<>() {
+ @Override public DummyWebSocketServer apply(int[] data) {
+ return Support.serverWithCannedData(data); }
+ @Override public String toString() { return "SERVER_WITH_CANNED_DATA"; }
+ };
+
+ static final Function<int[],DummyWebSocketServer> AUTH_SERVER_WITH_CANNED_DATA =
+ new Function<>() {
+ @Override public DummyWebSocketServer apply(int[] data) {
+ return Support.serverWithCannedDataAndAuthentication(USERNAME, PASSWORD, data); }
+ @Override public String toString() { return "AUTH_SERVER_WITH_CANNED_DATA"; }
+ };
+
+ @DataProvider(name = "servers")
+ public Object[][] servers() {
+ return new Object[][] {
+ { SERVER_WITH_CANNED_DATA },
+ { AUTH_SERVER_WITH_CANNED_DATA },
+ };
+ }
+
+ @Test(dataProvider = "servers")
+ public void simpleAggregatingBinaryMessages
+ (Function<int[],DummyWebSocketServer> serverSupplier)
+ throws IOException
+ {
List<byte[]> expected = List.of("alpha", "beta", "gamma", "delta")
.stream()
.map(s -> s.getBytes(StandardCharsets.US_ASCII))
@@ -399,7 +458,7 @@
};
CompletableFuture<List<byte[]>> actual = new CompletableFuture<>();
- server = Support.serverWithCannedData(binary);
+ server = serverSupplier.apply(binary);
server.open();
WebSocket.Listener listener = new WebSocket.Listener() {
@@ -437,7 +496,7 @@
}
private void processWholeBinary(byte[] bytes) {
- String stringBytes = new String(bytes, StandardCharsets.UTF_8);
+ String stringBytes = new String(bytes, UTF_8);
System.out.println("processWholeBinary: " + stringBytes);
collectedBytes.add(bytes);
}
@@ -456,17 +515,24 @@
}
};
- webSocket = newBuilder().proxy(NO_PROXY).build().newWebSocketBuilder()
+ webSocket = newBuilder()
+ .proxy(NO_PROXY)
+ .authenticator(new WSAuthenticator())
+ .build().newWebSocketBuilder()
.buildAsync(server.getURI(), listener)
.join();
List<byte[]> a = actual.join();
assertEquals(a, expected);
+
+ server.close();
}
- @Test
- public void simpleAggregatingTextMessages() throws IOException {
-
+ @Test(dataProvider = "servers")
+ public void simpleAggregatingTextMessages
+ (Function<int[],DummyWebSocketServer> serverSupplier)
+ throws IOException
+ {
List<String> expected = List.of("alpha", "beta", "gamma", "delta");
int[] binary = new int[]{
@@ -488,7 +554,7 @@
};
CompletableFuture<List<String>> actual = new CompletableFuture<>();
- server = Support.serverWithCannedData(binary);
+ server = serverSupplier.apply(binary);
server.open();
WebSocket.Listener listener = new WebSocket.Listener() {
@@ -530,21 +596,28 @@
}
};
- webSocket = newBuilder().proxy(NO_PROXY).build().newWebSocketBuilder()
+ webSocket = newBuilder()
+ .proxy(NO_PROXY)
+ .authenticator(new WSAuthenticator())
+ .build().newWebSocketBuilder()
.buildAsync(server.getURI(), listener)
.join();
List<String> a = actual.join();
assertEquals(a, expected);
+
+ server.close();
}
/*
* Exercises the scenario where requests for more messages are made prior to
* completing the returned CompletionStage instances.
*/
- @Test
- public void aggregatingTextMessages() throws IOException {
-
+ @Test(dataProvider = "servers")
+ public void aggregatingTextMessages
+ (Function<int[],DummyWebSocketServer> serverSupplier)
+ throws IOException
+ {
List<String> expected = List.of("alpha", "beta", "gamma", "delta");
int[] binary = new int[]{
@@ -566,8 +639,7 @@
};
CompletableFuture<List<String>> actual = new CompletableFuture<>();
-
- server = Support.serverWithCannedData(binary);
+ server = serverSupplier.apply(binary);
server.open();
WebSocket.Listener listener = new WebSocket.Listener() {
@@ -623,11 +695,111 @@
}
};
- webSocket = newBuilder().proxy(NO_PROXY).build().newWebSocketBuilder()
+ webSocket = newBuilder()
+ .proxy(NO_PROXY)
+ .authenticator(new WSAuthenticator())
+ .build().newWebSocketBuilder()
.buildAsync(server.getURI(), listener)
.join();
List<String> a = actual.join();
assertEquals(a, expected);
+
+ server.close();
+ }
+
+ // -- authentication specific tests
+
+ /*
+ * Ensures authentication succeeds when an Authenticator set on client builder.
+ */
+ @Test
+ public void clientAuthenticate() throws IOException {
+ try (var server = new DummyWebSocketServer(USERNAME, PASSWORD)){
+ server.open();
+
+ var webSocket = newBuilder()
+ .proxy(NO_PROXY)
+ .authenticator(new WSAuthenticator())
+ .build()
+ .newWebSocketBuilder()
+ .buildAsync(server.getURI(), new WebSocket.Listener() { })
+ .join();
+ }
+ }
+
+ /*
+ * Ensures authentication succeeds when an `Authorization` header is explicitly set.
+ */
+ @Test
+ public void explicitAuthenticate() throws IOException {
+ try (var server = new DummyWebSocketServer(USERNAME, PASSWORD)) {
+ server.open();
+
+ String hv = "Basic " + Base64.getEncoder().encodeToString(
+ (USERNAME + ":" + PASSWORD).getBytes(UTF_8));
+
+ var webSocket = newBuilder()
+ .proxy(NO_PROXY).build()
+ .newWebSocketBuilder()
+ .header("Authorization", hv)
+ .buildAsync(server.getURI(), new WebSocket.Listener() { })
+ .join();
+ }
+ }
+
+ /*
+ * Ensures authentication does not succeed when no authenticator is present.
+ */
+ @Test
+ public void failNoAuthenticator() throws IOException {
+ try (var server = new DummyWebSocketServer(USERNAME, PASSWORD)) {
+ server.open();
+
+ CompletableFuture<WebSocket> cf = newBuilder()
+ .proxy(NO_PROXY).build()
+ .newWebSocketBuilder()
+ .buildAsync(server.getURI(), new WebSocket.Listener() { });
+
+ try {
+ var webSocket = cf.join();
+ fail("Expected exception not thrown");
+ } catch (CompletionException expected) {
+ WebSocketHandshakeException e = (WebSocketHandshakeException)expected.getCause();
+ HttpResponse<?> response = e.getResponse();
+ assertEquals(response.statusCode(), 401);
+ }
+ }
+ }
+
+ /*
+ * Ensures authentication does not succeed when the authenticator presents
+ * unauthorized credentials.
+ */
+ @Test
+ public void failBadCredentials() throws IOException {
+ try (var server = new DummyWebSocketServer(USERNAME, PASSWORD)) {
+ server.open();
+
+ Authenticator authenticator = new Authenticator() {
+ @Override protected PasswordAuthentication getPasswordAuthentication() {
+ return new PasswordAuthentication("BAD"+USERNAME, "".toCharArray());
+ }
+ };
+
+ CompletableFuture<WebSocket> cf = newBuilder()
+ .proxy(NO_PROXY)
+ .authenticator(authenticator)
+ .build()
+ .newWebSocketBuilder()
+ .buildAsync(server.getURI(), new WebSocket.Listener() { });
+
+ try {
+ var webSocket = cf.join();
+ fail("Expected exception not thrown");
+ } catch (CompletionException expected) {
+ System.out.println("caught expected exception:" + expected);
+ }
+ }
}
}
--- a/test/jdk/java/util/Calendar/JapaneseEraNameTest.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/jdk/java/util/Calendar/JapaneseEraNameTest.java Tue Jan 29 17:42:58 2019 +0000
@@ -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
@@ -23,7 +23,7 @@
/*
* @test
- * @bug 8202088 8207152
+ * @bug 8202088 8207152 8217609
* @summary Test the localized Japanese new era name (May 1st. 2019-)
* is retrieved no matter CLDR provider contains the name or not.
* @modules jdk.localedata
@@ -53,8 +53,8 @@
// type, locale, name
{ LONG, JAPAN, "\u5143\u53f7" }, // NewEra
{ LONG, US, "NewEra" },
- { SHORT, JAPAN, "N" },
- { SHORT, US, "N" },
+ { SHORT, JAPAN, "\u5143\u53f7" },
+ { SHORT, US, "NewEra" },
};
}
--- a/test/jdk/java/util/logging/LogManager/Configuration/updateConfiguration/HandlersOnComplexResetUpdate.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/jdk/java/util/logging/LogManager/Configuration/updateConfiguration/HandlersOnComplexResetUpdate.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 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
@@ -80,6 +80,14 @@
}
}
+ public static final double TIMEOUT_FACTOR;
+ static {
+ String toFactor = System.getProperty("test.timeout.factor", "1.0");
+ TIMEOUT_FACTOR = Double.parseDouble(toFactor);
+ }
+ static int adjustCount(int count) {
+ return (int) Math.ceil(TIMEOUT_FACTOR * count);
+ }
private static final String PREFIX =
"FileHandler-" + UUID.randomUUID() + ".log";
@@ -213,11 +221,11 @@
+ barChild.getParent() +"\n\texpected: " + barRef.get());
}
Reference<? extends Logger> ref2;
- int max = 3;
+ int max = adjustCount(3);
barChild = null;
while ((ref2 = queue.poll()) == null) {
System.gc();
- Thread.sleep(100);
+ Thread.sleep(1000);
if (--max == 0) break;
}
@@ -328,21 +336,25 @@
throw new RuntimeException(x);
}
});
- fooChild = null;
- System.out.println("Setting fooChild to: " + fooChild);
- while ((ref2 = queue.poll()) == null) {
- System.gc();
- Thread.sleep(1000);
- }
- if (ref2 != fooRef) {
- throw new RuntimeException("Unexpected reference: "
- + ref2 +"\n\texpected: " + fooRef);
- }
- if (ref2.get() != null) {
- throw new RuntimeException("Referent not cleared: " + ref2.get());
- }
- System.out.println("Got fooRef after reset(), fooChild is " + fooChild);
-
+ try {
+ fooChild = null;
+ System.out.println("Setting fooChild to: " + fooChild);
+ while ((ref2 = queue.poll()) == null) {
+ System.gc();
+ Thread.sleep(1000);
+ }
+ if (ref2 != fooRef) {
+ throw new RuntimeException("Unexpected reference: "
+ + ref2 +"\n\texpected: " + fooRef);
+ }
+ if (ref2.get() != null) {
+ throw new RuntimeException("Referent not cleared: " + ref2.get());
+ }
+ System.out.println("Got fooRef after reset(), fooChild is " + fooChild);
+ } catch(Throwable t) {
+ if (failed != null) t.addSuppressed(failed);
+ throw t;
+ }
}
if (failed != null) {
// should rarely happen...
--- a/test/jdk/java/util/logging/LogManager/Configuration/updateConfiguration/HandlersOnComplexUpdate.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/jdk/java/util/logging/LogManager/Configuration/updateConfiguration/HandlersOnComplexUpdate.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 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
@@ -80,6 +80,14 @@
}
}
+ public static final double TIMEOUT_FACTOR;
+ static {
+ String toFactor = System.getProperty("test.timeout.factor", "1.0");
+ TIMEOUT_FACTOR = Double.parseDouble(toFactor);
+ }
+ static int adjustCount(int count) {
+ return (int) Math.ceil(TIMEOUT_FACTOR * count);
+ }
private static final String PREFIX =
"FileHandler-" + UUID.randomUUID() + ".log";
@@ -213,11 +221,11 @@
+ barChild.getParent() +"\n\texpected: " + barRef.get());
}
Reference<? extends Logger> ref2;
- int max = 3;
+ int max = adjustCount(3);
barChild = null;
while ((ref2 = queue.poll()) == null) {
System.gc();
- Thread.sleep(100);
+ Thread.sleep(1000);
if (--max == 0) break;
}
@@ -316,21 +324,25 @@
throw new RuntimeException(x);
}
});
- fooChild = null;
- System.out.println("Setting fooChild to: " + fooChild);
- while ((ref2 = queue.poll()) == null) {
- System.gc();
- Thread.sleep(1000);
- }
- if (ref2 != fooRef) {
- throw new RuntimeException("Unexpected reference: "
- + ref2 +"\n\texpected: " + fooRef);
- }
- if (ref2.get() != null) {
- throw new RuntimeException("Referent not cleared: " + ref2.get());
- }
- System.out.println("Got fooRef after reset(), fooChild is " + fooChild);
-
+ try {
+ fooChild = null;
+ System.out.println("Setting fooChild to: " + fooChild);
+ while ((ref2 = queue.poll()) == null) {
+ System.gc();
+ Thread.sleep(1000);
+ }
+ if (ref2 != fooRef) {
+ throw new RuntimeException("Unexpected reference: "
+ + ref2 +"\n\texpected: " + fooRef);
+ }
+ if (ref2.get() != null) {
+ throw new RuntimeException("Referent not cleared: " + ref2.get());
+ }
+ System.out.println("Got fooRef after reset(), fooChild is " + fooChild);
+ } catch (Throwable t) {
+ if (failed != null) t.addSuppressed(failed);
+ throw t;
+ }
}
if (failed != null) {
// should rarely happen...
--- a/test/jdk/java/util/prefs/ExportSubtree.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/jdk/java/util/prefs/ExportSubtree.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 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
@@ -21,76 +21,74 @@
* questions.
*/
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.util.prefs.Preferences;
-/* @test
- * @bug 6203576 4700020 7197662
+/**
+ * @test
+ * @bug 6203576 4700020 7197662 8217777
* @summary checks if the output of exportSubtree() is identical to
* the output from previous release.
* @run main/othervm -Djava.util.prefs.userRoot=. ExportSubtree
*/
-
-import java.io.*;
-import java.util.prefs.*;
+public class ExportSubtree {
+ private static final String LS = System.getProperty("line.separator");
-public class ExportSubtree {
- public static void main(String[] args) throws Exception {
- try
- {
- //File f = new File(System.getProperty("test.src", "."), "TestPrefs.xml");
- ByteArrayInputStream bais = new ByteArrayInputStream(importPrefs.getBytes("utf-8"));
- Preferences.importPreferences(bais);
- ByteArrayOutputStream baos = new ByteArrayOutputStream();
- Preferences.userRoot().node("testExportSubtree").exportSubtree(baos);
- Preferences.userRoot().node("testExportSubtree").removeNode();
- if (!expectedResult.equals(baos.toString())) {
- //System.out.print(baos.toString());
- //System.out.print(expectedResult);
- throw new IOException("exportSubtree does not output expected result");
- }
- }
- catch( Exception e ) {
- e.printStackTrace();
- }
- }
+ private static final String IMPORT_PREFS =
+ "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" +
+ "<!DOCTYPE preferences SYSTEM \"http://java.sun.com/dtd/preferences.dtd\">" +
+ "<preferences EXTERNAL_XML_VERSION=\"1.0\">" +
+ " <root type=\"user\">" +
+ " <map>" +
+ " <entry key=\"key1\" value=\"value1\"/>" +
+ " </map>" +
+ " <node name=\"testExportSubtree\">" +
+ " <map>" +
+ " <entry key=\"key2\" value=\"value2\"/>" +
+ " </map>" +
+ " <node name=\"test\">" +
+ " <map>" +
+ " <entry key=\"key3\" value=\"value3\"/>" +
+ " </map>" +
+ " </node>" +
+ " </node>" +
+ " </root>" +
+ "</preferences>";
- static String ls = System.getProperty("line.separator");
- static String importPrefs =
- "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
- + "<!DOCTYPE preferences SYSTEM \"http://java.sun.com/dtd/preferences.dtd\">"
- + "<preferences EXTERNAL_XML_VERSION=\"1.0\">"
- + " <root type=\"user\">"
- + " <map>"
- + " <entry key=\"key1\" value=\"value1\"/>"
- + " </map>"
- + " <node name=\"testExportSubtree\">"
- + " <map>"
- + " <entry key=\"key2\" value=\"value2\"/>"
- + " </map>"
- + " <node name=\"test\">"
- + " <map>"
- + " <entry key=\"key3\" value=\"value3\"/>"
- + " </map>"
- + " </node>"
- + " </node>"
- + " </root>"
- + "</preferences>";
+ private static final String EXPECTED_RESULT =
+ "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>" + LS +
+ "<!DOCTYPE preferences SYSTEM \"http://java.sun.com/dtd/preferences.dtd\">" + LS +
+ "<preferences EXTERNAL_XML_VERSION=\"1.0\">" + LS +
+ " <root type=\"user\">" + LS +
+ " <map/>" + LS +
+ " <node name=\"testExportSubtree\">" + LS +
+ " <map>" + LS +
+ " <entry key=\"key2\" value=\"value2\"/>" + LS +
+ " </map>" + LS +
+ " <node name=\"test\">" + LS +
+ " <map>" + LS +
+ " <entry key=\"key3\" value=\"value3\"/>" + LS +
+ " </map>" + LS +
+ " </node>" + LS +
+ " </node>" + LS +
+ " </root>" + LS +
+ "</preferences>" + LS;
- static String expectedResult =
- "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
- + ls + "<!DOCTYPE preferences SYSTEM \"http://java.sun.com/dtd/preferences.dtd\">"
- + ls + "<preferences EXTERNAL_XML_VERSION=\"1.0\">"
- + ls + " <root type=\"user\">"
- + ls + " <map/>"
- + ls + " <node name=\"testExportSubtree\">"
- + ls + " <map>"
- + ls + " <entry key=\"key2\" value=\"value2\"/>"
- + ls + " </map>"
- + ls + " <node name=\"test\">"
- + ls + " <map>"
- + ls + " <entry key=\"key3\" value=\"value3\"/>"
- + ls + " </map>"
- + ls + " </node>"
- + ls + " </node>"
- + ls + " </root>"
- + ls + "</preferences>" + ls;
+ public static void main(String[] args) throws Exception {
+ ByteArrayInputStream bais = new ByteArrayInputStream(IMPORT_PREFS.getBytes("utf-8"));
+ Preferences.importPreferences(bais);
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
+ Preferences.userRoot().node("testExportSubtree").exportSubtree(baos);
+ Preferences.userRoot().node("testExportSubtree").removeNode();
+ if (!EXPECTED_RESULT.equals(baos.toString())) {
+ String errMsg = "Preferences::exportSubtree did not yield the expected result.";
+ System.out.println(errMsg + LS +
+ "Actual:" + LS +
+ baos + LS +
+ "Expected:" + LS +
+ EXPECTED_RESULT);
+ throw new RuntimeException(errMsg);
+ }
+ }
}
--- a/test/jdk/javax/net/ssl/sanity/ciphersuites/CheckCipherSuites.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/jdk/javax/net/ssl/sanity/ciphersuites/CheckCipherSuites.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 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
@@ -23,221 +23,180 @@
/*
* @test
- * @bug 4750141 4895631
+ * @bug 4750141 4895631 8217579
* @summary Check enabled and supported ciphersuites are correct
- * @ignore JSSE supported cipher suites are changed with CR 6916074,
- * need to update this test case in JDK 7 soon
+ * @run main CheckCipherSuites default
+ * @run main/othervm CheckCipherSuites limited
*/
import java.util.*;
-
+import java.security.Security;
import javax.net.ssl.*;
-import javax.crypto.Cipher;
-import javax.crypto.spec.*;
-
public class CheckCipherSuites {
+ // List of enabled cipher suites when the "crypto.policy" security
+ // property is set to "unlimited" (the default value).
private final static String[] ENABLED_DEFAULT = {
- "SSL_RSA_WITH_RC4_128_MD5",
- "SSL_RSA_WITH_RC4_128_SHA",
+ "TLS_AES_128_GCM_SHA256",
+ "TLS_AES_256_GCM_SHA384",
+ "TLS_CHACHA20_POLY1305_SHA256",
+ "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384",
+ "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256",
+ "TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256",
+ "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384",
+ "TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256",
+ "TLS_RSA_WITH_AES_256_GCM_SHA384",
+ "TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384",
+ "TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384",
+ "TLS_DHE_RSA_WITH_AES_256_GCM_SHA384",
+ "TLS_DHE_RSA_WITH_CHACHA20_POLY1305_SHA256",
+ "TLS_DHE_DSS_WITH_AES_256_GCM_SHA384",
+ "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256",
+ "TLS_RSA_WITH_AES_128_GCM_SHA256",
+ "TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256",
+ "TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256",
+ "TLS_DHE_RSA_WITH_AES_128_GCM_SHA256",
+ "TLS_DHE_DSS_WITH_AES_128_GCM_SHA256",
+ "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384",
+ "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384",
+ "TLS_RSA_WITH_AES_256_CBC_SHA256",
+ "TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384",
+ "TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384",
+ "TLS_DHE_RSA_WITH_AES_256_CBC_SHA256",
+ "TLS_DHE_DSS_WITH_AES_256_CBC_SHA256",
+ "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA",
+ "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA",
+ "TLS_RSA_WITH_AES_256_CBC_SHA",
+ "TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA",
+ "TLS_ECDH_RSA_WITH_AES_256_CBC_SHA",
+ "TLS_DHE_RSA_WITH_AES_256_CBC_SHA",
+ "TLS_DHE_DSS_WITH_AES_256_CBC_SHA",
+ "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256",
+ "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256",
+ "TLS_RSA_WITH_AES_128_CBC_SHA256",
+ "TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256",
+ "TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256",
+ "TLS_DHE_RSA_WITH_AES_128_CBC_SHA256",
+ "TLS_DHE_DSS_WITH_AES_128_CBC_SHA256",
+ "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA",
+ "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA",
"TLS_RSA_WITH_AES_128_CBC_SHA",
- "TLS_ECDH_ECDSA_WITH_RC4_128_SHA",
"TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA",
- "TLS_ECDH_RSA_WITH_RC4_128_SHA",
"TLS_ECDH_RSA_WITH_AES_128_CBC_SHA",
- "TLS_ECDHE_ECDSA_WITH_RC4_128_SHA",
- "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA",
- "TLS_ECDHE_RSA_WITH_RC4_128_SHA",
- "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA",
"TLS_DHE_RSA_WITH_AES_128_CBC_SHA",
"TLS_DHE_DSS_WITH_AES_128_CBC_SHA",
- "SSL_RSA_WITH_3DES_EDE_CBC_SHA",
- "TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA",
- "TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA",
- "TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA",
- "TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA",
- "SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA",
- "SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA",
- "SSL_RSA_WITH_DES_CBC_SHA",
- "SSL_DHE_RSA_WITH_DES_CBC_SHA",
- "SSL_DHE_DSS_WITH_DES_CBC_SHA",
- "SSL_RSA_EXPORT_WITH_RC4_40_MD5",
- "SSL_RSA_EXPORT_WITH_DES40_CBC_SHA",
- "SSL_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA",
- "SSL_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA",
- "TLS_EMPTY_RENEGOTIATION_INFO_SCSV",
-
+ "TLS_EMPTY_RENEGOTIATION_INFO_SCSV"
};
- private final static String[] ENABLED_UNLIMITED = {
- "SSL_RSA_WITH_RC4_128_MD5",
- "SSL_RSA_WITH_RC4_128_SHA",
- "TLS_RSA_WITH_AES_128_CBC_SHA",
- "TLS_RSA_WITH_AES_256_CBC_SHA",
- "TLS_ECDH_ECDSA_WITH_RC4_128_SHA",
- "TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA",
- "TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA",
- "TLS_ECDH_RSA_WITH_RC4_128_SHA",
- "TLS_ECDH_RSA_WITH_AES_128_CBC_SHA",
- "TLS_ECDH_RSA_WITH_AES_256_CBC_SHA",
- "TLS_ECDHE_ECDSA_WITH_RC4_128_SHA",
+ // List of enabled cipher suites when the "crypto.policy" security
+ // property is set to "limited".
+ private final static String[] ENABLED_LIMITED = {
+ "TLS_AES_128_GCM_SHA256",
+ "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256",
+ "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256",
+ "TLS_RSA_WITH_AES_128_GCM_SHA256",
+ "TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256",
+ "TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256",
+ "TLS_DHE_RSA_WITH_AES_128_GCM_SHA256",
+ "TLS_DHE_DSS_WITH_AES_128_GCM_SHA256",
+ "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256",
+ "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256",
+ "TLS_RSA_WITH_AES_128_CBC_SHA256",
+ "TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256",
+ "TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256",
+ "TLS_DHE_RSA_WITH_AES_128_CBC_SHA256",
+ "TLS_DHE_DSS_WITH_AES_128_CBC_SHA256",
"TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA",
- "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA",
- "TLS_ECDHE_RSA_WITH_RC4_128_SHA",
"TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA",
- "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA",
- "TLS_DHE_RSA_WITH_AES_128_CBC_SHA",
- "TLS_DHE_RSA_WITH_AES_256_CBC_SHA",
- "TLS_DHE_DSS_WITH_AES_128_CBC_SHA",
- "TLS_DHE_DSS_WITH_AES_256_CBC_SHA",
- "SSL_RSA_WITH_3DES_EDE_CBC_SHA",
- "TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA",
- "TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA",
- "TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA",
- "TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA",
- "SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA",
- "SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA",
- "SSL_RSA_WITH_DES_CBC_SHA",
- "SSL_DHE_RSA_WITH_DES_CBC_SHA",
- "SSL_DHE_DSS_WITH_DES_CBC_SHA",
- "SSL_RSA_EXPORT_WITH_RC4_40_MD5",
- "SSL_RSA_EXPORT_WITH_DES40_CBC_SHA",
- "SSL_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA",
- "SSL_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA",
- "TLS_EMPTY_RENEGOTIATION_INFO_SCSV",
-
- };
-
- // supported ciphersuites using default JCE policy jurisdiction files
- // AES/256 unavailable
- private final static String[] SUPPORTED_DEFAULT = {
- "SSL_RSA_WITH_RC4_128_MD5",
- "SSL_RSA_WITH_RC4_128_SHA",
"TLS_RSA_WITH_AES_128_CBC_SHA",
- "TLS_ECDH_ECDSA_WITH_RC4_128_SHA",
"TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA",
- "TLS_ECDH_RSA_WITH_RC4_128_SHA",
"TLS_ECDH_RSA_WITH_AES_128_CBC_SHA",
- "TLS_ECDHE_ECDSA_WITH_RC4_128_SHA",
- "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA",
- "TLS_ECDHE_RSA_WITH_RC4_128_SHA",
- "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA",
"TLS_DHE_RSA_WITH_AES_128_CBC_SHA",
"TLS_DHE_DSS_WITH_AES_128_CBC_SHA",
- "SSL_RSA_WITH_3DES_EDE_CBC_SHA",
- "TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA",
- "TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA",
- "TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA",
- "TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA",
- "SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA",
- "SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA",
- "SSL_RSA_WITH_DES_CBC_SHA",
- "SSL_DHE_RSA_WITH_DES_CBC_SHA",
- "SSL_DHE_DSS_WITH_DES_CBC_SHA",
- "SSL_RSA_EXPORT_WITH_RC4_40_MD5",
- "SSL_RSA_EXPORT_WITH_DES40_CBC_SHA",
- "SSL_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA",
- "SSL_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA",
- "TLS_EMPTY_RENEGOTIATION_INFO_SCSV",
-
- "SSL_RSA_WITH_NULL_MD5",
- "SSL_RSA_WITH_NULL_SHA",
- "TLS_ECDH_ECDSA_WITH_NULL_SHA",
- "TLS_ECDH_RSA_WITH_NULL_SHA",
- "TLS_ECDHE_ECDSA_WITH_NULL_SHA",
- "TLS_ECDHE_RSA_WITH_NULL_SHA",
- "SSL_DH_anon_WITH_RC4_128_MD5",
- "TLS_DH_anon_WITH_AES_128_CBC_SHA",
- "SSL_DH_anon_WITH_3DES_EDE_CBC_SHA",
- "SSL_DH_anon_WITH_DES_CBC_SHA",
- "TLS_ECDH_anon_WITH_RC4_128_SHA",
- "TLS_ECDH_anon_WITH_AES_128_CBC_SHA",
- "TLS_ECDH_anon_WITH_3DES_EDE_CBC_SHA",
- "SSL_DH_anon_EXPORT_WITH_RC4_40_MD5",
- "SSL_DH_anon_EXPORT_WITH_DES40_CBC_SHA",
- "TLS_ECDH_anon_WITH_NULL_SHA",
- "TLS_KRB5_WITH_RC4_128_SHA",
- "TLS_KRB5_WITH_RC4_128_MD5",
- "TLS_KRB5_WITH_3DES_EDE_CBC_SHA",
- "TLS_KRB5_WITH_3DES_EDE_CBC_MD5",
- "TLS_KRB5_WITH_DES_CBC_SHA",
- "TLS_KRB5_WITH_DES_CBC_MD5",
- "TLS_KRB5_EXPORT_WITH_RC4_40_SHA",
- "TLS_KRB5_EXPORT_WITH_RC4_40_MD5",
- "TLS_KRB5_EXPORT_WITH_DES_CBC_40_SHA",
- "TLS_KRB5_EXPORT_WITH_DES_CBC_40_MD5",
-
+ "TLS_EMPTY_RENEGOTIATION_INFO_SCSV"
};
- // supported ciphersuites using unlimited JCE policy jurisdiction files
- // AES/256 available
- private final static String[] SUPPORTED_UNLIMITED = {
- "SSL_RSA_WITH_RC4_128_MD5",
- "SSL_RSA_WITH_RC4_128_SHA",
- "TLS_RSA_WITH_AES_128_CBC_SHA",
+ // List of enabled cipher suites when the "crypto.policy" security
+ // property is set to "unlimited" (the default value).
+ private final static String[] SUPPORTED_DEFAULT = {
+ "TLS_AES_128_GCM_SHA256",
+ "TLS_AES_256_GCM_SHA384",
+ "TLS_CHACHA20_POLY1305_SHA256",
+ "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384",
+ "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256",
+ "TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256",
+ "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384",
+ "TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256",
+ "TLS_RSA_WITH_AES_256_GCM_SHA384",
+ "TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384",
+ "TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384",
+ "TLS_DHE_RSA_WITH_AES_256_GCM_SHA384",
+ "TLS_DHE_RSA_WITH_CHACHA20_POLY1305_SHA256",
+ "TLS_DHE_DSS_WITH_AES_256_GCM_SHA384",
+ "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256",
+ "TLS_RSA_WITH_AES_128_GCM_SHA256",
+ "TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256",
+ "TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256",
+ "TLS_DHE_RSA_WITH_AES_128_GCM_SHA256",
+ "TLS_DHE_DSS_WITH_AES_128_GCM_SHA256",
+ "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384",
+ "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384",
+ "TLS_RSA_WITH_AES_256_CBC_SHA256",
+ "TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384",
+ "TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384",
+ "TLS_DHE_RSA_WITH_AES_256_CBC_SHA256",
+ "TLS_DHE_DSS_WITH_AES_256_CBC_SHA256",
+ "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA",
+ "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA",
"TLS_RSA_WITH_AES_256_CBC_SHA",
- "TLS_ECDH_ECDSA_WITH_RC4_128_SHA",
- "TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA",
"TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA",
- "TLS_ECDH_RSA_WITH_RC4_128_SHA",
- "TLS_ECDH_RSA_WITH_AES_128_CBC_SHA",
"TLS_ECDH_RSA_WITH_AES_256_CBC_SHA",
- "TLS_ECDHE_ECDSA_WITH_RC4_128_SHA",
- "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA",
- "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA",
- "TLS_ECDHE_RSA_WITH_RC4_128_SHA",
- "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA",
- "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA",
- "TLS_DHE_RSA_WITH_AES_128_CBC_SHA",
"TLS_DHE_RSA_WITH_AES_256_CBC_SHA",
- "TLS_DHE_DSS_WITH_AES_128_CBC_SHA",
"TLS_DHE_DSS_WITH_AES_256_CBC_SHA",
- "SSL_RSA_WITH_3DES_EDE_CBC_SHA",
- "TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA",
- "TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA",
- "TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA",
- "TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA",
- "SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA",
- "SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA",
- "SSL_RSA_WITH_DES_CBC_SHA",
- "SSL_DHE_RSA_WITH_DES_CBC_SHA",
- "SSL_DHE_DSS_WITH_DES_CBC_SHA",
- "SSL_RSA_EXPORT_WITH_RC4_40_MD5",
- "SSL_RSA_EXPORT_WITH_DES40_CBC_SHA",
- "SSL_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA",
- "SSL_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA",
- "TLS_EMPTY_RENEGOTIATION_INFO_SCSV",
+ "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256",
+ "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256",
+ "TLS_RSA_WITH_AES_128_CBC_SHA256",
+ "TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256",
+ "TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256",
+ "TLS_DHE_RSA_WITH_AES_128_CBC_SHA256",
+ "TLS_DHE_DSS_WITH_AES_128_CBC_SHA256",
+ "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA",
+ "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA",
+ "TLS_RSA_WITH_AES_128_CBC_SHA",
+ "TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA",
+ "TLS_ECDH_RSA_WITH_AES_128_CBC_SHA",
+ "TLS_DHE_RSA_WITH_AES_128_CBC_SHA",
+ "TLS_DHE_DSS_WITH_AES_128_CBC_SHA",
+ "TLS_EMPTY_RENEGOTIATION_INFO_SCSV"
+ };
- "SSL_RSA_WITH_NULL_MD5",
- "SSL_RSA_WITH_NULL_SHA",
- "TLS_ECDH_ECDSA_WITH_NULL_SHA",
- "TLS_ECDH_RSA_WITH_NULL_SHA",
- "TLS_ECDHE_ECDSA_WITH_NULL_SHA",
- "TLS_ECDHE_RSA_WITH_NULL_SHA",
- "SSL_DH_anon_WITH_RC4_128_MD5",
- "TLS_DH_anon_WITH_AES_128_CBC_SHA",
- "TLS_DH_anon_WITH_AES_256_CBC_SHA",
- "SSL_DH_anon_WITH_3DES_EDE_CBC_SHA",
- "SSL_DH_anon_WITH_DES_CBC_SHA",
- "TLS_ECDH_anon_WITH_RC4_128_SHA",
- "TLS_ECDH_anon_WITH_AES_128_CBC_SHA",
- "TLS_ECDH_anon_WITH_AES_256_CBC_SHA",
- "TLS_ECDH_anon_WITH_3DES_EDE_CBC_SHA",
- "SSL_DH_anon_EXPORT_WITH_RC4_40_MD5",
- "SSL_DH_anon_EXPORT_WITH_DES40_CBC_SHA",
- "TLS_ECDH_anon_WITH_NULL_SHA",
- "TLS_KRB5_WITH_RC4_128_SHA",
- "TLS_KRB5_WITH_RC4_128_MD5",
- "TLS_KRB5_WITH_3DES_EDE_CBC_SHA",
- "TLS_KRB5_WITH_3DES_EDE_CBC_MD5",
- "TLS_KRB5_WITH_DES_CBC_SHA",
- "TLS_KRB5_WITH_DES_CBC_MD5",
- "TLS_KRB5_EXPORT_WITH_RC4_40_SHA",
- "TLS_KRB5_EXPORT_WITH_RC4_40_MD5",
- "TLS_KRB5_EXPORT_WITH_DES_CBC_40_SHA",
- "TLS_KRB5_EXPORT_WITH_DES_CBC_40_MD5",
-
+ // List of supported cipher suites when the "crypto.policy" security
+ // property is set to "limited".
+ private final static String[] SUPPORTED_LIMITED = {
+ "TLS_AES_128_GCM_SHA256",
+ "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256",
+ "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256",
+ "TLS_RSA_WITH_AES_128_GCM_SHA256",
+ "TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256",
+ "TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256",
+ "TLS_DHE_RSA_WITH_AES_128_GCM_SHA256",
+ "TLS_DHE_DSS_WITH_AES_128_GCM_SHA256",
+ "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256",
+ "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256",
+ "TLS_RSA_WITH_AES_128_CBC_SHA256",
+ "TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256",
+ "TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256",
+ "TLS_DHE_RSA_WITH_AES_128_CBC_SHA256",
+ "TLS_DHE_DSS_WITH_AES_128_CBC_SHA256",
+ "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA",
+ "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA",
+ "TLS_RSA_WITH_AES_128_CBC_SHA",
+ "TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA",
+ "TLS_ECDH_RSA_WITH_AES_128_CBC_SHA",
+ "TLS_DHE_RSA_WITH_AES_128_CBC_SHA",
+ "TLS_DHE_DSS_WITH_AES_128_CBC_SHA",
+ "TLS_EMPTY_RENEGOTIATION_INFO_SCSV"
};
private static void showSuites(String[] suites) {
@@ -252,19 +211,21 @@
public static void main(String[] args) throws Exception {
long start = System.currentTimeMillis();
+ if (args.length != 1) {
+ throw new Exception("One arg required");
+ }
+
String[] ENABLED;
String[] SUPPORTED;
- try {
- Cipher c = Cipher.getInstance("AES/CBC/NoPadding");
- SecretKeySpec key = new SecretKeySpec(new byte[32], "AES");
- c.init(Cipher.ENCRYPT_MODE, key);
- System.out.println("AES/256 is available");
- ENABLED = ENABLED_UNLIMITED;
- SUPPORTED = SUPPORTED_UNLIMITED;
- } catch (Exception e) {
- System.out.println("AES/256 is NOT available (" + e + ")");
+ if (args[0].equals("default")) {
ENABLED = ENABLED_DEFAULT;
SUPPORTED = SUPPORTED_DEFAULT;
+ } else if (args[0].equals("limited")) {
+ Security.setProperty("crypto.policy", "limited");
+ ENABLED = ENABLED_LIMITED;
+ SUPPORTED = SUPPORTED_LIMITED;
+ } else {
+ throw new Exception("Illegal argument");
}
SSLSocketFactory factory = (SSLSocketFactory)SSLSocketFactory.getDefault();
--- a/test/jdk/jdk/jfr/event/gc/collection/TestG1ParallelPhases.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/jdk/jdk/jfr/event/gc/collection/TestG1ParallelPhases.java Tue Jan 29 17:42:58 2019 +0000
@@ -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
@@ -90,7 +90,6 @@
Set<String> allPhases = of(
"ExtRootScan",
"ThreadRoots",
- "StringTableRoots",
"UniverseRoots",
"JNIRoots",
"ObjectSynchronizerRoots",
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/jdk/nio/zipfs/PropertyPermissionTests.java Tue Jan 29 17:42:58 2019 +0000
@@ -0,0 +1,95 @@
+/*
+ * Copyright (c) 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
+ * 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.
+ */
+
+import org.testng.annotations.AfterClass;
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.Test;
+
+import java.io.IOException;
+import java.nio.file.FileSystem;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.nio.file.spi.FileSystemProvider;
+import java.util.Map;
+
+/**
+ * @test
+ * @bug 8210469
+ * @summary Verify ZIP FileSystem works with a Security Manager
+ * @modules jdk.zipfs
+ * @compile PropertyPermissionTests.java
+ * @run testng/othervm/java.security.policy=PropertyPermissions.policy PropertyPermissionTests
+ */
+public class PropertyPermissionTests {
+
+ // Map to used for creating a ZIP archive
+ private static final Map<String, String> ZIPFS_OPTIONS = Map.of("create", "true");
+
+ // The ZIP file system provider
+ private static final FileSystemProvider ZIPFS_PROVIDER = getZipFSProvider();
+
+ // Primary jar file used for testing
+ private static Path jarFile;
+
+ /**
+ * Create the JAR files used by the tests
+ */
+ @BeforeClass
+ public void setUp() throws Exception {
+ jarFile = Utils.createJarFile("basic.jar",
+ "META-INF/services/java.nio.file.spi.FileSystemProvider");
+ }
+
+ /**
+ * Remove JAR files used by test as part of clean-up
+ */
+ @AfterClass
+ public void tearDown() throws Exception {
+ Files.deleteIfExists(jarFile);
+ }
+
+ /**
+ * Validate that the ZIP File System can be successfully closed when a Security Manager
+ * has been enabled.
+ */
+ @Test
+ public void test0000() throws IOException {
+ FileSystem zipfs = ZIPFS_PROVIDER.newFileSystem(
+ Paths.get("basic.jar"), ZIPFS_OPTIONS);
+ zipfs.close();
+ }
+
+ /**
+ * Returns the Zip FileSystem Provider
+ */
+ private static FileSystemProvider getZipFSProvider() {
+ for (FileSystemProvider fsProvider : FileSystemProvider.installedProviders()) {
+ if ("jar".equals(fsProvider.getScheme())) {
+ return fsProvider;
+ }
+ }
+ return null;
+ }
+
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/jdk/nio/zipfs/PropertyPermissions.policy Tue Jan 29 17:42:58 2019 +0000
@@ -0,0 +1,4 @@
+grant {
+ permission java.io.FilePermission "<<ALL FILES>>","read,write,delete";
+
+};
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/jdk/security/JavaDotSecurity/TestJDKIncludeInExceptions.java Tue Jan 29 17:42:58 2019 +0000
@@ -0,0 +1,45 @@
+/*
+ * 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
+ * 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.
+ */
+
+import java.security.Security;
+
+/**
+ * @test
+ * @bug 8207846 8208691
+ * @summary Test the default setting of the jdk.net.includeInExceptions
+ * security property
+ * @comment In OpenJDK, this property is empty by default and on purpose.
+ * This test assures the default is not changed.
+ * @run main TestJDKIncludeInExceptions
+ */
+public class TestJDKIncludeInExceptions {
+
+ public static void main(String args[]) throws Exception {
+ String incInExc = Security.getProperty("jdk.includeInExceptions");
+ if (incInExc != null) {
+ throw new RuntimeException("Test failed: default value of " +
+ "jdk.includeInExceptions security property is not null: " +
+ incInExc);
+ }
+ }
+}
--- a/test/jtreg-ext/requires/VMProps.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/jtreg-ext/requires/VMProps.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 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
@@ -86,6 +86,7 @@
map.put("vm.rtm.cpu", vmRTMCPU());
map.put("vm.rtm.compiler", vmRTMCompiler());
map.put("vm.aot", vmAOT());
+ map.put("vm.aot.enabled", vmAotEnabled());
// vm.cds is true if the VM is compiled with cds support.
map.put("vm.cds", vmCDS());
map.put("vm.cds.custom.loaders", vmCDSForCustomLoaders());
@@ -266,6 +267,7 @@
vmOptFinalFlag(map, "ClassUnloading");
vmOptFinalFlag(map, "UseCompressedOops");
vmOptFinalFlag(map, "EnableJVMCI");
+ vmOptFinalFlag(map, "EliminateAllocations");
}
/**
@@ -334,6 +336,13 @@
return "" + Files.exists(jaotc);
}
+ /*
+ * @return true if there is at least one loaded AOT'ed library.
+ */
+ protected String vmAotEnabled() {
+ return "" + (WB.aotLibrariesCount() > 0);
+ }
+
/**
* Check for CDS support.
*
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/langtools/tools/javac/generics/typevars/AnnoTypeVarBounds.java Tue Jan 29 17:42:58 2019 +0000
@@ -0,0 +1,38 @@
+/*
+ * Copyright (c) 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
+ * 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
+ * @bug 8193367
+ * @summary Annotated type variable bounds crash javac
+ * @compile AnnoTypeVarBounds.java
+ */
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Target;
+
+class AnnoTypeVarBounds {
+ @Target(value = {ElementType.TYPE_USE})
+ @interface A{}
+ class Sup<X, Y> { }
+ class Sub<U extends @A V, @A V extends String> extends Sup<U, V> { }
+}
--- a/test/langtools/tools/javac/lib/DPrinter.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/langtools/tools/javac/lib/DPrinter.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 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
@@ -1336,8 +1336,8 @@
// null or bot. So, only print the bound for subtypes of TypeVar,
// or if the bound is (erroneously) not null or bot.
if (!type.hasTag(TypeTag.TYPEVAR)
- || !(type.bound == null || type.bound.hasTag(TypeTag.BOT))) {
- printType("bound", type.bound, Details.FULL);
+ || !(type.getUpperBound() == null || type.getUpperBound().hasTag(TypeTag.BOT))) {
+ printType("bound", type.getUpperBound(), Details.FULL);
}
printType("lower", type.lower, Details.FULL);
return visitType(type, null);
--- a/test/langtools/tools/javac/types/GenericTypeWellFormednessTest.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/langtools/tools/javac/types/GenericTypeWellFormednessTest.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 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
@@ -144,7 +144,7 @@
typeVars[typeVars.length - 1] = new InstantiableType(null) {
Type inst(Type clazz) {
TypeVar tvar = fac.TypeVariable();
- tvar.bound = subst(clazz, Mapping(clazz.getTypeArguments().head, tvar));
+ tvar.setUpperBound( subst(clazz, Mapping(clazz.getTypeArguments().head, tvar)) );
return tvar;
}
};
@@ -204,20 +204,20 @@
TypeVar tv4 = fac.TypeVariable();
Type decl4 = fac.Class(tv4);
- tv4.bound = decl4;
+ tv4.setUpperBound(decl4);
tv4.tsym.name = predef.exceptionType.tsym.name;
TypeVar tv5 = fac.TypeVariable();
Type decl5 = fac.Class(tv5);
- tv5.bound = subst(decl5, Mapping(tv5, fac.Wildcard(BoundKind.EXTENDS, tv5)));
+ tv5.setUpperBound( subst(decl5, Mapping(tv5, fac.Wildcard(BoundKind.EXTENDS, tv5))) );
TypeVar tv6 = fac.TypeVariable();
Type decl6 = fac.Class(tv6);
- tv6.bound = subst(decl6, Mapping(tv6, fac.Wildcard(BoundKind.SUPER, tv6)));
+ tv6.setUpperBound( subst(decl6, Mapping(tv6, fac.Wildcard(BoundKind.SUPER, tv6))) );
TypeVar tv7 = fac.TypeVariable();
Type decl7 = fac.Class(tv7);
- tv7.bound = subst(decl7, Mapping(tv7, fac.Wildcard(BoundKind.UNBOUND, predef.objectType)));
+ tv7.setUpperBound( subst(decl7, Mapping(tv7, fac.Wildcard(BoundKind.UNBOUND, predef.objectType))) );
columns = new Type[] {
decl1, decl2, decl3, decl4, decl5, decl6, decl7
--- a/test/lib/sun/hotspot/WhiteBox.java Fri Jan 25 13:50:44 2019 +0000
+++ b/test/lib/sun/hotspot/WhiteBox.java Tue Jan 29 17:42:58 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 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
@@ -549,4 +549,7 @@
// Protection Domain Table
public native int protectionDomainRemovedCount();
+
+ // Number of loaded AOT libraries
+ public native int aotLibrariesCount();
}