diff options
author | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-12-10 19:35:07 +0000 |
---|---|---|
committer | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-12-10 19:35:07 +0000 |
commit | 1de3e801c40e5a0121198ae08cd5b32dd92a42a2 (patch) | |
tree | 734ed5b0cd802bedbe15422302d75eabebdcab0c /vm_trace.c | |
parent | 7a77cf71335c426d973bbf94518177954a175945 (diff) | |
download | ruby-1de3e801c40e5a0121198ae08cd5b32dd92a42a2.tar.gz |
* 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 'vm_trace.c')
-rw-r--r-- | vm_trace.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/vm_trace.c b/vm_trace.c index 978850a00a..a11ee7789e 100644 --- a/vm_trace.c +++ b/vm_trace.c @@ -332,7 +332,7 @@ rb_threadptr_exec_event_hooks_orig(rb_trace_arg_t *trace_arg, int pop_p) const VALUE old_recursive = th->local_storage_recursive_hash; int state = 0; - th->local_storage_recursive_hash = Qnil; + th->local_storage_recursive_hash = th->local_storage_recursive_hash_for_trace; th->state = 0; th->errinfo = Qnil; @@ -352,6 +352,8 @@ rb_threadptr_exec_event_hooks_orig(rb_trace_arg_t *trace_arg, int pop_p) terminate: th->trace_arg = 0; th->vm->trace_running--; + + th->local_storage_recursive_hash_for_trace = th->local_storage_recursive_hash; th->local_storage_recursive_hash = old_recursive; if (state) { |