diff options
| author | Max Bernstein <tekknolagi@gmail.com> | 2026-03-24 16:45:40 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-03-24 16:45:40 -0400 |
| commit | 3b8317eb42dd2d11988ecdc603387308ac991f23 (patch) | |
| tree | 9d9e693a79126891489bbd043de3791ff69e84f9 /zjit/src/gc.rs | |
| parent | e74823a08098ef87c7a2fc3a35647c4c4467ca40 (diff) | |
ZJIT: Dump side-exit locations in Fuchsia trace format (#16470)
This gives us instant access to all nice Fuchsia and Perfetto tooling, including zoomable, SQL queryable browsing for traces:
<img width="1912" height="1185" alt="Screenshot 2026-03-20 at 10 50 57 AM" src="https://github.com/user-attachments/assets/6475bbec-eb55-4886-8e94-13450def2de5" />
Hottest side-exits grouped by exit location using SQL:
```sql
SELECT reason, backtrace, count(*) AS exits FROM (
SELECT
s.id,
s.name AS reason,
group_concat(a.display_value, ' <- ') AS backtrace
FROM slice s
JOIN args a USING(arg_set_id)
WHERE s.category = 'side_exit'
GROUP BY s.id
)
GROUP BY reason, backtrace
ORDER BY exits DESC
LIMIT 30
```
<img width="1912" height="1186" alt="Screenshot 2026-03-24 at 3 58 28 PM" src="https://github.com/user-attachments/assets/8195ccd8-aeb6-4396-8c07-e85bbb280a4a" />
Diffstat (limited to 'zjit/src/gc.rs')
| -rw-r--r-- | zjit/src/gc.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/zjit/src/gc.rs b/zjit/src/gc.rs index 40230ccc8d..b79f19837f 100644 --- a/zjit/src/gc.rs +++ b/zjit/src/gc.rs @@ -5,7 +5,6 @@ use std::{ffi::c_void, ops::Range}; use crate::{cruby::*, state::ZJITState, stats::with_time_stat, virtualmem::CodePtr}; use crate::payload::{IseqPayload, IseqVersionRef, get_or_create_iseq_payload}; use crate::stats::Counter::gc_time_ns; -use crate::state::gc_mark_raw_samples; /// GC callback for marking GC objects in the per-ISEQ payload. #[unsafe(no_mangle)] @@ -207,5 +206,5 @@ fn ranges_overlap<T>(left: &Range<T>, right: &Range<T>) -> bool where T: Partial /// Callback for marking GC objects inside [crate::invariants::Invariants]. #[unsafe(no_mangle)] pub extern "C" fn rb_zjit_root_mark() { - gc_mark_raw_samples(); + // TODO(max): Either add roots to mark or consider removing this callback } |
