Open
Description
Hey!
I want to add a few metrics about YJIT
in the Process
instrumentation to understand the YJIT performance.
These metrics depend on the RUBYOPT=--yjit-stats
flag and Ruby::YJIT.runtime_stats
API.
When the Ruby process starts with --yjit-stats
or RUBYOPT=--yjit-stats
, the Ruby::YJIT.runtime_stats
produces performance stats. Otherwise, Ruby::YJIT.runtime_stats
returns nil
. Naturally, I would propose to add:
- A new function
collect_yjit_metrics
in theProcess#collect
. collect_yjit_metrics
collects:ratio_in_yjit
: the percentage of total YARV instructions executed by YJIT as opposed to the CRuby interpretercode_region_size
yjit_alloc_size
code_gc_count
compiled_iseq_count
yjit_insns_count
side_exit_count
total_exit_count
avg_len_in_yjit
Reference: Ruby YJIT Docuementation
Metadata
Assignees
Labels
No labels