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 | 827ad0a306505a461847edade02d008b3758da45 (patch) | |
| tree | 8bf33e560f4c99904d36a1f0681bf5c2ebd34dae /eval_intern.h | |
| parent | 378a63a638028a855ad089ce208585cbb9f6c07c (diff) | |
| download | ruby-827ad0a306505a461847edade02d008b3758da45.tar.gz ruby-827ad0a306505a461847edade02d008b3758da45.tar.xz ruby-827ad0a306505a461847edade02d008b3758da45.zip | |
* 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: http://svn.ruby-lang.org/repos/ruby/trunk@12213 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'eval_intern.h')
| -rw-r--r-- | eval_intern.h | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/eval_intern.h b/eval_intern.h index ce059ae04..2bc529db9 100644 --- a/eval_intern.h +++ b/eval_intern.h @@ -234,7 +234,9 @@ static void inline exec_event_hooks(rb_event_hook_t *hook, rb_event_flag_t flag, VALUE self, ID id, VALUE klass) { while (hook) { - (*hook->func)(flag, hook->data, self, id, klass); + if (flag & hook->flag) { + (*hook->func)(flag, hook->data, self, id, klass); + } hook = hook->next; } } @@ -242,13 +244,15 @@ exec_event_hooks(rb_event_hook_t *hook, rb_event_flag_t flag, VALUE self, ID id, #define EXEC_EVENT_HOOK(th, flag, self, id, klass) do { \ rb_event_flag_t wait_event__ = th->event_flags; \ if (UNLIKELY(wait_event__)) { \ - VALUE self__ = (self), klass__ = (klass); \ - ID id__ = (id); \ - if (wait_event__ & flag) { \ - exec_event_hooks(th->event_hooks, flag, self__, id__, klass__); \ - } \ - if (wait_event__ & RUBY_EVENT_VM) { \ - exec_event_hooks(th->vm->event_hooks, flag, self__, id__, klass__); \ + if (wait_event__ & (flag | RUBY_EVENT_VM)) { \ + VALUE self__ = (self), klass__ = (klass); \ + ID id__ = (id); \ + if (wait_event__ & flag) { \ + exec_event_hooks(th->event_hooks, flag, self__, id__, klass__); \ + } \ + if (wait_event__ & RUBY_EVENT_VM) { \ + exec_event_hooks(th->vm->event_hooks, flag, self__, id__, klass__); \ + } \ } \ } \ } while (0) |
