Project

General

Profile

Feature #12747 ยป 0002-Add-TracePoint-callee_id.patch

ktsj (Kazuki Tsujimoto), 09/10/2016 06:30 AM

View differences:

cont.c
1280 1280
	th->root_svar = Qfalse;
1281 1281
	fib->status = RUNNING;
1282 1282

  
1283
	EXEC_EVENT_HOOK(th, RUBY_EVENT_FIBER_SWITCH, th->self, 0, 0, Qnil);
1283
	EXEC_EVENT_HOOK(th, RUBY_EVENT_FIBER_SWITCH, th->self, 0, 0, 0, Qnil);
1284 1284
	cont->value = rb_vm_invoke_proc(th, proc, argc, argv, VM_BLOCK_HANDLER_NONE);
1285 1285
    }
1286 1286
    TH_POP_TAG();
......
1470 1470
    value = fiber_store(fib, th);
1471 1471
    RUBY_VM_CHECK_INTS(th);
1472 1472

  
1473
    EXEC_EVENT_HOOK(th, RUBY_EVENT_FIBER_SWITCH, th->self, 0, 0, Qnil);
1473
    EXEC_EVENT_HOOK(th, RUBY_EVENT_FIBER_SWITCH, th->self, 0, 0, 0, Qnil);
1474 1474

  
1475 1475
    return value;
1476 1476
}
eval.c
563 563

  
564 564
    if (tag != TAG_FATAL) {
565 565
	RUBY_DTRACE_HOOK(RAISE, rb_obj_classname(th->errinfo));
566
	EXEC_EVENT_HOOK(th, RUBY_EVENT_RAISE, th->cfp->self, 0, 0, mesg);
566
	EXEC_EVENT_HOOK(th, RUBY_EVENT_RAISE, th->cfp->self, 0, 0, 0, mesg);
567 567
    }
568 568
}
569 569

  
......
738 738
    ID mid = me->called_id;
739 739

  
740 740
    rb_vm_pop_frame(th);
741
    EXEC_EVENT_HOOK(th, RUBY_EVENT_C_RETURN, self, me->def->original_id, klass, Qnil);
741
    EXEC_EVENT_HOOK(th, RUBY_EVENT_C_RETURN, self, me->def->original_id, mid, klass, Qnil);
742 742

  
743 743
    setup_exception(th, TAG_RAISE, mesg, cause);
744 744

  
gc.c
1751 1751
static void
1752 1752
gc_event_hook_body(rb_thread_t *th, rb_objspace_t *objspace, const rb_event_flag_t event, VALUE data)
1753 1753
{
1754
    EXEC_EVENT_HOOK(th, event, th->cfp->self, 0, 0, data);
1754
    EXEC_EVENT_HOOK(th, event, th->cfp->self, 0, 0, 0, data);
1755 1755
}
1756 1756

  
1757 1757
#define gc_event_hook_available_p(objspace) ((objspace)->flags.has_hook)
include/ruby/intern.h
968 968
ID rb_frame_callee(void);
969 969
VALUE rb_str_succ(VALUE);
970 970
VALUE rb_time_succ(VALUE);
971
int rb_frame_method_id_and_class(ID *idp, VALUE *klassp);
971
int rb_frame_method_id_and_class(ID *idp, ID *callee_idp, VALUE *klassp);
972 972
VALUE rb_make_backtrace(void);
973 973
VALUE rb_make_exception(int, const VALUE*);
974 974

  
insns.def
829 829
	}
830 830
    }
831 831

  
832
    EXEC_EVENT_HOOK(th, flag, GET_SELF(), 0, 0 /* id and klass are resolved at callee */,
832
    EXEC_EVENT_HOOK(th, flag, GET_SELF(), 0, 0, 0 /* id and klass are resolved at callee */,
833 833
		    (flag & (RUBY_EVENT_RETURN | RUBY_EVENT_B_RETURN)) ? TOPN(0) : Qundef);
834 834
}
835 835

  
thread.c
589 589
		    th->errinfo = Qnil;
590 590
		    th->root_lep = rb_vm_ep_local_ep(vm_proc_ep(th->first_proc));
591 591
		    th->root_svar = Qfalse;
592
		    EXEC_EVENT_HOOK(th, RUBY_EVENT_THREAD_BEGIN, th->self, 0, 0, Qundef);
592
		    EXEC_EVENT_HOOK(th, RUBY_EVENT_THREAD_BEGIN, th->self, 0, 0, 0, Qundef);
593 593
		    th->value = rb_vm_invoke_proc(th, proc,
594 594
						  (int)RARRAY_LEN(args), RARRAY_CONST_PTR(args),
595 595
						  VM_BLOCK_HANDLER_NONE);
596
		    EXEC_EVENT_HOOK(th, RUBY_EVENT_THREAD_END, th->self, 0, 0, Qundef);
596
		    EXEC_EVENT_HOOK(th, RUBY_EVENT_THREAD_END, th->self, 0, 0, 0, Qundef);
597 597
		}
598 598
		else {
599 599
		    th->value = (*th->first_func)((void *)args);
......
2063 2063
	    if (th->status == THREAD_RUNNABLE)
2064 2064
		th->running_time_us += TIME_QUANTUM_USEC;
2065 2065

  
2066
	    EXEC_EVENT_HOOK(th, RUBY_INTERNAL_EVENT_SWITCH, th->cfp->self, 0, 0, Qundef);
2066
	    EXEC_EVENT_HOOK(th, RUBY_INTERNAL_EVENT_SWITCH, th->cfp->self, 0, 0, 0, Qundef);
2067 2067

  
2068 2068
	    rb_thread_schedule_limits(limits_us);
2069 2069
	}
vm.c
330 330
    enum ruby_value_type type;
331 331
    if (!klass) {
332 332
	if (!th) th = GET_THREAD();
333
	if (!rb_thread_method_id_and_class(th, &id, &klass) || !klass)
333
	if (!rb_thread_method_id_and_class(th, &id, 0, &klass) || !klass)
334 334
	    return FALSE;
335 335
    }
336 336
    if (RB_TYPE_P(klass, T_ICLASS)) {
......
522 522
    rb_control_frame_t *cfp = th->cfp;
523 523
    const rb_callable_method_entry_t *me = rb_vm_frame_method_entry(cfp);
524 524

  
525
    EXEC_EVENT_HOOK(th, RUBY_EVENT_C_RETURN, cfp->self, me->def->original_id, me->owner, Qnil); /* TODO */
526
    RUBY_DTRACE_CMETHOD_RETURN_HOOK(th, me->owner, me->def->original_id);
525
    EXEC_EVENT_HOOK(th, RUBY_EVENT_C_RETURN, cfp->self, me->def->original_id, me->called_id, me->owner, Qnil);
526
    RUBY_DTRACE_CMETHOD_RETURN_HOOK(th, me->owner, me->called_id);
527 527
    vm_pop_frame(th, cfp, cfp->ep);
528 528
}
529 529

  
......
984 984
		  iseq->body->stack_max);
985 985

  
986 986
    RUBY_DTRACE_METHOD_ENTRY_HOOK(th, me->owner, me->def->original_id);
987
    EXEC_EVENT_HOOK(th, RUBY_EVENT_CALL, self, me->def->original_id, me->owner, Qnil);
987
    EXEC_EVENT_HOOK(th, RUBY_EVENT_CALL, self, me->def->original_id, me->called_id, me->owner, Qnil);
988 988
    ret = vm_exec(th);
989
    EXEC_EVENT_HOOK(th, RUBY_EVENT_RETURN, self, me->def->original_id, me->owner, ret);
989
    EXEC_EVENT_HOOK(th, RUBY_EVENT_RETURN, self, me->def->original_id, me->called_id, me->owner, ret);
990 990
    RUBY_DTRACE_METHOD_RETURN_HOOK(th, me->owner, me->def->original_id);
991 991
    return ret;
992 992
}
......
1592 1592
    switch (VM_FRAME_TYPE(th->cfp)) {
1593 1593
      case VM_FRAME_MAGIC_METHOD:
1594 1594
	RUBY_DTRACE_METHOD_RETURN_HOOK(th, 0, 0);
1595
	EXEC_EVENT_HOOK_AND_POP_FRAME(th, RUBY_EVENT_RETURN, th->cfp->self, 0, 0, Qnil);
1595
	EXEC_EVENT_HOOK_AND_POP_FRAME(th, RUBY_EVENT_RETURN, th->cfp->self, 0, 0, 0, Qnil);
1596 1596
	break;
1597 1597
      case VM_FRAME_MAGIC_BLOCK:
1598 1598
      case VM_FRAME_MAGIC_LAMBDA:
1599 1599
	if (VM_FRAME_BMETHOD_P(th->cfp)) {
1600
	    EXEC_EVENT_HOOK(th, RUBY_EVENT_B_RETURN, th->cfp->self, 0, 0, Qnil);
1600
	    EXEC_EVENT_HOOK(th, RUBY_EVENT_B_RETURN, th->cfp->self, 0, 0, 0, Qnil);
1601 1601

  
1602 1602
	    if (!will_finish_vm_exec) {
1603 1603
		/* kick RUBY_EVENT_RETURN at invoke_block_from_c() for bmethod */
1604 1604
		EXEC_EVENT_HOOK_AND_POP_FRAME(th, RUBY_EVENT_RETURN, th->cfp->self,
1605 1605
					      rb_vm_frame_method_entry(th->cfp)->def->original_id,
1606
					      rb_vm_frame_method_entry(th->cfp)->called_id,
1606 1607
					      rb_vm_frame_method_entry(th->cfp)->owner, Qnil);
1607 1608
	    }
1608 1609
	}
1609 1610
	else {
1610
	    EXEC_EVENT_HOOK_AND_POP_FRAME(th, RUBY_EVENT_B_RETURN, th->cfp->self, 0, 0, Qnil);
1611
	    EXEC_EVENT_HOOK_AND_POP_FRAME(th, RUBY_EVENT_B_RETURN, th->cfp->self, 0, 0, 0, Qnil);
1611 1612
	}
1612 1613
	break;
1613 1614
      case VM_FRAME_MAGIC_CLASS:
1614
	EXEC_EVENT_HOOK_AND_POP_FRAME(th, RUBY_EVENT_END, th->cfp->self, 0, 0, Qnil);
1615
	EXEC_EVENT_HOOK_AND_POP_FRAME(th, RUBY_EVENT_END, th->cfp->self, 0, 0, 0, Qnil);
1615 1616
	break;
1616 1617
    }
1617 1618
}
......
1735 1736
	    if (UNLIKELY(VM_FRAME_TYPE(th->cfp) == VM_FRAME_MAGIC_CFUNC)) {
1736 1737
		EXEC_EVENT_HOOK(th, RUBY_EVENT_C_RETURN, th->cfp->self,
1737 1738
				rb_vm_frame_method_entry(th->cfp)->def->original_id,
1739
				rb_vm_frame_method_entry(th->cfp)->called_id,
1738 1740
				rb_vm_frame_method_entry(th->cfp)->owner, Qnil);
1739 1741
		RUBY_DTRACE_CMETHOD_RETURN_HOOK(th,
1740 1742
					       rb_vm_frame_method_entry(th->cfp)->owner,
......
1958 1960
}
1959 1961

  
1960 1962
int
1961
rb_vm_control_frame_id_and_class(const rb_control_frame_t *cfp, ID *idp, VALUE *klassp)
1963
rb_vm_control_frame_id_and_class(const rb_control_frame_t *cfp, ID *idp, ID *called_idp, VALUE *klassp)
1962 1964
{
1963 1965
    const rb_callable_method_entry_t *me = rb_vm_frame_method_entry(cfp);
1964 1966

  
1965 1967
    if (me) {
1966 1968
	if (idp) *idp = me->def->original_id;
1969
	if (called_idp) *called_idp = me->called_id;
1967 1970
	if (klassp) *klassp = me->owner;
1968 1971
	return TRUE;
1969 1972
    }
......
1973 1976
}
1974 1977

  
1975 1978
int
1976
rb_thread_method_id_and_class(rb_thread_t *th, ID *idp, VALUE *klassp)
1979
rb_thread_method_id_and_class(rb_thread_t *th, ID *idp, ID *called_idp, VALUE *klassp)
1977 1980
{
1978
    return rb_vm_control_frame_id_and_class(th->cfp, idp, klassp);
1981
    return rb_vm_control_frame_id_and_class(th->cfp, idp, called_idp, klassp);
1979 1982
}
1980 1983

  
1981 1984
int
1982
rb_frame_method_id_and_class(ID *idp, VALUE *klassp)
1985
rb_frame_method_id_and_class(ID *idp, ID *called_idp, VALUE *klassp)
1983 1986
{
1984
    return rb_thread_method_id_and_class(GET_THREAD(), idp, klassp);
1987
    return rb_thread_method_id_and_class(GET_THREAD(), idp, called_idp, klassp);
1985 1988
}
1986 1989

  
1987 1990
VALUE
vm_backtrace.c
1088 1088
get_klass(const rb_control_frame_t *cfp)
1089 1089
{
1090 1090
    VALUE klass;
1091
    if (rb_vm_control_frame_id_and_class(cfp, 0, &klass)) {
1091
    if (rb_vm_control_frame_id_and_class(cfp, 0, 0, &klass)) {
1092 1092
	if (RB_TYPE_P(klass, T_ICLASS)) {
1093 1093
	    return RBASIC(klass)->klass;
1094 1094
	}
vm_core.h
1420 1420
VALUE rb_iseq_eval(const rb_iseq_t *iseq);
1421 1421
VALUE rb_iseq_eval_main(const rb_iseq_t *iseq);
1422 1422
RUBY_SYMBOL_EXPORT_END
1423
int rb_thread_method_id_and_class(rb_thread_t *th, ID *idp, VALUE *klassp);
1423
int rb_thread_method_id_and_class(rb_thread_t *th, ID *idp, ID *called_idp, VALUE *klassp);
1424 1424

  
1425 1425
VALUE rb_vm_invoke_proc(rb_thread_t *th, rb_proc_t *proc, int argc, const VALUE *argv, VALUE block_handler);
1426 1426
VALUE rb_vm_make_proc_lambda(rb_thread_t *th, const struct rb_captured_block *captured, VALUE klass, int8_t is_lambda);
......
1468 1468
VALUE rb_name_err_mesg_new(VALUE mesg, VALUE recv, VALUE method);
1469 1469
void rb_vm_stack_to_heap(rb_thread_t *th);
1470 1470
void ruby_thread_init_stack(rb_thread_t *th);
1471
int rb_vm_control_frame_id_and_class(const rb_control_frame_t *cfp, ID *idp, VALUE *klassp);
1471
int rb_vm_control_frame_id_and_class(const rb_control_frame_t *cfp, ID *idp, ID *called_idp, VALUE *klassp);
1472 1472
void rb_vm_rewind_cfp(rb_thread_t *th, rb_control_frame_t *cfp);
1473 1473

  
1474 1474
void rb_vm_register_special_exception(enum ruby_special_exceptions sp, VALUE exception_class, const char *mesg);
......
1580 1580
    rb_control_frame_t *cfp;
1581 1581
    VALUE self;
1582 1582
    ID id;
1583
    ID called_id;
1583 1584
    VALUE klass;
1584 1585
    VALUE data;
1585 1586

  
......
1593 1594
void rb_threadptr_exec_event_hooks(struct rb_trace_arg_struct *trace_arg);
1594 1595
void rb_threadptr_exec_event_hooks_and_pop_frame(struct rb_trace_arg_struct *trace_arg);
1595 1596

  
1596
#define EXEC_EVENT_HOOK_ORIG(th_, flag_, self_, id_, klass_, data_, pop_p_) do { \
1597
#define EXEC_EVENT_HOOK_ORIG(th_, flag_, self_, id_, callee_id_, klass_, data_, pop_p_) do { \
1597 1598
    const rb_event_flag_t flag_arg_ = (flag_); \
1598 1599
    if (UNLIKELY(ruby_vm_event_flags & (flag_arg_))) { \
1599 1600
	/* defer evaluating the other arguments */ \
1600
	ruby_exec_event_hook_orig(th_, flag_arg_, self_, id_, klass_, data_, pop_p_); \
1601
	ruby_exec_event_hook_orig(th_, flag_arg_, self_, id_, callee_id_, klass_, data_, pop_p_); \
1601 1602
    } \
1602 1603
} while (0)
1603 1604

  
1604 1605
static inline void
1605 1606
ruby_exec_event_hook_orig(rb_thread_t *const th, const rb_event_flag_t flag,
1606
			  VALUE self, ID id, VALUE klass, VALUE data, int pop_p)
1607
			  VALUE self, ID id, ID called_id, VALUE klass, VALUE data, int pop_p)
1607 1608
{
1608 1609
    if ((th->event_hooks.events | th->vm->event_hooks.events) & flag) {
1609 1610
	struct rb_trace_arg_struct trace_arg;
......
1612 1613
	trace_arg.cfp = th->cfp;
1613 1614
	trace_arg.self = self;
1614 1615
	trace_arg.id = id;
1616
	trace_arg.called_id = called_id;
1615 1617
	trace_arg.klass = klass;
1616 1618
	trace_arg.data = data;
1617 1619
	trace_arg.path = Qundef;
......
1621 1623
    }
1622 1624
}
1623 1625

  
1624
#define EXEC_EVENT_HOOK(th_, flag_, self_, id_, klass_, data_) \
1625
  EXEC_EVENT_HOOK_ORIG(th_, flag_, self_, id_, klass_, data_, 0)
1626
#define EXEC_EVENT_HOOK(th_, flag_, self_, id_, callee_id_, klass_, data_) \
1627
  EXEC_EVENT_HOOK_ORIG(th_, flag_, self_, id_, callee_id_, klass_, data_, 0)
1626 1628

  
1627
#define EXEC_EVENT_HOOK_AND_POP_FRAME(th_, flag_, self_, id_, klass_, data_) \
1628
  EXEC_EVENT_HOOK_ORIG(th_, flag_, self_, id_, klass_, data_, 1)
1629
#define EXEC_EVENT_HOOK_AND_POP_FRAME(th_, flag_, self_, id_, callee_id_, klass_, data_) \
1630
  EXEC_EVENT_HOOK_ORIG(th_, flag_, self_, id_, callee_id_, klass_, data_, 1)
1629 1631

  
1630 1632
RUBY_SYMBOL_EXPORT_BEGIN
1631 1633

  
vm_eval.c
68 68
    VALUE val;
69 69

  
70 70
    RUBY_DTRACE_CMETHOD_ENTRY_HOOK(th, cc->me->owner, ci->mid);
71
    EXEC_EVENT_HOOK(th, RUBY_EVENT_C_CALL, calling->recv, ci->mid, cc->me->owner, Qnil);
71
    EXEC_EVENT_HOOK(th, RUBY_EVENT_C_CALL, calling->recv, ci->mid, ci->mid, cc->me->owner, Qnil);
72 72
    {
73 73
	rb_control_frame_t *reg_cfp = th->cfp;
74 74
	const rb_callable_method_entry_t *me = cc->me;
......
98 98
	    rb_vm_pop_frame(th);
99 99
	}
100 100
    }
101
    EXEC_EVENT_HOOK(th, RUBY_EVENT_C_RETURN, calling->recv, ci->mid, callnig->cc->me->owner, val);
101
    EXEC_EVENT_HOOK(th, RUBY_EVENT_C_RETURN, calling->recv, ci->mid, ci->mid, callnig->cc->me->owner, val);
102 102
    RUBY_DTRACE_CMETHOD_RETURN_HOOK(th, cc->me->owner, ci->mid);
103 103

  
104 104
    return val;
......
117 117
    VALUE block_handler = calling->block_handler;
118 118

  
119 119
    RUBY_DTRACE_CMETHOD_ENTRY_HOOK(th, me->owner, mid);
120
    EXEC_EVENT_HOOK(th, RUBY_EVENT_C_CALL, recv, me->def->original_id, me->owner, Qnil);
120
    EXEC_EVENT_HOOK(th, RUBY_EVENT_C_CALL, recv, me->def->original_id, mid, me->owner, Qnil);
121 121
    {
122 122
	rb_control_frame_t *reg_cfp = th->cfp;
123 123

  
......
136 136
	VM_PROFILE_UP(C2C_POPF);
137 137
	rb_vm_pop_frame(th);
138 138
    }
139
    EXEC_EVENT_HOOK(th, RUBY_EVENT_C_RETURN, recv, me->def->original_id, me->owner, val);
139
    EXEC_EVENT_HOOK(th, RUBY_EVENT_C_RETURN, recv, me->def->original_id, mid, me->owner, val);
140 140
    RUBY_DTRACE_CMETHOD_RETURN_HOOK(th, me->owner, mid);
141 141

  
142 142
    return val;
vm_insnhelper.c
1724 1724
    int argc = calling->argc;
1725 1725

  
1726 1726
    RUBY_DTRACE_CMETHOD_ENTRY_HOOK(th, me->owner, me->def->original_id);
1727
    EXEC_EVENT_HOOK(th, RUBY_EVENT_C_CALL, recv, me->def->original_id, me->owner, Qundef);
1727
    EXEC_EVENT_HOOK(th, RUBY_EVENT_C_CALL, recv, me->def->original_id, ci->mid, me->owner, Qundef);
1728 1728

  
1729 1729
    vm_push_frame(th, NULL, VM_FRAME_MAGIC_CFUNC | VM_FRAME_FLAG_CFRAME | VM_ENV_FLAG_LOCAL, recv,
1730 1730
		  block_handler, (VALUE)me,
......
1742 1742

  
1743 1743
    rb_vm_pop_frame(th);
1744 1744

  
1745
    EXEC_EVENT_HOOK(th, RUBY_EVENT_C_RETURN, recv, me->def->original_id, me->owner, val);
1745
    EXEC_EVENT_HOOK(th, RUBY_EVENT_C_RETURN, recv, me->def->original_id, ci->mid, me->owner, val);
1746 1746
    RUBY_DTRACE_CMETHOD_RETURN_HOOK(th, me->owner, me->def->original_id);
1747 1747

  
1748 1748
    return val;
......
1794 1794
    if (len >= 0) rb_check_arity(calling->argc, len, len);
1795 1795

  
1796 1796
    RUBY_DTRACE_CMETHOD_ENTRY_HOOK(th, me->owner, me->called_id);
1797
    EXEC_EVENT_HOOK(th, RUBY_EVENT_C_CALL, recv, me->called_id, me->owner, Qnil);
1797
    EXEC_EVENT_HOOK(th, RUBY_EVENT_C_CALL, recv, me->called_id, ci->mid, me->owner, Qnil);
1798 1798

  
1799 1799
    if (!(cc->me->def->flag & METHOD_VISI_PROTECTED) &&
1800 1800
	!(ci->flag & VM_CALL_ARGS_SPLAT) &&
......
1803 1803
    }
1804 1804
    val = vm_call_cfunc_latter(th, reg_cfp, calling);
1805 1805

  
1806
    EXEC_EVENT_HOOK(th, RUBY_EVENT_C_RETURN, recv, me->called_id, me->owner, val);
1806
    EXEC_EVENT_HOOK(th, RUBY_EVENT_C_RETURN, recv, me->called_id, ci->mid, me->owner, val);
1807 1807
    RUBY_DTRACE_CMETHOD_RETURN_HOOK(th, me->owner, me->called_id);
1808 1808

  
1809 1809
    return val;
vm_trace.c
616 616
    rb_thread_t *th = GET_THREAD();
617 617

  
618 618
    if (!klass) {
619
	rb_thread_method_id_and_class(th, &id, &klass);
619
	rb_thread_method_id_and_class(th, &id, 0, &klass);
620 620
    }
621 621

  
622 622
    if (klass) {
......
781 781
{
782 782
    if (!trace_arg->klass_solved) {
783 783
	if (!trace_arg->klass) {
784
	    rb_vm_control_frame_id_and_class(trace_arg->cfp, &trace_arg->id, &trace_arg->klass);
784
	    rb_vm_control_frame_id_and_class(trace_arg->cfp, &trace_arg->id, &trace_arg->called_id, &trace_arg->klass);
785 785
	}
786 786

  
787 787
	if (trace_arg->klass) {
......
805 805
}
806 806

  
807 807
VALUE
808
rb_tracearg_callee_id(rb_trace_arg_t *trace_arg)
809
{
810
    fill_id_and_klass(trace_arg);
811
    return trace_arg->called_id ? ID2SYM(trace_arg->called_id) : Qnil;
812
}
813

  
814
VALUE
808 815
rb_tracearg_defined_class(rb_trace_arg_t *trace_arg)
809 816
{
810 817
    fill_id_and_klass(trace_arg);
......
906 913
}
907 914

  
908 915
/*
909
 * Return the name of the method being called
916
 * Return the name at the definition of the method being called
910 917
 */
911 918
static VALUE
912 919
tracepoint_attr_method_id(VALUE tpval)
......
915 922
}
916 923

  
917 924
/*
925
 * Return the called name of the method being called
926
 */
927
static VALUE
928
tracepoint_attr_callee_id(VALUE tpval)
929
{
930
    return rb_tracearg_callee_id(get_trace_arg());
931
}
932

  
933
/*
918 934
 * Return class or module of the method being called.
919 935
 *
920 936
 *	class C; def foo; end; end
......
1480 1496
    rb_define_method(rb_cTracePoint, "lineno", tracepoint_attr_lineno, 0);
1481 1497
    rb_define_method(rb_cTracePoint, "path", tracepoint_attr_path, 0);
1482 1498
    rb_define_method(rb_cTracePoint, "method_id", tracepoint_attr_method_id, 0);
1499
    rb_define_method(rb_cTracePoint, "callee_id", tracepoint_attr_callee_id, 0);
1483 1500
    rb_define_method(rb_cTracePoint, "defined_class", tracepoint_attr_defined_class, 0);
1484 1501
    rb_define_method(rb_cTracePoint, "binding", tracepoint_attr_binding, 0);
1485 1502
    rb_define_method(rb_cTracePoint, "self", tracepoint_attr_self, 0);
1486
-