summaryrefslogtreecommitdiff
path: root/yjit/src/core.rs
diff options
context:
space:
mode:
authorMaxime Chevalier-Boisvert <[email protected]>2024-06-12 13:33:27 -0400
committerGitHub <[email protected]>2024-06-12 13:33:27 -0400
commitce06924a17176d18816d968867858f97401d7c82 (patch)
tree9cf636b18f7f17061816a6910b8e6874e29ff838 /yjit/src/core.rs
parent85190d41307525063d9963283d5813074dda793f (diff)
YJIT: add context cache hits stat (#10979)
* YJIT: add context cache hits stat This stat should make more sense when it comes to interpreting the effectiveness of the cache on large deployed apps.
Diffstat (limited to 'yjit/src/core.rs')
-rw-r--r--yjit/src/core.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/yjit/src/core.rs b/yjit/src/core.rs
index 397ebb4566..244b03a565 100644
--- a/yjit/src/core.rs
+++ b/yjit/src/core.rs
@@ -858,10 +858,12 @@ impl Context {
incr_counter!(num_contexts_encoded);
if *self == Context::default() {
+ incr_counter!(context_cache_hits);
return 0;
}
if let Some(idx) = Self::cache_get(self) {
+ incr_counter!(context_cache_hits);
debug_assert!(Self::decode(idx) == *self);
return idx;
}