summaryrefslogtreecommitdiff
path: root/cont.c
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-12-10 19:35:07 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-12-10 19:35:07 +0000
commit1de3e801c40e5a0121198ae08cd5b32dd92a42a2 (patch)
tree734ed5b0cd802bedbe15422302d75eabebdcab0c /cont.c
parent7a77cf71335c426d973bbf94518177954a175945 (diff)
* vm_core.h: introduce new field
rb_thread_t::local_storage_recursive_hash_for_trace to store recursive hash to avoid creating new recursive (nested) hashes for each trace events. [Bug #10511] * vm_trace.c (rb_threadptr_exec_event_hooks_orig): use it. * cont.c: catch up this fix. * vm.c (rb_thread_mark): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48765 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'cont.c')
-rw-r--r--cont.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/cont.c b/cont.c
index 035cfba..78ae089 100644
--- a/cont.c
+++ b/cont.c
@@ -460,6 +460,7 @@ cont_init(rb_context_t *cont, rb_thread_t *th)
cont->saved_thread.fiber = th->fiber;
cont->saved_thread.local_storage = 0;
cont->saved_thread.local_storage_recursive_hash = Qnil;
+ cont->saved_thread.local_storage_recursive_hash_for_trace = Qnil;
}
static rb_context_t *
@@ -565,6 +566,7 @@ cont_restore_thread(rb_context_t *cont)
th->stack_size = sth->stack_size;
th->local_storage = sth->local_storage;
th->local_storage_recursive_hash = sth->local_storage_recursive_hash;
+ th->local_storage_recursive_hash_for_trace = sth->local_storage_recursive_hash_for_trace;
th->fiber = (rb_fiber_t*)cont;
}
@@ -1211,6 +1213,7 @@ fiber_init(VALUE fibval, VALUE proc)
th->tag = 0;
th->local_storage = st_init_numtable();
th->local_storage_recursive_hash = Qnil;
+ th->local_storage_recursive_hash_for_trace = Qnil;
th->first_proc = proc;