Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
97 commits
Select commit Hold shift + click to select a range
734ee6a
8391454: [Valhalla][AArch64] C2 stack-repair fails with PAC-RET branc…
Sep 10, 2026
e5d592d
8391950: Clean out leftovers from inline to value rename
stefank Sep 10, 2026
d734c3a
8390513: [Valhalla] Scalar replacement of clone can tear atomic flat …
fparain Sep 10, 2026
010428f
8392037: Avoid switching off the unused-variable warning in BUILD_LIB…
MBaesken Sep 10, 2026
a781f02
8391146: assert(_base == AryPtr) failed: Not an array pointer
Sep 10, 2026
cd1ad4a
8392090: HashOverflowTest.java fails on PPC64 due to too small stack …
TheRealMDoerr Sep 10, 2026
b96680c
8387336: C2: PPC64: should elide more ConvL2I nodes
reinrich Sep 10, 2026
1bc30c4
8392095: EventLogs memory allocations should be mtLogging
shipilev Sep 10, 2026
1cd075c
8387446: Update vtableStubs.hpp comments
benjaminp Sep 10, 2026
dd721f9
8391064: JMX: RMIConnector findRMIServer error message should not men…
Sep 10, 2026
c3e9b1d
8391998: Mutex name should be mtSynchronizer
synecdoche Sep 10, 2026
9e6fe60
8392156: RISC-V: Inverted VerifyStackAtCalls condition in in_preserve…
DingliZhang Sep 10, 2026
0ef2caa
8392015: Remove broken and untested VerifyStackAtCalls debug flag
dean-long Sep 11, 2026
a8f55f2
8392127: RISC-V: Replace assert with guarantee in patch_offset_in_jal…
DingliZhang Sep 11, 2026
b09fc17
8369311: De-problem list non-failing SizeMinimizedTest
prsadhuk Sep 11, 2026
a9ed6bc
8390747: C2: Improve VerifyIterativeGVN flag description
hgqxjj Sep 11, 2026
7a394a7
8391688: Add test to check that InetAddress.getByName doesn't throw N…
vy Sep 11, 2026
515108b
8391669: [Valhalla] C2 hits assert due to expensive node with StoreFl…
TobiHartmann Sep 11, 2026
f584518
8391695: [Valhalla] Timeouts due to unbounded GC stress threads in co…
TobiHartmann Sep 11, 2026
0cb3c58
8385565: Store MallocSites in MemBaseline in an array instead of a li…
johan-sjolen Sep 11, 2026
af41160
8391687: Add a test to check that java.net.URI doesn't throw NumberFo…
vy Sep 11, 2026
0441ac7
8384101: C2: Memory edge of boxed load incorrectly moved above modify…
mhaessig Sep 11, 2026
444f22f
8378404: VoiceOver Too Chatty For Tooltips
Sep 11, 2026
cd21962
8196441: java/awt/Modal/ToBack/*.java tests fail
Sep 11, 2026
bf3a80c
8340022: java/awt/PopupMenu/PopupHangTest/PopupHangTest.java fails on…
prsadhuk Sep 11, 2026
aa8dde1
8392180: Enable JSON unit tests in CI
naotoj Sep 11, 2026
196dff3
8391988: Disable stringop-overflow in shenandoahInPlacePromoter.cpp
Sep 11, 2026
53f88f9
8390106: SA: Inline object support is incomplete
YaSuenag Sep 12, 2026
e200542
8392129: Remove the usage of DONT_ENABLE_IPV6 macro in net_util_md.c
jaikiran Sep 12, 2026
444bce4
8392167: [arm32] safepoint poll always takes slow path
Sep 14, 2026
89365a0
8392205: RISC-V: Small refactoring for C1 volatile load handling
zifeihan Sep 14, 2026
041f89a
8311029: G1: Check constraints before adjusting G1HeapRegionSize
benshuai5D Sep 14, 2026
2797c1b
8390759: Checked exception in switch guard is hidden
Sep 14, 2026
734f694
8392002: Improve BCEscapeAnalyzer tracing readability
robcasloz Sep 14, 2026
d6ab49b
8365968: Error in FFM tests due to swallowing exception
minborg Sep 14, 2026
0699724
8391662: Deadlock in UpcallContext dtor when called after JVM shutdow…
JornVernee Sep 14, 2026
5fc7d6f
8391861: JFR: JfrThreadLocal::_dead termination condition has a data …
Sep 14, 2026
b8bc062
8391766: JFR: Reset JfrSet element count when clearing
Sep 14, 2026
aa58687
8391865: JFR: JfrEventThrottler::_disabled needs unadorned atomic loa…
Sep 14, 2026
0243cfa
8391951: Rename inlined fields to flat fields
stefank Sep 14, 2026
8eec211
8338063: Passing "|" as argument to TEST fails
benshuai5D Sep 14, 2026
5c2c639
8391287: C2: Potential null dereference in inline_vector_gather_scatter
aprilivy Sep 14, 2026
b966985
8391790: JFR: MethodTracer should inspect the union of unload sets
Sep 14, 2026
ae50831
8391707: JFR: Underscoped SerializerRegistrationGuard
Sep 14, 2026
d6dc35d
8391751: JFR: Acquire JfrStacktrace_lock on reverse lookup for leak p…
Sep 14, 2026
515b117
8391824: JFR: wrong field lookup for JVM.getEventWriter() slow path
Sep 14, 2026
677f530
8392254: Remove java/awt/Modal/ModalExclusionTests from the problem l…
Sep 14, 2026
9777af3
8391835: JFR: Clarify deprecated event level helper name
Sep 14, 2026
754a81f
8392326: JFR: Custom .jfc-files in lib/jfr can't be resolved
egahlin Sep 14, 2026
79f5eed
8391986: JFR: TestLookForUntestedEvents should only read a file once
egahlin Sep 14, 2026
3ca8206
8392175: Remove VtableStub::receiver_location
benjaminp Sep 14, 2026
cea4c73
8389652: HotCodeHeap should throw warning when enabled without Segmen…
Sep 14, 2026
bc020b7
8392334: JFR: Incorrect average duration for 'jfr view'
egahlin Sep 14, 2026
3e67481
8392323: serviceability/sa/ClhsdbInspectWithValueObject.java fails du…
YaSuenag Sep 15, 2026
1f78ef1
8373730: Missing identity optimization in arithmetic Or
benshuai5D Sep 15, 2026
c288088
8391915: New test IdleConnectionTimeoutReuseTest times out on AIX
vy Sep 15, 2026
6b251ed
8373416: JFR: Cutoff parameter ignored for path-to-gc-roots in JFR.dump
egahlin Sep 15, 2026
8c7f730
8196102: sun/java2d/DirectX/OverriddenInsetsTest/OverriddenInsetsTest…
jayathirthrao Sep 15, 2026
2740ea7
8390284: javac does not consider the exporting default of automatic m…
lahodaj Sep 15, 2026
3fb53fc
8392216: Use more mtCompiler NMT tags in compiler code
MBaesken Sep 15, 2026
328268d
8081489: [macosx] Test java/awt/Focus/FocusOwnerFrameOnClick/FocusOwn…
Sep 15, 2026
6822733
8392342: Delete Hotspot's LinkedList utility class
johan-sjolen Sep 15, 2026
e69047e
8392325: JFR parser reads empty string as null
Sep 15, 2026
801469d
8392195: [PPC64] Several vector tests fail on Power8
TheRealMDoerr Sep 15, 2026
39ba96b
8392172: [REDO] os::print_location should handle markword printing wi…
Sep 15, 2026
76e0fcb
8387759: PPC64: Remove postalloc_expand from EncodeP/DecodeN not-null…
dbriemann Sep 15, 2026
88c5066
8392353: [valhalla] clean up incorrect verification comments
Sep 15, 2026
d9397ce
8392123: JFR: Harden jdk.jfr.AnnotationElement
egahlin Sep 15, 2026
fa9b262
8391591: GenShen: Humongous allocation failure should trigger a degen…
Sep 15, 2026
30df76e
8392429: Problem list vmTestbase/nsk/jdwp/StackFrame/PopFrames/popfra…
plummercj Sep 15, 2026
1dbf333
8392450: ProblemList compiler\vectorapi\VectorMaskCompareNotTest.java…
Sep 15, 2026
e034d7e
8384073: VM does not build without g1gc
benshuai5D Sep 16, 2026
82ee29f
8392364: RISC-V: Merge reloc_destination into destination
DingliZhang Sep 16, 2026
ff6eb14
8392031: Crash in ThreadSnapshot::initialize
D-D-H Sep 16, 2026
7bde641
8392366: compiler/vectorapi/TestVectorLogicConeFuzzer.java fails IR v…
merykitty Sep 16, 2026
b0ac803
8392427: ZGC: Missing ICacheInvalidationContext forward declaration
stefank Sep 16, 2026
4ed0386
8066259: [macosx] Possible regression: test/java/awt/Modal/ModalDialo…
prsadhuk Sep 16, 2026
a2fa835
8392458: [s390x] Add missing assert
offamitkumar Sep 16, 2026
2539806
8392389: TestPids.java fails as "--pids-limit=0" caps max number of t…
Domest0s Sep 16, 2026
2831850
8392390: Initialize ObjectMonitor::_object_strong_lock
fbredber Sep 16, 2026
bf1e57e
8389342: [Valhalla] C2: assert(false) failed: value_type does not fit…
fparain Sep 16, 2026
4076d34
8376837: Typo in code comment in sun/security/ssl/TransportContext.java
ByeongGyuJeon Sep 16, 2026
1d7059f
8392412: Remove STATIC_ASSERT macro
xmas92 Sep 16, 2026
e012242
8391777: C2 hits "Bad immediate dominator info" in CountedLoopConvert…
fparain Sep 16, 2026
7bb6b56
8386465: 4th argument in inline_dilithiumNttMult() is unused
Domest0s Sep 16, 2026
ea04454
8384415: Shenandoah: Hotpatch GC state checks
shipilev Sep 16, 2026
4ab5127
8389654: BaseFileManager --preview-mode handling need to be more robust
liach Sep 16, 2026
d6438e5
8392349: Remove usage of GetPrimitiveArrayCritical in creating dither…
prrace Sep 16, 2026
5b2ede2
8392413: ciField constructor should set _is_constant for strict final…
merykitty Sep 16, 2026
c58720a
8379016: Improve double_keccak() intrinsic on ARM when SHA3 instructi…
smemery Sep 16, 2026
dac0525
8135174: javax/print/PrintSEUmlauts/PrintSEUmlauts.java failed
prrace Sep 16, 2026
daa1891
8391685: AOT cache creation fails with unarchived method in ResolvedM…
iklam Sep 16, 2026
b95b278
8392369: JFR: Incorrect default value with beginChunk + endChunk
egahlin Sep 16, 2026
a31170a
8381641: ML-DSA in TLS 1.3
Sep 16, 2026
ed900b3
8392319: Remove use of BULLET in HotSpot logging code
ByeongGyuJeon Sep 17, 2026
431b10a
8202882: java/awt/FileDialog/FilenameFilterTest/FilenameFilterTest.ja…
prsadhuk Sep 17, 2026
f074759
8392527: Problemlist java/awt/Modal/ModalDialogOrderingTest/ModalDial…
prsadhuk Sep 17, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
8 changes: 4 additions & 4 deletions make/RunTests.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -666,7 +666,7 @@ define SetupRunMicroTestBody
$$($1_MICRO_ITER) $$($1_MICRO_FORK) $$($1_MICRO_TIME) \
$$($1_MICRO_WARMUP_ITER) $$($1_MICRO_WARMUP_TIME) \
$$($1_MICRO_VM_OPTIONS) $$($1_MICRO_BASIC_OPTIONS) $$(MICRO_OPTIONS) \
$$($1_TEST_NAME) \
$$(call ShellQuote,$$($1_TEST_NAME)) \
> >($(TEE) $$($1_TEST_RESULTS_DIR)/micro.txt) \
&& $$(ECHO) $$$$? > $$($1_EXITCODE) \
|| $$(ECHO) $$$$? > $$($1_EXITCODE) \
Expand Down Expand Up @@ -1293,7 +1293,7 @@ UseSpecialTestHandler = \

# Now process each test to run and setup a proper make rule
$(foreach test, $(TESTS_TO_RUN), \
$(eval TEST_ID := $(shell $(ECHO) $(strip $(test)) | \
$(eval TEST_ID := $(shell $(ECHO) $(call ShellQuote,$(strip $(test))) | \
$(TR) -cs '[a-z][A-Z][0-9]\n' '_')) \
$(eval ALL_TEST_IDS += $(TEST_ID)) \
$(if $(call UseCustomTestHandler, $(test)), \
Expand Down Expand Up @@ -1373,10 +1373,10 @@ run-test-report: post-run-test
$(PRINTF) >> $(TEST_SUMMARY) "%2s %-49s %5s %5s %5s %5s %5s %2s\n" " " \
TEST TOTAL PASS FAIL ERROR SKIP " "
$(foreach test, $(TESTS_TO_RUN), \
$(eval TEST_ID := $(shell $(ECHO) $(strip $(test)) | \
$(eval TEST_ID := $(shell $(ECHO) $(call ShellQuote,$(strip $(test))) | \
$(TR) -cs '[a-z][A-Z][0-9]\n' '_')) \
$(ECHO) >> $(TEST_LAST_IDS) $(TEST_ID) $(NEWLINE) \
$(eval NAME_PATTERN := $(shell $(ECHO) $(test) | $(TR) -c '\n' '_')) \
$(eval NAME_PATTERN := $(shell $(ECHO) $(call ShellQuote,$(test)) | $(TR) -c '\n' '_')) \
$(if $(filter __________________________________________________%, $(NAME_PATTERN)), \
$(eval TEST_NAME := ) \
$(PRINTF) >> $(TEST_SUMMARY) "%2s %-49s\n" " " "$(test)" $(NEWLINE) \
Expand Down
1 change: 1 addition & 0 deletions make/hotspot/lib/CompileJvm.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBJVM, \
DISABLED_WARNINGS_gcc_safepointMechanism.cpp := stringop-overflow, \
DISABLED_WARNINGS_gcc_shenandoahGenerationalHeap.cpp := stringop-overflow, \
DISABLED_WARNINGS_gcc_shenandoahHeap.cpp := stringop-overflow, \
DISABLED_WARNINGS_gcc_shenandoahInPlacePromoter.cpp := stringop-overflow, \
DISABLED_WARNINGS_gcc_shenandoahLock.cpp := stringop-overflow, \
DISABLED_WARNINGS_gcc_stubGenerator_s390.cpp := unused-const-variable, \
DISABLED_WARNINGS_gcc_synchronizer.cpp := stringop-overflow, \
Expand Down
10 changes: 4 additions & 6 deletions make/modules/java.base/Lib.gmk
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2025, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 2026, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -43,10 +43,9 @@ include lib/CoreLibraries.gmk
$(eval $(call SetupJdkLibrary, BUILD_LIBNET, \
NAME := net, \
OPTIMIZATION := LOW, \
DISABLED_WARNINGS_gcc_net_util_md.c := format-nonliteral unused-variable, \
DISABLED_WARNINGS_gcc_net_util_md.c := format-nonliteral, \
DISABLED_WARNINGS_gcc_NetworkInterface.c := unused-function, \
DISABLED_WARNINGS_clang_net_util_md.c := format-nonliteral \
unused-variable, \
DISABLED_WARNINGS_clang_net_util_md.c := format-nonliteral, \
DISABLED_WARNINGS_clang_NetworkInterface.c := unused-function, \
DISABLED_WARNINGS_clang_aix_DefaultProxySelector.c := \
deprecated-non-prototype, \
Expand Down Expand Up @@ -78,8 +77,7 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBNIO, \
libnio/ch \
libnio/fs \
libjvm, \
DISABLED_WARNINGS_clang_Net.c := unused-function unused-variable, \
DISABLED_WARNINGS_clang_UnixNativeDispatcher.c := unused-variable, \
DISABLED_WARNINGS_clang_Net.c := unused-function, \
JDK_LIBS := libjava libnet, \
LIBS_linux := $(LIBDL) $(LIBPTHREAD), \
LIBS_aix := $(LIBDL), \
Expand Down
1 change: 1 addition & 0 deletions make/test/JtregNativeJdk.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ else
# java.lang.foreign tests
BUILD_JDK_JTREG_LIBRARIES_LDFLAGS_libAsyncStackWalk := -pthread
BUILD_JDK_JTREG_LIBRARIES_LDFLAGS_libAsyncInvokers := -pthread
BUILD_JDK_JTREG_LIBRARIES_LDFLAGS_libDetachAfterExit := -pthread
BUILD_JDK_JTREG_LIBRARIES_LDFLAGS_libLinkerInvokerUnnamed := -pthread
BUILD_JDK_JTREG_LIBRARIES_LDFLAGS_libLinkerInvokerModule := -pthread
BUILD_JDK_JTREG_LIBRARIES_LDFLAGS_libLoaderLookupInvoker := -pthread
Expand Down
8 changes: 0 additions & 8 deletions src/hotspot/cpu/aarch64/aarch64.ad
Original file line number Diff line number Diff line change
Expand Up @@ -1810,10 +1810,6 @@ void MachPrologNode::emit(C2_MacroAssembler *masm, PhaseRegAlloc *ra_) const {
__ bind(*_verified_entry);
}

if (VerifyStackAtCalls) {
Unimplemented();
}

C->output()->set_frame_complete(__ offset());

if (C->has_mach_constant_base_node()) {
Expand Down Expand Up @@ -3679,10 +3675,6 @@ encode %{
%}

enc_class aarch64_enc_call_epilog() %{
if (VerifyStackAtCalls) {
// Check that stack depth is unchanged: find majik cookie on stack
__ call_Unimplemented();
}
if (tf()->returns_value_type_as_fields() && !_method->is_method_handle_intrinsic() && _method->return_type()->is_loaded()) {
// The last return value is not set by the callee but used to pass the null marker to compiled code.
// Search for the corresponding projection, get the register and emit code that initializes it.
Expand Down
4 changes: 2 additions & 2 deletions src/hotspot/cpu/aarch64/assembler_aarch64.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -477,8 +477,8 @@ class Address {
// Verify the value is trivially destructible regardless of mode, so our
// destructor can also be trivial, and so our assignment operator doesn't
// need to destruct the old value before copying over it.
static_assert(std::is_trivially_destructible<Literal>::value, "must be");
static_assert(std::is_trivially_destructible<Nonliteral>::value, "must be");
static_assert(std::is_trivially_destructible<Literal>::value);
static_assert(std::is_trivially_destructible<Nonliteral>::value);

Address& operator=(const Address& a) {
_mode = a._mode;
Expand Down
2 changes: 1 addition & 1 deletion src/hotspot/cpu/aarch64/c1_Runtime1_aarch64.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -778,7 +778,7 @@ OopMapSet* Runtime1::generate_code_for(StubId id, StubAssembler* sasm) {
case StubId::c1_new_null_free_array_id:
__ cmpw(t0, Klass::_lh_array_tag_flat_value); // the array can be a flat array.
__ br(Assembler::EQ, ok);
__ cmpw(t0, Klass::_lh_array_tag_ref_value); // the array cannot be a flat array (due to the InlineArrayElementMaxFlatSize, etc.)
__ cmpw(t0, Klass::_lh_array_tag_ref_value); // the array cannot be a flat array.
__ br(Assembler::EQ, ok);
__ stop("assert(is an object or value type array klass)");
break;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,13 @@ inline frame FreezeBase::sender(const frame& f) {
frame::CompiledFramePointers cfp = f.compiled_frame_details();

int slot = 0;
CodeBlob* sender_cb = CodeCache::find_blob_and_oopmap(*cfp.sender_pc_addr, slot);
address sender_pc = ContinuationHelper::return_address_at((intptr_t*)cfp.sender_pc_addr);
CodeBlob* sender_cb = CodeCache::find_blob_and_oopmap(sender_pc, slot);

return sender_cb != nullptr
? frame(cfp.sender_sp, cfp.sender_sp, *cfp.saved_fp_addr, *cfp.sender_pc_addr, sender_cb,
slot == -1 ? nullptr : sender_cb->oop_map_for_slot(slot, *cfp.sender_pc_addr), false)
: frame(cfp.sender_sp, cfp.sender_sp, *cfp.saved_fp_addr, *cfp.sender_pc_addr);
? frame(cfp.sender_sp, cfp.sender_sp, *cfp.saved_fp_addr, sender_pc, sender_cb,
slot == -1 ? nullptr : sender_cb->oop_map_for_slot(slot, sender_pc), false)
: frame(cfp.sender_sp, cfp.sender_sp, *cfp.saved_fp_addr, sender_pc);
}

template<typename FKind>
Expand Down
4 changes: 3 additions & 1 deletion src/hotspot/cpu/aarch64/frame_aarch64.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -632,7 +632,9 @@ void frame::describe_pd(FrameValues& values, int frame_no) {
ret_pc_loc = (intptr_t*)cfp.sender_pc_addr;
fp_loc = (intptr_t*)cfp.saved_fp_addr;
}
address ret_pc = *(address*)ret_pc_loc;
// Strip without authenticating: describe may see unsigned or broken LRs,
// and is_return_barrier_entry() compares against a raw stub address.
address ret_pc = pauth_strip_pointer(*(address*)ret_pc_loc);
values.describe(frame_no, ret_pc_loc,
Continuation::is_return_barrier_entry(ret_pc) ? "return address (return barrier)" : "return address");
values.describe(-1, fp_loc, "saved fp", 0); // "unowned" as value belongs to sender
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ void BarrierSetAssembler::copy_store_at(MacroAssembler* masm,
void BarrierSetAssembler::try_resolve_jobject_in_native(MacroAssembler* masm, Register jni_env,
Register obj, Register tmp, Label& slowpath) {
// If mask changes we need to ensure that the inverse is still encodable as an immediate
STATIC_ASSERT(JNIHandles::tag_mask == 0b11);
static_assert(JNIHandles::tag_mask == 0b11);
__ andr(obj, obj, ~JNIHandles::tag_mask);
__ ldr(obj, Address(obj, 0)); // *obj
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,13 @@
#include "gc/shenandoah/shenandoahBarrierSetAssembler.hpp"
#include "gc/shenandoah/shenandoahHeap.inline.hpp"
#include "gc/shenandoah/shenandoahHeapRegion.hpp"
#include "gc/shenandoah/shenandoahNMethod.inline.hpp"
#include "gc/shenandoah/shenandoahRuntime.hpp"
#include "gc/shenandoah/shenandoahThreadLocalData.hpp"
#include "interpreter/interp_masm.hpp"
#include "interpreter/interpreter.hpp"
#include "nativeInst_aarch64.hpp"
#include "runtime/icache.hpp"
#include "runtime/javaThread.hpp"
#include "runtime/sharedRuntime.hpp"
#ifdef COMPILER1
Expand Down Expand Up @@ -493,6 +496,47 @@ void ShenandoahBarrierSetAssembler::gen_write_ref_array_post_barrier(MacroAssemb

#undef __

address ShenandoahBarrierSetAssembler::parse_jump_address(address pc) {
NativeInstruction* ni = nativeInstruction_at(pc);
assert(ni->is_jump(), "Initial code version: GC barrier fastpath must be a jump");
NativeJump* jmp = nativeJump_at(pc);
return jmp->jump_destination();
}

static uint32_t encode_patchable_nop() {
return 0xD503201F;
}

static uint32_t encode_patchable_jump(address pc, address target_pc) {
int32_t disp = checked_cast<int32_t>((intptr_t)target_pc - (intptr_t)pc);
int64_t imm26 = disp >> 2;
guarantee(Assembler::is_simm(imm26, 26), "Maximum offset is 128MiB");
return 0x14000000 | (imm26 & 0x03FFFFFF);
}

void ShenandoahBarrierSetAssembler::insert_patchable_nop(address pc) {
*((uint32_t*)pc) = encode_patchable_nop();
assert(nativeInstruction_at(pc)->is_nop(), "Sanity");
if (!UseSingleICacheInvalidation) {
ICache::invalidate_word(pc);
}
}

void ShenandoahBarrierSetAssembler::insert_patchable_jump(address pc, address target_pc) {
*((uint32_t*)pc) = encode_patchable_jump(pc, target_pc);
if (!UseSingleICacheInvalidation) {
ICache::invalidate_word(pc);
}
}

bool ShenandoahBarrierSetAssembler::is_patchable_nop(address pc) {
return *((uint32_t*)pc) == encode_patchable_nop();
}

bool ShenandoahBarrierSetAssembler::is_patchable_jump(address pc, address target_pc) {
return *((uint32_t*)pc) == encode_patchable_jump(pc, target_pc);
}

#ifdef COMPILER1

#define __ ce->masm()->
Expand Down Expand Up @@ -707,27 +751,70 @@ void ShenandoahBarrierStubC2::cardtable(MacroAssembler& masm, Address address, R
}
}

void ShenandoahBarrierStubC2::enter_if_gc_state(MacroAssembler& masm, const char test_state, Register tmp) {
Assembler::InlineSkippedInstructionsCounter skip_counter(&masm);
void ShenandoahBarrierStubC2::patchable_jump(MacroAssembler& masm, const char gc_state, bool jump_when_state, Register tmp1, Register tmp2, Label* L_target) {
const size_t check_size = 8;

PhaseOutput* const output = Compile::current()->output();
Address gc_state_fast(rthread, in_bytes(ShenandoahThreadLocalData::gc_state_fast_array_offset(test_state)));
if (output->in_scratch_emit_size()) {
// Avoid binding L_target and emitting more branches in scratch emits.
// We know the patched check is exactly 1 instruction long in release,
// and verification adds more instructions.
const int nops = 1 DEBUG_ONLY(+ check_size);
for (size_t c = 0; c < nops; c++) {
__ nop();
}
return;
}

// We piggyback on scratch_emit_size mode to compute the slowpath stub size.
// We'll use that information to decide whether we need a far jump to the
// stub entry point or not. In scratch_emit_size mode we don't bind entry()
// because otherwise it will be rebound when we later emit the instructions
// for real.
if (_needs_far_jump) {
__ ldrb(tmp, gc_state_fast);
__ cbz(tmp, *continuation());
__ b(output->in_scratch_emit_size() ? *continuation() : *entry());
#ifdef ASSERT
Label L_fake_entry, L_skip;
Address gc_state_addr(rthread, in_bytes(ShenandoahThreadLocalData::gc_state_offset()));

address check_start = __ pc();

__ ldrb(tmp1, gc_state_addr);
__ mov(tmp2, gc_state);
__ andr(tmp2, tmp1, tmp2);

// Emit the secondary jump and use it to cross-check against the actual GC state.
// This also checks that all interesting GC state transitions are done non-racily
// from the perspective of the thread executing the nmethod.
__ relocate(patchable_barrier_Relocation::spec(ShenandoahNMethod::encode_to_reloc(gc_state, jump_when_state)));
__ b(L_fake_entry);

// Currently hot-patched to NOP.
if (jump_when_state) {
__ cbz(tmp2, L_skip);
} else {
__ ldrb(tmp, gc_state_fast);
__ cbnz(tmp, output->in_scratch_emit_size() ? *continuation() : *entry());
__ cbnz(tmp2, L_skip);
}
__ hlt(0);

// This is were the slowpath stub will return to or the code above will
// jump to if the checks are false
// Currently hot-patched to JUMP.
__ bind(L_fake_entry);
if (jump_when_state) {
__ cbnz(tmp2, L_skip);
} else {
__ cbz(tmp2, L_skip);
}
__ hlt(0);

__ bind(L_skip);

address check_end = __ pc();
size_t actual_check_size = pointer_delta(check_end, check_start, Assembler::instruction_size);
assert(check_size == actual_check_size, "Must match: %zu != %zu", check_size, actual_check_size);
#endif

// Emit the unconditional branch in the first version of the method.
// Let the rest of runtime figure out how to manage it.
__ relocate(patchable_barrier_Relocation::spec(ShenandoahNMethod::encode_to_reloc(gc_state, jump_when_state)));
__ b(*L_target);
}

void ShenandoahBarrierStubC2::enter_if_gc_state(MacroAssembler& masm, const char test_state, Register tmp1, Register tmp2) {
Assembler::InlineSkippedInstructionsCounter skip_counter(&masm);
patchable_jump_if_gc_state(masm, test_state, tmp1, tmp2, entry());
__ bind(*continuation());
}

Expand Down Expand Up @@ -801,16 +888,15 @@ void ShenandoahBarrierStubC2::maybe_far_jump_if_zero(MacroAssembler& masm, Regis
}

void ShenandoahBarrierStubC2::keepalive(MacroAssembler& masm, Label* L_done) {
Address gcstate(rthread, in_bytes(ShenandoahThreadLocalData::gc_state_fast_array_offset(ShenandoahHeap::MARKING)));
Address index(rthread, in_bytes(ShenandoahThreadLocalData::satb_mark_queue_index_offset()));
Address buffer(rthread, in_bytes(ShenandoahThreadLocalData::satb_mark_queue_buffer_offset()));
Label L_through, L_slowpath;

// If another barrier is enabled as well, do a runtime check for a specific barrier.
// If another barrier is enabled as well, do a check for a specific barrier.
if (_needs_load_ref_barrier) {
assert(L_done == nullptr, "L_done is always null when _needs_load_ref_barrier is true");
__ ldrb(_tmp1, gcstate);
__ cbz(_tmp1, L_through);
assert(L_done == nullptr, "Should be");
char state_to_check = ShenandoahHeap::MARKING;
patchable_jump_if_not_gc_state(masm, state_to_check, _tmp1, _tmp2, &L_through);
}

// Fast-path: put object into buffer.
Expand Down Expand Up @@ -860,20 +946,17 @@ void ShenandoahBarrierStubC2::keepalive(MacroAssembler& masm, Label* L_done) {
void ShenandoahBarrierStubC2::lrb(MacroAssembler& masm) {
Label L_slow;

// If another barrier is enabled as well, do a runtime check for a specific barrier.
// If another barrier is enabled as well, do a check for a specific barrier.
if (_needs_keep_alive_barrier) {
char state_to_check = ShenandoahHeap::HAS_FORWARDED | (_needs_load_ref_weak_barrier ? ShenandoahHeap::WEAK_ROOTS : 0);
Address gc_state_fast(rthread, in_bytes(ShenandoahThreadLocalData::gc_state_fast_array_offset(state_to_check)));
__ ldrb(_tmp1, gc_state_fast);
maybe_far_jump_if_zero(masm, _tmp1);
patchable_jump_if_not_gc_state(masm, state_to_check, _tmp1, _tmp2, continuation());
}

// If weak references are being processed, weak/phantom loads need to go slow,
// regardless of their cset status.
if (_needs_load_ref_weak_barrier) {
Address gc_state_fast(rthread, in_bytes(ShenandoahThreadLocalData::gc_state_fast_array_offset(ShenandoahHeap::WEAK_ROOTS)));
__ ldrb(_tmp1, gc_state_fast);
__ cbnz(_tmp1, L_slow);
char state_to_check = ShenandoahHeap::WEAK_ROOTS;
patchable_jump_if_gc_state(masm, state_to_check, _tmp1, _tmp2, &L_slow);
}

// Cset-check. Fall-through to slow if in collection set.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,13 @@ class ShenandoahBarrierSetAssembler: public BarrierSetAssembler {
Register tmp, Label& slow_path);
virtual void check_oop(MacroAssembler* masm, Register obj, Register tmp1, Register tmp2, Label& L_error);

// Jumps hotpatching
static address parse_jump_address(address pc);
static void insert_patchable_nop(address pc);
static bool is_patchable_nop(address pc);
static void insert_patchable_jump(address pc, address target_pc);
static bool is_patchable_jump(address pc, address target_pc);

#ifdef COMPILER1
void keepalive_barrier_c1_stub(LIR_Assembler* ce, ShenandoahKeepaliveBarrierStub* stub);
void keepalive_barrier_c1_runtime_stub(StubAssembler* sasm);
Expand Down
2 changes: 1 addition & 1 deletion src/hotspot/cpu/aarch64/interpreterRT_aarch64.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ void InterpreterRuntime::SignatureHandlerGenerator::pass_object() {
__ cbnz(temp(), L);
__ mov(r0, zr);
__ bind(L);
static_assert(sizeof(jobject) == wordSize, "");
static_assert(sizeof(jobject) == wordSize);
__ str(r0, Address(to(), next_stack_offset(sizeof(jobject))));
}
}
Expand Down
Loading
Loading