Checkpoint

This commit is contained in:
Andrew Haley 2026-02-24 17:16:25 +00:00
parent eee4f5b588
commit 94b4e56a40
4 changed files with 19 additions and 16 deletions

View File

@ -275,17 +275,20 @@ void C1_MacroAssembler::step_random(Register state, Register temp) {
// One of these will be the best for a particular CPU.
/* Algorithm "xor" from p. 4 of Marsaglia, "Xorshift RNGs" */
// movl(temp, state);
// sall(temp, 13);
// xorl(state, temp);
// movl(temp, state);
// shrl(temp, 7);
// xorl(state, temp);
// movl(temp, state);
// sall(temp, 5);
// xorl(state, temp);
if (getenv("APH_USE_XORSHIFT")) {
movl(temp, state);
sall(temp, 13);
xorl(state, temp);
movl(temp, state);
shrl(temp, 7);
xorl(state, temp);
movl(temp, state);
sall(temp, 5);
xorl(state, temp);
return;
}
if (VM_Version::supports_sse4_2()) {
if (!getenv("APH_USE_LCG") && VM_Version::supports_sse4_2()) {
/* CRC used as a psuedo-random-number generator */
// In effect, the CRC instruction is being used here for its
// linear feedback shift register. It's unbeatably fast, and

View File

@ -4761,7 +4761,7 @@ Address MacroAssembler::argument_address(RegisterOrConstant arg_slot,
// counter updates are not atomic.
//
void MacroAssembler::profile_receiver_type(Register recv, Register mdp, int mdp_offset,
addptr_32_insn_t xx) {
addptr_32_insn_t increment) {
int base_receiver_offset = in_bytes(ReceiverTypeData::receiver_offset(0));
int end_receiver_offset = in_bytes(ReceiverTypeData::receiver_offset(ReceiverTypeData::row_limit()));
int poly_count_offset = in_bytes(CounterData::count_offset());
@ -4805,8 +4805,8 @@ void MacroAssembler::profile_receiver_type(Register recv, Register mdp, int mdp_
// Corner case: no profile table. Increment poly counter and exit.
if (ReceiverTypeData::row_limit() == 0) {
addptr(Address(mdp, poly_count_offset, Address::times_ptr), DataLayout::counter_increment);
BLOCK_COMMENT("} profile_receiver_type {");
increment(this, Address(mdp, poly_count_offset, Address::times_ptr), DataLayout::counter_increment);
BLOCK_COMMENT("} profile_receiver_type");
return;
}
@ -4948,7 +4948,7 @@ void MacroAssembler::profile_receiver_type(Register recv, Register mdp, int mdp_
bind(L_count_update);
// addptr(Address(mdp, offset, Address::times_ptr), DataLayout::counter_increment);
xx(this, Address(mdp, offset, Address::times_ptr), DataLayout::counter_increment);
increment(this, Address(mdp, offset, Address::times_ptr), DataLayout::counter_increment);
BLOCK_COMMENT("} profile_receiver_type");
}

View File

@ -673,7 +673,7 @@ public:
}
typedef void (*addptr_32_insn_t)(MacroAssembler *masm, Address dst, int32_t src);
void profile_receiver_type(Register recv, Register mdp, int mdp_offset,
addptr_32_insn_t xx = &addptr_32);
addptr_32_insn_t increment = &addptr_32);
// Debugging

View File

@ -388,7 +388,7 @@
"If compilation is stopped with an error, capture diagnostic " \
"information at the bailout point") \
\
product(int, ProfileCaptureRatio, 1, EXPERIMENTAL, \
product(int, ProfileCaptureRatio, 64, EXPERIMENTAL, \
"Reduce and randomize tiered-compilation profile captures " \
"in order to reduce cache contention on shared method data. " \
"Must be a power of 2.") \