summaryrefslogtreecommitdiff
path: root/yjit
diff options
context:
space:
mode:
authorMaxime Chevalier-Boisvert <maxime.chevalierboisvert@shopify.com>2022-11-30 14:09:10 -0500
committerGitHub <noreply@github.com>2022-11-30 14:09:10 -0500
commitd98d84b75dab450070ff3dc7154661a9941fb44d (patch)
treee4f6d979f7d6391ef88a0275d56f53305f5ff99e /yjit
parentab4c7077cc44cd6725625562b7380a44cf462190 (diff)
YJIT: add new counters for deferred compilation and queued blocks (#6837)
Notes
Notes: Merged-By: maximecb <maximecb@ruby-lang.org>
Diffstat (limited to 'yjit')
-rw-r--r--yjit/src/core.rs4
-rw-r--r--yjit/src/stats.rs2
2 files changed, 6 insertions, 0 deletions
diff --git a/yjit/src/core.rs b/yjit/src/core.rs
index 0c55ba89fc..9f89a6e554 100644
--- a/yjit/src/core.rs
+++ b/yjit/src/core.rs
@@ -1489,6 +1489,8 @@ fn gen_block_series_body(
_ => break
};
+ incr_counter!(block_next_count);
+
// Get id and context for the new block
let requested_id = last_target.id;
let requested_ctx = &last_target.ctx;
@@ -2089,6 +2091,8 @@ pub fn defer_compilation(
gen_jump_branch(asm, dst_addr, None, BranchShape::Default);
}
asm.mark_branch_end(&branch_rc);
+
+ incr_counter!(defer_count);
}
fn remove_from_graph(blockref: &BlockRef) {
diff --git a/yjit/src/stats.rs b/yjit/src/stats.rs
index 03eec21b50..ee841a4c04 100644
--- a/yjit/src/stats.rs
+++ b/yjit/src/stats.rs
@@ -269,6 +269,8 @@ make_counters! {
compiled_block_count,
compiled_branch_count,
compilation_failure,
+ block_next_count,
+ defer_count,
freed_iseq_count,
exit_from_branch_stub,