summaryrefslogtreecommitdiff
path: root/vm_trace.c
AgeCommit message (Collapse)Author
2012-09-08internal.h: allocator function in rb_classext_tnobu
* internal.h (struct rb_classext_struct): move allocator function into rb_classext_t from ordinary method table. [ruby-dev:46121] [Feature #6993] * object.c (rb_obj_alloc): call allocator function directly. * vm_method.c (rb_define_alloc_func, rb_undef_alloc_func) (rb_get_alloc_func): use allocator function in rb_classext_t. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36925 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-31vm_trace.c: freed memory accessnobu
* vm_trace.c (clean_hooks): do not access freed memory. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36862 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-31vm_trace.c: uninitialized statenobu
* vm_trace.c (rb_threadptr_exec_event_hooks): fix uninitialized state when no events is excuted. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36861 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-30vm_trace.c: warningnobu
* vm_trace.c (exec_hooks): supress clobbered warning. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36855 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-22* vm_trace.c: support TracePoint. [ruby-trunk - Feature #6895]ko1
* test/ruby/test_settracefunc.rb: add tests for above. * proc.c (rb_binding_new_with_cfp): add an internal function. * vm.c (rb_vm_control_frame_id_and_class): add an internal function. * vm_trace.c: add rb_add_event_hook2() and rb_thread_add_event_hook2(). Give us the good name for them! git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36773 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-17vm_trace.c: remove meaningless assingmentsnobu
* vm_trace.c (call_trace_func): remove meaningless assingments to same variables. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36716 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-16* vm_trace.c, vm_core.h: simplify tracing mechanism.ko1
(1) add rb_hook_list_t data structure which includes hooks, events (flag) and `need_clean' flag. If the last flag is true, then clean the hooks list. In other words, deleted hooks are contained by `hooks'. Cleanup process should run before traversing the list. (2) Change check mechanism See EXEC_EVENT_HOOK() in vm_core.h. (3) Add `raw' hooks APIs Normal hooks are guarded from exception by rb_protect(). However, this protection is overhead for too simple functions which never cause exceptions. `raw' hooks are executed without protection and faster. Now, we only provide registration APIs. All `raw' hooks are kicked under protection (same as normal hooks). * include/ruby/ruby.h: remove internal data definition and macros. * internal.h (ruby_suppress_tracing), vm_trace.c: rename ruby_suppress_tracing() to rb_suppress_tracing() and remove unused function parameter. * parse.y: fix to use renamed rb_suppress_tracing(). * thread.c (thread_create_core): no need to set RUBY_VM_VM. * vm.c (mark_event_hooks): move definition to vm_trace.c. * vm.c (ruby_vm_event_flags): add a global variable. This global variable represents all of Threads and VM's event masks (T1#events | T2#events | ... | VM#events). You can check the possibility kick trace func or not with ruby_vm_event_flags. ruby_vm_event_flags is maintained by vm_trace.c. * cont.c (fiber_switch, rb_cont_call): restore tracing status. [Feature #4347] * test/ruby/test_continuation.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36715 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-15* vm_trace.c: separate trace_func related functions fromko1
thread.c. * thread.c: ditto. * common.mk: add vm_trace.o. * inits.c: call Init_vm_trace(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36703 b2dd03c8-39d4-4d8f-98ff-823fe69b080e