Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
fde23eb
Start
Feb 10, 2025
993c054
So far, so good
Feb 10, 2025
d586694
So far, so good
Feb 12, 2025
97e89e6
First POC
Feb 13, 2025
b5fb6c3
More
Feb 14, 2025
070c683
Temp
Feb 19, 2025
3fd6463
Still works
Feb 20, 2025
5083826
Thinko
Feb 24, 2025
aa4da23
Inter
Mar 3, 2025
13c3c8d
Inter
Mar 3, 2025
45da64f
Inter
Mar 3, 2025
665946d
Inter
Mar 3, 2025
659347e
Use a fixed ProfileCaptureRatio for 1st patch
Mar 4, 2025
887b215
More cleanups
Mar 4, 2025
25c4c3c
More cleanups
Mar 4, 2025
e7e3d59
Cleanup
Mar 4, 2025
53bc868
Merge from master
Oct 23, 2025
5be4c52
Merge from master
Oct 23, 2025
62db183
Little things.
Oct 24, 2025
3bbdfad
Tmp
Oct 27, 2025
f137d65
Temp
Oct 30, 2025
0637a8c
Branch around
Oct 30, 2025
d715a21
Blah
Oct 31, 2025
ed4fee4
Refactor increment_profile_ctr to back end
Nov 5, 2025
e7afed1
More
Nov 11, 2025
8ef8f92
Works
Nov 12, 2025
7e6a8d8
Better
Nov 13, 2025
822a673
Step
Nov 14, 2025
84385e7
Cleanup
Nov 14, 2025
6cafeb7
Cleanup
Nov 14, 2025
5d7425b
Fix bug introduced during cleanup
Nov 16, 2025
e9c809c
cleanup
Nov 17, 2025
619805b
cleanup
Nov 17, 2025
2c24993
So far, so good.
Nov 18, 2025
2ae0216
AArch64
Nov 18, 2025
b9f8a62
Oops
Nov 18, 2025
b907e6d
Delete debug code
Nov 18, 2025
49df925
Foo
Nov 19, 2025
8f5f66c
Fix SNAFU
Nov 20, 2025
0d05915
Merge remote-tracking branch 'refs/remotes/origin/JDK-8134940' into J…
Nov 20, 2025
55ea06a
More
Nov 20, 2025
cd9abc1
More
Nov 21, 2025
d3b393f
D'oh
Nov 21, 2025
bfa7b61
Cleanup
Nov 25, 2025
eeaadc8
Cleanup
Nov 25, 2025
126cd0e
Inter
Nov 26, 2025
026db53
Better
Nov 26, 2025
785369d
Minimize deltas to master
Nov 26, 2025
2f0e50f
AArch64
Nov 27, 2025
66ea587
whitespace
Nov 27, 2025
2ae5a83
Merge master
Nov 27, 2025
49d52d8
Merge remote-tracking branch 'refs/remotes/origin/JDK-8134940' into J…
Nov 27, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions src/hotspot/cpu/aarch64/assembler_aarch64.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,9 @@ constexpr Register rdispatch = r21; // dispatch table base
constexpr Register esp = r20; // Java expression stack pointer
constexpr Register r19_sender_sp = r19; // sender's SP while in interpreter

// State for randomized profile counters. Used by C1.
extern Register r_profile_rng;

// Preserved predicate register with all elements set TRUE.
constexpr PRegister ptrue = p7;

Expand Down Expand Up @@ -3227,11 +3230,11 @@ template<typename R, typename... Rx>
#undef INSN

// CRC32 instructions
#define INSN(NAME, c, sf, sz) \
void NAME(Register Rd, Register Rn, Register Rm) { \
starti; \
f(sf, 31), f(0b0011010110, 30, 21), f(0b010, 15, 13), f(c, 12); \
f(sz, 11, 10), rf(Rm, 16), rf(Rn, 5), rf(Rd, 0); \
#define INSN(NAME, c, sf, sz) \
void NAME(Register Rd, Register Rn, Register Rm) { \
starti; \
f(sf, 31), f(0b0011010110, 30, 21), f(0b010, 15, 13), f(c, 12); \
f(sz, 11, 10), zrf(Rm, 16), rf(Rn, 5), rf(Rd, 0); \
}

INSN(crc32b, 0, 0, 0b00);
Expand Down
29 changes: 19 additions & 10 deletions src/hotspot/cpu/aarch64/c1_FrameMap_aarch64.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -191,24 +191,33 @@ void FrameMap::initialize() {
map_register(i, r23); r23_opr = LIR_OprFact::single_cpu(i); i++;
map_register(i, r24); r24_opr = LIR_OprFact::single_cpu(i); i++;
map_register(i, r25); r25_opr = LIR_OprFact::single_cpu(i); i++;
map_register(i, r26); r26_opr = LIR_OprFact::single_cpu(i); i++;

// r27 is allocated conditionally. With compressed oops it holds
// the heapbase value and is not visible to the allocator.
bool preserve_rheapbase = i >= nof_caller_save_cpu_regs();
if (!preserve_rheapbase) {
map_register(i, r27); r27_opr = LIR_OprFact::single_cpu(i); i++; // rheapbase
auto remaining = RegSet::of(r26, r27);

if (UseCompressedOops && (CompressedOops::base() != nullptr)) {
// r27 is allocated conditionally. With compressed oops it holds
// the heapbase value and is not visible to the allocator.
remaining -= r27;
}

if (ProfileCaptureRatio > 1) {
// Use the highest remaining register for r_profile_rng.
r_profile_rng = *remaining.rbegin();
remaining -= r_profile_rng;
}

if (remaining.contains(r26)) {
map_register(i, r26); r26_opr = LIR_OprFact::single_cpu(i); i++;
}
if (remaining.contains(r27)) {
map_register(i, r27); r27_opr = LIR_OprFact::single_cpu(i); i++;
}

if(!PreserveFramePointer) {
map_register(i, r29); r29_opr = LIR_OprFact::single_cpu(i); i++;
}

// The unallocatable registers are at the end

if (preserve_rheapbase) {
map_register(i, r27); r27_opr = LIR_OprFact::single_cpu(i); i++; // rheapbase
}
map_register(i, r28); r28_opr = LIR_OprFact::single_cpu(i); i++; // rthread
if(PreserveFramePointer) {
map_register(i, r29); r29_opr = LIR_OprFact::single_cpu(i); i++; // rfp
Expand Down
5 changes: 5 additions & 0 deletions src/hotspot/cpu/aarch64/c1_FrameMap_aarch64.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,11 @@
range -= 1;
}

// Use r26 for randomized profile captures.
if (ProfileCaptureRatio > 1) {
range -= 1;
}

// r29 is not allocatable when PreserveFramePointer is on,
// but fp saving is handled in MacroAssembler::build_frame()/remove_frame()
if (exclude_fp) {
Expand Down
Loading