diff options
author | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-04-25 03:50:00 +0000 |
---|---|---|
committer | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-04-25 03:50:00 +0000 |
commit | abcbd7ea38f64f942a934ba065aabf9da81a21bc (patch) | |
tree | 8bf33e560f4c99904d36a1f0681bf5c2ebd34dae /thread.c | |
parent | 354844be45efe799031b1a9799e8c6d52cc6b16d (diff) | |
download | ruby-abcbd7ea38f64f942a934ba065aabf9da81a21bc.tar.gz |
* yarvcore.h: remove rb_control_frame_t#callee_id.
* vm_macro.def: ditto.
* eval_intern.h (exec_event_hooks): fix to check event flags
* eval_intern.h (EXEC_EVENT_HOOK): fix to re-check event flags.
* ext/probeprofiler : added. this profiler is sampling based
profiler.
* vm.c: add rb_thread_current_status() API for probeprofiler.
* thread.c (rb_thread_execute_interrupts): add comments.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12213 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'thread.c')
-rw-r--r-- | thread.c | 17 |
1 files changed, 16 insertions, 1 deletions
@@ -717,6 +717,7 @@ rb_thread_execute_interrupts(rb_thread_t *th) /* thread pass */ rb_thread_schedule(); } + EXEC_EVENT_HOOK(th, RUBY_EVENT_SWITCH, th->cfp->self, 0, 0); } @@ -1836,14 +1837,28 @@ static void timer_thread_function(void) { rb_vm_t *vm = GET_VM(); /* TODO: fix me for Multi-VM */ + + /* for time slice */ vm->running_thread->interrupt_flag = 1; - + + /* check signal */ if (vm->bufferd_signal_size && vm->main_thread->exec_signal == 0) { vm->main_thread->exec_signal = rb_get_next_signal(vm); thread_debug("bufferd_signal_size: %d, sig: %d\n", vm->bufferd_signal_size, vm->main_thread->exec_signal); rb_thread_interrupt(vm->main_thread); } + +#if 0 + /* prove profiler */ + if (vm->prove_profile.enable) { + rb_thread_t *th = vm->running_thread; + + if (vm->during_gc) { + /* GC prove profiling */ + } + } +#endif } void |