summaryrefslogtreecommitdiff
path: root/iseq.c
diff options
context:
space:
mode:
authorTakashi Kokubun <takashikkbn@gmail.com>2020-03-11 00:54:18 -0700
committerTakashi Kokubun <takashikkbn@gmail.com>2020-03-11 00:59:34 -0700
commitda4b97a0e3914f0dbb9983229b266bb4761a28d3 (patch)
treed2fe93a70e2f0a5942ebb19e30c51cec0eb12297 /iseq.c
parente89ebdcb87f23a71ad97581541bb2eaeee5e83e9 (diff)
Pin and inline cme in JIT-ed method calls
``` $ benchmark-driver benchmark.yml -v --rbenv 'before --jit;after --jit' --repeat-count=12 --output=all before --jit: ruby 2.8.0dev (2020-03-11T07:43:12Z master e89ebdcb87) +JIT [x86_64-linux] after --jit: ruby 2.8.0dev (2020-03-11T07:54:18Z master 143776a0da) +JIT [x86_64-linux] Calculating ------------------------------------- before --jit after --jit Optcarrot Lan_Master.nes 73.86976729561439 77.20184819316513 fps 74.46997176460742 78.43493030231805 77.59686308754307 78.55714131655935 78.53693921126656 79.08984255596820 80.10158944910573 79.17751731838183 80.12254974411167 79.60853122429181 80.28678655204945 79.74674066871896 80.38690681095379 79.90624544440300 80.79223498756919 80.57881084206193 80.82857188422419 80.70677614429169 81.06447745878245 81.03868541295149 81.21620802278490 82.16354660940607 ```
Diffstat (limited to 'iseq.c')
-rw-r--r--iseq.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/iseq.c b/iseq.c
index b6d463526d..d32a0929c6 100644
--- a/iseq.c
+++ b/iseq.c
@@ -364,8 +364,9 @@ rb_iseq_mark(const rb_iseq_t *iseq)
for (unsigned int i=0; i<body->ci_size; i++) {
const struct rb_callcache *cc = cc_entries[i];
if (cc != NULL) {
- // Pin cc against GC.compact as the the address may be written in JIT-ed code.
+ // Pin `cc` and `cc->cme` against GC.compact as their addresses may be written in JIT-ed code.
rb_gc_mark((VALUE)cc);
+ rb_gc_mark((VALUE)vm_cc_cme(cc));
}
}
}