From 13df05acfa02aeccac89e93f8789933b23004113 Mon Sep 17 00:00:00 2001 From: k0kubun Date: Sun, 21 Oct 2018 14:23:24 +0000 Subject: mjit.c: copy call cache values to MJIT worker same as r65275 but for call cache. === Optcarrot Benchmark === $ benchmark-driver benchmark.yml --rbenv 'before::before --disable-gems --jit;after::after --disable-gems --jit' -v --repeat-count 24 before: ruby 2.6.0dev (2018-10-21 trunk 65277) +JIT [x86_64-linux] after: ruby 2.6.0dev (2018-10-21 trunk 65277) +JIT [x86_64-linux] last_commit=mjit.c: copy call cache values to MJIT worker Calculating ------------------------------------- before after Optcarrot Lan_Master.nes 85.372 85.359 fps Comparison: Optcarrot Lan_Master.nes before: 85.4 fps after: 85.4 fps - 1.00x slower git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65279 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- mjit.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'mjit.c') diff --git a/mjit.c b/mjit.c index f2b2581f7a..215057ae30 100644 --- a/mjit.c +++ b/mjit.c @@ -25,7 +25,12 @@ static void mjit_copy_job_handler(void *data) { struct mjit_copy_job *job = (struct mjit_copy_job *)data; - memcpy(job->is_entries, job->body->is_entries, sizeof(union iseq_inline_storage_entry) * job->body->is_size); + if (job->cc_entries) { + memcpy(job->cc_entries, job->body->cc_entries, sizeof(struct rb_call_cache) * (job->body->ci_size + job->body->ci_kw_size)); + } + if (job->is_entries) { + memcpy(job->is_entries, job->body->is_entries, sizeof(union iseq_inline_storage_entry) * job->body->is_size); + } CRITICAL_SECTION_START(3, "in MJIT copy job wait"); job->finish_p = TRUE; -- cgit v1.2.3