44 #define MAX_EVENT_NUM 32
70 if (events & (1 << i)) {
84 if (events & (1 << i)) {
162 if (func == 0 || hook->
func == func) {
231 while ((hook = *nextp) != 0) {
262 for (hook = list->
hooks; hook; hook = hook->
next) {
290 const int outer_state = th->
state;
303 if (state)
goto terminate;
309 state =
exec_hooks(th, list, trace_arg, !vm_tracing);
310 if (state)
goto terminate;
327 th->
state = outer_state;
347 volatile int outer_state;
351 const int tracing = th->
trace_arg ? 1 : 0;
358 outer_state = th->
state;
363 result = (*func)(
arg);
378 th->
state = outer_state;
541 #define C(name, NAME) case RUBY_EVENT_##NAME: CONST_ID(id, #name); return id;
548 C(c_return, C_RETURN);
551 C(b_return, B_RETURN);
552 C(thread_begin, THREAD_BEGIN);
553 C(thread_end, THREAD_END);
554 C(specified_line, SPECIFIED_LINE);
578 klass =
RBASIC(klass)->klass;
581 klass =
rb_iv_get(klass,
"__attached__");
590 argv[5] = klass ? klass :
Qnil;
649 #define C(name, NAME) CONST_ID(id, #name); if (sym == ID2SYM(id)) return RUBY_EVENT_##NAME
656 C(c_return, C_RETURN);
659 C(b_return, B_RETURN);
660 C(thread_begin, THREAD_BEGIN);
661 C(thread_end, THREAD_END);
662 C(specified_line, SPECIFIED_LINE);
679 if (trace_arg == 0) {
724 return trace_arg->
path;
731 if (!trace_arg->
klass) {
735 if (trace_arg->
klass) {
759 return trace_arg->
klass;
779 return trace_arg->
self;
792 rb_bug(
"tp_attr_return_value_m: unreachable");
794 return trace_arg->
data;
807 rb_bug(
"tp_attr_raised_exception_m: unreachable");
809 return trace_arg->
data;
1021 int previous_tracing = tp->
tracing;
1072 int previous_tracing = tp->
tracing;
1118 if (
RTEST(target_thval)) {
1181 for (i=0; i<
argc; i++) {
1219 switch (trace_arg->
event) {
1243 return rb_sprintf(
"#<TracePoint:%"PRIsVALUE
" %"PRIsVALUE
">",
1248 return rb_sprintf(
"#<TracePoint:%"PRIsVALUE
"@%"PRIsVALUE
":%d>",