mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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
This commit is contained in:
parent
354844be45
commit
abcbd7ea38
10 changed files with 199 additions and 35 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue