Skip to content

Commit ec2a74f

Browse files
committed
Update comment for reset_profiles_remaining
1 parent 114ea05 commit ec2a74f

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

zjit/src/payload.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ impl IseqPayload {
3737
}
3838
}
3939

40+
/// Profile counts are used for compilation policy.
41+
/// When we deoptimize a method that can be recompiled, we need to update the count.
42+
/// Otherwise, we will generate the same code that was just deoptimized.
4043
pub fn reset_profiles_remaining(&mut self, insn_idx: YarvInsnIdx) {
4144
let num_profiles = get_option!(num_profiles);
4245
self.profile.entry_mut(insn_idx).set_profiles_remaining(num_profiles);

0 commit comments

Comments
 (0)