Skip to content

ZJIT: Decouple stats and side exit tracing#14688

Merged
k0kubun merged 1 commit intoruby:masterfrom
aidenfoxivey:master
Sep 30, 2025
Merged

ZJIT: Decouple stats and side exit tracing#14688
k0kubun merged 1 commit intoruby:masterfrom
aidenfoxivey:master

Conversation

@aidenfoxivey
Copy link
Contributor

@aidenfoxivey aidenfoxivey commented Sep 30, 2025

ZJIT: Decouple stats and side exit tracing

@matzbot matzbot requested a review from a team September 30, 2025 20:16
@k0kubun k0kubun enabled auto-merge (squash) September 30, 2025 20:21
@aidenfoxivey
Copy link
Contributor Author

~/s/ruby-bench (main)> WARMUP_ITRS=0 MIN_BENCH_ITRS=1 MIN_BENCH_TIME=0 ~/.rubies/ruby-dev/bin/ruby --zjit-trace-exits -I harness ~/src/ruby-bench/benchmarks/liquid-render/benchmark.rb
ruby 3.5.0dev (2025-09-30T18:16:53Z master b211aaef3b) +ZJIT dev +PRISM [arm64-darwin25]
Command: bundle check 2> /dev/null || bundle install
The Gemfile's dependencies are satisfied
itr:   time
 #1: 2513ms
Failed to activate fiddle, please install it with 'gem install fiddle'
ZJIT stats:
code_region_bytes:        917,504
compile_time             645.57ms
profile_time               3.95ms
gc_time                    2.19ms
invalidation_time          0.23ms
RSS: 128.1MiB
Writing file /Users/aidenfoxivey/src/ruby-bench/data/results-ruby-3.5.0-2025-09-30-161443.json
ZJIT exit locations dumped to `zjit_exit_locations.dump`.
~/s/ruby-bench (main)> ~/.rubies/ruby-dev/bin/stackprof ~/src/ruby-bench/benchmarks/liquid-render/zjit_exit_locations.dump --text
==================================
  Mode: ()
  Samples: 256773 (0.00% miss rate)
  GC: 0 (0.00%)
==================================
     TOTAL    (pct)     SAMPLES    (pct)     FRAME
    154971  (60.4%)      154971  (60.4%)     opt_send_without_block
     90686  (35.3%)       90686  (35.3%)     getinstancevariable
      3512   (1.4%)        3512   (1.4%)     getclassvariable
      3274   (1.3%)        3274   (1.3%)     opt_eq
      3272   (1.3%)        3272   (1.3%)     throw
       483   (0.2%)         483   (0.2%)     opt_getconstant_path
       146   (0.1%)         146   (0.1%)     opt_nil_p
       133   (0.1%)         133   (0.1%)     opt_not
       131   (0.1%)         131   (0.1%)     opt_new
       121   (0.0%)         121   (0.0%)     once
        43   (0.0%)          43   (0.0%)     getblockparamproxy
         1   (0.0%)           1   (0.0%)     jump
         0   (0.0%)           0   (0.0%)     pushtoarraykwsplat
         0   (0.0%)           0   (0.0%)     newarray
         0   (0.0%)           0   (0.0%)     intern
         0   (0.0%)           0   (0.0%)     toregexp
         0   (0.0%)           0   (0.0%)     anytostring
         0   (0.0%)           0   (0.0%)     concatstrings
         0   (0.0%)           0   (0.0%)     putchilledstring
         0   (0.0%)           0   (0.0%)     duparray
         0   (0.0%)           0   (0.0%)     duphash
         0   (0.0%)           0   (0.0%)     expandarray
         0   (0.0%)           0   (0.0%)     concatarray
         0   (0.0%)           0   (0.0%)     concattoarray
         0   (0.0%)           0   (0.0%)     pushtoarray
         0   (0.0%)           0   (0.0%)     splatarray
         0   (0.0%)           0   (0.0%)     splatkw
         0   (0.0%)           0   (0.0%)     send
         0   (0.0%)           0   (0.0%)     putstring
         0   (0.0%)           0   (0.0%)     putspecialobject
~/s/ruby-bench (main)>

@k0kubun k0kubun merged commit df2d1d5 into ruby:master Sep 30, 2025
86 checks passed
@tekknolagi tekknolagi linked an issue Oct 9, 2025 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ZJIT: Add --zjit-trace-exits functionality

4 participants