This commit is contained in:
Rob McKenna 2020-08-04 12:20:45 +00:00
commit 48074a82bf
93 changed files with 1810 additions and 697 deletions

View File

@ -648,6 +648,7 @@ b58fc60580550a4a587cab729d8fd87223ad6932 jdk-15+29
a32f58c6b8be81877411767de7ba9c4cf087c1b5 jdk-15+31
2dad000726b8d5db9f3df647fb4949d88f269dd4 jdk-15+32
6b65f4e7a975628df51ef755b02642075390041d jdk-15+33
b0817631d2f4395508cb10e81c3858a94d9ae4de jdk-15+34
93813843680bbe1b7efbca56c03fd137f20a2c31 jdk-15.0.1+0
286ddf41c3f697bcf684042544fa4736ba1b85f3 jdk-15.0.1+1
08e8fa30d8456913dd0f698f9c61e4adac22805a jdk-15.0.1+2

8
README
View File

@ -2,11 +2,11 @@
Welcome to the JDK!
===================
For information about building the JDK, including how to retrieve all
of the source code, please see either of these files:
For build instructions, please see either of these files:
* doc/building.html (html version)
* doc/building.md (markdown version)
See http://openjdk.java.net/ for more information about the OpenJDK
Community and the JDK.
See https://openjdk.java.net/ for more information about
the OpenJDK Community and the JDK.

View File

@ -664,7 +664,7 @@ $(eval $(call SetupTarget, test-image-hotspot-jtreg-graal, \
DEPS := build-test-hotspot-jtreg-graal, \
))
ifneq ($GTEST_FRAMEWORK_SRC), )
ifneq ($(GTEST_FRAMEWORK_SRC), )
$(eval $(call SetupTarget, test-image-hotspot-gtest, \
MAKEFILE := hotspot/test/GtestImage, \
DEPS := hotspot, \

View File

@ -103,12 +103,22 @@ define SetupBuildLauncherBody
ifeq ($(call isTargetOs, macosx), true)
ifeq ($$($1_MACOSX_PRIVILEGED), true)
$1_PLIST_FILE := Info-privileged.plist
$1_PLIST_SRC_FILE := Info-privileged.plist
else
$1_PLIST_FILE := Info-cmdline.plist
$1_PLIST_SRC_FILE := Info-cmdline.plist
endif
$1_LDFLAGS += -sectcreate __TEXT __info_plist $(MACOSX_PLIST_DIR)/$$($1_PLIST_FILE)
$1_PLIST_FILE := $$(SUPPORT_OUTPUTDIR)/native/$$(MODULE)/$1/Info.plist
$$(eval $$(call SetupTextFileProcessing, BUILD_PLIST_$1, \
SOURCE_FILES := $$(TOPDIR)/src/java.base/macosx/native/launcher/$$($1_PLIST_SRC_FILE), \
OUTPUT_FILE := $$($1_PLIST_FILE), \
REPLACEMENTS := \
@@ID@@ => $(MACOSX_BUNDLE_ID_BASE).$(VERSION_SHORT).$1 ; \
@@VERSION@@ => $(VERSION_NUMBER) ; \
))
$1_LDFLAGS += -sectcreate __TEXT __info_plist $$($1_PLIST_FILE)
ifeq ($(STATIC_BUILD), true)
$1_LDFLAGS += -exported_symbols_list \
@ -168,6 +178,8 @@ define SetupBuildLauncherBody
$1 += $$(BUILD_LAUNCHER_$1)
TARGETS += $$($1)
$$(BUILD_LAUNCHER_$1): $$(BUILD_PLIST_$1)
ifeq ($(call isTargetOs, aix), true)
$$(BUILD_LAUNCHER_$1): $(call FindStaticLib, java.base, jli_static)
endif

View File

@ -22,6 +22,8 @@
<string>????</string>
<key>CFBundleVersion</key>
<string>@@VERSION@@</string>
<key>NSMicrophoneUsageDescription</key>
<string>The application is requesting access to the microphone.</string>
<key>JavaVM</key>
<dict>
<key>JVMCapabilities</key>

View File

@ -22,6 +22,8 @@
<string>????</string>
<key>CFBundleVersion</key>
<string>@@VERSION@@</string>
<key>NSMicrophoneUsageDescription</key>
<string>The application is requesting access to the microphone.</string>
<key>JavaVM</key>
<dict>
<key>JVMMinimumFrameworkVersion</key>

View File

@ -0,0 +1,43 @@
Owner: CN=Entrust Root Certification Authority - G4, OU="(c) 2015 Entrust, Inc. - for authorized use only", OU=See www.entrust.net/legal-terms, O="Entrust, Inc.", C=US
Issuer: CN=Entrust Root Certification Authority - G4, OU="(c) 2015 Entrust, Inc. - for authorized use only", OU=See www.entrust.net/legal-terms, O="Entrust, Inc.", C=US
Serial number: d9b5437fafa9390f000000005565ad58
Valid from: Wed May 27 11:11:16 GMT 2015 until: Sun Dec 27 11:41:16 GMT 2037
Signature algorithm name: SHA256withRSA
Subject Public Key Algorithm: 4096-bit RSA key
Version: 3
-----BEGIN CERTIFICATE-----
MIIGSzCCBDOgAwIBAgIRANm1Q3+vqTkPAAAAAFVlrVgwDQYJKoZIhvcNAQELBQAw
gb4xCzAJBgNVBAYTAlVTMRYwFAYDVQQKEw1FbnRydXN0LCBJbmMuMSgwJgYDVQQL
Ex9TZWUgd3d3LmVudHJ1c3QubmV0L2xlZ2FsLXRlcm1zMTkwNwYDVQQLEzAoYykg
MjAxNSBFbnRydXN0LCBJbmMuIC0gZm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxMjAw
BgNVBAMTKUVudHJ1c3QgUm9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEc0
MB4XDTE1MDUyNzExMTExNloXDTM3MTIyNzExNDExNlowgb4xCzAJBgNVBAYTAlVT
MRYwFAYDVQQKEw1FbnRydXN0LCBJbmMuMSgwJgYDVQQLEx9TZWUgd3d3LmVudHJ1
c3QubmV0L2xlZ2FsLXRlcm1zMTkwNwYDVQQLEzAoYykgMjAxNSBFbnRydXN0LCBJ
bmMuIC0gZm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxMjAwBgNVBAMTKUVudHJ1c3Qg
Um9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEc0MIICIjANBgkqhkiG9w0B
AQEFAAOCAg8AMIICCgKCAgEAsewsQu7i0TD/pZJH4i3DumSXbcr3DbVZwbPLqGgZ
2K+EbTBwXX7zLtJTmeH+H17ZSK9dE43b/2MzTdMAArzE+NEGCJR5WIoV3imz/f3E
T+iq4qA7ec2/a0My3dl0ELn39GjUu9CH1apLiipvKgS1sqbHoHrmSKvS0VnM1n4j
5pds8ELl3FFLFUHtSUrJ3hCX1nbB76W1NhSXNdh4IjVS70O92yfbYVaCNNzLiGAM
C1rlLAHGVK/XqsEQe9IFWrhAnoanw5CGAlZSCXqc0ieCU0plUmr1POeo8pyvi73T
DtTUXm6Hnmo9RR3RXRv06QqsYJn7ibT/mCzPfB3pAqoEmh643IhuJbNsZvc8kPNX
wbMv9W3y+8qh+CmdRouzavbmZwe+LGcKKh9asj5XxNMhIWNlUpEbsZmOeX7m640A
2Vqq6nPopIICR5b+W45UYaPrL0swsIsjdXJ8ITzI9vF01Bx7owVV7rtNOzK+mndm
nqxpkCIHH2E6lr7lmk/MBTwoWdPBDFSoWWG9yHJM6Nyfh3+9nEg2XpWjDrk4JFX8
dWbrAuMINClKxuMrLzOg2qOGpRKX/YAr2hRC45K9PvJdXmd0LhyIRyk0X+IyqJwl
N4y6mACXi0mWHv0liqzc2thddG5msP9E36EYxr5ILzeUePiVSj9/E15dWf10hkNj
c0kCAwEAAaNCMEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYD
VR0OBBYEFJ84xFYjwznooHFs6FRM5Og6sb9nMA0GCSqGSIb3DQEBCwUAA4ICAQAS
5UKme4sPDORGpbZgQIeMJX6tuGguW8ZAdjwD+MlZ9POrYs4QjbRaZIxowLByQzTS
Gwv2LFPSypBLhmb8qoMi9IsabyZIrHZ3CL/FmFz0Jomee8O5ZDIBf9PD3Vht7LGr
hFV0d4QEJ1JrhkzO3bll/9bGXp+aEJlLdWr+aumXIOTkdnrG0CSqkM0gkLpHZPt/
B7NTeLUKYvJzQ85BK4FqLoUWlFPUa19yIqtRLULVAJyZv967lDtX/Zr1hstWO1uI
AeV8KEsD+UmDfLJ/fOPtjqF/YFOOVZ1QNBIPt5d7bIdKROf1beyAN/BYGW5KaHbw
H5Lk6rWS02FREAutp9lfx1/cH6NcjKF+m7ee01ZvZl4HliDtC3T7Zk6LERXpgUl+
b7DUUH8i119lAg2m9IUe2K4GS0qn0jFmwvjO5QimpAKWRGhXxNUzzxkvFMSUHHuk
2fCfDrGA4tGeEWSpiBE6doLlYsKA2KSD7ZPvfC+QsDJMlhVoSFLUmQjAJOgc47Ol
IQ6SwJAfzyBfyjs4x7dtOvPmRLgOMWuIjnDrnBdSqEGULoe256YSxXXfW8AKbnuk
5F6G+TaU33fD6Q3AOfF5u0aOq0NZJ7cguyPpVkAh7DE9ZapD8j3fcEThuk0mEDuY
n/PIjhs4ViFqUZPTkcpG2om3PVODLAgfi49T3f+sHw==
-----END CERTIFICATE-----

View File

@ -46,6 +46,30 @@
address ShenandoahBarrierSetAssembler::_shenandoah_lrb = NULL;
static void save_xmm_registers(MacroAssembler* masm) {
__ subptr(rsp, 64);
__ movdbl(Address(rsp, 0), xmm0);
__ movdbl(Address(rsp, 8), xmm1);
__ movdbl(Address(rsp, 16), xmm2);
__ movdbl(Address(rsp, 24), xmm3);
__ movdbl(Address(rsp, 32), xmm4);
__ movdbl(Address(rsp, 40), xmm5);
__ movdbl(Address(rsp, 48), xmm6);
__ movdbl(Address(rsp, 56), xmm7);
}
static void restore_xmm_registers(MacroAssembler* masm) {
__ movdbl(xmm0, Address(rsp, 0));
__ movdbl(xmm1, Address(rsp, 8));
__ movdbl(xmm2, Address(rsp, 16));
__ movdbl(xmm3, Address(rsp, 24));
__ movdbl(xmm4, Address(rsp, 32));
__ movdbl(xmm5, Address(rsp, 40));
__ movdbl(xmm6, Address(rsp, 48));
__ movdbl(xmm7, Address(rsp, 56));
__ addptr(rsp, 64);
}
void ShenandoahBarrierSetAssembler::arraycopy_prologue(MacroAssembler* masm, DecoratorSet decorators, BasicType type,
Register src, Register dst, Register count) {
@ -290,7 +314,9 @@ void ShenandoahBarrierSetAssembler::load_reference_barrier_not_null(MacroAssembl
__ lea(src_addr, src);
}
save_xmm_registers(masm);
__ call(RuntimeAddress(CAST_FROM_FN_PTR(address, ShenandoahBarrierSetAssembler::shenandoah_lrb())));
restore_xmm_registers(masm);
if (need_addr_setup) {
if (dst != rax) {
@ -368,7 +394,10 @@ void ShenandoahBarrierSetAssembler::load_reference_barrier_native(MacroAssembler
assert_different_registers(dst, rsi);
__ lea(rsi, src);
save_xmm_registers(masm);
__ call_VM_leaf(CAST_FROM_FN_PTR(address, ShenandoahRuntime::load_reference_barrier_native), dst, rsi);
restore_xmm_registers(masm);
#ifdef _LP64
__ pop(r15);
@ -514,15 +543,7 @@ void ShenandoahBarrierSetAssembler::load_at(MacroAssembler* masm, DecoratorSet d
// That path can be reached from the c2i adapter with live fp
// arguments in registers.
LP64_ONLY(assert(Argument::n_float_register_parameters_j == 8, "8 fp registers to save at java call"));
__ subptr(rsp, 64);
__ movdbl(Address(rsp, 0), xmm0);
__ movdbl(Address(rsp, 8), xmm1);
__ movdbl(Address(rsp, 16), xmm2);
__ movdbl(Address(rsp, 24), xmm3);
__ movdbl(Address(rsp, 32), xmm4);
__ movdbl(Address(rsp, 40), xmm5);
__ movdbl(Address(rsp, 48), xmm6);
__ movdbl(Address(rsp, 56), xmm7);
save_xmm_registers(masm);
Register thread = NOT_LP64(tmp_thread) LP64_ONLY(r15_thread);
assert_different_registers(dst, tmp1, tmp_thread);
@ -539,15 +560,7 @@ void ShenandoahBarrierSetAssembler::load_at(MacroAssembler* masm, DecoratorSet d
tmp1 /* tmp */,
true /* tosca_live */,
true /* expand_call */);
__ movdbl(xmm0, Address(rsp, 0));
__ movdbl(xmm1, Address(rsp, 8));
__ movdbl(xmm2, Address(rsp, 16));
__ movdbl(xmm3, Address(rsp, 24));
__ movdbl(xmm4, Address(rsp, 32));
__ movdbl(xmm5, Address(rsp, 40));
__ movdbl(xmm6, Address(rsp, 48));
__ movdbl(xmm7, Address(rsp, 56));
__ addptr(rsp, 64);
restore_xmm_registers(masm);
__ pop_IU_state();
}
}

View File

@ -67,6 +67,7 @@ void ShenandoahAsserts::print_obj(ShenandoahMessageBuffer& msg, oop obj) {
msg.append(" " PTR_FORMAT " - klass " PTR_FORMAT " %s\n", p2i(obj), p2i(obj->klass()), obj->klass()->external_name());
msg.append(" %3s allocated after mark start\n", ctx->allocated_after_mark_start(obj) ? "" : "not");
msg.append(" %3s after update watermark\n", cast_from_oop<HeapWord*>(obj) >= r->get_update_watermark() ? "" : "not");
msg.append(" %3s marked \n", ctx->is_marked(obj) ? "" : "not");
msg.append(" %3s in collection set\n", heap->in_collection_set(obj) ? "" : "not");
msg.append(" mark:%s\n", mw_ss.as_string());

View File

@ -82,7 +82,7 @@ inline void ShenandoahBarrierSet::enqueue(oop obj) {
// Filter marked objects before hitting the SATB queues. The same predicate would
// be used by SATBMQ::filter to eliminate already marked objects downstream, but
// filtering here helps to avoid wasteful SATB queueing work to begin with.
if (!_heap->requires_marking<false>(obj)) return;
if (!_heap->requires_marking(obj)) return;
ShenandoahThreadLocalData::satb_mark_queue(Thread::current()).enqueue_known_active(obj);
}

View File

@ -203,26 +203,19 @@ public:
}
void do_buffer(void **buffer, size_t size) {
if (_heap->has_forwarded_objects()) {
if (ShenandoahStringDedup::is_enabled()) {
do_buffer_impl<RESOLVE, ENQUEUE_DEDUP>(buffer, size);
} else {
do_buffer_impl<RESOLVE, NO_DEDUP>(buffer, size);
}
assert(size == 0 || !_heap->has_forwarded_objects(), "Forwarded objects are not expected here");
if (ShenandoahStringDedup::is_enabled()) {
do_buffer_impl<ENQUEUE_DEDUP>(buffer, size);
} else {
if (ShenandoahStringDedup::is_enabled()) {
do_buffer_impl<NONE, ENQUEUE_DEDUP>(buffer, size);
} else {
do_buffer_impl<NONE, NO_DEDUP>(buffer, size);
}
do_buffer_impl<NO_DEDUP>(buffer, size);
}
}
template<UpdateRefsMode UPDATE_REFS, StringDedupMode STRING_DEDUP>
template<StringDedupMode STRING_DEDUP>
void do_buffer_impl(void **buffer, size_t size) {
for (size_t i = 0; i < size; ++i) {
oop *p = (oop *) &buffer[i];
ShenandoahConcurrentMark::mark_through_ref<oop, UPDATE_REFS, STRING_DEDUP>(p, _heap, _queue, _mark_context);
ShenandoahConcurrentMark::mark_through_ref<oop, NONE, STRING_DEDUP>(p, _heap, _queue, _mark_context);
}
}
};

View File

@ -53,6 +53,9 @@ ShenandoahControlThread::ShenandoahControlThread() :
create_and_start(ShenandoahCriticalControlThreadPriority ? CriticalPriority : NearMaxPriority);
_periodic_task.enroll();
_periodic_satb_flush_task.enroll();
if (ShenandoahPacing) {
_periodic_pacer_notify_task.enroll();
}
}
ShenandoahControlThread::~ShenandoahControlThread() {
@ -68,6 +71,11 @@ void ShenandoahPeriodicSATBFlushTask::task() {
ShenandoahHeap::heap()->force_satb_flush_all_threads();
}
void ShenandoahPeriodicPacerNotify::task() {
assert(ShenandoahPacing, "Should not be here otherwise");
ShenandoahHeap::heap()->pacer()->notify_waiters();
}
void ShenandoahControlThread::run_service() {
ShenandoahHeap* heap = ShenandoahHeap::heap();
@ -244,6 +252,9 @@ void ShenandoahControlThread::run_service() {
// Commit worker statistics to cycle data
heap->phase_timings()->flush_par_workers_to_cycle();
if (ShenandoahPacing) {
heap->pacer()->flush_stats_to_cycle();
}
// Print GC stats for current cycle
{
@ -252,6 +263,9 @@ void ShenandoahControlThread::run_service() {
ResourceMark rm;
LogStream ls(lt);
heap->phase_timings()->print_cycle_on(&ls);
if (ShenandoahPacing) {
heap->pacer()->print_cycle_on(&ls);
}
}
}

View File

@ -52,6 +52,13 @@ public:
virtual void task();
};
// Periodic task to notify blocked paced waiters.
class ShenandoahPeriodicPacerNotify : public PeriodicTask {
public:
ShenandoahPeriodicPacerNotify() : PeriodicTask(PeriodicTask::min_interval) {}
virtual void task();
};
class ShenandoahControlThread: public ConcurrentGCThread {
friend class VMStructs;
@ -70,6 +77,7 @@ private:
Monitor _gc_waiters_lock;
ShenandoahPeriodicTask _periodic_task;
ShenandoahPeriodicSATBFlushTask _periodic_satb_flush_task;
ShenandoahPeriodicPacerNotify _periodic_pacer_notify_task;
public:
void run_service();

View File

@ -1044,28 +1044,79 @@ void ShenandoahHeap::trash_humongous_region_at(ShenandoahHeapRegion* start) {
}
}
class ShenandoahRetireGCLABClosure : public ThreadClosure {
class ShenandoahCheckCleanGCLABClosure : public ThreadClosure {
public:
ShenandoahCheckCleanGCLABClosure() {}
void do_thread(Thread* thread) {
PLAB* gclab = ShenandoahThreadLocalData::gclab(thread);
assert(gclab != NULL, "GCLAB should be initialized for %s", thread->name());
assert(gclab->words_remaining() == 0, "GCLAB should not need retirement");
}
};
class ShenandoahRetireGCLABClosure : public ThreadClosure {
private:
bool const _resize;
public:
ShenandoahRetireGCLABClosure(bool resize) : _resize(resize) {}
void do_thread(Thread* thread) {
PLAB* gclab = ShenandoahThreadLocalData::gclab(thread);
assert(gclab != NULL, "GCLAB should be initialized for %s", thread->name());
gclab->retire();
if (_resize && ShenandoahThreadLocalData::gclab_size(thread) > 0) {
ShenandoahThreadLocalData::set_gclab_size(thread, 0);
}
}
};
void ShenandoahHeap::make_parsable(bool retire_tlabs) {
if (UseTLAB) {
CollectedHeap::ensure_parsability(retire_tlabs);
void ShenandoahHeap::labs_make_parsable() {
assert(UseTLAB, "Only call with UseTLAB");
ShenandoahRetireGCLABClosure cl(false);
for (JavaThreadIteratorWithHandle jtiwh; JavaThread *t = jtiwh.next(); ) {
ThreadLocalAllocBuffer& tlab = t->tlab();
tlab.make_parsable();
cl.do_thread(t);
}
ShenandoahRetireGCLABClosure cl;
workers()->threads_do(&cl);
}
void ShenandoahHeap::tlabs_retire(bool resize) {
assert(UseTLAB, "Only call with UseTLAB");
assert(!resize || ResizeTLAB, "Only call for resize when ResizeTLAB is enabled");
ThreadLocalAllocStats stats;
for (JavaThreadIteratorWithHandle jtiwh; JavaThread *t = jtiwh.next(); ) {
ThreadLocalAllocBuffer& tlab = t->tlab();
tlab.retire(&stats);
if (resize) {
tlab.resize();
}
}
stats.publish();
#ifdef ASSERT
ShenandoahCheckCleanGCLABClosure cl;
for (JavaThreadIteratorWithHandle jtiwh; JavaThread *t = jtiwh.next(); ) {
cl.do_thread(t);
}
workers()->threads_do(&cl);
#endif
}
void ShenandoahHeap::resize_tlabs() {
CollectedHeap::resize_all_tlabs();
void ShenandoahHeap::gclabs_retire(bool resize) {
assert(UseTLAB, "Only call with UseTLAB");
assert(!resize || ResizeTLAB, "Only call for resize when ResizeTLAB is enabled");
ShenandoahRetireGCLABClosure cl(resize);
for (JavaThreadIteratorWithHandle jtiwh; JavaThread *t = jtiwh.next(); ) {
cl.do_thread(t);
}
workers()->threads_do(&cl);
}
class ShenandoahEvacuateUpdateRootsTask : public AbstractGangTask {
@ -1122,25 +1173,6 @@ size_t ShenandoahHeap::max_tlab_size() const {
return ShenandoahHeapRegion::max_tlab_size_words();
}
class ShenandoahRetireAndResetGCLABClosure : public ThreadClosure {
public:
void do_thread(Thread* thread) {
PLAB* gclab = ShenandoahThreadLocalData::gclab(thread);
gclab->retire();
if (ShenandoahThreadLocalData::gclab_size(thread) > 0) {
ShenandoahThreadLocalData::set_gclab_size(thread, 0);
}
}
};
void ShenandoahHeap::retire_and_reset_gclabs() {
ShenandoahRetireAndResetGCLABClosure cl;
for (JavaThreadIteratorWithHandle jtiwh; JavaThread *t = jtiwh.next(); ) {
cl.do_thread(t);
}
workers()->threads_do(&cl);
}
void ShenandoahHeap::collect(GCCause::Cause cause) {
control_thread()->request_gc(cause);
}
@ -1173,8 +1205,8 @@ jlong ShenandoahHeap::millis_since_last_gc() {
}
void ShenandoahHeap::prepare_for_verify() {
if (SafepointSynchronize::is_at_safepoint() || ! UseTLAB) {
make_parsable(false);
if (SafepointSynchronize::is_at_safepoint() && UseTLAB) {
labs_make_parsable();
}
}
@ -1203,13 +1235,6 @@ void ShenandoahHeap::print_tracing_info() const {
ls.cr();
ls.cr();
if (ShenandoahPacing) {
pacer()->print_on(&ls);
}
ls.cr();
ls.cr();
}
}
@ -1264,7 +1289,7 @@ public:
* This is public API, used in preparation of object_iterate().
* Since we don't do linear scan of heap in object_iterate() (see comment below), we don't
* need to make the heap parsable. For Shenandoah-internal linear heap scans that we can
* control, we call SH::make_tlabs_parsable().
* control, we call SH::tlabs_retire, SH::gclabs_retire.
*/
void ShenandoahHeap::ensure_parsability(bool retire_tlabs) {
// No-op.
@ -1420,10 +1445,13 @@ void ShenandoahHeap::op_init_mark() {
}
set_concurrent_mark_in_progress(true);
// We need to reset all TLABs because we'd lose marks on all objects allocated in them.
{
ShenandoahGCPhase phase(ShenandoahPhaseTimings::make_parsable);
make_parsable(true);
// We need to reset all TLABs because they might be below the TAMS, and we need to mark
// the objects in them. Do not let mutators allocate any new objects in their current TLABs.
// It is also a good place to resize the TLAB sizes for future allocations.
if (UseTLAB) {
ShenandoahGCPhase phase(ShenandoahPhaseTimings::init_manage_tlabs);
tlabs_retire(ResizeTLAB);
}
{
@ -1437,11 +1465,6 @@ void ShenandoahHeap::op_init_mark() {
concurrent_mark()->mark_roots(ShenandoahPhaseTimings::scan_roots);
if (UseTLAB) {
ShenandoahGCPhase phase(ShenandoahPhaseTimings::resize_tlabs);
resize_tlabs();
}
if (ShenandoahPacing) {
pacer()->setup_for_mark();
}
@ -1539,9 +1562,9 @@ void ShenandoahHeap::op_final_mark() {
// which would be outside the collection set, so no cset writes would happen there.
// Weaker one: new allocations would happen past update watermark, and so less work would
// be needed for reference updates (would update the large filler instead).
{
ShenandoahGCPhase phase(ShenandoahPhaseTimings::retire_tlabs);
make_parsable(true);
if (UseTLAB) {
ShenandoahGCPhase phase(ShenandoahPhaseTimings::final_manage_labs);
tlabs_retire(false);
}
{
@ -1917,10 +1940,6 @@ void ShenandoahHeap::op_full(GCCause::Cause cause) {
metrics.snap_before();
full_gc()->do_it(cause);
if (UseTLAB) {
ShenandoahGCPhase phase(ShenandoahPhaseTimings::full_gc_resize_tlabs);
resize_all_tlabs();
}
metrics.snap_after();
@ -2511,9 +2530,12 @@ void ShenandoahHeap::op_init_updaterefs() {
set_evacuation_in_progress(false);
{
ShenandoahGCPhase phase(ShenandoahPhaseTimings::init_update_refs_retire_gclabs);
retire_and_reset_gclabs();
// Evacuation is over, no GCLABs are needed anymore. GCLABs are under URWM, so we need to
// make them parsable for update code to work correctly. Plus, we can compute new sizes
// for future GCLABs here.
if (UseTLAB) {
ShenandoahGCPhase phase(ShenandoahPhaseTimings::init_update_refs_manage_gclabs);
gclabs_retire(ResizeTLAB);
}
if (ShenandoahVerify) {

View File

@ -595,7 +595,6 @@ private:
inline HeapWord* allocate_from_gclab(Thread* thread, size_t size);
HeapWord* allocate_from_gclab_slow(Thread* thread, size_t size);
HeapWord* allocate_new_gclab(size_t min_size, size_t word_size, size_t* actual_size);
void retire_and_reset_gclabs();
public:
HeapWord* allocate_memory(ShenandoahAllocRequest& request);
@ -615,10 +614,11 @@ public:
size_t max_tlab_size() const;
size_t tlab_used(Thread* ignored) const;
void resize_tlabs();
void ensure_parsability(bool retire_labs);
void ensure_parsability(bool retire_tlabs);
void make_parsable(bool retire_tlabs);
void labs_make_parsable();
void tlabs_retire(bool resize);
void gclabs_retire(bool resize);
// ---------- Marking support
//
@ -659,7 +659,6 @@ public:
void reset_mark_bitmap();
// SATB barriers hooks
template<bool RESOLVE>
inline bool requires_marking(const void* entry) const;
void force_satb_flush_all_threads();

View File

@ -327,12 +327,8 @@ inline oop ShenandoahHeap::evacuate_object(oop p, Thread* thread) {
}
}
template<bool RESOLVE>
inline bool ShenandoahHeap::requires_marking(const void* entry) const {
oop obj = oop(entry);
if (RESOLVE) {
obj = ShenandoahBarrierSet::resolve_forwarded_not_null(obj);
}
return !_marking_context->is_marked(obj);
}

View File

@ -23,7 +23,7 @@
*/
#include "precompiled.hpp"
#include "gc/shenandoah/shenandoahHeap.hpp"
#include "gc/shenandoah/shenandoahHeap.inline.hpp"
#include "gc/shenandoah/shenandoahHeapRegion.hpp"
#include "gc/shenandoah/shenandoahInitLogger.hpp"
#include "gc/shenandoah/heuristics/shenandoahHeuristics.hpp"

View File

@ -118,21 +118,26 @@ void ShenandoahMarkCompact::do_it(GCCause::Cause gc_cause) {
}
assert(!heap->is_concurrent_mark_in_progress(), "sanity");
// c. Reset the bitmaps for new marking
// c. Update roots if this full GC is due to evac-oom, which may carry from-space pointers in roots.
if (has_forwarded_objects) {
heap->concurrent_mark()->update_roots(ShenandoahPhaseTimings::full_gc_update_roots);
}
// d. Reset the bitmaps for new marking
heap->reset_mark_bitmap();
assert(heap->marking_context()->is_bitmap_clear(), "sanity");
assert(!heap->marking_context()->is_complete(), "sanity");
// d. Abandon reference discovery and clear all discovered references.
// e. Abandon reference discovery and clear all discovered references.
ReferenceProcessor* rp = heap->ref_processor();
rp->disable_discovery();
rp->abandon_partial_discovery();
rp->verify_no_references_recorded();
// e. Set back forwarded objects bit back, in case some steps above dropped it.
// f. Set back forwarded objects bit back, in case some steps above dropped it.
heap->set_has_forwarded_objects(has_forwarded_objects);
// f. Sync pinned region status from the CP marks
// g. Sync pinned region status from the CP marks
heap->sync_pinned_region_status();
// The rest of prologue:
@ -140,7 +145,10 @@ void ShenandoahMarkCompact::do_it(GCCause::Cause gc_cause) {
_preserved_marks->init(heap->workers()->active_workers());
}
heap->make_parsable(true);
if (UseTLAB) {
heap->gclabs_retire(ResizeTLAB);
heap->tlabs_retire(ResizeTLAB);
}
OrderAccess::fence();
@ -242,7 +250,6 @@ void ShenandoahMarkCompact::phase1_mark_heap() {
rp->setup_policy(true); // forcefully purge all soft references
rp->set_active_mt_degree(heap->workers()->active_workers());
cm->update_roots(ShenandoahPhaseTimings::full_gc_update_roots);
cm->mark_roots(ShenandoahPhaseTimings::full_gc_scan_roots);
cm->finish_mark_from_roots(/* full_gc = */ true);
heap->mark_complete_marking_context();

View File

@ -122,16 +122,20 @@ double HdrSeq::percentile(double level) const {
BinaryMagnitudeSeq::BinaryMagnitudeSeq() {
_mags = NEW_C_HEAP_ARRAY(size_t, BitsPerSize_t, mtInternal);
for (int c = 0; c < BitsPerSize_t; c++) {
_mags[c] = 0;
}
_sum = 0;
clear();
}
BinaryMagnitudeSeq::~BinaryMagnitudeSeq() {
FREE_C_HEAP_ARRAY(size_t, _mags);
}
void BinaryMagnitudeSeq::clear() {
for (int c = 0; c < BitsPerSize_t; c++) {
_mags[c] = 0;
}
_sum = 0;
}
void BinaryMagnitudeSeq::add(size_t val) {
Atomic::add(&_sum, val);

View File

@ -70,6 +70,7 @@ public:
size_t sum() const;
int min_level() const;
int max_level() const;
void clear();
};
#endif // SHARE_GC_SHENANDOAH_SHENANDOAHNUMBERSEQ_HPP

View File

@ -27,6 +27,7 @@
#include "gc/shenandoah/shenandoahFreeSet.hpp"
#include "gc/shenandoah/shenandoahHeap.inline.hpp"
#include "gc/shenandoah/shenandoahPacer.hpp"
#include "gc/shenandoah/shenandoahPhaseTimings.hpp"
#include "runtime/atomic.hpp"
#include "runtime/mutexLocker.hpp"
@ -191,6 +192,9 @@ void ShenandoahPacer::restart_with(size_t non_taxable_bytes, double tax_rate) {
Atomic::xchg(&_budget, (intptr_t)initial);
Atomic::store(&_tax_rate, tax_rate);
Atomic::inc(&_epoch);
// Shake up stalled waiters after budget update.
_need_notify_waiters.try_set();
}
bool ShenandoahPacer::claim_for_alloc(size_t words, bool force) {
@ -219,8 +223,8 @@ void ShenandoahPacer::unpace_for_alloc(intptr_t epoch, size_t words) {
return;
}
intptr_t tax = MAX2<intptr_t>(1, words * Atomic::load(&_tax_rate));
Atomic::add(&_budget, tax);
size_t tax = MAX2<size_t>(1, words * Atomic::load(&_tax_rate));
add_budget(tax);
}
intptr_t ShenandoahPacer::epoch() {
@ -231,56 +235,45 @@ void ShenandoahPacer::pace_for_alloc(size_t words) {
assert(ShenandoahPacing, "Only be here when pacing is enabled");
// Fast path: try to allocate right away
if (claim_for_alloc(words, false)) {
bool claimed = claim_for_alloc(words, false);
if (claimed) {
return;
}
// Forcefully claim the budget: it may go negative at this point, and
// GC should replenish for this and subsequent allocations. After this claim,
// we would wait a bit until our claim is matched by additional progress,
// or the time budget depletes.
claimed = claim_for_alloc(words, true);
assert(claimed, "Should always succeed");
// Threads that are attaching should not block at all: they are not
// fully initialized yet. Blocking them would be awkward.
// This is probably the path that allocates the thread oop itself.
// Forcefully claim without waiting.
if (JavaThread::current()->is_attaching_via_jni()) {
claim_for_alloc(words, true);
return;
}
size_t max = ShenandoahPacingMaxDelay;
double start = os::elapsedTime();
size_t total = 0;
size_t cur = 0;
size_t max_ms = ShenandoahPacingMaxDelay;
size_t total_ms = 0;
while (true) {
// We could instead assist GC, but this would suffice for now.
// This code should also participate in safepointing.
// Perform the exponential backoff, limited by max.
cur = cur * 2;
if (total + cur > max) {
cur = (max > total) ? (max - total) : 0;
}
cur = MAX2<size_t>(1, cur);
wait(cur);
size_t cur_ms = (max_ms > total_ms) ? (max_ms - total_ms) : 1;
wait(cur_ms);
double end = os::elapsedTime();
total = (size_t)((end - start) * 1000);
total_ms = (size_t)((end - start) * 1000);
if (total > max) {
// Spent local time budget to wait for enough GC progress.
// Breaking out and allocating anyway, which may mean we outpace GC,
// and start Degenerated GC cycle.
_delays.add(total);
// Forcefully claim the budget: it may go negative at this point, and
// GC should replenish for this and subsequent allocations
claim_for_alloc(words, true);
break;
}
if (claim_for_alloc(words, false)) {
// Acquired enough permit, nice. Can allocate now.
_delays.add(total);
if (total_ms > max_ms || Atomic::load(&_budget) >= 0) {
// Exiting if either:
// a) Spent local time budget to wait for enough GC progress.
// Breaking out and allocating anyway, which may mean we outpace GC,
// and start Degenerated GC cycle.
// b) The budget had been replenished, which means our claim is satisfied.
ShenandoahThreadLocalData::add_paced_time(JavaThread::current(), end - start);
break;
}
}
@ -296,45 +289,54 @@ void ShenandoahPacer::wait(size_t time_ms) {
}
void ShenandoahPacer::notify_waiters() {
MonitorLocker locker(_wait_monitor);
_wait_monitor->notify_all();
}
void ShenandoahPacer::print_on(outputStream* out) const {
out->print_cr("ALLOCATION PACING:");
out->cr();
out->print_cr("Max pacing delay is set for " UINTX_FORMAT " ms.", ShenandoahPacingMaxDelay);
out->cr();
out->print_cr("Higher delay would prevent application outpacing the GC, but it will hide the GC latencies");
out->print_cr("from the STW pause times. Pacing affects the individual threads, and so it would also be");
out->print_cr("invisible to the usual profiling tools, but would add up to end-to-end application latency.");
out->print_cr("Raise max pacing delay with care.");
out->cr();
out->print_cr("Actual pacing delays histogram:");
out->cr();
out->print_cr("%10s - %10s %12s%12s", "From", "To", "Count", "Sum");
size_t total_count = 0;
size_t total_sum = 0;
for (int c = _delays.min_level(); c <= _delays.max_level(); c++) {
int l = (c == 0) ? 0 : 1 << (c - 1);
int r = 1 << c;
size_t count = _delays.level(c);
size_t sum = count * (r - l) / 2;
total_count += count;
total_sum += sum;
out->print_cr("%7d ms - %7d ms: " SIZE_FORMAT_W(12) SIZE_FORMAT_W(12) " ms", l, r, count, sum);
if (_need_notify_waiters.try_unset()) {
MonitorLocker locker(_wait_monitor);
_wait_monitor->notify_all();
}
out->print_cr("%23s: " SIZE_FORMAT_W(12) SIZE_FORMAT_W(12) " ms", "Total", total_count, total_sum);
}
void ShenandoahPacer::flush_stats_to_cycle() {
double sum = 0;
for (JavaThreadIteratorWithHandle jtiwh; JavaThread *t = jtiwh.next(); ) {
sum += ShenandoahThreadLocalData::paced_time(t);
}
ShenandoahHeap::heap()->phase_timings()->record_phase_time(ShenandoahPhaseTimings::pacing, sum);
}
void ShenandoahPacer::print_cycle_on(outputStream* out) {
MutexLocker lock(Threads_lock);
double now = os::elapsedTime();
double total = now - _last_time;
_last_time = now;
out->cr();
out->print_cr("Pacing delays are measured from entering the pacing code till exiting it. Therefore,");
out->print_cr("observed pacing delays may be higher than the threshold when paced thread spent more");
out->print_cr("time in the pacing code. It usually happens when thread is de-scheduled while paced,");
out->print_cr("OS takes longer to unblock the thread, or JVM experiences an STW pause.");
out->print_cr("Allocation pacing accrued:");
size_t threads_total = 0;
size_t threads_nz = 0;
double sum = 0;
for (JavaThreadIteratorWithHandle jtiwh; JavaThread *t = jtiwh.next(); ) {
double d = ShenandoahThreadLocalData::paced_time(t);
if (d > 0) {
threads_nz++;
sum += d;
out->print_cr(" %5.0f of %5.0f ms (%5.1f%%): %s",
d * 1000, total * 1000, d/total*100, t->name());
}
threads_total++;
ShenandoahThreadLocalData::reset_paced_time(t);
}
out->print_cr(" %5.0f of %5.0f ms (%5.1f%%): <total>",
sum * 1000, total * 1000, sum/total*100);
if (threads_total > 0) {
out->print_cr(" %5.0f of %5.0f ms (%5.1f%%): <average total>",
sum / threads_total * 1000, total * 1000, sum / threads_total / total * 100);
}
if (threads_nz > 0) {
out->print_cr(" %5.0f of %5.0f ms (%5.1f%%): <average non-zero>",
sum / threads_nz * 1000, total * 1000, sum / threads_nz / total * 100);
}
out->cr();
}

View File

@ -43,9 +43,10 @@ class ShenandoahHeap;
class ShenandoahPacer : public CHeapObj<mtGC> {
private:
ShenandoahHeap* _heap;
BinaryMagnitudeSeq _delays;
double _last_time;
TruncatedSeq* _progress_history;
Monitor* _wait_monitor;
ShenandoahSharedFlag _need_notify_waiters;
// Set once per phase
volatile intptr_t _epoch;
@ -64,6 +65,7 @@ private:
public:
ShenandoahPacer(ShenandoahHeap* heap) :
_heap(heap),
_last_time(os::elapsedTime()),
_progress_history(new TruncatedSeq(5)),
_wait_monitor(new Monitor(Mutex::leaf, "_wait_monitor", true, Monitor::_safepoint_check_always)),
_epoch(0),
@ -89,20 +91,23 @@ public:
void pace_for_alloc(size_t words);
void unpace_for_alloc(intptr_t epoch, size_t words);
void notify_waiters();
intptr_t epoch();
void print_on(outputStream* out) const;
void flush_stats_to_cycle();
void print_cycle_on(outputStream* out);
private:
inline void report_internal(size_t words);
inline void report_progress_internal(size_t words);
inline void add_budget(size_t words);
void restart_with(size_t non_taxable_bytes, double tax_rate);
size_t update_and_get_progress_history();
void wait(size_t time_ms);
void notify_waiters();
};
#endif // SHARE_GC_SHENANDOAH_SHENANDOAHPACER_HPP

View File

@ -47,8 +47,7 @@ inline void ShenandoahPacer::report_alloc(size_t words) {
inline void ShenandoahPacer::report_internal(size_t words) {
assert(ShenandoahPacing, "Only be here when pacing is enabled");
STATIC_ASSERT(sizeof(size_t) <= sizeof(intptr_t));
Atomic::add(&_budget, (intptr_t)words);
add_budget(words);
}
inline void ShenandoahPacer::report_progress_internal(size_t words) {
@ -57,4 +56,17 @@ inline void ShenandoahPacer::report_progress_internal(size_t words) {
Atomic::add(&_progress, (intptr_t)words);
}
inline void ShenandoahPacer::add_budget(size_t words) {
STATIC_ASSERT(sizeof(size_t) <= sizeof(intptr_t));
intptr_t inc = (intptr_t) words;
intptr_t new_budget = Atomic::add(&_budget, inc);
// Was the budget replenished beyond zero? Then all pacing claims
// are satisfied, notify the waiters. Avoid taking any locks here,
// as it can be called from hot paths and/or while holding other locks.
if (new_budget >= 0 && (new_budget - inc) < 0) {
_need_notify_waiters.try_set();
}
}
#endif // SHARE_GC_SHENANDOAH_SHENANDOAHPACER_INLINE_HPP

View File

@ -271,6 +271,17 @@ void ShenandoahPhaseTimings::print_global_on(outputStream* out) const {
out->print_cr(" all workers. Dividing the <total> over the root stage time estimates parallelism.");
out->cr();
out->print_cr(" Pacing delays are measured from entering the pacing code till exiting it. Therefore,");
out->print_cr(" observed pacing delays may be higher than the threshold when paced thread spent more");
out->print_cr(" time in the pacing code. It usually happens when thread is de-scheduled while paced,");
out->print_cr(" OS takes longer to unblock the thread, or JVM experiences an STW pause.");
out->cr();
out->print_cr(" Higher delay would prevent application outpacing the GC, but it will hide the GC latencies");
out->print_cr(" from the STW pause times. Pacing affects the individual threads, and so it would also be");
out->print_cr(" invisible to the usual profiling tools, but would add up to end-to-end application latency.");
out->print_cr(" Raise max pacing delay with care.");
out->cr();
for (uint i = 0; i < _num_phases; i++) {
if (_global_data[i].maximum() != 0) {
out->print_cr(SHENANDOAH_PHASE_NAME_FORMAT " = " SHENANDOAH_S_TIME_FORMAT " s "

View File

@ -60,11 +60,10 @@ class outputStream;
\
f(init_mark_gross, "Pause Init Mark (G)") \
f(init_mark, "Pause Init Mark (N)") \
f(make_parsable, " Make Parsable") \
f(init_manage_tlabs, " Manage TLABs") \
f(init_update_region_states, " Update Region States") \
f(scan_roots, " Scan Roots") \
SHENANDOAH_PAR_PHASE_DO(scan_, " S: ", f) \
f(resize_tlabs, " Resize TLABs") \
\
f(conc_mark, "Concurrent Marking") \
f(conc_mark_roots, " Roots ") \
@ -86,7 +85,7 @@ class outputStream;
SHENANDOAH_PAR_PHASE_DO(purge_weak_par_, " WR: ", f) \
f(purge_cldg, " CLDG") \
f(final_update_region_states, " Update Region States") \
f(retire_tlabs, " Retire TLABs") \
f(final_manage_labs, " Manage GC/TLABs") \
f(choose_cset, " Choose Collection Set") \
f(final_rebuild_freeset, " Rebuild Free Set") \
f(init_evac, " Initial Evacuation") \
@ -113,7 +112,7 @@ class outputStream;
\
f(init_update_refs_gross, "Pause Init Update Refs (G)") \
f(init_update_refs, "Pause Init Update Refs (N)") \
f(init_update_refs_retire_gclabs, " Retire GCLABs") \
f(init_update_refs_manage_gclabs, " Manage GCLABs") \
\
f(conc_update_refs, "Concurrent Update Refs") \
\
@ -139,12 +138,12 @@ class outputStream;
f(full_gc, "Pause Full GC (N)") \
f(full_gc_heapdump_pre, " Pre Heap Dump") \
f(full_gc_prepare, " Prepare") \
f(full_gc_update_roots, " Update Roots") \
SHENANDOAH_PAR_PHASE_DO(full_gc_update_roots_, " FU: ", f) \
f(full_gc_scan_roots, " Scan Roots") \
SHENANDOAH_PAR_PHASE_DO(full_gc_scan_roots_, " FS: ", f) \
f(full_gc_scan_conc_roots, " Scan Concurrent Roots") \
SHENANDOAH_PAR_PHASE_DO(full_gc_scan_conc_roots, " FCS: ", f) \
f(full_gc_update_roots, " Update Roots") \
SHENANDOAH_PAR_PHASE_DO(full_gc_update_roots_, " FU: ", f) \
f(full_gc_mark, " Mark") \
f(full_gc_mark_finish_queues, " Finish Queues") \
f(full_gc_weakrefs, " Weak References") \
@ -166,10 +165,10 @@ class outputStream;
f(full_gc_copy_objects_humong, " Humongous Objects") \
f(full_gc_copy_objects_reset_complete, " Reset Complete Bitmap") \
f(full_gc_copy_objects_rebuild, " Rebuild Region Sets") \
f(full_gc_resize_tlabs, " Resize TLABs") \
f(full_gc_heapdump_post, " Post Heap Dump") \
\
f(conc_uncommit, "Concurrent Uncommit") \
f(pacing, "Pacing") \
\
f(heap_iteration_roots, "Heap Iteration") \
SHENANDOAH_PAR_PHASE_DO(heap_iteration_roots_, " HI: ", f) \

View File

@ -93,9 +93,11 @@ private:
JVMTI_ONLY(ShenandoahJVMTIWeakRoot _jvmti_weak_roots;)
JFR_ONLY(ShenandoahJFRWeakRoot _jfr_weak_roots;)
public:
ShenandoahSerialWeakRoots(ShenandoahPhaseTimings::Phase phase) :
JVMTI_ONLY(_jvmti_weak_roots(phase))
JFR_ONLY(JVMTI_ONLY(COMMA)_jfr_weak_roots(phase)) {};
ShenandoahSerialWeakRoots(ShenandoahPhaseTimings::Phase phase)
JVMTI_ONLY(: _jvmti_weak_roots(phase))
JFR_ONLY(NOT_JVMTI(:) JVMTI_ONLY(COMMA) _jfr_weak_roots(phase))
{};
void weak_oops_do(BoolObjectClosure* is_alive, OopClosure* keep_alive, uint worker_id);
void weak_oops_do(OopClosure* cl, uint worker_id);
};

View File

@ -36,7 +36,6 @@ SATBMarkQueue& ShenandoahSATBMarkQueueSet::satb_queue_for_thread(Thread* const t
return ShenandoahThreadLocalData::satb_mark_queue(t);
}
template <bool RESOLVE>
class ShenandoahSATBMarkQueueFilterFn {
ShenandoahHeap* const _heap;
@ -46,17 +45,13 @@ public:
// Return true if entry should be filtered out (removed), false if
// it should be retained.
bool operator()(const void* entry) const {
return !_heap->requires_marking<RESOLVE>(entry);
return !_heap->requires_marking(entry);
}
};
void ShenandoahSATBMarkQueueSet::filter(SATBMarkQueue* queue) {
ShenandoahHeap* heap = ShenandoahHeap::heap();
if (heap->has_forwarded_objects()) {
apply_filter(ShenandoahSATBMarkQueueFilterFn<true>(heap), queue);
} else {
apply_filter(ShenandoahSATBMarkQueueFilterFn<false>(heap), queue);
}
apply_filter(ShenandoahSATBMarkQueueFilterFn(heap), queue);
}
void ShenandoahSATBMarkQueue::handle_completed_buffer() {

View File

@ -49,6 +49,7 @@ private:
uint _worker_id;
bool _force_satb_flush;
int _disarmed_value;
double _paced_time;
ShenandoahThreadLocalData() :
_gc_state(0),
@ -59,7 +60,8 @@ private:
_gclab_size(0),
_worker_id(INVALID_WORKER_ID),
_force_satb_flush(false),
_disarmed_value(0) {
_disarmed_value(0),
_paced_time(0) {
// At least on x86_64, nmethod entry barrier encodes _disarmed_value offset
// in instruction as disp8 immed
@ -139,6 +141,18 @@ public:
data(thread)->_gclab_size = v;
}
static void add_paced_time(Thread* thread, double v) {
data(thread)->_paced_time += v;
}
static double paced_time(Thread* thread) {
return data(thread)->_paced_time;
}
static void reset_paced_time(Thread* thread) {
data(thread)->_paced_time = 0;
}
static void set_disarmed_value(Thread* thread, int value) {
data(thread)->_disarmed_value = value;
}

View File

@ -690,7 +690,10 @@ void ShenandoahVerifier::verify_at_safepoint(const char *label,
}
OrderAccess::fence();
_heap->make_parsable(false);
if (UseTLAB) {
_heap->labs_make_parsable();
}
// Allocate temporary bitmap for storing marking wavefront:
_verification_bit_map->clear();

View File

@ -993,11 +993,15 @@ bool IfNode::fold_compares_helper(ProjNode* proj, ProjNode* success, ProjNode* f
}
if (lo && hi) {
Node* hook = new Node(1);
hook->init_req(0, lo); // Add a use to lo to prevent him from dying
// Merge the two compares into a single unsigned compare by building (CmpU (n - lo) (hi - lo))
Node* adjusted_val = igvn->transform(new SubINode(n, lo));
if (adjusted_lim == NULL) {
adjusted_lim = igvn->transform(new SubINode(hi, lo));
}
hook->del_req(0); // Just yank bogus edge
hook->destruct();
Node* newcmp = igvn->transform(new CmpUNode(adjusted_val, adjusted_lim));
Node* newbool = igvn->transform(new BoolNode(newcmp, cond));

View File

@ -3,12 +3,14 @@
<plist version="1.0">
<dict>
<key>CFBundleIdentifier</key>
<string>net.java.openjdk.cmd</string>
<string>@@ID@@</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<string>@@VERSION@@</string>
<key>NSMicrophoneUsageDescription</key>
<string>The application is requesting access to the microphone.</string>
</dict>
</plist>

View File

@ -3,7 +3,7 @@
<plist version="1.0">
<dict>
<key>CFBundleIdentifier</key>
<string>net.java.openjdk.cmd</string>
<string>@@ID@@</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
@ -11,7 +11,7 @@
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<string>@@VERSION@@</string>
<key>SecTaskAccess</key>
<string>allowed</string>
</dict>

View File

@ -185,8 +185,10 @@ public class Net {
nx = new SocketException("Socket is not bound yet");
else if (x instanceof UnsupportedAddressTypeException)
nx = new SocketException("Unsupported address type");
else if (x instanceof UnresolvedAddressException) {
else if (x instanceof UnresolvedAddressException)
nx = new SocketException("Unresolved address");
else if (x instanceof IOException) {
nx = new SocketException(x.getMessage());
}
if (nx != x)
nx.initCause(x);

View File

@ -22,7 +22,7 @@
.\"
.\" Automatically generated by Pandoc 2.3.1
.\"
.TH "JAVA" "1" "2020" "JDK 14" "JDK Commands"
.TH "JAVA" "1" "2020" "JDK 15" "JDK Commands"
.hy
.SH NAME
.PP
@ -180,9 +180,10 @@ API that was defined in JDK \f[I]N\f[R].
with new values added and old values removed.
You\[aq]ll get an error message if you use a value of \f[I]N\f[R] that is
no longer supported.
Supported values of \f[I]N\f[R] for this release are \f[CB]7\f[R],
\f[CB]8\f[R], \f[CB]9\f[R], \f[CB]10\f[R], \f[CB]11\f[R], \f[CB]12\f[R],
\f[CB]13\f[R], and \f[CB]14\f[R].
The supported values of \f[I]N\f[R] are the current Java SE release
(\f[CB]15\f[R]) and a limited number of previous releases, detailed in the
command\-line help for \f[CB]javac\f[R], under the \f[CB]\-\-source\f[R] and
\f[CB]\-\-release\f[R] options.
.RE
.PP
If the file does not have the \f[CB]\&.java\f[R] extension, the
@ -437,9 +438,9 @@ After the library name, a comma\-separated list of options specific to
the library can be used.
.RS
.IP \[bu] 2
\f[B]Oracle Solaris, Linux, and macOS:\f[R] If the option
\f[CB]\-agentlib:foo\f[R] is specified, then the JVM attempts to load the
library named \f[CB]libfoo.so\f[R] in the location specified by the
\f[B]Linux and macOS:\f[R] If the option \f[CB]\-agentlib:foo\f[R] is
specified, then the JVM attempts to load the library named
\f[CB]libfoo.so\f[R] in the location specified by the
\f[CB]LD_LIBRARY_PATH\f[R] system variable (on macOS this variable is
\f[CB]DYLD_LIBRARY_PATH\f[R]).
.IP \[bu] 2
@ -784,8 +785,8 @@ Specifies a list of directories, JAR files, and ZIP archives to append
to the end of the default bootstrap class path.
.RS
.PP
\f[B]Oracle Solaris, Linux, and macOS:\f[R] Colons (\f[CB]:\f[R]) separate
entities in this list.
\f[B]Linux and macOS:\f[R] Colons (\f[CB]:\f[R]) separate entities in this
list.
.PP
\f[B]Windows:\f[R] Semicolons (\f[CB];\f[R]) separate entities in this
list.
@ -948,7 +949,7 @@ running user cleanup code (such as closing database connections) at
shutdown, even if the JVM terminates abruptly.
.RS
.IP \[bu] 2
\f[B]Oracle Solaris, Linux, and macOS:\f[R]
\f[B]Linux and macOS:\f[R]
.RS 2
.IP \[bu] 2
The JVM catches signals to implement shutdown hooks for unexpected
@ -994,8 +995,8 @@ process \f[CB]CTRL_C_EVENT\f[R], \f[CB]CTRL_CLOSE_EVENT\f[R],
.PP
There are two consequences of specifying \f[CB]\-Xrs\f[R]:
.IP \[bu] 2
\f[B]Oracle Solaris, Linux, and macOS:\f[R] \f[CB]SIGQUIT\f[R] thread dumps
aren\[aq]t available.
\f[B]Linux and macOS:\f[R] \f[CB]SIGQUIT\f[R] thread dumps aren\[aq]t
available.
.IP \[bu] 2
\f[B]Windows:\f[R] Ctrl + Break thread dumps aren\[aq]t available.
.PP
@ -1082,8 +1083,6 @@ Linux/x64 (64\-bit): 1024 KB
.IP \[bu] 2
macOS (64\-bit): 1024 KB
.IP \[bu] 2
Oracle Solaris (64\-bit): 1024 KB
.IP \[bu] 2
Windows: The default value depends on virtual memory
.PP
The following examples set the thread stack size to 1024 KB in different
@ -1334,8 +1333,8 @@ the identifier of the process is specified as \f[CB]%p\f[R]):
\f[CB]\-XX:ErrorFile=./hs_err_pid%p.log\f[R]
.RE
.IP \[bu] 2
\f[B]Oracle Solaris, Linux, and macOS:\f[R] The following example shows
how to set the error log to \f[CB]/var/log/java/java_error.log\f[R]:
\f[B]Linux and macOS:\f[R] The following example shows how to set the
error log to \f[CB]/var/log/java/java_error.log\f[R]:
.RS 2
.RS
.PP
@ -1357,8 +1356,7 @@ Otherwise, if the file can\[aq]t be created in the specified directory
(due to insufficient space, permission problem, or another issue), then
the file is created in the temporary directory for the operating system:
.IP \[bu] 2
\f[B]Oracle Solaris, Linux, and macOS:\f[R] The temporary directory is
\f[CB]/tmp\f[R].
\f[B]Linux and macOS:\f[R] The temporary directory is \f[CB]/tmp\f[R].
.IP \[bu] 2
\f[B]Windows:\f[R] The temporary directory is specified by the value of
the \f[CB]TMP\f[R] environment variable; if that environment variable
@ -1579,12 +1577,11 @@ If the string contains spaces, then it must be enclosed in quotation
marks.
.RS
.IP \[bu] 2
\f[B]Oracle Solaris, Linux, and macOS:\f[R] The following example shows
how the \f[CB]\-XX:OnError\f[R] option can be used to run the
\f[CB]gcore\f[R] command to create a core image, and start the
\f[CB]gdb\f[R] debugger to attach to the process in case of an
irrecoverable error (the \f[CB]%p\f[R] designates the current process
identifier):
\f[B]Linux and macOS:\f[R] The following example shows how the
\f[CB]\-XX:OnError\f[R] option can be used to run the \f[CB]gcore\f[R]
command to create a core image, and start the \f[CB]gdb\f[R] debugger to
attach to the process in case of an irrecoverable error (the \f[CB]%p\f[R]
designates the current process identifier):
.RS 2
.RS
.PP
@ -1691,7 +1688,7 @@ source with a null\-detail message.
The null\-detail message is calculated and returned by
\f[CB]NullPointerException.getMessage()\f[R], and will be printed as the
exception message along with the method, filename, and line number.
By default, this option is disabled.
By default, this option is enabled.
.RS
.RE
.TP
@ -1839,8 +1836,6 @@ Linux/x64 (64\-bit): 1024 KB
.IP \[bu] 2
macOS (64\-bit): 1024 KB
.IP \[bu] 2
Oracle Solaris (64\-bit): 1024 KB
.IP \[bu] 2
Windows: The default value depends on virtual memory
.PP
The following examples show how to set the thread stack size to 1
@ -1856,17 +1851,6 @@ megabyte in different units:
This option is similar to \f[CB]\-Xss\f[R].
.RE
.TP
.B \f[CB]\-XX:\-UseBiasedLocking\f[R]
Disables the use of biased locking.
Some applications with significant amounts of uncontended
synchronization may attain significant speedups with this flag enabled,
but applications with certain patterns of locking may see slowdowns.
\&.
.RS
.PP
By default, this option is enabled.
.RE
.TP
.B \f[CB]\-XX:\-UseCompressedOops\f[R]
Disables the use of compressed pointers.
By default, this option is enabled, and compressed pointers are used.
@ -2362,6 +2346,7 @@ To disable method inlining, specify \f[CB]\-XX:\-Inline\f[R].
.B \f[CB]\-XX:InlineSmallCode=\f[R]\f[I]size\f[R]
Sets the maximum code size (in bytes) for already compiled methods that
may be inlined.
This flag only applies to the C2 compiler.
Append the letter \f[CB]k\f[R] or \f[CB]K\f[R] to indicate kilobytes,
\f[CB]m\f[R] or \f[CB]M\f[R] to indicate megabytes, or \f[CB]g\f[R] or
\f[CB]G\f[R] to indicate gigabytes.
@ -2395,6 +2380,7 @@ console every time a method is compiled by using the
.TP
.B \f[CB]\-XX:FreqInlineSize=\f[R]\f[I]size\f[R]
Sets the maximum bytecode size (in bytes) of a hot method to be inlined.
This flag only applies to the C2 compiler.
Append the letter \f[CB]k\f[R] or \f[CB]K\f[R] to indicate kilobytes,
\f[CB]m\f[R] or \f[CB]M\f[R] to indicate megabytes, or \f[CB]g\f[R] or
\f[CB]G\f[R] to indicate gigabytes.
@ -2410,6 +2396,22 @@ In the following example it is set to 325 bytes:
.B \f[CB]\-XX:MaxInlineSize=\f[R]\f[I]size\f[R]
Sets the maximum bytecode size (in bytes) of a cold method to be
inlined.
This flag only applies to the C2 compiler.
Append the letter \f[CB]k\f[R] or \f[CB]K\f[R] to indicate kilobytes,
\f[CB]m\f[R] or \f[CB]M\f[R] to indicate megabytes, or \f[CB]g\f[R] or
\f[CB]G\f[R] to indicate gigabytes.
By default, the maximum bytecode size is set to 35 bytes:
.RS
.RS
.PP
\f[CB]\-XX:MaxInlineSize=35\f[R]
.RE
.RE
.TP
.B \f[CB]\-XX:C1MaxInlineSize=\f[R]\f[I]size\f[R]
Sets the maximum bytecode size (in bytes) of a cold method to be
inlined.
This flag only applies to the C1 compiler.
Append the letter \f[CB]k\f[R] or \f[CB]K\f[R] to indicate kilobytes,
\f[CB]m\f[R] or \f[CB]M\f[R] to indicate megabytes, or \f[CB]g\f[R] or
\f[CB]G\f[R] to indicate gigabytes.
@ -2424,6 +2426,23 @@ By default, the maximum bytecode size is set to 35 bytes:
.B \f[CB]\-XX:MaxTrivialSize=\f[R]\f[I]size\f[R]
Sets the maximum bytecode size (in bytes) of a trivial method to be
inlined.
This flag only applies to the C2 compiler.
Append the letter \f[CB]k\f[R] or \f[CB]K\f[R] to indicate kilobytes,
\f[CB]m\f[R] or \f[CB]M\f[R] to indicate megabytes, or \f[CB]g\f[R] or
\f[CB]G\f[R] to indicate gigabytes.
By default, the maximum bytecode size of a trivial method is set to 6
bytes:
.RS
.RS
.PP
\f[CB]\-XX:MaxTrivialSize=6\f[R]
.RE
.RE
.TP
.B \f[CB]\-XX:C1MaxTrivialSize=\f[R]\f[I]size\f[R]
Sets the maximum bytecode size (in bytes) of a trivial method to be
inlined.
This flag only applies to the C1 compiler.
Append the letter \f[CB]k\f[R] or \f[CB]K\f[R] to indicate kilobytes,
\f[CB]m\f[R] or \f[CB]M\f[R] to indicate megabytes, or \f[CB]g\f[R] or
\f[CB]G\f[R] to indicate gigabytes.
@ -2675,7 +2694,7 @@ Flags that control intrinsics now require the option
.TP
.B \f[CB]\-XX:+UseSHA\f[R]
Enables hardware\-based intrinsics for SHA crypto hash functions for
SPARC hardware.
some hardware.
The \f[CB]UseSHA\f[R] option is used in conjunction with the
\f[CB]UseSHA1Intrinsics\f[R], \f[CB]UseSHA256Intrinsics\f[R], and
\f[CB]UseSHA512Intrinsics\f[R] options.
@ -2817,7 +2836,7 @@ Default value is 1/10th of \f[CB]\-XX:LoopStripMiningIter\f[R].
.TP
.B \f[CB]\-XX:+UseFMA\f[R]
Enables hardware\-based FMA intrinsics for hardware where FMA
instructions are available (such as, Intel, SPARC, and ARM64).
instructions are available (such as, Intel and ARM64).
FMA intrinsics are generated for the
\f[CB]java.lang.Math.fma(\f[R]\f[I]a\f[R]\f[CB],\f[R] \f[I]b\f[R]\f[CB],\f[R]
\f[I]c\f[R]\f[CB])\f[R] methods that calculate the value of \f[CB](\f[R]
@ -2916,8 +2935,8 @@ different JDK version.
.RE
.TP
.B \f[CB]\-XX:+ExtendedDTraceProbes\f[R]
\f[B]Oracle Solaris, Linux, and macOS:\f[R] Enables additional
\f[CB]dtrace\f[R] tool probes that affect the performance.
\f[B]Linux and macOS:\f[R] Enables additional \f[CB]dtrace\f[R] tool probes
that affect the performance.
By default, this option is disabled and \f[CB]dtrace\f[R] performs only
standard probes.
.RS
@ -2949,9 +2968,8 @@ The following example shows how to set the default file explicitly
\f[CB]\-XX:HeapDumpPath=./java_pid%p.hprof\f[R]
.RE
.IP \[bu] 2
\f[B]Oracle Solaris, Linux, and macOS:\f[R] The following example shows
how to set the heap dump file to
\f[CB]/var/log/java/java_heapdump.hprof\f[R]:
\f[B]Linux and macOS:\f[R] The following example shows how to set the
heap dump file to \f[CB]/var/log/java/java_heapdump.hprof\f[R]:
.RS 2
.RS
.PP
@ -2975,8 +2993,8 @@ By default, the file is created in the current working directory, and
it\[aq]s named \f[CB]hotspot.log\f[R].
.RS
.IP \[bu] 2
\f[B]Oracle Solaris, Linux, and macOS:\f[R] The following example shows
how to set the log file to \f[CB]/var/log/java/hotspot.log\f[R]:
\f[B]Linux and macOS:\f[R] The following example shows how to set the log
file to \f[CB]/var/log/java/hotspot.log\f[R]:
.RS 2
.RS
.PP
@ -2999,7 +3017,7 @@ Enables printing of a class instance histogram after one of the
following events:
.RS
.IP \[bu] 2
\f[B]Oracle Solaris, Linux, and macOS:\f[R] \f[CB]Control+Break\f[R]
\f[B]Linux and macOS:\f[R] \f[CB]Control+Break\f[R]
.IP \[bu] 2
\f[B]Windows:\f[R] \f[CB]Control+C\f[R] (\f[CB]SIGTERM\f[R])
.PP
@ -3015,7 +3033,7 @@ Enables printing of \f[CB]java.util.concurrent\f[R] locks after one of the
following events:
.RS
.IP \[bu] 2
\f[B]Oracle Solaris, Linux, and macOS:\f[R] \f[CB]Control+Break\f[R]
\f[B]Linux and macOS:\f[R] \f[CB]Control+Break\f[R]
.IP \[bu] 2
\f[B]Windows:\f[R] \f[CB]Control+C\f[R] (\f[CB]SIGTERM\f[R])
.PP
@ -3278,13 +3296,11 @@ amount of memory used for the Java heap:
.TP
.B \f[CB]\-XX:InitialSurvivorRatio=\f[R]\f[I]ratio\f[R]
Sets the initial survivor space ratio used by the throughput garbage
collector (which is enabled by the \f[CB]\-XX:+UseParallelGC\f[R] and/or
\f[CB]\-XX:+UseParallelOldGC\f[R] options).
collector (which is enabled by the \f[CB]\-XX:+UseParallelGC\f[R] option).
Adaptive sizing is enabled by default with the throughput garbage
collector by using the \f[CB]\-XX:+UseParallelGC\f[R] and
\f[CB]\-XX:+UseParallelOldGC\f[R] options, and the survivor space is
resized according to the application behavior, starting with the initial
value.
collector by using the \f[CB]\-XX:+UseParallelGC\f[R] option, and the
survivor space is resized according to the application behavior,
starting with the initial value.
If adaptive sizing is disabled (using the
\f[CB]\-XX:\-UseAdaptiveSizePolicy\f[R] option), then the
\f[CB]\-XX:SurvivorRatio\f[R] option should be used to set the size of the
@ -3811,8 +3827,6 @@ application by leveraging multiple processors.
.RS
.PP
By default, this option is disabled and the default collector is used.
If it\[aq]s enabled, then the \f[CB]\-XX:+UseParallelOldGC\f[R] option is
automatically enabled, unless you explicitly disable it.
.RE
.TP
.B \f[CB]\-XX:+UseSerialGC\f[R]
@ -3855,19 +3869,66 @@ To disable the use of TLABs, specify the option \f[CB]\-XX:\-UseTLAB\f[R].
.RE
.TP
.B \f[CB]\-XX:+UseZGC\f[R]
Enables the use of the Z garbage collector.
This garbage collector is best for providing lowest latency with large
Java heaps at some throughput cost.
This is an experimental garbage collector, you need to specify
\f[CB]\-XX:+UnlockExperimentalVMOptions\f[R] before \f[CB]\-XX:+UseZGC\f[R]
on the command line.
Enables the use of the Z garbage collector (ZGC).
This is a low latency garbage collector, providing max pause times of a
few milliseconds, at some throughput cost.
Pause times are independent of what heap size is used.
Supports heap sizes from 8MB to 16TB.
.RS
.PP
Example:
.RS
.PP
\f[CB]\-XX:+UnlockExperimentalVMOptions\ \-XX:+UseZGC\f[R]
.RE
.TP
.B \f[CB]\-XX:ZAllocationSpikeTolerance\f[R]=\f[I]factor\f[R]
Sets the allocation spike tolerance for ZGC.
By default, this option is set to 2.0.
This factor describes the level of allocation spikes to expect.
For example, using a factor of 3.0 means the current allocation rate can
be expected to triple at any time.
.RS
.RE
.TP
.B \f[CB]\-XX:ZCollectionInterval\f[R]=\f[I]seconds\f[R]
Sets the maximum interval (in seconds) between two GC cycles when using
ZGC.
By default, this option is set to 0 (disabled).
.RS
.RE
.TP
.B \f[CB]\-XX:ZFragmentationLimit\f[R]=\f[I]percent\f[R]
Sets the maximum acceptable heap fragmentation (in percent) for ZGC.
By default, this option is set to 25.
Using a lower value will cause the heap to be compacted more
aggressively, to reclaim more memory at the cost of using more CPU time.
.RS
.RE
.TP
.B \f[CB]\-XX:+ZProactive\f[R]
Enables proactive GC cycles when using ZGC.
By default, this option is enabled.
ZGC will start a proactive GC cycle if doing so is expected to have
minimal impact on the running application.
This is useful if the application is mostly idle or allocates very few
objects, but you still want to keep the heap size down and allow
reference processing to happen even when there are a lot of free space
on the heap.
.RS
.RE
.TP
.B \f[CB]\-XX:+ZUncommit\f[R]
Enables uncommitting of unused heap memory when using ZGC.
By default, this option is enabled.
Uncommitting unused heap memory will lower the memory footprint of the
JVM, and make that memory available for other processes to use.
.RS
.RE
.TP
.B \f[CB]\-XX:ZUncommitDelay\f[R]=\f[I]seconds\f[R]
Sets the amount of time (in seconds) that heap memory must have been
unused before being uncommitted.
By default, this option is set to 300 (5 minutes).
Committing and uncommitting memory are relatively expensive operations.
Using a lower value will cause heap memory to be uncommitted earlier, at
the risk of soon having to commit it again.
.RS
.RE
.SH DEPRECATED JAVA OPTIONS
.PP
@ -3993,27 +4054,20 @@ The replacement Unified Logging syntax is
See \f[B]Enable Logging with the JVM Unified Logging Framework\f[R].
.RE
.TP
.B \f[CB]\-XX:+UseParallelOldGC\f[R]
Enables the use of the parallel garbage collector for full GCs.
By default, this option is disabled.
Enabling it automatically enables the \f[CB]\-XX:+UseParallelGC\f[R]
option.
.B \f[CB]\-XX:+UseBiasedLocking\f[R]
Enables the use of biased locking.
Some applications with significant amounts of uncontended
synchronization may attain significant speedups with this flag enabled,
but applications with certain patterns of locking may see slowdowns.
.RS
.PP
By default, this option is disabled.
.RE
.SH OBSOLETE JAVA OPTIONS
.PP
These \f[CB]java\f[R] options are still accepted but ignored, and a
warning is issued when they\[aq]re used.
.TP
.B \f[CB]\-XX:+FailOverToOldVerifier\f[R]
Enables automatic failover to the old verifier when the new type checker
fails.
By default, this option is disabled and it\[aq]s ignored (that is,
treated as disabled) for classes with a recent bytecode version.
You can enable it only for classes with older versions of the bytecode.
.RS
.RE
.TP
.B \f[CB]\-XX:+UseMembar\f[R]
Enabled issuing membars on thread\-state transitions.
This option was disabled by default on all platforms except ARM servers,
@ -4035,13 +4089,48 @@ This option was deprecated in JDK 8 and superseded by the
\f[CB]\-XX:MetaspaceSize\f[R] option.
.RS
.RE
.TP
.B \f[CB]\-XX:+UseParallelOldGC\f[R]
Enables the use of the parallel garbage collector for full GCs.
By default, this option is disabled.
Enabling it automatically enables the \f[CB]\-XX:+UseParallelGC\f[R]
option.
.RS
.RE
.SH REMOVED JAVA OPTIONS
.PP
No documented \f[CB]java\f[R] options have been removed in JDK 14.
These \f[CB]java\f[R] options have been removed in JDK 15 and using them
results in an error of:
.RS
.PP
\f[CB]Unrecognized\ VM\ option\f[R] \f[I]option\-name\f[R]
.RE
.TP
.B \f[CB]\-XX:+FailOverToOldVerifier\f[R]
Enables automatic failover to the old verifier when the new type checker
fails.
By default, this option is disabled and it\[aq]s ignored (that is,
treated as disabled) for classes with a recent bytecode version.
You can enable it only for classes with older versions of the bytecode.
.RS
.RE
.TP
.B \f[CB]\-XX:+UseConcMarkSweepGC\f[R]
Enables the use of the CMS garbage collector for the old generation.
CMS is an alternative to the default garbage collector (G1), which also
focuses on meeting application latency requirements.
By default, this option is disabled and the collector is selected
automatically based on the configuration of the machine and type of the
JVM.
.RS
.RE
.PP
For the lists and descriptions of options removed in previous releases
see the \f[I]Removed Java Options\f[R] section in:
.IP \[bu] 2
\f[B]Java Platform, Standard Edition Tools Reference, Release 14\f[R]
[https://docs.oracle.com/en/java/javase/14/docs/specs/man/java.html]
.IP \[bu] 2
\f[B]Java Platform, Standard Edition Tools Reference, Release 13\f[R]
[https://docs.oracle.com/en/java/javase/13/docs/specs/man/java.html]
.IP \[bu] 2
@ -5060,11 +5149,7 @@ fragmentation, which could make it impossible to reserve enough large
page memory.
When this happens, either the OS or JVM reverts to using regular pages.
.PP
Oracle Solaris, Linux, and Windows support large pages.
.SS Large Pages Support for Oracle Solaris
.PP
Oracle Solaris includes Multiple Page Size Support (MPSS).
No additional configuration is necessary.
Linux and Windows support large pages.
.SS Large Pages Support for Linux
.PP
The 2.6 kernel supports large pages.
@ -5623,9 +5708,9 @@ Create a single list of classes used by all the applications that will
share the shared archive file.
.RS 4
.PP
\f[B]Oracle Solaris, Linux, and macOS\f[R] The following commands combine
the files \f[CB]hello.classlist\f[R] and \f[CB]hi.classlist\f[R] into one
file, \f[CB]common.classlist\f[R]:
\f[B]Linux and macOS\f[R] The following commands combine the files
\f[CB]hello.classlist\f[R] and \f[CB]hi.classlist\f[R] into one file,
\f[CB]common.classlist\f[R]:
.RS
.PP
\f[CB]cat\ hello.classlist\ hi.classlist\ >\ common.classlist\f[R]

View File

@ -1,4 +1,4 @@
.\" Copyright (c) 1994, 2019, Oracle and/or its affiliates. All rights reserved.
.\" Copyright (c) 2019, 2020, Oracle and/or its affiliates. All rights reserved.
.\" 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,7 +21,7 @@
.\"
.\" Automatically generated by Pandoc 2.3.1
.\"
.TH "JFR" "1" "2020" "JDK 14" "JDK Commands"
.TH "JFR" "1" "2020" "JDK 15" "JDK Commands"
.hy
.SH NAME
.PP

View File

@ -1,5 +1,5 @@
.\"t
.\" Copyright (c) 1994, 2019, Oracle and/or its affiliates. All rights reserved.
.\" Copyright (c) 1998, 2020, Oracle and/or its affiliates. All rights reserved.
.\" 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,7 +22,7 @@
.\"
.\" Automatically generated by Pandoc 2.3.1
.\"
.TH "KEYTOOL" "1" "2020" "JDK 14" "JDK Commands"
.TH "KEYTOOL" "1" "2020" "JDK 15" "JDK Commands"
.hy
.SH NAME
.PP
@ -101,6 +101,16 @@ It can also display other security\-related information.
.PP
The \f[CB]keytool\f[R] command stores the keys and certificates in a
keystore.
.PP
The \f[CB]keytool\f[R] command uses the
\f[CB]jdk.certpath.disabledAlgorithms\f[R] and
\f[CB]jdk.security.legacyAlgorithms\f[R] security properties to determine
which algorithms are considered a security risk.
It emits warnings when disabled or legacy algorithms are being used.
The \f[CB]jdk.certpath.disabledAlgorithms\f[R] and
\f[CB]jdk.security.legacyAlgorithms\f[R] security properties are defined
in the \f[CB]java.security\f[R] file (located in the JDK\[aq]s
\f[CB]$JAVA_HOME/conf/security\f[R] directory).
.SH COMMAND AND OPTION NOTES
.PP
The following notes apply to the descriptions in \f[B]Commands and
@ -260,12 +270,10 @@ For example,
.PP
\f[B]Note:\f[R]
.PP
For compatibility reasons, the SunPKCS11 and OracleUcrypto providers can
still be loaded with
\f[CB]\-providerclass\ sun.security.pkcs11.SunPKCS11\f[R] and
\f[CB]\-providerclass\ com.oracle.security.crypto.UcryptoProvider\f[R]
even if they are now defined in modules.
These are the only modules included in JDK that need a configuration,
For compatibility reasons, the SunPKCS11 provider can still be loaded
with \f[CB]\-providerclass\ sun.security.pkcs11.SunPKCS11\f[R] even if it
is now defined in a module.
This is the only module included in the JDK that needs a configuration,
and therefore the most widely used with the \f[CB]\-providerclass\f[R]
option.
For legacy security providers located on classpath and loaded by
@ -2199,8 +2207,7 @@ file.
The security properties file is called \f[CB]java.security\f[R], and
resides in the security properties directory:
.IP \[bu] 2
\f[B]Oracle Solaris, Linux, and OS X:\f[R]
\f[CB]java.home/lib/security\f[R]
\f[B]Linux and OS X:\f[R] \f[CB]java.home/lib/security\f[R]
.IP \[bu] 2
\f[B]Windows:\f[R] \f[CB]java.home\\lib\\security\f[R]
.PP
@ -2477,15 +2484,10 @@ A certificates file named \f[CB]cacerts\f[R] resides in the security
properties directory:
.RS
.IP \[bu] 2
\f[B]Oracle Solaris, Linux, and OS X:\f[R]
\f[I]JAVA_HOME\f[R]\f[CB]/lib/security\f[R]
\f[B]Linux and OS X:\f[R] \f[I]JAVA_HOME\f[R]\f[CB]/lib/security\f[R]
.IP \[bu] 2
\f[B]Windows:\f[R] \f[I]JAVA_HOME\f[R]\f[CB]\\lib\\security\f[R]
.PP
\f[I]JAVA_HOME\f[R] is the runtime environment directory, which is the
\f[CB]jre\f[R] directory in the JDK or the top\-level directory of the
Java Runtime Environment (JRE).
.PP
The \f[CB]cacerts\f[R] file represents a system\-wide keystore with CA
certificates.
System administrators can configure and manage that file with the
@ -2493,8 +2495,8 @@ System administrators can configure and manage that file with the
type.
The \f[CB]cacerts\f[R] keystore file ships with a default set of root CA
certificates.
For Oracle Solaris, Linux, OS X, and Windows, you can list the default
certificates with the following command:
For Linux, OS X, and Windows, you can list the default certificates with
the following command:
.RS
.PP
\f[CB]keytool\ \-list\ \-cacerts\f[R]
@ -2518,10 +2520,10 @@ bundled in the \f[CB]cacerts\f[R] file and make your own trust decisions.
.PP
To remove an untrusted CA certificate from the \f[CB]cacerts\f[R] file,
use the \f[CB]\-delete\f[R] option of the \f[CB]keytool\f[R] command.
You can find the \f[CB]cacerts\f[R] file in the JRE installation
directory.
You can find the \f[CB]cacerts\f[R] file in the JDK\[aq]s
\f[CB]$JAVA_HOME/lib/security\f[R] directory.
Contact your system administrator if you don\[aq]t have permission to
edit this file
edit this file.
.RE
.TP
.B Internet RFC 1421 Certificate Encoding Standard
@ -2672,7 +2674,7 @@ fingerprints, as follows:
\f[R]
.fi
.PP
\f[B]Oracle Solaris Example:\f[R]
\f[B]Linux Example:\f[R]
.PP
View the certificate first with the \f[CB]\-printcert\f[R] command or the
\f[CB]\-importcert\f[R] command without the \f[CB]\-noprompt\f[R] option.
@ -2743,7 +2745,7 @@ it can generate certificates that don\[aq]t conform to the standard,
such as self\-signed certificates that would be used for internal
testing purposes.
Certificates that don\[aq]t conform to the standard might be rejected by
JRE or other applications.
the JDK or other applications.
Users should ensure that they provide the correct options for
\f[CB]\-dname\f[R], \f[CB]\-ext\f[R], and so on.
.SH IMPORT A NEW TRUSTED CERTIFICATE

View File

@ -1,4 +1,4 @@
.\" Copyright (c) 1994, 2019, Oracle and/or its affiliates. All rights reserved.
.\" Copyright (c) 1998, 2020, Oracle and/or its affiliates. All rights reserved.
.\" 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,7 +21,7 @@
.\"
.\" Automatically generated by Pandoc 2.3.1
.\"
.TH "RMID" "1" "2020" "JDK 14" "JDK Commands"
.TH "RMID" "1" "2020" "JDK 15" "JDK Commands"
.hy
.SH NAME
.PP
@ -38,6 +38,12 @@ See \f[B]Options for rmid\f[R].
.RE
.SH DESCRIPTION
.PP
\f[B]Deprecation Notice:\f[R] The rmid tool and the RMI Activation
mechanism have been deprecated and may be removed from a future version
of the platform.
See \f[B]JEP 385\f[R] [https://openjdk.java.net/jeps/385] for further
information.
.PP
The \f[CB]rmid\f[R] command starts the activation system daemon.
The activation system daemon must be started before objects that can be
activated are either registered with the activation system or activated
@ -79,11 +85,10 @@ and a registry on the registry\[aq]s default port, 1099.
.PP
\f[CB]rmid\ \-J\-Djava.security.policy=rmid.policy\ \-port\ 1099\f[R]
.RE
.SH START RMID ON DEMAND (ORACLE SOLARIS AND LINUX ONLY)
.SH START RMID ON DEMAND (LINUX ONLY)
.PP
An alternative to starting \f[CB]rmid\f[R] from the command line is to
configure \f[CB]inetd\f[R] (Oracle Solaris) or \f[CB]xinetd\f[R] (Linux) to
start \f[CB]rmid\f[R] on demand.
configure \f[CB]xinetd\f[R] (Linux) to start \f[CB]rmid\f[R] on demand.
.PP
When RMID starts, it attempts to obtain an inherited channel (inherited
from \f[CB]inetd\f[R]/\f[CB]xinetd\f[R]) by calling the
@ -257,14 +262,14 @@ It is safe to grant these permissions universally because only the
An example policy file that grants various execute permissions to the
\f[CB]rmid\f[R] command is:
.IP \[bu] 2
\f[B]Oracle Solaris:\f[R]
\f[B]Linux:\f[R]
.RS 2
.IP
.nf
\f[CB]
grant\ {
\ \ \ \ permission\ com.sun.rmi.rmid.ExecPermission
\ \ \ \ \ \ \ \ "/files/apps/java/jdk1.7.0/solaris/bin/java";
\ \ \ \ \ \ \ \ "/files/apps/java/jdk1.7.0/linux/bin/java";
\ \ \ \ permission\ com.sun.rmi.rmid.ExecPermission
\ \ \ \ \ \ \ \ "/files/apps/rmidcmds/*";
@ -314,15 +319,13 @@ By default, the version of the \f[CB]java\f[R] command found in
\f[CB]java.home\f[R] is used (the same one that the \f[CB]rmid\f[R] command
uses), and doesn\[aq]t need to be specified in the policy file.
The second permission allows the \f[CB]rmid\f[R] command to execute any
command in either the directory \f[CB]/files/apps/rmidcmds\f[R] (Oracle
Solaris, Linux, and macOS) or the directory
\f[CB]c:\\files\\apps\\rmidcmds\\\f[R] (Windows).
command in either the directory \f[CB]/files/apps/rmidcmds\f[R] (Linux and
macOS) or the directory \f[CB]c:\\files\\apps\\rmidcmds\\\f[R] (Windows).
.PP
The third permission granted, \f[CB]ExecOptionPermission\f[R], allows the
\f[CB]rmid\f[R] command to start an activation group that defines the
security policy file to be either \f[CB]/files/policies/group.policy\f[R]
(Oracle Solaris) or \f[CB]c:\\files\\policies\\group.policy\f[R]
(Windows).
(Linux) or \f[CB]c:\\files\\policies\\group.policy\f[R] (Windows).
The next permission allows the \f[CB]java.security.debug\ property\f[R] to
be used by an activation group.
The last permission allows any property in the

View File

@ -1,4 +1,4 @@
.\" Copyright (c) 1994, 2019, Oracle and/or its affiliates. All rights reserved.
.\" Copyright (c) 1997, 2020, Oracle and/or its affiliates. All rights reserved.
.\" 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,7 +21,7 @@
.\"
.\" Automatically generated by Pandoc 2.3.1
.\"
.TH "RMIREGISTRY" "1" "2020" "JDK 14" "JDK Commands"
.TH "RMIREGISTRY" "1" "2020" "JDK 15" "JDK Commands"
.hy
.SH NAME
.PP

View File

@ -1,4 +1,4 @@
.\" Copyright (c) 1994, 2019, Oracle and/or its affiliates. All rights reserved.
.\" Copyright (c) 2006, 2020, Oracle and/or its affiliates. All rights reserved.
.\" 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,7 +21,7 @@
.\"
.\" Automatically generated by Pandoc 2.3.1
.\"
.TH "JRUNSCRIPT" "1" "2020" "JDK 14" "JDK Commands"
.TH "JRUNSCRIPT" "1" "2020" "JDK 15" "JDK Commands"
.hy
.SH NAME
.PP

View File

@ -1,4 +1,4 @@
.\" Copyright (c) 1994, 2019, Oracle and/or its affiliates. All rights reserved.
.\" Copyright (c) 2019, 2020, Oracle and/or its affiliates. All rights reserved.
.\" 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,7 +21,7 @@
.\"
.\" Automatically generated by Pandoc 2.3.1
.\"
.TH "JAOTC" "1" "2020" "JDK 14" "JDK Commands"
.TH "JAOTC" "1" "2020" "JDK 15" "JDK Commands"
.hy
.SH NAME
.PP

View File

@ -1,4 +1,4 @@
.\" Copyright (c) 1994, 2019, Oracle and/or its affiliates. All rights reserved.
.\" Copyright (c) 1994, 2020, Oracle and/or its affiliates. All rights reserved.
.\" 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,7 +21,7 @@
.\"
.\" Automatically generated by Pandoc 2.3.1
.\"
.TH "JAVAC" "1" "2020" "JDK 14" "JDK Commands"
.TH "JAVAC" "1" "2020" "JDK 15" "JDK Commands"
.hy
.SH NAME
.PP
@ -1027,7 +1027,7 @@ Note that the following lists have no line\-continuation characters.
.PP
Create a file named \f[CB]options\f[R] that contains the following:
.PP
\f[B]Oracle Solaris, Linux, and macOS:\f[R]
\f[B]Linux and macOS:\f[R]
.IP
.nf
\f[CB]
@ -1274,7 +1274,7 @@ This example compiles the \f[CB]Aloha.java\f[R], \f[CB]GutenTag.java\f[R],
\f[CB]Hello.java\f[R], and \f[CB]Hi.java\f[R] source files in the
\f[CB]greetings\f[R] package.
.PP
\f[B]Oracle Solaris, Linux, and macOS:\f[R]
\f[B]Linux and macOS:\f[R]
.IP
.nf
\f[CB]
@ -1300,7 +1300,7 @@ Aloha.java\ \ \ \ \ \ \ \ \ \ GutenTag.java\ \ \ \ \ \ \ Hello.java\ \ \ \ \ \ \
After changing one of the source files in the previous example,
recompile it:
.PP
\f[B]Oracle Solaris, Linux, and macOS:\f[R]
\f[B]Linux and macOS:\f[R]
.IP
.nf
\f[CB]
@ -1330,7 +1330,7 @@ you are in, then add the examples directory to the user class path by
setting \f[CB]CLASSPATH\f[R].
This example uses the \f[CB]\-classpath\f[R] option.
.PP
\f[B]Oracle Solaris, Linux, and macOS:\f[R]
\f[B]Linux and macOS:\f[R]
.RS
.PP
\f[CB]javac\ \-classpath\ /examples\ /examples/greetings/Hi.java\f[R]
@ -1345,7 +1345,7 @@ This example uses the \f[CB]\-classpath\f[R] option.
If you change \f[CB]greetings.Hi\f[R] to use a banner utility, then that
utility also needs to be accessible through the user class path.
.PP
\f[B]Oracle Solaris, Linux, and macOS:\f[R]
\f[B]Linux and macOS:\f[R]
.IP
.nf
\f[CB]
@ -1367,7 +1367,7 @@ To execute a class in the \f[CB]greetings\f[R] package, the program needs
access to the \f[CB]greetings\f[R] package, and to the classes that the
\f[CB]greetings\f[R] classes use.
.PP
\f[B]Oracle Solaris, Linux, and macOS:\f[R]
\f[B]Linux and macOS:\f[R]
.RS
.PP
\f[CB]java\ \-classpath\ /examples:/lib/Banners.jar\ greetings.Hi\f[R]
@ -1571,7 +1571,7 @@ hierarchy\f[R].
.PP
While \f[CB]javac\f[R] is fairly relaxed about the organization of source
code, beyond the expectation that source will be organized in one or
package hierarchies, and can generally accomodate organizations
package hierarchies, and can generally accommodate organizations
prescribed by development environments and build tools, Java tools in
general, and \f[CB]javac\f[R] and the Java launcher in particular, are
more stringent regarding the organization of compiled class files, and
@ -2105,7 +2105,7 @@ annotation.
For example:
.RS
.IP \[bu] 2
\f[B]Oracle Solaris, Linux, and macOS:\f[R]
\f[B]Linux and macOS:\f[R]
\f[CB]javac\ \-Xlint:path\ \-classpath\ /nonexistentpath\ Example.java\f[R]
.IP \[bu] 2
\f[B]Windows:\f[R]

View File

@ -1,4 +1,4 @@
.\" Copyright (c) 1994, 2019, Oracle and/or its affiliates. All rights reserved.
.\" Copyright (c) 1997, 2020, Oracle and/or its affiliates. All rights reserved.
.\" 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,7 +21,7 @@
.\"
.\" Automatically generated by Pandoc 2.3.1
.\"
.TH "SERIALVER" "1" "2020" "JDK 14" "JDK Commands"
.TH "SERIALVER" "1" "2020" "JDK 15" "JDK Commands"
.hy
.SH NAME
.PP

View File

@ -1,4 +1,4 @@
.\" Copyright (c) 1994, 2019, Oracle and/or its affiliates. All rights reserved.
.\" Copyright (c) 2019, 2020, Oracle and/or its affiliates. All rights reserved.
.\" 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,7 +21,7 @@
.\"
.\" Automatically generated by Pandoc 2.3.1
.\"
.TH "JHSDB" "1" "2020" "JDK 14" "JDK Commands"
.TH "JHSDB" "1" "2020" "JDK 15" "JDK Commands"
.hy
.SH NAME
.PP
@ -69,14 +69,6 @@ To get a list of Java processes running on a machine, use the
\f[CB]ps\f[R] command or, if the JVM processes are not running in a
separate docker instance, the \f[B]jps\f[R] command.
.RS
.PP
\f[B]Note:\f[R] JDK 10 has added support for using the Attach API when
attaching to Java processes running in a separate docker process.
However, the \f[CB]jps\f[R] command will not list the JVM processes that
are running in a separate docker instance.
If you are trying to connect a Linux host with a Virtual Machine that is
in a docker container, you must use tools such as \f[CB]ps\f[R] to look up
the PID of the JVM.
.RE
.TP
.B \f[I]executable\f[R]
@ -171,6 +163,31 @@ An optional unique ID for this debug server.
This is required if multiple debug servers are run on the same machine.
.RS
.RE
.TP
.B \f[CB]\-\-rmiport\f[R] \f[I]port\f[R]
Sets the port number to which the RMI connector is bound.
If not specified a random available port is used.
.RS
.RE
.TP
.B \f[CB]\-\-registryport\f[R] \f[I]port\f[R]
Sets the RMI registry port.
This option overrides the system property
\[aq]sun.jvm.hotspot.rmi.port\[aq].
If not specified, the system property is used.
If the system property is not set, the default port 1099 is used.
.RS
.RE
.TP
.B \f[CB]\-\-hostname\f[R] \f[I]hostname\f[R]
Sets the hostname the RMI connector is bound.
The value could be a hostname or an IPv4/IPv6 address.
This option overrides the system property
\[aq]java.rmi.server.hostname\[aq].
If not specified, the system property is used.
If the system property is not set, a system hostname is used.
.RS
.RE
.SH OPTIONS FOR THE JINFO MODE
.TP
.B \f[CB]\-\-flags\f[R]

View File

@ -1,4 +1,4 @@
.\" Copyright (c) 1994, 2019, Oracle and/or its affiliates. All rights reserved.
.\" Copyright (c) 2018, 2020, Oracle and/or its affiliates. All rights reserved.
.\" 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,7 +21,7 @@
.\"
.\" Automatically generated by Pandoc 2.3.1
.\"
.TH "JPACKAGE" "1" "2019" "JDK 14" "JDK Commands"
.TH "JPACKAGE" "1" "2019" "JDK 15" "JDK Commands"
.hy
.SH NAME
.PP
@ -56,7 +56,7 @@ Read options and/or mode from a file.
This option can be used multiple times.
.RE
.TP
.B \f[CB]\-\-type\f[R] or \f[CB]\-t\f[R] \f[I]type string\f[R]
.B \f[CB]\-\-type\f[R] or \f[CB]\-t\f[R] <type string>
The type of package to create
.RS
.PP
@ -67,17 +67,17 @@ If this option is not specified a platform dependent default type will
be created.
.RE
.TP
.B \f[CB]\-\-app\-version\f[R] \f[I]version\f[R]
.B \f[CB]\-\-app\-version\f[R] <version>
Version of the application and/or package`
.RS
.RE
.TP
.B \f[CB]\-\-copyright\f[R] \f[I]copyright string\f[R]
.B \f[CB]\-\-copyright\f[R] <copyright string>
Copyright for the application.
.RS
.RE
.TP
.B \f[CB]\-\-description\f[R] \f[I]description string\f[R]
.B \f[CB]\-\-description\f[R] <description string>
Description of the application.
.RS
.RE
@ -88,12 +88,12 @@ for the current platform to the output stream, and exit.
.RS
.RE
.TP
.B \f[CB]\-\-name\f[R] or \f[CB]\-n\f[R] \f[I]name\f[R]
.B \f[CB]\-\-name\f[R] or \f[CB]\-n\f[R] <name>
Name of the application and/or package.
.RS
.RE
.TP
.B \f[CB]\-\-dest\f[R] or \f[CB]\-d\f[R] \f[I]output path\f[R]
.B \f[CB]\-\-dest\f[R] or \f[CB]\-d\f[R] <output path>
Path where generated output file is placed
.RS
.PP
@ -101,7 +101,7 @@ Defaults to the current working directory.
(absolute path or relative to the current directory).
.RE
.TP
.B \f[CB]\-\-temp\f[R] \f[I]file path\f[R]
.B \f[CB]\-\-temp\f[R] <file path>
Path of a new or empty directory used to create temporary files
(absolute path or relative to the current directory).
.RS
@ -113,7 +113,7 @@ If not specified, a temporary directory will be created and removed upon
the task completion.
.RE
.TP
.B \f[CB]\-\-vendor\f[R] \f[I]vendor string\f[R]
.B \f[CB]\-\-vendor\f[R] <vendor string>
Vendor of the application.
.RS
.RE
@ -129,7 +129,7 @@ Print the product version to the output stream and exit.
.RE
.SS Options for creating the runtime image:
.TP
.B \f[CB]\-\-add\-modules\f[R] \f[I]module name\f[R] [\f[CB],\f[R]\f[I]module name\f[R]...]
.B \f[CB]\-\-add\-modules\f[R] <module name> [\f[CB],\f[R]<module name>...]
A comma (",") separated list of modules to add.
.RS
.PP
@ -142,7 +142,7 @@ specified) are used.
This option can be used multiple times.
.RE
.TP
.B \f[CB]\-\-module\-path\f[R] or \f[CB]\-p\f[R] \f[I]module path\f[R]...
.B \f[CB]\-\-module\-path\f[R] or \f[CB]\-p\f[R] <module path>...
A File.pathSeparator separated list of paths.
.RS
.PP
@ -158,7 +158,7 @@ provider modules and their dependences).
.RS
.RE
.TP
.B \f[CB]\-\-runtime\-image\f[R] \f[I]file path\f[R]
.B \f[CB]\-\-runtime\-image\f[R] <file paths>
Path of the predefined runtime image that will be copied into the
application image (absolute path or relative to the current directory).
.RS
@ -170,13 +170,13 @@ create the runtime image using options: \-\-strip\-debug,
.RE
.SS Options for creating the application image:
.TP
.B \f[CB]\-\-icon\f[R] \f[I]icon file path\f[R]
.B \f[CB]\-\-icon\f[R] <icon file path>
Path of the icon of the application bundle (absolute path or relative to
the current directory).
.RS
.RE
.TP
.B \f[CB]\-\-input\f[R] or \f[CB]\-i\f[R] \f[I]input path\f[R]
.B \f[CB]\-\-input\f[R] or \f[CB]\-i\f[R] <input path>
Path of the input directory that contains the files to be packaged
(absolute path or relative to the current directory).
.RS
@ -186,7 +186,7 @@ image.
.RE
.SS Options for creating the application launcher(s):
.TP
.B \f[CB]\-\-add\-launcher\f[R] \f[I]launcher name\f[R]=\f[I]file path\f[R]
.B \f[CB]\-\-add\-launcher\f[R] <launcher name>=<file path>
Name of launcher, and a path to a Properties file that contains a list
of key, value pairs (absolute path or relative to the current
directory).
@ -205,7 +205,7 @@ this option can be used multiple times to build multiple additional
launchers.
.RE
.TP
.B \f[CB]\-\-arguments\f[R] \f[I]main class arguments\f[R]
.B \f[CB]\-\-arguments\f[R] <main class arguments>
Command line arguments to pass to the main class if no command line
arguments are given to the launcher.
.RS
@ -213,21 +213,21 @@ arguments are given to the launcher.
This option can be used multiple times.
.RE
.TP
.B \f[CB]\-\-java\-options\f[R] \f[I]java options\f[R]
.B \f[CB]\-\-java\-options\f[R] <java options>
Options to pass to the Java runtime.
.RS
.PP
This option can be used multiple times.
.RE
.TP
.B \f[CB]\-\-main\-class\f[R] \f[I]class name\f[R]
.B \f[CB]\-\-main\-class\f[R] <class name>
Qualified name of the application main class to execute.
.RS
.PP
This option can only be used if \-\-main\-jar is specified.
.RE
.TP
.B \f[CB]\-\-main\-jar\f[R] \f[I]main jar file\f[R]
.B \f[CB]\-\-main\-jar\f[R] <main jar file>
The main JAR of the application; containing the main class (specified as
a path relative to the input path).
.RS
@ -235,7 +235,7 @@ a path relative to the input path).
Either \-\-module or \-\-main\-jar option can be specified but not both.
.RE
.TP
.B \f[CB]\-\-module\f[R] or \f[CB]\-m\f[R] \f[I]module name\f[R]/\f[I]main class\f[R]]
.B \f[CB]\-\-module\f[R] or \f[CB]\-m\f[R] <module name>/<main class>]
The main module (and optionally main class) of the application This
module must be located on the module path.
.RS
@ -254,7 +254,7 @@ application which requires console interactions
.RE
.SS macOS platform options (available only when running on macOS):
.TP
.B \f[CB]\-\-mac\-package\-identifier\f[R] \f[I]ID string\f[R]
.B \f[CB]\-\-mac\-package\-identifier\f[R] <ID string>
An identifier that uniquely identifies the application for macOSX.
.RS
.PP
@ -264,7 +264,7 @@ May only use alphanumeric (A\-Z,a\-z,0\-9), hyphen (\-), and period (.)
characters.
.RE
.TP
.B \f[CB]\-\-mac\-package\-name\f[R] \f[I]name string\f[R]
.B \f[CB]\-\-mac\-package\-name\f[R] <name string>
Name of the application as it appears in the Menu Bar.
.RS
.PP
@ -275,7 +275,7 @@ displaying in the menu bar and the application Info window.
Defaults to the application name.
.RE
.TP
.B \f[CB]\-\-mac\-bundle\-signing\-prefix\f[R] \f[I]prefix string\f[R]
.B \f[CB]\-\-mac\-bundle\-signing\-prefix\f[R] <prefix string>
When signing the application bundle, this value is prefixed to all
components that need to be signed that don\[aq]t have an existing bundle
identifier.
@ -287,7 +287,7 @@ Request that the bundle be signed.
.RS
.RE
.TP
.B \f[CB]\-\-mac\-signing\-keychain\f[R] \f[I]file path\f[R]
.B \f[CB]\-\-mac\-signing\-keychain\f[R] <file path>
Path of the keychain to search for the signing identity (absolute path
or relative to the current directory).
.RS
@ -295,15 +295,15 @@ or relative to the current directory).
If not specified, the standard keychains are used.
.RE
.TP
.B \f[CB]\-\-mac\-signing\-key\-user\-name\f[R] \f[I]team name\f[R]
.B \f[CB]\-\-mac\-signing\-key\-user\-name\f[R] <team name>
Team name portion in Apple signing identities\[aq] names.
.RS
.PP
For example "Developer ID Application: "
For example "Developer ID Application: <team name>"
.RE
.SS Options for creating the application package:
.TP
.B \f[CB]\-\-app\-image\f[R] \f[I]file path\f[R]
.B \f[CB]\-\-app\-image\f[R] <file path>
Location of the predefined application image that is used to build an
installable package (absolute path or relative to the current
directory).
@ -312,7 +312,7 @@ directory).
See create\-app\-image mode options to create the application image.
.RE
.TP
.B \f[CB]\-\-file\-associations\f[R] \f[I]file path\f[R]
.B \f[CB]\-\-file\-associations\f[R] <file path>
Path to a Properties file that contains list of key, value pairs
(absolute path or relative to the current directory).
.RS
@ -323,7 +323,7 @@ used to describe the association.
This option can be used multiple times.
.RE
.TP
.B \f[CB]\-\-install\-dir\f[R] \f[I]file path\f[R]
.B \f[CB]\-\-install\-dir\f[R] <file path>
Absolute path of the installation directory of the application on OS X
or Linux.
Relative sub\-path of the installation location of the application such
@ -331,13 +331,13 @@ as "Program Files" or "AppData" on Windows.
.RS
.RE
.TP
.B \f[CB]\-\-license\-file\f[R] \f[I]file path\f[R]
.B \f[CB]\-\-license\-file\f[R] <file path>
Path to the license file (absolute path or relative to the current
directory).
.RS
.RE
.TP
.B \f[CB]\-\-resource\-dir\f[R] \f[I]path\f[R]
.B \f[CB]\-\-resource\-dir\f[R] <path>
Path to override jpackage resources (absolute path or relative to the
current directory).
.RS
@ -346,7 +346,7 @@ Icons, template files, and other resources of jpackage can be
over\-ridden by adding replacement resources to this directory.
.RE
.TP
.B \f[CB]\-\-runtime\-image\f[R] \f[I]file\-path\f[R]
.B \f[CB]\-\-runtime\-image\f[R] <file\-path>
Path of the predefined runtime image to install (absolute path or
relative to the current directory).
.RS
@ -367,7 +367,7 @@ Adds the application to the system menu.
.RS
.RE
.TP
.B \f[CB]\-\-win\-menu\-group\f[R] \f[I]menu group name\f[R]
.B \f[CB]\-\-win\-menu\-group\f[R] <menu group name>
Start Menu group this application is placed in.
.RS
.RE
@ -382,23 +382,23 @@ Creates a desktop shortcut for the application.
.RS
.RE
.TP
.B \f[CB]\-\-win\-upgrade\-uuid\f[R] \f[I]id string\f[R]
.B \f[CB]\-\-win\-upgrade\-uuid\f[R] <id string>
UUID associated with upgrades for this package.
.RS
.RE
.SS Linux platform options (available only when running on Linux):
.TP
.B \f[CB]\-\-linux\-package\-name\f[R] \f[I]package name\f[R]
.B \f[CB]\-\-linux\-package\-name\f[R] <package name>
Name for Linux package, defaults to the application name.
.RS
.RE
.TP
.B \f[CB]\-\-linux\-deb\-maintainer\f[R] \f[I]email address\f[R]
.B \f[CB]\-\-linux\-deb\-maintainer\f[R] <email address>
Maintainer for .deb bundle.
.RS
.RE
.TP
.B \f[CB]\-\-linux\-menu\-group\f[R] \f[I]menu\-group\-name\f[R]
.B \f[CB]\-\-linux\-menu\-group\f[R] <menu\-group\-name>
Menu group this application is placed in.
.RS
.RE
@ -408,19 +408,20 @@ Required packages or capabilities for the application
.RS
.RE
.TP
.B \f[CB]\-\-linux\-rpm\-license\-type\f[R] \f[I]type string\f[R]
Type of the license ("License: " of the RPM .spec).
.B \f[CB]\-\-linux\-rpm\-license\-type\f[R] <type string>
Type of the license ("License: <value>" of the RPM .spec).
.RS
.RE
.TP
.B \f[CB]\-\-linux\-app\-release\f[R] \f[I]release string\f[R]
Release value of the RPM .spec file or Debian revision value of the DEB
control file.
.B \f[CB]\-\-linux\-app\-release\f[R] <release string>
Release value of the RPM <name>.spec file or Debian revision value of
the DEB control file.
.RS
.RE
.TP
.B \f[CB]\-\-linux\-app\-category\f[R] \f[I]category string\f[R]
Group value of the RPM .spec file or Section value of DEB control file.
.B \f[CB]\-\-linux\-app\-category\f[R] <category string>
Group value of the RPM <name>.spec file or Section value of DEB control
file.
.RS
.RE
.TP

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2018, 2020, Oracle and/or its affiliates. All rights reserved.
* 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,9 @@
package org.graalvm.compiler.core.test;
import org.graalvm.compiler.api.directives.GraalDirectives;
import org.graalvm.compiler.nodes.CallTargetNode.InvokeKind;
import org.graalvm.compiler.phases.OptimisticOptimizations;
import org.junit.Test;
public class ConditionalNodeTest extends GraalCompilerTest {
@ -126,4 +128,73 @@ public class ConditionalNodeTest extends GraalCompilerTest {
node.a = a;
return a;
}
@SuppressWarnings("all")
static int lastIndexOf(char[] source, int sourceOffset, int sourceCount,
char[] target, int targetOffset, int targetCount,
int fromIndex) {
/*
* Check arguments; return immediately where possible. For consistency, don't check for null
* str.
*/
int rightIndex = sourceCount - targetCount;
if (fromIndex < 0) {
return -1;
}
if (fromIndex > rightIndex) {
fromIndex = rightIndex;
}
/* Empty string always matches. */
if (targetCount == 0) {
return fromIndex;
}
int strLastIndex = targetOffset + targetCount - 1;
char strLastChar = target[strLastIndex];
int min = sourceOffset + targetCount - 1;
int i = min + fromIndex;
startSearchForLastChar: while (true) {
while (i >= min && source[i] != strLastChar) {
i--;
}
if (i < min) {
return -1;
}
int j = i - 1;
int start = j - (targetCount - 1);
int k = strLastIndex - 1;
while (j > start) {
if (source[j--] != target[k--]) {
i--;
continue startSearchForLastChar;
}
}
return start - sourceOffset + 1;
}
}
public static String simple(String simpleName) {
char[] value = simpleName.toCharArray();
char[] target = ".".toCharArray();
int lastDotIndex = lastIndexOf(value, 0, value.length,
target, 0, target.length, value.length);
if (lastDotIndex < 0) {
return null;
}
GraalDirectives.deoptimize();
return simpleName.substring(0, lastDotIndex);
}
@Override
protected OptimisticOptimizations getOptimisticOptimizations() {
// Disable profile based optimizations
return OptimisticOptimizations.NONE;
}
@Test
public void testConditionalExit() {
test("simple", Object.class.getName());
}
}

View File

@ -549,6 +549,10 @@ public final class IfNode extends ControlSplitNode implements Simplifiable, LIRL
return false;
}
if (falseSuccessor instanceof LoopExitNode && ((LoopExitNode) falseSuccessor).stateAfter != null) {
return false;
}
PhiNode phi = merge.phis().first();
ValueNode falseValue = phi.valueAt(falseEnd);
ValueNode trueValue = phi.valueAt(trueEnd);
@ -868,6 +872,11 @@ public final class IfNode extends ControlSplitNode implements Simplifiable, LIRL
AbstractEndNode trueEnd = (AbstractEndNode) trueSuccessor().next();
AbstractEndNode falseEnd = (AbstractEndNode) falseSuccessor().next();
AbstractMergeNode merge = trueEnd.merge();
if (falseSuccessor instanceof LoopExitNode && ((LoopExitNode) falseSuccessor).stateAfter != null) {
return false;
}
if (merge == falseEnd.merge() && trueSuccessor().anchored().isEmpty() && falseSuccessor().anchored().isEmpty()) {
PhiNode singlePhi = null;
int distinct = 0;
@ -986,6 +995,11 @@ public final class IfNode extends ControlSplitNode implements Simplifiable, LIRL
}
protected void removeThroughFalseBranch(SimplifierTool tool, AbstractMergeNode merge) {
// If the LoopExitNode and the Merge still have states then it's incorrect to arbitrarily
// pick one side of the branch the represent the control flow. The state on the merge is the
// real after state but it would need to be adjusted to represent the effects of the
// conditional conversion.
assert !(falseSuccessor instanceof LoopExitNode) || ((LoopExitNode) falseSuccessor).stateAfter == null;
AbstractBeginNode trueBegin = trueSuccessor();
LogicNode conditionNode = condition();
graph().removeSplitPropagate(this, trueBegin);

View File

@ -1,4 +1,4 @@
.\" Copyright (c) 1994, 2019, Oracle and/or its affiliates. All rights reserved.
.\" Copyright (c) 1997, 2020, Oracle and/or its affiliates. All rights reserved.
.\" 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,7 +21,7 @@
.\"
.\" Automatically generated by Pandoc 2.3.1
.\"
.TH "JAR" "1" "2020" "JDK 14" "JDK Commands"
.TH "JAR" "1" "2020" "JDK 15" "JDK Commands"
.hy
.SH NAME
.PP

View File

@ -1,5 +1,5 @@
.\"t
.\" Copyright (c) 1994, 2019, Oracle and/or its affiliates. All rights reserved.
.\" Copyright (c) 1998, 2020, Oracle and/or its affiliates. All rights reserved.
.\" 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,7 +22,7 @@
.\"
.\" Automatically generated by Pandoc 2.3.1
.\"
.TH "JARSIGNER" "1" "2020" "JDK 14" "JDK Commands"
.TH "JARSIGNER" "1" "2020" "JDK 15" "JDK Commands"
.hy
.SH NAME
.PP
@ -145,6 +145,9 @@ Use the \f[CB]\-verify\f[R] option to verify a signed JAR file.
.PP
The \f[CB]jarsigner\f[R] command also attempts to validate the
signer\[aq]s certificate after signing or verifying.
During validation, it checks the revocation status of each certificate
in the signer\[aq]s certificate chain when the \f[CB]\-revCheck\f[R]
option is specified.
If there is a validation error or any other problem, the command
generates warning messages.
If you specify the \f[CB]\-strict\f[R] option, then the command treats
@ -176,8 +179,8 @@ The keystore is by default stored in a file named \f[CB]\&.keystore\f[R]
in the user\[aq]s home directory, as determined by the
\f[CB]user.home\f[R] system property.
.PP
\f[B]Oracle Solaris, Linux, and OS X:\f[R] \f[CB]user.home\f[R] defaults to
the user\[aq]s home directory.
\f[B]Linux and OS X:\f[R] \f[CB]user.home\f[R] defaults to the user\[aq]s
home directory.
.PP
The input stream from the \f[CB]\-keystore\f[R] option is passed to the
\f[CB]KeyStore.load\f[R] method.
@ -351,16 +354,21 @@ T}
These default signature algorithms can be overridden by using the
\f[CB]\-sigalg\f[R] option.
.PP
Signed JAR file algorithms are checked against the
\f[CB]jdk.jar.disabledAlgorithms\f[R] security property during
verification (\f[CB]\-verify\f[R]).
The \f[CB]jarsigner\f[R] command uses the
\f[CB]jdk.jar.disabledAlgorithms\f[R] and
\f[CB]jdk.security.legacyAlgorithms\f[R] security properties to determine
which algorithms are considered a security risk.
If the JAR file was signed with any algorithms that are disabled, it
will be treated as an unsigned JAR file.
If the JAR file was signed with any legacy algorithms, it will be
treated as signed with an informational warning to inform users that the
legacy algorithm will be disabled in a future update.
For detailed verification output, include
\f[CB]\-J\-Djava.security.debug=jar\f[R].
The default value for the \f[CB]jdk.jar.disabledAlgorithms\f[R] security
property is defined in the \f[CB]java.security\f[R] file (located in the
JRE\[aq]s \f[CB]$JAVA_HOME/conf/security\f[R] directory).
The \f[CB]jdk.jar.disabledAlgorithms\f[R] and
\f[CB]jdk.security.legacyAlgorithms\f[R] security properties are defined
in the \f[CB]java.security\f[R] file (located in the JDK\[aq]s
\f[CB]$JAVA_HOME/conf/security\f[R] directory).
.PP
\f[B]Note:\f[R]
.PP
@ -595,7 +603,7 @@ a file: URL, for example, the following are equivalent:
.PP
If the Sun PKCS #11 provider was configured in the
\f[CB]java.security\f[R] security properties file (located in the
JRE\[aq]s \f[CB]$JAVA_HOME/conf/security\f[R] directory), then the
JDK\[aq]s \f[CB]$JAVA_HOME/conf/security\f[R] directory), then the
\f[CB]keytool\f[R] and \f[CB]jarsigner\f[R] tools can operate on the PKCS
#11 token by specifying these options:
.RS
@ -810,6 +818,17 @@ keystore, then the alias name for the keystore entry for that signer is
displayed in parentheses.
.RE
.TP
.B \f[CB]\-revCheck\f[R]
This option enables revocation checking of certificates when signing or
verifying a JAR file.
The \f[CB]jarsigner\f[R] command attempts to make network connections to
fetch OCSP responses and CRLs if the \f[CB]\-revCheck\f[R] option is
specified on the command line.
Note that revocation checks are not enabled unless this option is
specified.
.RS
.RE
.TP
.B \f[CB]\-tsa\f[R] \f[I]url\f[R]
If \f[CB]\-tsa\ http://example.tsa.url\f[R] appears on the command line
when signing a JAR file then a time stamp is generated for the
@ -1031,7 +1050,7 @@ specified.
If \f[I]classpathlist\f[R] contains multiple paths or JAR files, then
they should be separated with a:
.IP \[bu] 2
Colon (\f[CB]:\f[R]) on Oracle Solaris, Linux, and macOS
Colon (\f[CB]:\f[R]) on Linux and macOS
.IP \[bu] 2
Semicolon (\f[CB];\f[R]) on Windows
.PP
@ -1073,7 +1092,7 @@ KeyUsage extension that doesn\[aq]t allow it to sign a file, the
\f[CB]\-strict\f[R] option is specified.
.PP
\f[B]Note:\f[R] Exit codes are reused because only the values from 0 to
255 are legal on Oracle Solaris, Linux, and OS X.
255 are legal on Linux and OS X.
.PP
The following sections describes the names, codes, and descriptions of
the errors and warnings that the \f[CB]jarsigner\f[R] command can issue.
@ -1135,10 +1154,9 @@ This JAR contains entries whose signer certificate is self signed.
.RS
.RE
.TP
.B weakAlg
.B disabledAlg
Code 4.
An algorithm specified on the command line is considered a security
risk.
An algorithm used is considered a security risk and is disabled.
.RS
.RE
.TP
@ -1206,6 +1224,11 @@ The timestamp will expire within one year on \f[CB]YYYY\-MM\-DD\f[R].
.RS
.RE
.TP
.B legacyAlg
An algorithm used is considered a security risk but not disabled.
.RS
.RE
.TP
.B noTimestamp
This JAR contains signatures that doesn\[aq]t include a timestamp.
Without a timestamp, users may not be able to validate this JAR file

View File

@ -1,4 +1,4 @@
.\" Copyright (c) 1994, 2019, Oracle and/or its affiliates. All rights reserved.
.\" Copyright (c) 1994, 2020, Oracle and/or its affiliates. All rights reserved.
.\" 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,7 +21,7 @@
.\"
.\" Automatically generated by Pandoc 2.3.1
.\"
.TH "JAVADOC" "1" "2020" "JDK 14" "JDK Commands"
.TH "JAVADOC" "1" "2020" "JDK 15" "JDK Commands"
.hy
.SH NAME
.PP
@ -141,7 +141,7 @@ descriptions of using these options:
.IP \[bu] 2
\f[CB]\-\-release\f[R]
.IP \[bu] 2
\f[CB]\-source\f[R]
\f[CB]\-\-source\f[R] or \f[CB]\-source\f[R]
.IP \[bu] 2
\f[CB]\-\-source\-path\f[R] or \f[CB]\-sourcepath\f[R]
.IP \[bu] 2
@ -202,8 +202,8 @@ the path to that JAR file.
You can specify an absolute path or a path relative to the current
directory.
If \f[CB]classpathlist\f[R] contains multiple paths or JAR files, then
they should be separated with a colon (\f[CB]:\f[R]) on Oracle Solaris and
a semi\-colon (\f[CB];\f[R]) on Windows.
they should be separated with a colon (\f[CB]:\f[R]) on Linux and a
semi\-colon (\f[CB];\f[R]) on Windows.
This option isn\[aq]t necessary when the \f[CB]doclet\f[R] starting class
is already in the search path.
.RS
@ -222,7 +222,7 @@ exclude packages rooted at \f[CB]java.net\f[R] and \f[CB]java.lang\f[R].
Notice that these examples exclude \f[CB]java.lang.ref\f[R], which is a
subpackage of \f[CB]java.lang\f[R].
.IP \[bu] 2
\f[B]Oracle Solaris, Linux, and OS X:\f[R]
\f[B]Linux and OS X:\f[R]
.RS 2
.RS
.PP
@ -253,14 +253,13 @@ dependencies of those modules.
\f[CB]all\f[R]: includes all dependencies.
.RE
.TP
.B \f[CB]\-help\f[R] or \f[CB]\-\-help\f[R]
Displays the online help, which lists all of the \f[CB]javadoc\f[R] and
\f[CB]doclet\f[R] command\-line options.
.B \f[CB]\-\-help\f[R], \f[CB]\-help\f[R], \f[CB]\-h\f[R], or \f[CB]\-?\f[R]
Prints a synopsis of the standard options.
.RS
.RE
.TP
.B \f[CB]\-\-help\-extra\f[R] or \f[CB]\-X\f[R]
Prints a synopsis of non\-standard options and exits.
Prints a synopsis of the set of extra options.
.RS
.RE
.TP
@ -405,7 +404,7 @@ For example, the following commands generates documentation for packages
named \f[CB]java\f[R] and \f[CB]javax.swing\f[R] and all of their
subpackages.
.IP \[bu] 2
\f[B]Oracle Solaris, Linux, and OS X:\f[R]
\f[B]Linux and OS X:\f[R]
.RS 2
.RS
.PP
@ -436,6 +435,11 @@ that specify the number of milliseconds to parse each Java source file.
Prints version information.
.RS
.RE
.TP
.B \f[CB]\-Werror\f[R]
Reports an error if any warnings occur.
.RS
.RE
.SH EXTENDED OPTIONS
.PP
\f[B]Note:\f[R]
@ -457,19 +461,6 @@ descriptions of using these options:
\f[CB]\-Xmaxerrs\f[R]
.IP \[bu] 2
\f[CB]\-Xmaxwarns\f[R]
.PP
The following extended \f[CB]javadoc\f[R] options are not equivalent to a
corresponding \f[CB]javac\f[R] option:
.TP
.B \f[CB]\-Xmodule:\f[R]\f[I]module\-name\f[R]
Specifies a module to which the classes being compiled belong.
.RS
.RE
.TP
.B \f[CB]\-Xold\f[R]
Invokes the legacy javadoc tool.
.RS
.RE
.SH STANDARD DOCLET OPTIONS
.PP
The following options are provided by the standard doclet.
@ -543,10 +534,9 @@ The destination directory is automatically created when the
\f[CB]javadoc\f[R] tool runs.
.RS
.IP \[bu] 2
\f[B]Oracle Solaris, Linux, and OS X:\f[R] For example, the following
command generates the documentation for the package
\f[CB]com.mypackage\f[R] and saves the results in the \f[CB]/user/doc/\f[R]
directory:
\f[B]Linux and OS X:\f[R] For example, the following command generates
the documentation for the package \f[CB]com.mypackage\f[R] and saves the
results in the \f[CB]/user/doc/\f[R] directory:
.RS 2
.RS
.PP
@ -633,11 +623,6 @@ Use escape characters for any internal quotation marks within a footer.
.RS
.RE
.TP
.B \f[CB]\-\-frames\f[R]
Enables the use of frames in the generated output (default).
.RS
.RE
.TP
.B \f[CB]\-group\f[R] \f[I]namep1\f[R]\f[CB]:\f[R]\f[I]p2\f[R]
Group the specified packages together in the Overview page.
.RS
@ -668,7 +653,7 @@ accordingly.
For example:
.RS
.IP \[bu] 2
\f[B]Oracle Solaris, Linux, and OS X:\f[R]
\f[B]Linux and OS X:\f[R]
.RS 2
.RS
.PP
@ -685,15 +670,9 @@ For example:
.RE
.RE
.TP
.B \f[CB]\-html4\f[R]
Generates HTML 4.0.1 output.
If the option is not used, \f[CB]\-html4\f[R] is the default
.RS
.RE
.TP
.B \f[CB]\-html5\f[R]
Generates HTML 5 output.
If the option is not used, \f[CB]\-html4\f[R] is the default.
This option is a no\-op and is just retained for backwards
compatibility.
.RS
.RE
.TP
@ -923,7 +902,8 @@ you want to make the navigation bar cleaner.
.RE
.TP
.B \f[CB]\-\-no\-frames\f[R]
Disables the use of frames in the generated output.
This option is a no\-op and is just retained for backwards
compatibility.
.RS
.RE
.TP
@ -1020,10 +1000,9 @@ that contains the topmost package directories.
In this location, no path is needed when documenting packages, because
the \f[CB]\-sourcepath\f[R] option points to this file.
.IP \[bu] 2
\f[B]Oracle Solaris, Linux, and OS X:\f[R] For example, if the source
tree for the \f[CB]java.lang\f[R] package is
\f[CB]/src/classes/java/lang/\f[R], then you could place the overview file
at /src/classes/overview.html.
\f[B]Linux and OS X:\f[R] For example, if the source tree for the
\f[CB]java.lang\f[R] package is \f[CB]/src/classes/java/lang/\f[R], then you
could place the overview file at /src/classes/overview.html.
.IP \[bu] 2
\f[B]Windows:\f[R] For example, if the source tree for the
\f[CB]java.lang\f[R] package is \f[CB]\\src\\classes\\java\\lang\\\f[R],
@ -1177,18 +1156,18 @@ For example,
.PP
The following are additional options provided by the standard doclet and
are subject to change without notice.
Additional options might are less commonly used or are otherwise
regarded as advanced.
Additional options are less commonly used or are otherwise regarded as
advanced.
.TP
.B \f[CB]\-Xdoclint\f[R]
Enables recommended checks for problems in Javadoc comments.
Enables recommended checks for problems in documentation comments.
.RS
.RE
.TP
.B \f[CB]\-Xdoclint:\f[R](\f[CB]all\f[R]|\f[CB]none\f[R]|[\f[CB]\-\f[R]]\f[I]group\f[R])
Enable or disable specific checks for bad references, lack of
accessibility, missing Javadoc comments, and reports errors for invalid
Javadoc syntax and missing HTML tags.
Enable or disable specific checks for bad references, accessibility
issues, missing documentation comments, errors in documentation comment
syntax and missing HTML tags.
.RS
.PP
This option enables the \f[CB]javadoc\f[R] tool to check for all
@ -1197,18 +1176,19 @@ You can select which items to include in the generated output with the
standard options \f[CB]\-public\f[R], \f[CB]\-protected\f[R],
\f[CB]\-package\f[R] and \f[CB]\-private\f[R].
.PP
When the \f[CB]\-Xdoclint\f[R] is enabled, it reports issues with messages
similar to the \f[CB]javac\f[R] command.
When the \f[CB]\-Xdoclint\f[R] option is enabled, it reports issues with
messages similar to the \f[CB]javac\f[R] command.
The \f[CB]javadoc\f[R] tool prints a message, a copy of the source line,
and a caret pointing at the exact position where the error was detected.
Messages may be either warnings or errors, depending on their severity
and the likelihood to cause an error if the generated documentation were
run through a validator.
For example, bad references or missing Javadoc comments don\[aq]t cause
the \f[CB]javadoc\f[R] tool to generate invalid HTML, so these issues are
reported as warnings.
Syntax errors or missing HTML end tags cause the \f[CB]javadoc\f[R] tool
to generate invalid output, so these issues are reported as errors.
to be run through a validator.
For example: missing documentation comments, duplicate information, and
extraneous comments do not cause the \f[CB]javadoc\f[R] tool to generate
invalid HTML, so these issues are reported as warnings; syntax errors,
missing required HTML end tags, and references to missing or misspelled
elements cause the \f[CB]javadoc\f[R] tool to generate invalid output, so
these issues are reported as errors.
.PP
\f[CB]\-Xdoclint\f[R] option validates input comments based upon the
requested markup.
@ -1244,17 +1224,17 @@ doclet \f[CB]html\f[R] output generation selected.
This type of check enables the \f[CB]javadoc\f[R] tool to detect HTML
issues that some browsers might not interpret as intended.
.IP \[bu] 2
\f[CB]missing\f[R]: Checks for missing Javadoc comments or tags (for
\f[CB]missing\f[R]: Checks for missing documentation comments or tags (for
example, a missing comment or class, or a missing \f[CB]\@return\f[R] tag
or similar tag on a method).
.IP \[bu] 2
\f[CB]reference\f[R]: Checks for issues relating to the references to Java
API elements from Javadoc tags (for example, item not found in
\f[CB]\@see\f[R], or a bad name after \f[CB]\@param)\f[R].
API elements from documentation comment tags (for example, item not
found in \f[CB]\@see\f[R], or a bad name after \f[CB]\@param)\f[R].
.IP \[bu] 2
\f[CB]syntax\f[R]: Checks for low level issues like unescaped angle
brackets (\f[CB]<\f[R] and \f[CB]>\f[R]) and ampersands (\f[CB]&\f[R]) and
invalid Javadoc tags.
invalid documentation comment tags.
.PP
You can specify the \f[CB]\-Xdoclint\f[R] option multiple times to enable
the option to check errors and warnings in multiple categories.

View File

@ -1,4 +1,4 @@
.\" Copyright (c) 1994, 2019, Oracle and/or its affiliates. All rights reserved.
.\" Copyright (c) 2012, 2020, Oracle and/or its affiliates. All rights reserved.
.\" 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,7 +21,7 @@
.\"
.\" Automatically generated by Pandoc 2.3.1
.\"
.TH "JCMD" "1" "2020" "JDK 14" "JDK Commands"
.TH "JCMD" "1" "2020" "JDK 15" "JDK Commands"
.hy
.SH NAME
.PP
@ -248,58 +248,6 @@ The \f[I]options\f[R] must be specified using either \f[I]key\f[R] or
objects (BOOLEAN, false)
.RE
.TP
.B \f[CB]GC.class_stats\f[R] [\f[I]options\f[R]] [\f[I]arguments\f[R]]
(Deprecated) Provide statistics about Java class meta data.
.RS
.PP
Impact: High \-\-\- depends on Java heap size and content.
.PP
\f[B]Note:\f[R]
.PP
The \f[I]options\f[R] must be specified using either \f[I]key\f[R] or
\f[I]key\f[R]\f[CB]=\f[R]\f[I]value\f[R] syntax.
.PP
\f[I]options\f[R]:
.IP \[bu] 2
\f[CB]\-all\f[R]: (Optional) Shows all columns (BOOLEAN, false)
.IP \[bu] 2
\f[CB]\-csv\f[R]: (Optional) Prints in CSV (comma\-separated values)
format for spreadsheets (BOOLEAN, false)
.IP \[bu] 2
\f[CB]\-help\f[R]: (Optional) Shows the meaning of all the columns
(BOOLEAN, false)
.PP
\f[I]arguments\f[R]:
.IP \[bu] 2
\f[I]columns\f[R]: (Optional) Comma\-separated list of all the columns to
be shown.
If not specified, the following columns are shown:
.RS 2
.IP \[bu] 2
InstBytes
.IP \[bu] 2
KlassBytes
.IP \[bu] 2
CpAll
.IP \[bu] 2
annotations
.IP \[bu] 2
MethodCount
.IP \[bu] 2
Bytecodes
.IP \[bu] 2
MethodAll
.IP \[bu] 2
ROAll
.IP \[bu] 2
RWAll
.IP \[bu] 2
Total
.PP
(STRING, no default value)
.RE
.RE
.TP
.B \f[CB]GC.finalizer_info\f[R]
Provides information about the Java finalization queue.
.RS
@ -868,7 +816,7 @@ Permission: \f[CB]java.lang.management.ManagementPermission(monitor)\f[R]
.TP
.B \f[CB]VM.log\f[R] [\f[I]options\f[R]]
Lists current log configuration, enables/disables/configures a log
output, or ro tates all logs.
output, or rotates all logs.
.RS
.PP
Impact: Low

View File

@ -1,4 +1,4 @@
.\" Copyright (c) 1994, 2019, Oracle and/or its affiliates. All rights reserved.
.\" Copyright (c) 2004, 2020, Oracle and/or its affiliates. All rights reserved.
.\" 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,7 +21,7 @@
.\"
.\" Automatically generated by Pandoc 2.3.1
.\"
.TH "JINFO" "1" "2020" "JDK 14" "JDK Commands"
.TH "JINFO" "1" "2020" "JDK 15" "JDK Commands"
.hy
.SH NAME
.PP
@ -46,14 +46,6 @@ To get a list of Java processes running on a machine, use either the
\f[CB]ps\f[R] command or, if the JVM processes are not running in a
separate docker instance, the \f[B]jps\f[R] command.
.RS
.PP
\f[B]Note:\f[R] JDK 10 has added support for using the Attach API when
attaching to Java processes running in a separate docker process.
However, the \f[CB]jps\f[R] command will not list the JVM processes that
are running in a separate docker instance.
If you are trying to connect a Linux host with a Virtual Machine that is
in a docker container, you must use tools such as \f[CB]ps\f[R] to look up
the PID of the JVM.
.RE
.SH DESCRIPTION
.PP

View File

@ -1,4 +1,4 @@
.\" Copyright (c) 1994, 2019, Oracle and/or its affiliates. All rights reserved.
.\" Copyright (c) 2004, 2020, Oracle and/or its affiliates. All rights reserved.
.\" 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,7 +21,7 @@
.\"
.\" Automatically generated by Pandoc 2.3.1
.\"
.TH "JMAP" "1" "2020" "JDK 14" "JDK Commands"
.TH "JMAP" "1" "2020" "JDK 15" "JDK Commands"
.hy
.SH NAME
.PP
@ -46,14 +46,6 @@ To get a list of Java processes running on a machine, use either the
\f[CB]ps\f[R] command or, if the JVM processes are not running in a
separate docker instance, the \f[B]jps\f[R] command.
.RS
.PP
\f[B]Note:\f[R] JDK 10 has added support for using the Attach API when
attaching to Java processes running in a separate docker process.
However, the \f[CB]jps\f[R] command will not list the JVM processes that
are running in a separate docker instance.
If you are trying to connect a Linux host with a Virtual Machine that is
in a docker container, you must use tools such as \f[CB]ps\f[R] to look up
the PID of the JVM.
.RE
.SH DESCRIPTION
.PP

View File

@ -1,4 +1,4 @@
.\" Copyright (c) 1994, 2019, Oracle and/or its affiliates. All rights reserved.
.\" Copyright (c) 2004, 2020, Oracle and/or its affiliates. All rights reserved.
.\" 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,7 +21,7 @@
.\"
.\" Automatically generated by Pandoc 2.3.1
.\"
.TH "JPS" "1" "2020" "JDK 14" "JDK Commands"
.TH "JPS" "1" "2020" "JDK 15" "JDK Commands"
.hy
.SH NAME
.PP
@ -81,17 +81,6 @@ target system.
The command is limited to reporting information on JVMs for which it has
the access permissions.
.PP
\f[B]Note:\f[R]
.PP
JDK 10 added support for using the Attach API when attaching to Java
processes running in a separate docker process.
However, the \f[CB]jps\f[R] tool cannot see JVM processes running in a
separate docker instance.
If you are trying to connect a Linux host with a Virtual Machine within
a docker container, you must use tools such as \f[CB]ps\f[R] to look up
the PID of the JVM and then specify the PID on the command line of the
tools that accept the PID.
.PP
If the \f[CB]jps\f[R] command is run without specifying a \f[CB]hostid\f[R],
then it searches for instrumented JVMs on the local host.
If started with a \f[CB]hostid\f[R], then it searches for JVMs on the

View File

@ -1,4 +1,4 @@
.\" Copyright (c) 1994, 2019, Oracle and/or its affiliates. All rights reserved.
.\" Copyright (c) 2004, 2020, Oracle and/or its affiliates. All rights reserved.
.\" 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,7 +21,7 @@
.\"
.\" Automatically generated by Pandoc 2.3.1
.\"
.TH "JSTACK" "1" "2020" "JDK 14" "JDK Commands"
.TH "JSTACK" "1" "2020" "JDK 15" "JDK Commands"
.hy
.SH NAME
.PP
@ -46,14 +46,6 @@ To get a list of Java processes running on a machine, use either the
\f[CB]ps\f[R] command or, if the JVM processes are not running in a
separate docker instance, the \f[B]jps\f[R] command.
.RS
.PP
\f[B]Note:\f[R] JDK 10 has added support for using the Attach API when
attaching to Java processes running in a separate docker process.
However, the \f[CB]jps\f[R] command will not list the JVM processes that
are running in a separate docker instance.
If you are trying to connect a Linux host with a Virtual Machine that is
in a docker container, you must use tools such as \f[CB]ps\f[R] to look up
the PID of the JVM.
.RE
.SH DESCRIPTION
.PP

View File

@ -1,4 +1,4 @@
.\" Copyright (c) 1994, 2019, Oracle and/or its affiliates. All rights reserved.
.\" Copyright (c) 2004, 2020, Oracle and/or its affiliates. All rights reserved.
.\" 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,7 +21,7 @@
.\"
.\" Automatically generated by Pandoc 2.3.1
.\"
.TH "JSTAT" "1" "2020" "JDK 14" "JDK Commands"
.TH "JSTAT" "1" "2020" "JDK 15" "JDK Commands"
.hy
.SH NAME
.PP
@ -553,18 +553,10 @@ The \f[I]lvmid\f[R] is typically, but not necessarily, the operating
system\[aq]s process identifier for the target JVM process.
You can use the \f[CB]jps\f[R] command to determine the \f[I]lvmid\f[R]
provided the JVM processes is not running in a separate docker instance.
You can also determine the \f[I]lvmid\f[R] on Oracle Solaris, Linux, and
OS X platforms with the \f[CB]ps\f[R] command, and on Windows with the
Windows Task Manager.
You can also determine the \f[I]lvmid\f[R] on Linux and OS X platforms
with the \f[CB]ps\f[R] command, and on Windows with the Windows Task
Manager.
.RS
.PP
\f[B]Note:\f[R] JDK 10 has added support for using the Attach API when
attaching to Java processes running in a separate docker process.
However, the \f[CB]jps\f[R] command will not list the JVM processes that
are running in a separate docker instance.
If you are trying to connect a Linux host with a Virtual Machine that is
in a docker container, you must use tools such as \f[CB]ps\f[R] to look up
the PID of the JVM.
.RE
.TP
.B \f[I]hostname\f[R]

View File

@ -1,4 +1,4 @@
.\" Copyright (c) 1994, 2019, Oracle and/or its affiliates. All rights reserved.
.\" Copyright (c) 2004, 2020, Oracle and/or its affiliates. All rights reserved.
.\" 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,7 +21,7 @@
.\"
.\" Automatically generated by Pandoc 2.3.1
.\"
.TH "JCONSOLE" "1" "2020" "JDK 14" "JDK Commands"
.TH "JCONSOLE" "1" "2020" "JDK 15" "JDK Commands"
.hy
.SH NAME
.PP

View File

@ -1,4 +1,4 @@
.\" Copyright (c) 1994, 2019, Oracle and/or its affiliates. All rights reserved.
.\" Copyright (c) 1994, 2020, Oracle and/or its affiliates. All rights reserved.
.\" 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,7 +21,7 @@
.\"
.\" Automatically generated by Pandoc 2.3.1
.\"
.TH "JAVAP" "1" "2020" "JDK 14" "JDK Commands"
.TH "JAVAP" "1" "2020" "JDK 15" "JDK Commands"
.hy
.SH NAME
.PP
@ -79,7 +79,7 @@ options can use the equal sign (\f[CB]=\f[R]) instead of a white space to
separate the name of an option from its value.
.SH OPTIONS FOR JAVAP
.TP
.B \f[CB]\-help\f[R], \f[CB]\-\-help\f[R] , or \f[CB]\-?\f[R]
.B \f[CB]\-\-help\f[R], \f[CB]\-help\f[R] , \f[CB]\-h\f[R], or \f[CB]\-?\f[R]
Prints a help message for the \f[CB]javap\f[R] command.
.RS
.RE

View File

@ -1,4 +1,4 @@
.\" Copyright (c) 1994, 2019, Oracle and/or its affiliates. All rights reserved.
.\" Copyright (c) 2017, 2020, Oracle and/or its affiliates. All rights reserved.
.\" 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,7 +21,7 @@
.\"
.\" Automatically generated by Pandoc 2.3.1
.\"
.TH "JDEPRSCAN" "1" "2020" "JDK 14" "JDK Commands"
.TH "JDEPRSCAN" "1" "2020" "JDK 15" "JDK Commands"
.hy
.SH NAME
.PP
@ -104,7 +104,7 @@ Provides a search path for resolution of dependent classes.
directories separated by the system\-specific path separator.
For example:
.IP \[bu] 2
\f[B]Oracle Solaris, Linux, and OS X:\f[R]
\f[B]Linux and OS X:\f[R]
.RS 2
.RS
.PP

View File

@ -1,4 +1,4 @@
.\" Copyright (c) 1994, 2019, Oracle and/or its affiliates. All rights reserved.
.\" Copyright (c) 2013, 2020, Oracle and/or its affiliates. All rights reserved.
.\" 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,7 +21,7 @@
.\"
.\" Automatically generated by Pandoc 2.3.1
.\"
.TH "JDEPS" "1" "2020" "JDK 14" "JDK Commands"
.TH "JDEPS" "1" "2020" "JDK 15" "JDK Commands"
.hy
.SH NAME
.PP
@ -337,7 +337,7 @@ classes in that containing archive are analyzed.
The following example demonstrates analyzing the dependencies of the
\f[CB]Notepad.jar\f[R] file.
.PP
\f[B]Oracle Solaris, Linux, and OS X:\f[R]
\f[B]Linux and OS X:\f[R]
.IP
.nf
\f[CB]

View File

@ -1,4 +1,4 @@
.\" Copyright (c) 1994, 2019, Oracle and/or its affiliates. All rights reserved.
.\" Copyright (c) 1995, 2020, Oracle and/or its affiliates. All rights reserved.
.\" 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,7 +21,7 @@
.\"
.\" Automatically generated by Pandoc 2.3.1
.\"
.TH "JDB" "1" "2020" "JDK 14" "JDK Commands"
.TH "JDB" "1" "2020" "JDK 15" "JDK Commands"
.hy
.SH NAME
.PP

View File

@ -1,4 +1,4 @@
.\" Copyright (c) 1994, 2019, Oracle and/or its affiliates. All rights reserved.
.\" Copyright (c) 2017, 2020, Oracle and/or its affiliates. All rights reserved.
.\" 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,7 +21,7 @@
.\"
.\" Automatically generated by Pandoc 2.3.1
.\"
.TH "JLINK" "1" "2020" "JDK 14" "JDK Commands"
.TH "JLINK" "1" "2020" "JDK 15" "JDK Commands"
.hy
.SH NAME
.PP

View File

@ -1,4 +1,4 @@
.\" Copyright (c) 1994, 2019, Oracle and/or its affiliates. All rights reserved.
.\" Copyright (c) 2017, 2020, Oracle and/or its affiliates. All rights reserved.
.\" 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,7 +21,7 @@
.\"
.\" Automatically generated by Pandoc 2.3.1
.\"
.TH "JMOD" "1" "2020" "JDK 14" "JDK Commands"
.TH "JMOD" "1" "2020" "JDK 15" "JDK Commands"
.hy
.SH NAME
.PP
@ -412,7 +412,7 @@ the directory \f[CB]jmodhashex\f[R].
Run the following command from the \f[CB]jmodhashex2\f[R] directory:
.RS 4
.IP \[bu] 2
\f[B]Oracle Solaris, Linux, and OS X:\f[R]
\f[B]Linux and OS X:\f[R]
.RS 2
.RS
.PP

View File

@ -1,5 +1,5 @@
.\"t
.\" Copyright (c) 1994, 2019, Oracle and/or its affiliates. All rights reserved.
.\" Copyright (c) 2017, 2020, Oracle and/or its affiliates. All rights reserved.
.\" 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,7 +22,7 @@
.\"
.\" Automatically generated by Pandoc 2.3.1
.\"
.TH "JSHELL" "1" "2020" "JDK 14" "JDK Commands"
.TH "JSHELL" "1" "2020" "JDK 15" "JDK Commands"
.hy
.SH NAME
.PP
@ -102,6 +102,12 @@ variations and make corrections.
To keep snippets for later use, save them to a file.
.SH OPTIONS FOR JSHELL
.TP
.B \f[CB]\-\-add\-exports\f[R] \f[I]module\f[R]/\f[I]package\f[R]
Specifies a package to be considered as exported from its defining
module.
.RS
.RE
.TP
.B \f[CB]\-\-add\-modules\f[R] \f[I]module\f[R][\f[CB],\f[R]\f[I]module\f[R]...]
Specifies the root modules to resolve in addition to the initial module.
.RS
@ -121,12 +127,24 @@ This option overrides the path in the \f[CB]CLASSPATH\f[R] environment
variable.
If the environment variable isn\[aq]t set and this option isn\[aq]t
used, then the current directory is searched.
For Oracle Solaris, Linux, and macOS, use a colon (:) to separate items
in the path.
For Linux and macOS, use a colon (:) to separate items in the path.
For Windows, use a semicolon (;) to separate items.
.RS
.RE
.TP
.B \f[CB]\-\-enable\-preview\f[R]
Allows code to depend on the preview features of this release.
.RS
.RE
.TP
.B \f[CB]\-\-execution\f[R] \f[I]specification\f[R]
Specifies an alternate execution engine, where \f[I]specification\f[R] is
an ExecutionControl spec.
See the documentation of the package jdk.jshell.spi for the syntax of
the spec.
.RS
.RE
.TP
.B \f[CB]\-\-feedback\f[R] \f[I]mode\f[R]
Sets the initial level of feedback provided in response to what\[aq]s
entered.
@ -191,8 +209,7 @@ flag or flag argument needed.
.TP
.B \f[CB]\-\-module\-path\f[R] \f[I]modulepath\f[R]
Specifies where to find application modules.
For Oracle Solaris, Linux, and macOS, use a colon (:) to separate items
in the path.
For Linux and macOS, use a colon (:) to separate items in the path.
For Windows, use a semicolon (;) to separate items.
.RS
.RE
@ -376,16 +393,16 @@ This option overrides the path in the \f[CB]CLASSPATH\f[R] environment
variable.
If the environment variable isn\[aq]t set and this option isn\[aq]t
used, then the current directory is searched.
For Oracle Solaris, Linux, and macOS, use a colon (\f[CB]:\f[R]) to
separate items in the path.
For Linux and macOS, use a colon (\f[CB]:\f[R]) to separate items in the
path.
For Windows, use a semicolon (\f[CB];\f[R]) to separate items.
.RS
.RE
.TP
.B \f[CB]\-\-module\-path\f[R] \f[I]modulepath\f[R]
Specifies where to find application modules.
For Oracle Solaris, Linux, and macOS, use a colon (\f[CB]:\f[R]) to
separate items in the path.
For Linux and macOS, use a colon (\f[CB]:\f[R]) to separate items in the
path.
For Windows, use a semicolon (\f[CB];\f[R]) to separate items.
.RS
.RE
@ -566,16 +583,16 @@ This option overrides the path in the \f[CB]CLASSPATH\f[R] environment
variable.
If the environment variable isn\[aq]t set and this option isn\[aq]t
used, then the current directory is searched.
For Oracle Solaris, Linux, and macOS, use a colon (\f[CB]:\f[R]) to
separate items in the path.
For Linux and macOS, use a colon (\f[CB]:\f[R]) to separate items in the
path.
For Windows, use a semicolon (\f[CB];\f[R]) to separate items.
.RS
.RE
.TP
.B \f[CB]\-\-module\-path\f[R] \f[I]modulepath\f[R]
Specifies where to find application modules.
For Oracle Solaris, Linux, and macOS, use a colon (\f[CB]:\f[R]) to
separate items in the path.
For Linux and macOS, use a colon (\f[CB]:\f[R]) to separate items in the
path.
For Windows, use a semicolon (\f[CB];\f[R]) to separate items.
.RS
.RE
@ -634,16 +651,16 @@ This option overrides the path in the \f[CB]CLASSPATH\f[R] environment
variable.
If the environment variable isn\[aq]t set and this option isn\[aq]t
used, then the current directory is searched.
For Oracle Solaris, Linux, and macOS, use a colon (\f[CB]:\f[R]) to
separate items in the path.
For Linux and macOS, use a colon (\f[CB]:\f[R]) to separate items in the
path.
For Windows, use a semicolon (\f[CB];\f[R]) to separate items.
.RS
.RE
.TP
.B \f[CB]\-\-module\-path\f[R] \f[I]modulepath\f[R]
Specifies where to find application modules.
For Oracle Solaris, Linux, and macOS, use a colon (\f[CB]:\f[R]) to
separate items in the path.
For Linux and macOS, use a colon (\f[CB]:\f[R]) to separate items in the
path.
For Windows, use a semicolon (\f[CB];\f[R]) to separate items.
.RS
.RE

View File

@ -1,4 +1,4 @@
.\" Copyright (c) 1994, 2019, Oracle and/or its affiliates. All rights reserved.
.\" Copyright (c) 2004, 2020, Oracle and/or its affiliates. All rights reserved.
.\" 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,7 +21,7 @@
.\"
.\" Automatically generated by Pandoc 2.3.1
.\"
.TH "JSTATD" "1" "2020" "JDK 14" "JDK Commands"
.TH "JSTATD" "1" "2020" "JDK 15" "JDK Commands"
.hy
.SH NAME
.PP
@ -72,6 +72,12 @@ isn\[aq]t specified.
.RS
.RE
.TP
.B \f[CB]\-r\f[R] \f[I]rmiport\f[R]
This option sets the port number to which the RMI connector is bound.
If not specified a random available port is used.
.RS
.RE
.TP
.B \f[CB]\-n\f[R] \f[I]rminame\f[R]
This option sets the name to which the remote RMI object is bound in the
RMI registry.
@ -98,9 +104,9 @@ The \f[CB]jstatd\f[R] server can monitor only JVMs for which it has the
appropriate native access permissions.
Therefore, the \f[CB]jstatd\f[R] process must be running with the same
user credentials as the target JVMs.
Some user credentials, such as the root user in Oracle Solaris, Linux,
and OS X operating systems, have permission to access the
instrumentation exported by any JVM on the system.
Some user credentials, such as the root user in Linux and OS X operating
systems, have permission to access the instrumentation exported by any
JVM on the system.
A \f[CB]jstatd\f[R] process running with such credentials can monitor any
JVM on the system, but introduces additional security concerns.
.PP
@ -168,6 +174,17 @@ jstatd\ \-J\-Djava.security.policy=all.policy\ \-p\ 2020
.fi
.PP
This example starts a \f[CB]jstatd\f[R] session with an external RMI
registry server on port \f[CB]2020\f[R] and JMX connector bound to port
\f[CB]2021\f[R].
.IP
.nf
\f[CB]
jrmiregistry\ 2020&
jstatd\ \-J\-Djava.security.policy=all.policy\ \-p\ 2020\ \-r\ 2021
\f[R]
.fi
.PP
This example starts a \f[CB]jstatd\f[R] session with an external RMI
registry on port 2020 that\[aq]s bound to
\f[CB]AlternateJstatdServerName\f[R].
.IP

View File

@ -0,0 +1,81 @@
/*
* Copyright (c) 2020, Huawei Technologies Co. Ltd. All rights reserved.
* 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 8250609
* @summary C2 crash in IfNode::fold_compares
*
* @run main/othervm -XX:CompileOnly=compiler.c2.TestFoldCompares::test
* -XX:-BackgroundCompilation compiler.c2.TestFoldCompares
*/
package compiler.c2;
public class TestFoldCompares {
public int test() {
byte by = -37;
int result = 1;
int iArr[] = new int[6];
for (int i = 0; i < iArr.length; i++) {
iArr[i] = 0;
}
for (int i = 16; i < 308; i++) {
result *= i;
if ((result--) <= (++by)) {
continue;
}
for (int j = 3; j < 86; j++) {
for (int k = 1; k < 2; k++) {
result >>= 25;
}
for (int k = 1; k < 2; k += 3) {
try {
iArr[k] = (16986 / result);
} catch (ArithmeticException a_e) {
}
result = k;
}
}
}
return result;
}
public static void main(String[] args) {
TestFoldCompares obj = new TestFoldCompares();
for (int i = 0; i < 10; i++) {
int result = obj.test();
if (result != 1) {
throw new RuntimeException("Test failed.");
}
}
System.out.println("Test passed.");
}
}

View File

@ -76,6 +76,14 @@
* -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=aggressive
* -XX:+ShenandoahAllocFailureALot
* TestAllocHumongousFragment
*/
/*
* @test TestAllocHumongousFragment
* @summary Make sure Shenandoah can recover from humongous allocation fragmentation
* @key randomness
* @requires vm.gc.Shenandoah & !vm.graal.enabled
* @library /test/lib
*
* @run main/othervm -Xmx1g -Xms1g -Xlog:gc -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -XX:ShenandoahTargetNumRegions=2048
* -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=adaptive
@ -85,10 +93,26 @@
* @run main/othervm -Xmx1g -Xms1g -Xlog:gc -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -XX:ShenandoahTargetNumRegions=2048
* -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=adaptive
* TestAllocHumongousFragment
*/
/*
* @test TestAllocHumongousFragment
* @summary Make sure Shenandoah can recover from humongous allocation fragmentation
* @key randomness
* @requires vm.gc.Shenandoah & !vm.graal.enabled
* @library /test/lib
*
* @run main/othervm -Xmx1g -Xms1g -Xlog:gc -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -XX:ShenandoahTargetNumRegions=2048
* -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=static
* TestAllocHumongousFragment
*/
/*
* @test TestAllocHumongousFragment
* @summary Make sure Shenandoah can recover from humongous allocation fragmentation
* @key randomness
* @requires vm.gc.Shenandoah & !vm.graal.enabled
* @library /test/lib
*
* @run main/othervm -Xmx1g -Xms1g -Xlog:gc -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -XX:ShenandoahTargetNumRegions=2048
* -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=compact
@ -121,6 +145,14 @@
* -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu -XX:ShenandoahGCHeuristics=aggressive
* -XX:+ShenandoahAllocFailureALot
* TestAllocHumongousFragment
*/
/*
* @test TestAllocHumongousFragment
* @summary Make sure Shenandoah can recover from humongous allocation fragmentation
* @key randomness
* @requires vm.gc.Shenandoah & !vm.graal.enabled
* @library /test/lib
*
* @run main/othervm -Xlog:gc -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -Xmx1g -Xms1g -XX:ShenandoahTargetNumRegions=2048
* -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu

View File

@ -80,6 +80,14 @@
* @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -Xmx1g -Xms1g
* -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=aggressive
* TestAllocIntArrays
*/
/*
* @test TestAllocIntArrays
* @summary Acceptance tests: collector can withstand allocation
* @key randomness
* @requires vm.gc.Shenandoah & !vm.graal.enabled
* @library /test/lib
*
* @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -Xmx1g -Xms1g
* -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=adaptive
@ -89,14 +97,38 @@
* @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -Xmx1g -Xms1g
* -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=adaptive
* TestAllocIntArrays
*/
/*
* @test TestAllocIntArrays
* @summary Acceptance tests: collector can withstand allocation
* @key randomness
* @requires vm.gc.Shenandoah & !vm.graal.enabled
* @library /test/lib
*
* @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -Xmx1g -Xms1g
* -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=static
* TestAllocIntArrays
*/
/*
* @test TestAllocIntArrays
* @summary Acceptance tests: collector can withstand allocation
* @key randomness
* @requires vm.gc.Shenandoah & !vm.graal.enabled
* @library /test/lib
*
* @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -Xmx1g -Xms1g
* -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=compact
* TestAllocIntArrays
*/
/*
* @test TestAllocIntArrays
* @summary Acceptance tests: collector can withstand allocation
* @key randomness
* @requires vm.gc.Shenandoah & !vm.graal.enabled
* @library /test/lib
*
* @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -Xmx1g -Xms1g
* -XX:+UseShenandoahGC
@ -134,6 +166,14 @@
* @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -Xmx1g -Xms1g
* -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu -XX:ShenandoahGCHeuristics=aggressive
* TestAllocIntArrays
*/
/*
* @test TestAllocIntArrays
* @summary Acceptance tests: collector can withstand allocation
* @key randomness
* @requires vm.gc.Shenandoah & !vm.graal.enabled
* @library /test/lib
*
* @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -Xmx1g -Xms1g
* -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu

View File

@ -80,6 +80,14 @@
* @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -Xmx1g -Xms1g
* -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=aggressive
* TestAllocObjectArrays
*/
/*
* @test TestAllocObjectArrays
* @summary Acceptance tests: collector can withstand allocation
* @key randomness
* @requires vm.gc.Shenandoah & !vm.graal.enabled
* @library /test/lib
*
* @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -Xmx1g -Xms1g
* -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=adaptive
@ -89,14 +97,38 @@
* @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -Xmx1g -Xms1g
* -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=adaptive
* TestAllocObjectArrays
*/
/*
* @test TestAllocObjectArrays
* @summary Acceptance tests: collector can withstand allocation
* @key randomness
* @requires vm.gc.Shenandoah & !vm.graal.enabled
* @library /test/lib
*
* @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -Xmx1g -Xms1g
* -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=static
* TestAllocObjectArrays
*/
/*
* @test TestAllocObjectArrays
* @summary Acceptance tests: collector can withstand allocation
* @key randomness
* @requires vm.gc.Shenandoah & !vm.graal.enabled
* @library /test/lib
*
* @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -Xmx1g -Xms1g
* -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=compact
* TestAllocObjectArrays
*/
/*
* @test TestAllocObjectArrays
* @summary Acceptance tests: collector can withstand allocation
* @key randomness
* @requires vm.gc.Shenandoah & !vm.graal.enabled
* @library /test/lib
*
* @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -Xmx1g -Xms1g
* -XX:+UseShenandoahGC
@ -134,6 +166,14 @@
* @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -Xmx1g -Xms1g
* -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu -XX:ShenandoahGCHeuristics=aggressive
* TestAllocObjectArrays
*/
/*
* @test TestAllocObjectArrays
* @summary Acceptance tests: collector can withstand allocation
* @key randomness
* @requires vm.gc.Shenandoah & !vm.graal.enabled
* @library /test/lib
*
* @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -Xmx1g -Xms1g
* -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu

View File

@ -82,6 +82,13 @@
* -XX:+ShenandoahSuspendibleWorkers
* TestAllocObjects
*
*/
/*
* @test TestAllocObjects
* @summary Acceptance tests: collector can withstand allocation
* @requires vm.gc.Shenandoah & !vm.graal.enabled
*
* @run main/othervm -Xmx1g -Xms1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
* -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=adaptive
* -XX:+ShenandoahVerify
@ -95,6 +102,12 @@
* -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=adaptive
* -XX:+ShenandoahSuspendibleWorkers
* TestAllocObjects
*/
/*
* @test TestAllocObjects
* @summary Acceptance tests: collector can withstand allocation
* @requires vm.gc.Shenandoah & !vm.graal.enabled
*
* @run main/othervm -Xmx1g -Xms1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
* -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=static
@ -104,6 +117,12 @@
* -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=static
* -XX:+ShenandoahSuspendibleWorkers
* TestAllocObjects
*/
/*
* @test TestAllocObjects
* @summary Acceptance tests: collector can withstand allocation
* @requires vm.gc.Shenandoah & !vm.graal.enabled
*
* @run main/othervm -Xmx1g -Xms1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
* -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=compact
@ -143,6 +162,12 @@
* @run main/othervm -Xmx1g -Xms1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
* -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu -XX:ShenandoahGCHeuristics=aggressive
* TestAllocObjects
*/
/*
* @test TestAllocObjects
* @summary Acceptance tests: collector can withstand allocation
* @requires vm.gc.Shenandoah & !vm.graal.enabled
*
* @run main/othervm -Xmx1g -Xms1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
* -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu

View File

@ -59,16 +59,31 @@
* -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=aggressive
* -Dtarget=1000
* TestLotsOfCycles
*/
/*
* @test TestLotsOfCycles
* @requires vm.gc.Shenandoah & !vm.graal.enabled
*
* @run main/othervm/timeout=480 -Xmx16m -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
* -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=adaptive
* -Dtarget=10000
* TestLotsOfCycles
*/
/*
* @test TestLotsOfCycles
* @requires vm.gc.Shenandoah & !vm.graal.enabled
*
* @run main/othervm/timeout=480 -Xmx16m -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
* -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=static
* -Dtarget=10000
* TestLotsOfCycles
*/
/*
* @test TestLotsOfCycles
* @requires vm.gc.Shenandoah & !vm.graal.enabled
*
* @run main/othervm/timeout=480 -Xmx16m -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
* -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=compact
@ -96,6 +111,11 @@
* -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu -XX:ShenandoahGCHeuristics=aggressive
* -Dtarget=1000
* TestLotsOfCycles
*/
/*
* @test TestLotsOfCycles
* @requires vm.gc.Shenandoah & !vm.graal.enabled
*
* @run main/othervm/timeout=480 -Xmx16m -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
* -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu

View File

@ -44,14 +44,29 @@
* @run main/othervm -Xmx1g -Xms1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -XX:+ShenandoahRegionSampling
* -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=adaptive
* TestRegionSampling
*/
/*
* @test TestRegionSampling
* @requires vm.gc.Shenandoah & !vm.graal.enabled
*
* @run main/othervm -Xmx1g -Xms1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -XX:+ShenandoahRegionSampling
* -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=static
* TestRegionSampling
*/
/*
* @test TestRegionSampling
* @requires vm.gc.Shenandoah & !vm.graal.enabled
*
* @run main/othervm -Xmx1g -Xms1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -XX:+ShenandoahRegionSampling
* -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=compact
* TestRegionSampling
*/
/*
* @test TestRegionSampling
* @requires vm.gc.Shenandoah & !vm.graal.enabled
*
* @run main/othervm -Xmx1g -Xms1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -XX:+ShenandoahRegionSampling
* -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=aggressive
@ -65,6 +80,11 @@
* @run main/othervm -Xmx1g -Xms1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -XX:+ShenandoahRegionSampling
* -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu -XX:ShenandoahGCHeuristics=aggressive
* TestRegionSampling
*/
/*
* @test TestRegionSampling
* @requires vm.gc.Shenandoah & !vm.graal.enabled
*
* @run main/othervm -Xmx1g -Xms1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -XX:+ShenandoahRegionSampling
* -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu

View File

@ -0,0 +1,201 @@
/*
* Copyright (c) 2020, Red Hat, Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*
*/
/*
* @test TestResizeTLAB
* @key randomness
* @summary Test that Shenandoah is able to work with(out) resizeable TLABs
* @requires vm.gc.Shenandoah
* @library /test/lib
*
* @run main/othervm -Xmx1g -Xms1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
* -XX:+UseShenandoahGC -XX:ShenandoahGCMode=passive
* -XX:+ShenandoahDegeneratedGC -XX:+ShenandoahVerify
* -XX:+ShenandoahVerify
* -XX:+ResizeTLAB
* TestResizeTLAB
*
* @run main/othervm -Xmx1g -Xms1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
* -XX:+UseShenandoahGC -XX:ShenandoahGCMode=passive
* -XX:+ShenandoahDegeneratedGC -XX:+ShenandoahVerify
* -XX:+ShenandoahVerify
* -XX:-ResizeTLAB
* TestResizeTLAB
*
* @run main/othervm -Xmx1g -Xms1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
* -XX:+UseShenandoahGC -XX:ShenandoahGCMode=passive
* -XX:-ShenandoahDegeneratedGC -XX:+ShenandoahVerify
* -XX:+ShenandoahVerify
* -XX:+ResizeTLAB
* TestResizeTLAB
*
* @run main/othervm -Xmx1g -Xms1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
* -XX:+UseShenandoahGC -XX:ShenandoahGCMode=passive
* -XX:-ShenandoahDegeneratedGC -XX:+ShenandoahVerify
* -XX:+ShenandoahVerify
* -XX:-ResizeTLAB
* TestResizeTLAB
*/
/*
* @test TestResizeTLAB
* @key randomness
* @summary Test that Shenandoah is able to work with(out) resizeable TLABs
* @requires vm.gc.Shenandoah
* @library /test/lib
*
* @run main/othervm -Xmx1g -Xms1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
* -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=aggressive
* -XX:+ShenandoahVerify
* -XX:+ResizeTLAB
* TestResizeTLAB
*
* @run main/othervm -Xmx1g -Xms1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
* -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=aggressive
* -XX:+ShenandoahVerify
* -XX:-ResizeTLAB
* TestResizeTLAB
*/
/*
* @test TestResizeTLAB
* @key randomness
* @summary Test that Shenandoah is able to work with(out) resizeable TLABs
* @requires vm.gc.Shenandoah
* @library /test/lib
*
* @run main/othervm -Xmx1g -Xms1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
* -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=adaptive
* -XX:+ShenandoahVerify
* -XX:+ResizeTLAB
* TestResizeTLAB
*
* @run main/othervm -Xmx1g -Xms1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
* -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=adaptive
* -XX:+ShenandoahVerify
* -XX:-ResizeTLAB
* TestResizeTLAB
*/
/*
* @test TestResizeTLAB
* @key randomness
* @summary Test that Shenandoah is able to work with(out) resizeable TLABs
* @requires vm.gc.Shenandoah
* @library /test/lib
*
* @run main/othervm -Xmx1g -Xms1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
* -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=static
* -XX:+ShenandoahVerify
* -XX:+ResizeTLAB
* TestResizeTLAB
*
* @run main/othervm -Xmx1g -Xms1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
* -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=static
* -XX:+ShenandoahVerify
* -XX:-ResizeTLAB
* TestResizeTLAB
*/
/*
* @test TestResizeTLAB
* @key randomness
* @summary Test that Shenandoah is able to work with(out) resizeable TLABs
* @requires vm.gc.Shenandoah
* @library /test/lib
*
* @run main/othervm -Xmx1g -Xms1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
* -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=compact
* -XX:+ShenandoahVerify
* -XX:+ResizeTLAB
* TestResizeTLAB
*
* @run main/othervm -Xmx1g -Xms1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
* -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=compact
* -XX:+ShenandoahVerify
* -XX:-ResizeTLAB
* TestResizeTLAB
*/
/*
* @test TestResizeTLAB
* @key randomness
* @summary Test that Shenandoah is able to work with(out) resizeable TLABs
* @requires vm.gc.Shenandoah
* @library /test/lib
*
* @run main/othervm -Xmx1g -Xms1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
* -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu -XX:ShenandoahGCHeuristics=aggressive
* -XX:+ShenandoahVerify
* -XX:+ResizeTLAB
* TestResizeTLAB
*
* @run main/othervm -Xmx1g -Xms1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
* -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu -XX:ShenandoahGCHeuristics=aggressive
* -XX:+ShenandoahVerify
* -XX:-ResizeTLAB
* TestResizeTLAB
*/
/*
* @test TestResizeTLAB
* @key randomness
* @summary Test that Shenandoah is able to work with(out) resizeable TLABs
* @requires vm.gc.Shenandoah
* @library /test/lib
*
* @run main/othervm -Xmx1g -Xms1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
* -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu
* -XX:+ShenandoahVerify
* -XX:+ResizeTLAB
* TestResizeTLAB
*
* @run main/othervm -Xmx1g -Xms1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
* -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu
* -XX:+ShenandoahVerify
* -XX:-ResizeTLAB
* TestResizeTLAB
*/
import java.util.Random;
import jdk.test.lib.Utils;
public class TestResizeTLAB {
static final long TARGET_MB = Long.getLong("target", 10_000); // 10 Gb allocation
static volatile Object sink;
public static void main(String[] args) throws Exception {
final int min = 0;
final int max = 384 * 1024;
long count = TARGET_MB * 1024 * 1024 / (16 + 4 * (min + (max - min) / 2));
Random r = Utils.getRandomInstance();
for (long c = 0; c < count; c++) {
sink = new int[min + r.nextInt(max - min)];
}
}
}

View File

@ -66,6 +66,12 @@
* @run main/othervm -Xmx1g -Xms1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
* -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=aggressive
* TestRetainObjects
*/
/*
* @test TestRetainObjects
* @summary Acceptance tests: collector can deal with retained objects
* @requires vm.gc.Shenandoah & !vm.graal.enabled
*
* @run main/othervm -Xmx1g -Xms1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
* -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=adaptive
@ -75,14 +81,32 @@
* @run main/othervm -Xmx1g -Xms1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
* -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=adaptive
* TestRetainObjects
*/
/*
* @test TestRetainObjects
* @summary Acceptance tests: collector can deal with retained objects
* @requires vm.gc.Shenandoah & !vm.graal.enabled
*
* @run main/othervm -Xmx1g -Xms1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
* -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=static
* TestRetainObjects
*/
/*
* @test TestRetainObjects
* @summary Acceptance tests: collector can deal with retained objects
* @requires vm.gc.Shenandoah & !vm.graal.enabled
*
* @run main/othervm -Xmx1g -Xms1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
* -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=compact
* TestRetainObjects
*/
/*
* @test TestRetainObjects
* @summary Acceptance tests: collector can deal with retained objects
* @requires vm.gc.Shenandoah & !vm.graal.enabled
*
* @run main/othervm -Xmx1g -Xms1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
* -XX:+UseShenandoahGC
@ -108,6 +132,12 @@
* @run main/othervm -Xmx1g -Xms1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
* -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu -XX:ShenandoahGCHeuristics=aggressive
* TestRetainObjects
*/
/*
* @test TestRetainObjects
* @summary Acceptance tests: collector can deal with retained objects
* @requires vm.gc.Shenandoah & !vm.graal.enabled
*
* @run main/othervm -Xmx1g -Xms1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
* -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu

View File

@ -70,6 +70,14 @@
* @run main/othervm -Xmx1g -Xms1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
* -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=aggressive
* TestSieveObjects
*/
/*
* @test TestSieveObjects
* @summary Acceptance tests: collector can deal with retained objects
* @key randomness
* @requires vm.gc.Shenandoah & !vm.graal.enabled
* @library /test/lib
*
* @run main/othervm -Xmx1g -Xms1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
* -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=adaptive
@ -80,13 +88,38 @@
* -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=adaptive
* TestSieveObjects
*
*/
/*
* @test TestSieveObjects
* @summary Acceptance tests: collector can deal with retained objects
* @key randomness
* @requires vm.gc.Shenandoah & !vm.graal.enabled
* @library /test/lib
*
* @run main/othervm -Xmx1g -Xms1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
* -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=static
* TestSieveObjects
*/
/*
* @test TestSieveObjects
* @summary Acceptance tests: collector can deal with retained objects
* @key randomness
* @requires vm.gc.Shenandoah & !vm.graal.enabled
* @library /test/lib
*
* @run main/othervm -Xmx1g -Xms1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
* -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=compact
* TestSieveObjects
*/
/*
* @test TestSieveObjects
* @summary Acceptance tests: collector can deal with retained objects
* @key randomness
* @requires vm.gc.Shenandoah & !vm.graal.enabled
* @library /test/lib
*
* @run main/othervm/timeout=240 -Xmx1g -Xms1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
* -XX:+UseShenandoahGC
@ -114,6 +147,14 @@
* @run main/othervm -Xmx1g -Xms1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
* -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu -XX:ShenandoahGCHeuristics=aggressive
* TestSieveObjects
*/
/*
* @test TestSieveObjects
* @summary Acceptance tests: collector can deal with retained objects
* @key randomness
* @requires vm.gc.Shenandoah & !vm.graal.enabled
* @library /test/lib
*
* @run main/othervm -Xmx1g -Xms1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
* -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu

View File

@ -47,16 +47,34 @@
* -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=aggressive
* -Dprecise=false
* TestChurnNotifications
*/
/*
* @test TestChurnNotifications
* @summary Check that MX notifications are reported for all cycles
* @requires vm.gc.Shenandoah & !vm.graal.enabled
*
* @run main/othervm -Xmx128m -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
* -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=adaptive
* -Dprecise=false
* TestChurnNotifications
*/
/*
* @test TestChurnNotifications
* @summary Check that MX notifications are reported for all cycles
* @requires vm.gc.Shenandoah & !vm.graal.enabled
*
* @run main/othervm -Xmx128m -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
* -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=static
* -Dprecise=false
* TestChurnNotifications
*/
/*
* @test TestChurnNotifications
* @summary Check that MX notifications are reported for all cycles
* @requires vm.gc.Shenandoah & !vm.graal.enabled
*
* @run main/othervm -Xmx128m -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
* -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=compact
@ -91,7 +109,7 @@ import com.sun.management.GarbageCollectionNotificationInfo;
public class TestChurnNotifications {
static final long HEAP_MB = 128; // adjust for test configuration above
static final long TARGET_MB = Long.getLong("target", 8_000); // 8 Gb allocation
static final long TARGET_MB = Long.getLong("target", 2_000); // 2 Gb allocation
// Should we track the churn precisely?
// Precise tracking is only reliable when GC is fully stop-the-world. Otherwise,
@ -149,7 +167,7 @@ public class TestChurnNotifications {
long maxExpected = mem + HEAP_MB * 1024 * 1024;
String msg = "Expected = [" + minExpected / M + "; " + maxExpected / M + "] (" + mem / M + "), actual = " + actual / M;
if (minExpected < actual && actual < maxExpected) {
if (minExpected <= actual && actual <= maxExpected) {
System.out.println(msg);
} else {
throw new IllegalStateException(msg);

View File

@ -46,14 +46,32 @@
* @run main/othervm -Xmx128m -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
* -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=aggressive
* TestPauseNotifications
*/
/*
* @test TestPauseNotifications
* @summary Check that MX notifications are reported for all cycles
* @requires vm.gc.Shenandoah & !vm.graal.enabled
*
* @run main/othervm -Xmx128m -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
* -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=adaptive
* TestPauseNotifications
*/
/*
* @test TestPauseNotifications
* @summary Check that MX notifications are reported for all cycles
* @requires vm.gc.Shenandoah & !vm.graal.enabled
*
* @run main/othervm -Xmx128m -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
* -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=static
* TestPauseNotifications
*/
/*
* @test TestPauseNotifications
* @summary Check that MX notifications are reported for all cycles
* @requires vm.gc.Shenandoah & !vm.graal.enabled
*
* @run main/othervm -Xmx128m -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
* -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=compact
@ -85,7 +103,7 @@ import com.sun.management.GarbageCollectionNotificationInfo;
public class TestPauseNotifications {
static final long HEAP_MB = 128; // adjust for test configuration above
static final long TARGET_MB = Long.getLong("target", 8_000); // 8 Gb allocation
static final long TARGET_MB = Long.getLong("target", 2_000); // 2 Gb allocation
static volatile Object sink;
@ -140,7 +158,7 @@ public class TestPauseNotifications {
{
String msg = "Pauses expected = [" + minExpected + "; " + maxExpected + "], actual = " + pausesActual;
if (minExpected < pausesActual && pausesActual < maxExpected) {
if (minExpected <= pausesActual && pausesActual <= maxExpected) {
System.out.println(msg);
} else {
throw new IllegalStateException(msg);
@ -149,7 +167,7 @@ public class TestPauseNotifications {
{
String msg = "Cycles expected = [" + minExpected + "; " + maxExpected + "], actual = " + cyclesActual;
if (minExpected < cyclesActual && cyclesActual < maxExpected) {
if (minExpected <= cyclesActual && cyclesActual <= maxExpected) {
System.out.println(msg);
} else {
throw new IllegalStateException(msg);
@ -158,7 +176,7 @@ public class TestPauseNotifications {
{
String msg = "Cycle duration (" + cyclesActual + "), pause duration (" + pausesActual + ")";
if (pausesActual < cyclesActual) {
if (pausesActual <= cyclesActual) {
System.out.println(msg);
} else {
throw new IllegalStateException(msg);

View File

@ -46,7 +46,9 @@ public class TestArgumentRanges {
private static void testHeuristics() throws Exception {
{
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("-XX:+UnlockDiagnosticVMOptions",
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
"-Xmx128m",
"-XX:+UnlockDiagnosticVMOptions",
"-XX:+UnlockExperimentalVMOptions",
"-XX:+UseShenandoahGC",
"-XX:ShenandoahGCHeuristics=aggressive",
@ -55,7 +57,9 @@ public class TestArgumentRanges {
output.shouldHaveExitValue(0);
}
{
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("-XX:+UnlockDiagnosticVMOptions",
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
"-Xmx128m",
"-XX:+UnlockDiagnosticVMOptions",
"-XX:+UnlockExperimentalVMOptions",
"-XX:+UseShenandoahGC",
"-XX:ShenandoahGCHeuristics=static",
@ -64,7 +68,9 @@ public class TestArgumentRanges {
output.shouldHaveExitValue(0);
}
{
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("-XX:+UnlockDiagnosticVMOptions",
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
"-Xmx128m",
"-XX:+UnlockDiagnosticVMOptions",
"-XX:+UnlockExperimentalVMOptions",
"-XX:+UseShenandoahGC",
"-XX:ShenandoahGCHeuristics=fluff",
@ -77,7 +83,9 @@ public class TestArgumentRanges {
private static void testRange(String option, int min, int max) throws Exception {
{
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("-XX:+UnlockDiagnosticVMOptions",
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
"-Xmx128m",
"-XX:+UnlockDiagnosticVMOptions",
"-XX:+UnlockExperimentalVMOptions",
"-XX:+UseShenandoahGC",
"-XX:" + option + "=" + (max + 1),
@ -86,7 +94,9 @@ public class TestArgumentRanges {
output.shouldHaveExitValue(1);
}
{
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("-XX:+UnlockDiagnosticVMOptions",
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
"-Xmx128m",
"-XX:+UnlockDiagnosticVMOptions",
"-XX:+UnlockExperimentalVMOptions",
"-XX:+UseShenandoahGC",
"-XX:" + option + "=" + max,
@ -95,7 +105,9 @@ public class TestArgumentRanges {
output.shouldHaveExitValue(0);
}
{
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("-XX:+UnlockDiagnosticVMOptions",
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
"-Xmx128m",
"-XX:+UnlockDiagnosticVMOptions",
"-XX:+UnlockExperimentalVMOptions",
"-XX:+UseShenandoahGC",
"-XX:" + option + "=" + (min - 1),
@ -104,7 +116,9 @@ public class TestArgumentRanges {
output.shouldHaveExitValue(1);
}
{
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("-XX:+UnlockDiagnosticVMOptions",
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
"-Xmx128m",
"-XX:+UnlockDiagnosticVMOptions",
"-XX:+UnlockExperimentalVMOptions",
"-XX:+UseShenandoahGC",
"-XX:" + option + "=" + min,

View File

@ -39,9 +39,10 @@ import jdk.test.lib.process.OutputAnalyzer;
public class TestClassUnloadingArguments {
public static void testWith(String msg, boolean cu, boolean cuConc, String... args) throws Exception {
String[] cmds = Arrays.copyOf(args, args.length + 2);
cmds[args.length] = "-XX:+PrintFlagsFinal";
cmds[args.length + 1] = "-version";
String[] cmds = Arrays.copyOf(args, args.length + 3);
cmds[args.length] = "-Xmx128m";
cmds[args.length + 1] = "-XX:+PrintFlagsFinal";
cmds[args.length + 2] = "-version";
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(cmds);
OutputAnalyzer output = new OutputAnalyzer(pb.start());
output.shouldHaveExitValue(0);

View File

@ -61,6 +61,7 @@ public class TestExplicitGC {
{
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
"-Xmx128m",
"-XX:+UnlockExperimentalVMOptions",
"-XX:+UseShenandoahGC",
"-Xlog:gc",
@ -77,6 +78,7 @@ public class TestExplicitGC {
{
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
"-Xmx128m",
"-XX:+UnlockExperimentalVMOptions",
"-XX:+UseShenandoahGC",
"-Xlog:gc",
@ -94,6 +96,7 @@ public class TestExplicitGC {
{
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
"-Xmx128m",
"-XX:+UnlockExperimentalVMOptions",
"-XX:+UseShenandoahGC",
"-Xlog:gc",
@ -111,6 +114,7 @@ public class TestExplicitGC {
{
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
"-Xmx128m",
"-XX:+UnlockExperimentalVMOptions",
"-XX:+UseShenandoahGC",
"-Xlog:gc",
@ -128,6 +132,7 @@ public class TestExplicitGC {
{
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
"-Xmx128m",
"-XX:+UnlockExperimentalVMOptions",
"-XX:+UseShenandoahGC",
"-Xlog:gc",

View File

@ -61,6 +61,7 @@ public class TestExplicitGCNoConcurrent {
for (String opt : opts) {
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
"-Xmx128m",
"-XX:+UnlockExperimentalVMOptions",
"-XX:+UseShenandoahGC",
"-Xlog:gc",

View File

@ -53,6 +53,7 @@ public class TestHeuristicsUnlock {
private static void testWith(String h, Mode mode) throws Exception {
{
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
"-Xmx128m",
"-XX:-UnlockDiagnosticVMOptions",
"-XX:-UnlockExperimentalVMOptions",
"-XX:+UseShenandoahGC",
@ -73,6 +74,7 @@ public class TestHeuristicsUnlock {
{
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
"-Xmx128m",
"-XX:+UnlockDiagnosticVMOptions",
"-XX:-UnlockExperimentalVMOptions",
"-XX:+UseShenandoahGC",
@ -93,6 +95,7 @@ public class TestHeuristicsUnlock {
{
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
"-Xmx128m",
"-XX:-UnlockDiagnosticVMOptions",
"-XX:+UnlockExperimentalVMOptions",
"-XX:+UseShenandoahGC",

View File

@ -38,7 +38,9 @@ import jdk.test.lib.process.OutputAnalyzer;
public class TestHumongousThresholdArgs {
public static void main(String[] args) throws Exception {
{
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("-XX:+UnlockExperimentalVMOptions",
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
"-Xmx128m",
"-XX:+UnlockExperimentalVMOptions",
"-XX:+UseShenandoahGC",
"-version");
OutputAnalyzer output = new OutputAnalyzer(pb.start());
@ -49,7 +51,9 @@ public class TestHumongousThresholdArgs {
int[] invalid = new int[] {-100, -1, 0, 101, 1000};
for (int v : valid) {
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("-XX:+UnlockExperimentalVMOptions",
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
"-Xmx128m",
"-XX:+UnlockExperimentalVMOptions",
"-XX:+UseShenandoahGC",
"-XX:ShenandoahHumongousThreshold=" + v,
"-version");
@ -58,7 +62,9 @@ public class TestHumongousThresholdArgs {
}
for (int v : invalid) {
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("-XX:+UnlockExperimentalVMOptions",
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
"-Xmx128m",
"-XX:+UnlockExperimentalVMOptions",
"-XX:+UseShenandoahGC",
"-XX:ShenandoahHumongousThreshold=" + v,
"-version");

View File

@ -40,9 +40,10 @@ import jdk.test.lib.process.OutputAnalyzer;
public class TestLoopMiningArguments {
public static void testWith(String msg, boolean cls, int iters, String... args) throws Exception {
String[] cmds = Arrays.copyOf(args, args.length + 2);
cmds[args.length] = "-XX:+PrintFlagsFinal";
cmds[args.length + 1] = "-version";
String[] cmds = Arrays.copyOf(args, args.length + 3);
cmds[args.length] = "-Xmx128m";
cmds[args.length + 1] = "-XX:+PrintFlagsFinal";
cmds[args.length + 2] = "-version";
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(cmds);
OutputAnalyzer output = new OutputAnalyzer(pb.start());
output.shouldHaveExitValue(0);

View File

@ -52,6 +52,7 @@ public class TestModeUnlock {
private static void testWith(String h, Mode mode) throws Exception {
{
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
"-Xmx128m",
"-XX:-UnlockDiagnosticVMOptions",
"-XX:-UnlockExperimentalVMOptions",
"-XX:+UseShenandoahGC",
@ -72,6 +73,7 @@ public class TestModeUnlock {
{
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
"-Xmx128m",
"-XX:+UnlockDiagnosticVMOptions",
"-XX:-UnlockExperimentalVMOptions",
"-XX:+UseShenandoahGC",
@ -92,6 +94,7 @@ public class TestModeUnlock {
{
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
"-Xmx128m",
"-XX:-UnlockDiagnosticVMOptions",
"-XX:+UnlockExperimentalVMOptions",
"-XX:+UseShenandoahGC",

View File

@ -45,7 +45,9 @@ public class TestThreadCounts {
}
private static void testWith(int conc, int par) throws Exception {
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("-XX:+UnlockDiagnosticVMOptions",
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
"-Xmx128m",
"-XX:+UnlockDiagnosticVMOptions",
"-XX:+UnlockExperimentalVMOptions",
"-XX:+UseShenandoahGC",
"-XX:ConcGCThreads=" + conc,

View File

@ -39,6 +39,7 @@ public class TestThreadCountsOverride {
public static void main(String[] args) throws Exception {
{
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
"-Xmx128m",
"-XX:+UnlockDiagnosticVMOptions",
"-XX:+UnlockExperimentalVMOptions",
"-XX:+UseShenandoahGC",
@ -53,6 +54,7 @@ public class TestThreadCountsOverride {
{
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
"-Xmx128m",
"-XX:+UnlockDiagnosticVMOptions",
"-XX:+UnlockExperimentalVMOptions",
"-XX:+UseShenandoahGC",

View File

@ -62,6 +62,7 @@ public class TestWrongBarrierDisable {
private static void shouldFailAll(String h, String[] barriers) throws Exception {
for (String b : barriers) {
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
"-Xmx128m",
"-XX:+UnlockDiagnosticVMOptions",
"-XX:+UnlockExperimentalVMOptions",
"-XX:+UseShenandoahGC",
@ -79,6 +80,7 @@ public class TestWrongBarrierDisable {
private static void shouldPassAll(String h, String[] barriers) throws Exception {
for (String b : barriers) {
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
"-Xmx128m",
"-XX:+UnlockDiagnosticVMOptions",
"-XX:+UnlockExperimentalVMOptions",
"-XX:+UseShenandoahGC",

View File

@ -56,6 +56,7 @@ public class TestWrongBarrierEnable {
private static void shouldFailAll(String h, String[] barriers) throws Exception {
for (String b : barriers) {
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
"-Xmx128m",
"-XX:+UnlockDiagnosticVMOptions",
"-XX:+UnlockExperimentalVMOptions",
"-XX:+UseShenandoahGC",
@ -73,6 +74,7 @@ public class TestWrongBarrierEnable {
private static void shouldPassAll(String h, String[] barriers) throws Exception {
for (String b : barriers) {
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
"-Xmx128m",
"-XX:+UnlockDiagnosticVMOptions",
"-XX:+UnlockExperimentalVMOptions",
"-XX:+UseShenandoahGC",

View File

@ -84,6 +84,15 @@ import java.io.IOException;
* @run main/othervm/timeout=200 -Xlog:gc*=info -Xmx1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
* -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=adaptive
* gc.stress.gcbasher.TestGCBasherWithShenandoah 120000
*/
/*
* @test TestGCBasherDeoptWithShenandoah
* @key stress
* @library /
* @requires vm.gc.Shenandoah
* @requires vm.flavor == "server" & !vm.emulatedClient & !vm.graal.enabled & vm.opt.ClassUnloading != false
* @summary Stress Shenandoah GC with nmethod barrier forced deoptimization enabled.
*
* @run main/othervm/timeout=200 -Xlog:gc*=info -Xmx1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
* -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=compact
@ -196,6 +205,15 @@ import java.io.IOException;
* -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=adaptive
* -XX:+DeoptimizeNMethodBarriersALot -XX:-Inline
* gc.stress.gcbasher.TestGCBasherWithShenandoah 120000
*/
/*
* @test TestGCBasherDeoptWithShenandoah
* @key stress
* @library /
* @requires vm.gc.Shenandoah
* @requires vm.flavor == "server" & !vm.emulatedClient & !vm.graal.enabled & vm.opt.ClassUnloading != false
* @summary Stress Shenandoah GC with nmethod barrier forced deoptimization enabled.
*
* @run main/othervm/timeout=200 -Xlog:gc*=info,nmethod+barrier=trace -Xmx1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
* -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=compact

View File

@ -38,6 +38,13 @@ package gc.stress.gclocker;
* @run main/native/othervm/timeout=200 -Xlog:gc*=info -Xms1500m -Xmx1500m -XX:+UnlockExperimentalVMOptions -XX:+UnlockDiagnosticVMOptions
* -XX:+UseShenandoahGC
* gc.stress.gclocker.TestGCLockerWithShenandoah
*/
/*
* @test TestGCLockerWithShenandoah
* @library /
* @requires vm.gc.Shenandoah & !vm.graal.enabled
* @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:+UseShenandoahGC -XX:ShenandoahGCHeuristics=aggressive

View File

@ -71,6 +71,14 @@ package gc.stress.gcold;
* @run main/othervm -Xmx384M -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
* -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=aggressive
* gc.stress.gcold.TestGCOld 50 1 20 10 10000
*/
/*
* @test TestGCOldWithShenandoah
* @key stress randomness
* @library / /test/lib
* @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=adaptive
@ -80,6 +88,14 @@ package gc.stress.gcold;
* @run main/othervm -Xmx384M -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
* -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=adaptive
* gc.stress.gcold.TestGCOld 50 1 20 10 10000
*/
/*
* @test TestGCOldWithShenandoah
* @key stress randomness
* @library / /test/lib
* @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 -Xmx384M -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
* -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=compact
@ -106,6 +122,14 @@ package gc.stress.gcold;
* @run main/othervm -Xmx384M -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
* -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu -XX:ShenandoahGCHeuristics=aggressive
* gc.stress.gcold.TestGCOld 50 1 20 10 10000
*/
/*
* @test TestGCOldWithShenandoah
* @key stress randomness
* @library / /test/lib
* @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:ShenandoahGCMode=iu

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2018, 2020, Oracle and/or its affiliates. All rights reserved.
* 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,22 +23,46 @@
/*
* @test
* @bug 8195774
* @summary Interoperability tests with Entrust EC CA
* @bug 8195774 8243321
* @summary Interoperability tests with Entrust CAs
* @build ValidatePathWithParams
* @run main/othervm -Djava.security.debug=certpath EntrustCA OCSP
* @run main/othervm -Djava.security.debug=certpath EntrustCA CRL
*/
/*
* Obtain test artifacts for Entrust EC CA from:
*
* Valid https://validec.entrust.net
* Obtain test artifacts for Entrust CA from:
*
* EC CA:
* Valid: https://validec.entrust.net
* Revoked https://revokedec.entrust.net
*
* G4 CA:
* Valid: https://validg4.entrust.net
* Revoked: https://revokedg4.entrust.net
*/
public class EntrustCA {
public static void main(String[] args) throws Exception {
ValidatePathWithParams pathValidator = new ValidatePathWithParams(null);
boolean ocspEnabled = false;
if (args.length >= 1 && "CRL".equalsIgnoreCase(args[0])) {
pathValidator.enableCRLCheck();
} else {
// OCSP check by default
pathValidator.enableOCSPCheck();
ocspEnabled = true;
}
new Entrust_ECCA().runTest(pathValidator, ocspEnabled);
new Entrust_G4().runTest(pathValidator, ocspEnabled);
}
}
class Entrust_ECCA {
// Owner: CN=Entrust Certification Authority - L1J, OU="(c) 2016 Entrust, Inc. - for authorized use only",
// OU=See www.entrust.net/legal-terms, O="Entrust, Inc.", C=US
// Issuer: CN=Entrust Root Certification Authority - EC1, OU="(c) 2012 Entrust, Inc. - for authorized use only",
@ -145,17 +169,7 @@ public class EntrustCA {
"4UbcGZc40eYu6wUbAxiUDD3gwSElNQ8Z6IhNLPCCdMM6KZORyaagAcXn4A==\n" +
"-----END CERTIFICATE-----";
public static void main(String[] args) throws Exception {
ValidatePathWithParams pathValidator = new ValidatePathWithParams(null);
if (args.length >= 1 && "CRL".equalsIgnoreCase(args[0])) {
pathValidator.enableCRLCheck();
} else {
// OCSP check by default
pathValidator.enableOCSPCheck();
}
public void runTest(ValidatePathWithParams pathValidator, boolean ocspEnabled) throws Exception {
// Validate valid
pathValidator.validate(new String[]{VALID, INT},
ValidatePathWithParams.Status.GOOD, null, System.out);
@ -165,5 +179,141 @@ public class EntrustCA {
ValidatePathWithParams.Status.REVOKED,
"Wed May 24 10:39:28 PDT 2017", System.out);
}
}
class Entrust_G4 {
// Owner: CN=Entrust Certification Authority - L1N, OU="(c) 2014 Entrust, Inc. - for authorized use only",
// OU=See www.entrust.net/legal-terms, O="Entrust, Inc.", C=US
// Issuer: CN=Entrust Root Certification Authority - G4, OU="(c) 2015 Entrust, Inc. - for authorized use only",
// OU=See www.entrust.net/legal-terms, O="Entrust, Inc.", C=US
private static final String INT = "-----BEGIN CERTIFICATE-----\n" +
"MIIGMjCCBBqgAwIBAgIRAKvsd/8bQQwHAAAAAFVl2AUwDQYJKoZIhvcNAQELBQAw\n" +
"gb4xCzAJBgNVBAYTAlVTMRYwFAYDVQQKEw1FbnRydXN0LCBJbmMuMSgwJgYDVQQL\n" +
"Ex9TZWUgd3d3LmVudHJ1c3QubmV0L2xlZ2FsLXRlcm1zMTkwNwYDVQQLEzAoYykg\n" +
"MjAxNSBFbnRydXN0LCBJbmMuIC0gZm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxMjAw\n" +
"BgNVBAMTKUVudHJ1c3QgUm9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEc0\n" +
"MB4XDTE3MTEyMjIwMDQyMFoXDTMwMTIyMjIwMzQyMFowgboxCzAJBgNVBAYTAlVT\n" +
"MRYwFAYDVQQKEw1FbnRydXN0LCBJbmMuMSgwJgYDVQQLEx9TZWUgd3d3LmVudHJ1\n" +
"c3QubmV0L2xlZ2FsLXRlcm1zMTkwNwYDVQQLEzAoYykgMjAxNCBFbnRydXN0LCBJ\n" +
"bmMuIC0gZm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxLjAsBgNVBAMTJUVudHJ1c3Qg\n" +
"Q2VydGlmaWNhdGlvbiBBdXRob3JpdHkgLSBMMU4wggEiMA0GCSqGSIb3DQEBAQUA\n" +
"A4IBDwAwggEKAoIBAQDcSG+caYQ4xcvf+dt8bgCEHorO0g5j0H1NOtQzRXgUoG8y\n" +
"QuRbJX9swyKqQZbsc18YvTV8OKA/uSNE46Jvq47TFPojWWTVLbNDqpM07e4EFYKs\n" +
"A9NFzAUngijnf3ivnXA6iNPAMXaEhXmhY/YFjk8NoM7Y1PFsA0oj5hamKQ06iO/j\n" +
"gvBScLmnQ1ju9Qj9IGIg18UL5AJNw0frspLUQBYVrLGaqAy5Nl2BUJKaZ4vnSLvP\n" +
"nk6YrB15mo1phHae10Ba4fx7R3z8IZ/hby4OXTy/KZpu107VEQPAwTuDK8ZXxB5y\n" +
"0DSzi4vaw27aLrUsq4aFqUo03gEfC31vWW76TNkFAgMBAAGjggErMIIBJzAOBgNV\n" +
"HQ8BAf8EBAMCAQYwEgYDVR0TAQH/BAgwBgEB/wIBADAdBgNVHSUEFjAUBggrBgEF\n" +
"BQcDAQYIKwYBBQUHAwIwOwYDVR0gBDQwMjAwBgRVHSAAMCgwJgYIKwYBBQUHAgEW\n" +
"Gmh0dHA6Ly93d3cuZW50cnVzdC5uZXQvcnBhMDMGCCsGAQUFBwEBBCcwJTAjBggr\n" +
"BgEFBQcwAYYXaHR0cDovL29jc3AuZW50cnVzdC5uZXQwMAYDVR0fBCkwJzAloCOg\n" +
"IYYfaHR0cDovL2NybC5lbnRydXN0Lm5ldC9nNGNhLmNybDAdBgNVHQ4EFgQU7kfR\n" +
"hXHx/S23P7s+Y1h3F0lADpUwHwYDVR0jBBgwFoAUnzjEViPDOeigcWzoVEzk6Dqx\n" +
"v2cwDQYJKoZIhvcNAQELBQADggIBACMeFFgsWmC7h6D1v8DJUkOpm/m5UhVhO0hb\n" +
"pQMQKMhKkl744Y9SWG4WNmpQy743TTciEJPZFhc7ke2R6VmK8ZJUqro2awOw1RWZ\n" +
"OtHla59Btf1NQd41vOVdU+qFhs8lFfXg9sK7YHTrfxHtMXLoGnkkamK3xJgn7sXa\n" +
"/zUvUDBTpDCXcpO9SyHoKIQswmkIPpRyIdPF4biRdR3N+9MYmlfqN/Nk3OEZ73xZ\n" +
"AUZP6Gu+f9cEiHTA8NdYHCPLJWyFnIHWK+QuTFEnKYnOYxCeroLBNOO64e8JWZ39\n" +
"kZ22BBXhHzqOCCczS7JOJTRF+JgvWuxbFwRstj8qf3fE+JndWmq2FC4hTHtpuK5K\n" +
"ENuiRm5gdkXfsXmB+qB6y5gaajiTIMscGIcZIKTe2YdKrLoicvEz8k+loM7favik\n" +
"vzFioTNTDHYGx3mkfElBE7ycY8n+jZE3QBBv33k28MeQi7XNgEaMc4tYwoZIdE9A\n" +
"xVccXTzEQzka82dOkRB1dU0XZId9XAWv+CtNc2TjF6Wgx2seA/c6H8S0IfgQBIV2\n" +
"8iN2wZns2QFdawkdy3hMUqPnA++kuGhLW3GemsIY5dP/WxY8rd+OfLb/Ks9T1pCd\n" +
"28t7PQRcQsgkYmouzrOW9ASBvYqLLdhl4y+fFXff8RkPIKMNoYP06WJvRKmky9R/\n" +
"41/nXRas\n" +
"-----END CERTIFICATE-----";
// Owner: CN=validg4.entrust.net, SERIALNUMBER=1913605, OID.2.5.4.15=Private Organization,
// O=Entrust Datacard Limited, OID.1.3.6.1.4.1.311.60.2.1.2=Ontario, OID.1.3.6.1.4.1.311.60.2.1.3=CA,
// L=Ottawa, ST=Ontario, C=CA
// Issuer: CN=Entrust Certification Authority - L1N, OU="(c) 2014 Entrust, Inc. - for authorized use only",
// OU=See www.entrust.net/legal-terms, O="Entrust, Inc.", C=US
// Serial number: 83790beb78eeb966007ad3dbf11d570
// Valid from: Fri May 29 13:29:00 PDT 2020 until: Sun Aug 28 13:34:23 PDT 2022
private static final String VALID = "-----BEGIN CERTIFICATE-----\n" +
"MIIFpjCCBI6gAwIBAgIQCDeQvreO65ZgB609vxHVcDANBgkqhkiG9w0BAQsFADCB\n" +
"ujELMAkGA1UEBhMCVVMxFjAUBgNVBAoTDUVudHJ1c3QsIEluYy4xKDAmBgNVBAsT\n" +
"H1NlZSB3d3cuZW50cnVzdC5uZXQvbGVnYWwtdGVybXMxOTA3BgNVBAsTMChjKSAy\n" +
"MDE0IEVudHJ1c3QsIEluYy4gLSBmb3IgYXV0aG9yaXplZCB1c2Ugb25seTEuMCwG\n" +
"A1UEAxMlRW50cnVzdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEwxTjAeFw0y\n" +
"MDA1MjkyMDI5MDBaFw0yMjA4MjgyMDM0MjNaMIHRMQswCQYDVQQGEwJDQTEQMA4G\n" +
"A1UECBMHT250YXJpbzEPMA0GA1UEBxMGT3R0YXdhMRMwEQYLKwYBBAGCNzwCAQMT\n" +
"AkNBMRgwFgYLKwYBBAGCNzwCAQITB09udGFyaW8xITAfBgNVBAoTGEVudHJ1c3Qg\n" +
"RGF0YWNhcmQgTGltaXRlZDEdMBsGA1UEDxMUUHJpdmF0ZSBPcmdhbml6YXRpb24x\n" +
"EDAOBgNVBAUTBzE5MTM2MDUxHDAaBgNVBAMTE3ZhbGlkZzQuZW50cnVzdC5uZXQw\n" +
"ggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC508f77Kp/kfbqs9DHfa+V\n" +
"977gsVzI78TzfN4tF3ujwnPgd9mzLArM71VJvceOJUto7ywRasxmFxOLHf7WN2Kg\n" +
"U1yk/Kp9WUNfjmjIkI+JfCTkaz1RztpW85GNN9SL/W2yFIxv0ijAiGoQeC7J80Ni\n" +
"+y31Q5+M0oPMzngBOtD8LpyVt+/lSwUvxwhlChu7LWpIFmBUriILkvh11vxaItZV\n" +
"Jm4g8amE33/eXPFjZxB4ABQpBMC4QVg10UP+DpimZuJa6oQZfoNUjDF2yKlyrA+z\n" +
"s3kK8SXzJhE5LQxBp158jAoCVZuER08cumw3wvXI5NGzkzDxpTGacDO0bDo2ULpN\n" +
"AgMBAAGjggGNMIIBiTAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUH\n" +
"AwIGCCsGAQUFBwMBMAwGA1UdEwEB/wQCMAAwHQYDVR0OBBYEFOA38RC6Sv6hMUgY\n" +
"eLACjvqO13vsMB8GA1UdIwQYMBaAFO5H0YVx8f0ttz+7PmNYdxdJQA6VMGgGCCsG\n" +
"AQUFBwEBBFwwWjAjBggrBgEFBQcwAYYXaHR0cDovL29jc3AuZW50cnVzdC5uZXQw\n" +
"MwYIKwYBBQUHMAKGJ2h0dHA6Ly9haWEuZW50cnVzdC5uZXQvbDFuLWNoYWluMjU2\n" +
"LmNlcjAzBgNVHR8ELDAqMCigJqAkhiJodHRwOi8vY3JsLmVudHJ1c3QubmV0L2xl\n" +
"dmVsMW4uY3JsMB4GA1UdEQQXMBWCE3ZhbGlkZzQuZW50cnVzdC5uZXQwSwYDVR0g\n" +
"BEQwQjA3BgpghkgBhvpsCgECMCkwJwYIKwYBBQUHAgEWG2h0dHBzOi8vd3d3LmVu\n" +
"dHJ1c3QubmV0L3JwYTAHBgVngQwBATANBgkqhkiG9w0BAQsFAAOCAQEAOExxxxEk\n" +
"iAZZ4RJSWwI/CBQYAlUmd2wb/SBk9eYNAu/UL0XiAbwbOjH2dV6JHwAdwn0eoPR1\n" +
"KK/E1/OVoVibVBdxLMISPqdodRgHps6kGCOJxS8Zz8d3AEvx27EQ/Hg/EwIJZsUK\n" +
"dyb48V6a3XzExqLiwGu9oI9Ozm3/mo11ixmhvSFXH+FZf93qvvCSO+XTGGrLv5ja\n" +
"Tkazn/HgnwUBHd1TiO0jLhAdc+rZyd/SDjXMAXsa99zVfc2MY0Mb8+MohNHOwqYg\n" +
"tuYuirvtt9P0oteauL+iEBCRcqsmJaHGeaEyJH2QMxC5W22KpW245eHisW7rMoGQ\n" +
"9nbGmfe97p7bHQ==\n" +
"-----END CERTIFICATE-----";
// Owner: CN=revokedg4.entrust.net, SERIALNUMBER=1913605, OID.2.5.4.15=Private Organization,
// O=Entrust Datacard Limited, OID.1.3.6.1.4.1.311.60.2.1.2=Ontario, OID.1.3.6.1.4.1.311.60.2.1.3=CA,
// L=Ottawa, ST=Ontario, C=CA
// Issuer: CN=Entrust Certification Authority - L1N, OU="(c) 2014 Entrust, Inc. - for authorized use only",
// OU=See www.entrust.net/legal-terms, O="Entrust, Inc.", C=US
// Serial number: 24c5f46412b9dcc242a93017176979d6
// Valid from: Fri May 29 13:36:00 PDT 2020 until: Sun Aug 28 13:40:43 PDT 2022
private static final String REVOKED = "-----BEGIN CERTIFICATE-----\n" +
"MIIFqjCCBJKgAwIBAgIQJMX0ZBK53MJCqTAXF2l51jANBgkqhkiG9w0BAQsFADCB\n" +
"ujELMAkGA1UEBhMCVVMxFjAUBgNVBAoTDUVudHJ1c3QsIEluYy4xKDAmBgNVBAsT\n" +
"H1NlZSB3d3cuZW50cnVzdC5uZXQvbGVnYWwtdGVybXMxOTA3BgNVBAsTMChjKSAy\n" +
"MDE0IEVudHJ1c3QsIEluYy4gLSBmb3IgYXV0aG9yaXplZCB1c2Ugb25seTEuMCwG\n" +
"A1UEAxMlRW50cnVzdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEwxTjAeFw0y\n" +
"MDA1MjkyMDM2MDBaFw0yMjA4MjgyMDQwNDNaMIHTMQswCQYDVQQGEwJDQTEQMA4G\n" +
"A1UECBMHT250YXJpbzEPMA0GA1UEBxMGT3R0YXdhMRMwEQYLKwYBBAGCNzwCAQMT\n" +
"AkNBMRgwFgYLKwYBBAGCNzwCAQITB09udGFyaW8xITAfBgNVBAoTGEVudHJ1c3Qg\n" +
"RGF0YWNhcmQgTGltaXRlZDEdMBsGA1UEDxMUUHJpdmF0ZSBPcmdhbml6YXRpb24x\n" +
"EDAOBgNVBAUTBzE5MTM2MDUxHjAcBgNVBAMTFXJldm9rZWRnNC5lbnRydXN0Lm5l\n" +
"dDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAN6Bvaj7EG752e15UQH9\n" +
"4o8+660Gi3caUAAu45vZebO7EfRgrz0zyalpiexmQzocGn6Zog2yVqmMZjrMY11a\n" +
"q96s0pzVKImnA/787G7J5lRncP+PM6/WGtUUGS2hHiifoW5Ya/kcI1uk6EDT0leb\n" +
"HIedOiwcfDkq38g5ckuWNae24DAD8AM9XBJXMuNbuiqo03wMlDL3Jif8wNQfpmPD\n" +
"b+KR6IwGJdYwLBMoMcPmZF0rykW3YTO2NTDGCwvT8zzvjIKp8caRkI6pfkKmc89U\n" +
"Nvgbk/d9JEsgQLbYmRKVnhtnt756U7v3+0kZITxzfsBvQZ6zC7X4FAcTN1302RGn\n" +
"NGsCAwEAAaOCAY8wggGLMA4GA1UdDwEB/wQEAwIFoDAdBgNVHSUEFjAUBggrBgEF\n" +
"BQcDAgYIKwYBBQUHAwEwDAYDVR0TAQH/BAIwADAdBgNVHQ4EFgQULjRc9DEsa0kD\n" +
"uhKNo6cCqQ+mPjgwHwYDVR0jBBgwFoAU7kfRhXHx/S23P7s+Y1h3F0lADpUwaAYI\n" +
"KwYBBQUHAQEEXDBaMCMGCCsGAQUFBzABhhdodHRwOi8vb2NzcC5lbnRydXN0Lm5l\n" +
"dDAzBggrBgEFBQcwAoYnaHR0cDovL2FpYS5lbnRydXN0Lm5ldC9sMW4tY2hhaW4y\n" +
"NTYuY2VyMDMGA1UdHwQsMCowKKAmoCSGImh0dHA6Ly9jcmwuZW50cnVzdC5uZXQv\n" +
"bGV2ZWwxbi5jcmwwIAYDVR0RBBkwF4IVcmV2b2tlZGc0LmVudHJ1c3QubmV0MEsG\n" +
"A1UdIAREMEIwNwYKYIZIAYb6bAoBAjApMCcGCCsGAQUFBwIBFhtodHRwczovL3d3\n" +
"dy5lbnRydXN0Lm5ldC9ycGEwBwYFZ4EMAQEwDQYJKoZIhvcNAQELBQADggEBAGab\n" +
"wtgpooQW3YL2Cqk9RDJFbNct5BSbzgY9qN1TOe4L7gbjV0BJBCcsHOCjvbgEuzME\n" +
"FC/kAmBu7eMnKVAqCCsWaI8XV7xB7P/BqHpvf9LI/GyHg4wCYdxgFGBXHOjlSy+8\n" +
"YWRM5UnFUknqbj1B4u2/U+U3X66QXi+MWrmBdjpcMahpY5zP1Bh90OmIc8DY4arf\n" +
"widObgJe2H/VFScudLf5JMpBso2v772GYTRr5Tqqq3ouS9WvDf0NBvoStt1oiUMP\n" +
"oowesfNiaYa/rZzWRlhYNs089KUeLhjOZswtIY5LCyy+Wt3CHgXljGEQFgi7p59s\n" +
"gk0aMRYM9Gri26VbD5A=\n" +
"-----END CERTIFICATE-----";
public void runTest(ValidatePathWithParams pathValidator, boolean ocspEnabled) throws Exception {
// Validate valid
pathValidator.validate(new String[]{VALID, INT},
ValidatePathWithParams.Status.GOOD, null, System.out);
// Validate Revoked
pathValidator.validate(new String[]{REVOKED, INT},
ValidatePathWithParams.Status.REVOKED,
"Fri May 29 13:42:13 PDT 2020", System.out);
}
}

View File

@ -26,7 +26,7 @@
* @test
* @bug 8189131 8198240 8191844 8189949 8191031 8196141 8204923 8195774 8199779
* 8209452 8209506 8210432 8195793 8216577 8222089 8222133 8222137 8222136
* 8223499 8225392 8232019 8234245 8233223 8225068 8225069
* 8223499 8225392 8232019 8234245 8233223 8225068 8225069 8243321
* @summary Check root CA entries in cacerts file
*/
import java.io.ByteArrayInputStream;
@ -52,12 +52,12 @@ public class VerifyCACerts {
+ File.separator + "security" + File.separator + "cacerts";
// The numbers of certs now.
private static final int COUNT = 91;
private static final int COUNT = 92;
// SHA-256 of cacerts, can be generated with
// shasum -a 256 cacerts | sed -e 's/../&:/g' | tr '[:lower:]' '[:upper:]' | cut -c1-95
private static final String CHECKSUM
= "60:EF:3A:F8:44:CF:79:6F:A3:55:AD:3A:80:61:A7:EE:69:2A:B4:E4:F4:01:C4:47:FF:F8:25:1E:AB:87:31:F2";
= "44:AE:94:16:D1:2A:5B:CB:C3:89:19:D5:7A:87:C9:4A:E1:D4:ED:24:81:25:0A:0F:70:75:08:2A:D5:90:93:8B";
// map of cert alias to SHA-256 fingerprint
@SuppressWarnings("serial")
@ -245,6 +245,8 @@ public class VerifyCACerts {
"18:CE:6C:FE:7B:F1:4E:60:B2:E3:47:B8:DF:E8:68:CB:31:D0:2E:BB:3A:DA:27:15:69:F5:03:43:B4:6D:B3:A4");
put("amazonrootca4 [jdk]",
"E3:5D:28:41:9E:D0:20:25:CF:A6:90:38:CD:62:39:62:45:8D:A5:C6:95:FB:DE:A3:C2:2B:0B:FB:25:89:70:92");
put("entrustrootcag4 [jdk]",
"DB:35:17:D1:F6:73:2A:2D:5A:B9:7C:53:3E:C7:07:79:EE:32:70:A6:2F:B4:AC:42:38:37:24:60:E6:F0:1E:88");
}
};