Skip to content

Commit fa08636

Browse files
committed
ZJIT: Print string name of constant in rb_zjit_constant_state_changed
It's not so useful to see `ID(abc)` when debugging with `--zjit-debug` or in Perfetto traces. Also provide the string representation of the ID, for example: `ID(abc): String`.
1 parent b914f83 commit fa08636

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

zjit/src/invariants.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -374,10 +374,10 @@ pub extern "C" fn rb_zjit_constant_state_changed(id: ID) {
374374
let invariants = ZJITState::get_invariants();
375375
if let Some(patch_points) = invariants.constant_state_patch_points.remove(&id) {
376376
let cb = ZJITState::get_code_block();
377-
debug!("Constant state changed: {:?}", id);
377+
debug!("Constant state changed: {id:?}: {}", id.contents_lossy());
378378

379379
// Invalidate all patch points for this constant ID
380-
compile_patch_points!(cb, patch_points, Const, "Constant state changed: {:?}", id);
380+
compile_patch_points!(cb, patch_points, Const, "Constant state changed: {id:?}: {}", id.contents_lossy());
381381

382382
cb.mark_all_executable();
383383
}

0 commit comments

Comments
 (0)