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.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.c')
-rw-r--r-- | vm.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -2063,6 +2063,7 @@ rb_thread_mark(void *ptr) rb_mark_tbl(th->local_storage); RUBY_MARK_UNLESS_NULL(th->local_storage_recursive_hash); + RUBY_MARK_UNLESS_NULL(th->local_storage_recursive_hash_for_trace); if (GET_THREAD() != th && th->machine.stack_start && th->machine.stack_end) { rb_gc_mark_machine_stack(th); @@ -2197,6 +2198,7 @@ th_init(rb_thread_t *th, VALUE self) th->waiting_fd = -1; th->root_svar = Qnil; th->local_storage_recursive_hash = Qnil; + th->local_storage_recursive_hash_for_trace = Qnil; #ifdef NON_SCALAR_THREAD_ID th->thread_id_string[0] = '\0'; #endif |