Ruby
2.1.10p492(2016-04-01revision54464)
|
Go to the source code of this file.
Typedefs | |
typedef struct rb_debug_inspector_struct | rb_debug_inspector_t |
typedef VALUE(* | rb_debug_inspector_func_t) (const rb_debug_inspector_t *, void *) |
typedef struct rb_trace_arg_struct | rb_trace_arg_t |
typedef void(* | rb_postponed_job_func_t) (void *arg) |
Enumerations | |
enum | rb_event_hook_flag_t { RUBY_EVENT_HOOK_FLAG_SAFE = 0x01, RUBY_EVENT_HOOK_FLAG_DELETED = 0x02, RUBY_EVENT_HOOK_FLAG_RAW_ARG = 0x04 } |
typedef VALUE(* rb_debug_inspector_func_t) (const rb_debug_inspector_t *, void *) |
typedef struct rb_debug_inspector_struct rb_debug_inspector_t |
typedef struct rb_trace_arg_struct rb_trace_arg_t |
enum rb_event_hook_flag_t |
void rb_add_event_hook | ( | rb_event_hook_func_t | func, |
rb_event_flag_t | events, | ||
VALUE | data | ||
) |
Definition at line 145 of file vm_trace.c.
Referenced by ole_initialize(), and rb_set_coverages().
void rb_add_event_hook2 | ( | rb_event_hook_func_t | func, |
rb_event_flag_t | events, | ||
VALUE | data, | ||
rb_event_hook_flag_t | hook_flag | ||
) |
Definition at line 158 of file vm_trace.c.
References alloc_event_hook(), connect_event_hook(), rb_event_hook_struct::data, rb_event_hook_struct::events, func, GET_VM, and rb_event_hook_struct::hook_flags.
Referenced by rb_tracepoint_enable().
VALUE rb_debug_inspector_backtrace_locations | ( | const rb_debug_inspector_t * | dc | ) |
Definition at line 1243 of file vm_backtrace.c.
References rb_debug_inspector_struct::backtrace.
VALUE rb_debug_inspector_frame_binding_get | ( | const rb_debug_inspector_t * | dc, |
long | index | ||
) |
Definition at line 1229 of file vm_backtrace.c.
References CALLER_BINDING_BINDING, frame_get(), and rb_ary_entry().
VALUE rb_debug_inspector_frame_class_get | ( | const rb_debug_inspector_t * | dc, |
long | index | ||
) |
Definition at line 1222 of file vm_backtrace.c.
References CALLER_BINDING_CLASS, frame_get(), and rb_ary_entry().
VALUE rb_debug_inspector_frame_iseq_get | ( | const rb_debug_inspector_t * | dc, |
long | index | ||
) |
Definition at line 1236 of file vm_backtrace.c.
References CALLER_BINDING_ISEQ, frame_get(), and rb_ary_entry().
VALUE rb_debug_inspector_frame_self_get | ( | const rb_debug_inspector_t * | dc, |
long | index | ||
) |
Definition at line 1215 of file vm_backtrace.c.
References CALLER_BINDING_SELF, frame_get(), and rb_ary_entry().
VALUE rb_debug_inspector_open | ( | rb_debug_inspector_func_t | func, |
void * | data | ||
) |
Definition at line 1177 of file vm_backtrace.c.
References rb_debug_inspector_struct::backtrace, rb_debug_inspector_struct::backtrace_size, rb_thread_struct::cfp, rb_debug_inspector_struct::cfp, collect_caller_bindings(), rb_debug_inspector_struct::contexts, EXEC_TAG, GET_THREAD(), JUMP_TAG, RARRAY_LEN, rb_vm_backtrace_location_ary(), result, rb_debug_inspector_struct::th, TH_POP_TAG, TH_PUSH_TAG, and UNINITIALIZED_VAR.
int rb_postponed_job_register | ( | unsigned int | flags, |
rb_postponed_job_func_t | func, | ||
void * | data | ||
) |
Definition at line 1473 of file vm_trace.c.
References func, GET_THREAD(), MAX_POSTPONED_JOB, PJRR_FULL, PJRR_INTERRUPTED, PJRR_SUCESS, rb_vm_struct::postponed_job_index, postponed_job_register(), rb_bug(), and rb_thread_struct::vm.
int rb_postponed_job_register_one | ( | unsigned int | flags, |
rb_postponed_job_func_t | func, | ||
void * | data | ||
) |
Definition at line 1489 of file vm_trace.c.
References func, rb_postponed_job_struct::func, GET_THREAD(), MAX_POSTPONED_JOB, MAX_POSTPONED_JOB_SPECIAL_ADDITION, PJRR_FULL, PJRR_INTERRUPTED, PJRR_SUCESS, rb_vm_struct::postponed_job_buffer, rb_vm_struct::postponed_job_index, postponed_job_register(), rb_bug(), RUBY_VM_SET_POSTPONED_JOB_INTERRUPT, and rb_thread_struct::vm.
Referenced by gc_finalize_deferred_register().
Definition at line 1282 of file vm_backtrace.c.
References frame2iseq, and rb_iseq_absolute_path().
Definition at line 1294 of file vm_backtrace.c.
References frame2iseq, and rb_iseq_base_label().
Referenced by rb_profile_frame_full_label().
Definition at line 1306 of file vm_backtrace.c.
References FL_SINGLETON, FL_TEST, frame2iseq, NIL_P, Qnil, rb_class2name(), rb_class_path(), rb_iseq_klass(), rb_ivar_get(), rb_obj_class(), rb_sprintf(), RB_TYPE_P, RBASIC, T_CLASS, and T_ICLASS.
Referenced by rb_profile_frame_qualified_method_name().
Definition at line 1300 of file vm_backtrace.c.
References frame2iseq, and rb_iseq_first_lineno().
Definition at line 1366 of file vm_backtrace.c.
References NIL_P, PRIsVALUE, rb_long2int, rb_profile_frame_base_label(), rb_profile_frame_label(), rb_profile_frame_qualified_method_name(), rb_sprintf(), RSTRING_LEN, and RSTRING_PTR.
Definition at line 1288 of file vm_backtrace.c.
References frame2iseq, and rb_iseq_label().
Referenced by rb_profile_frame_full_label().
Definition at line 1339 of file vm_backtrace.c.
References frame2iseq, and rb_iseq_method_name().
Definition at line 1276 of file vm_backtrace.c.
References frame2iseq, and rb_iseq_path().
Definition at line 1345 of file vm_backtrace.c.
References classpath, frame2iseq, method_name(), PRIsVALUE, Qnil, Qtrue, rb_iseq_method_name(), rb_profile_frame_classpath(), rb_profile_frame_singleton_method_p(), and rb_sprintf().
Referenced by rb_profile_frame_full_label().
Definition at line 1327 of file vm_backtrace.c.
References FL_SINGLETON, FL_TEST, frame2iseq, NIL_P, Qfalse, Qtrue, and rb_iseq_klass().
Referenced by rb_profile_frame_qualified_method_name().
RUBY_SYMBOL_EXPORT_BEGIN int rb_profile_frames | ( | int | start, |
int | limit, | ||
VALUE * | buff, | ||
int * | lines | ||
) |
Definition at line 1249 of file vm_backtrace.c.
References calc_lineno(), rb_thread_struct::cfp, GET_THREAD(), rb_control_frame_struct::iseq, rb_control_frame_struct::pc, RUBY_VM_END_CONTROL_FRAME, RUBY_VM_PREVIOUS_CONTROL_FRAME, and rb_iseq_struct::self.
int rb_remove_event_hook | ( | rb_event_hook_func_t | func | ) |
Definition at line 204 of file vm_trace.c.
Referenced by rb_reset_coverages().
int rb_remove_event_hook_with_data | ( | rb_event_hook_func_t | func, |
VALUE | data | ||
) |
Definition at line 210 of file vm_trace.c.
References rb_event_hook_struct::data, func, GET_VM, and remove_event_hook().
Referenced by rb_tracepoint_disable().
void rb_thread_add_event_hook | ( | VALUE | thval, |
rb_event_hook_func_t | func, | ||
rb_event_flag_t | events, | ||
VALUE | data | ||
) |
Definition at line 139 of file vm_trace.c.
References rb_event_hook_struct::data, rb_event_hook_struct::events, func, rb_threadptr_add_event_hook(), RUBY_EVENT_HOOK_FLAG_SAFE, and thval2thread_t().
void rb_thread_add_event_hook2 | ( | VALUE | thval, |
rb_event_hook_func_t | func, | ||
rb_event_flag_t | events, | ||
VALUE | data, | ||
rb_event_hook_flag_t | hook_flag | ||
) |
Definition at line 152 of file vm_trace.c.
References rb_event_hook_struct::data, rb_event_hook_struct::events, func, rb_event_hook_struct::hook_flags, rb_threadptr_add_event_hook(), and thval2thread_t().
Referenced by rb_tracepoint_enable().
int rb_thread_remove_event_hook | ( | VALUE | thval, |
rb_event_hook_func_t | func | ||
) |
Definition at line 192 of file vm_trace.c.
References func, Qundef, rb_threadptr_remove_event_hook(), and thval2thread_t().
int rb_thread_remove_event_hook_with_data | ( | VALUE | thval, |
rb_event_hook_func_t | func, | ||
VALUE | data | ||
) |
Definition at line 198 of file vm_trace.c.
References rb_event_hook_struct::data, func, rb_threadptr_remove_event_hook(), and thval2thread_t().
Referenced by rb_tracepoint_disable().
VALUE rb_tracearg_binding | ( | rb_trace_arg_t * | trace_arg | ) |
Definition at line 814 of file vm_trace.c.
References rb_trace_arg_struct::cfp, Qnil, rb_binding_new_with_cfp(), rb_vm_get_binding_creatable_next_cfp(), and rb_trace_arg_struct::th.
Referenced by tracepoint_attr_binding().
VALUE rb_tracearg_defined_class | ( | rb_trace_arg_t * | trace_arg | ) |
Definition at line 807 of file vm_trace.c.
References fill_id_and_klass(), and rb_trace_arg_struct::klass.
Referenced by newobj_i(), and tracepoint_attr_defined_class().
VALUE rb_tracearg_event | ( | rb_trace_arg_t * | trace_arg | ) |
Definition at line 743 of file vm_trace.c.
References rb_trace_arg_struct::event, get_event_id(), and ID2SYM.
Referenced by tracepoint_attr_event(), and tracepoint_inspect().
rb_event_flag_t rb_tracearg_event_flag | ( | rb_trace_arg_t * | trace_arg | ) |
Definition at line 737 of file vm_trace.c.
References rb_trace_arg_struct::event.
rb_trace_arg_t* rb_tracearg_from_tracepoint | ( | VALUE | tpval | ) |
Definition at line 731 of file vm_trace.c.
References get_trace_arg().
Referenced by freeobj_i(), and newobj_i().
VALUE rb_tracearg_lineno | ( | rb_trace_arg_t * | trace_arg | ) |
Definition at line 766 of file vm_trace.c.
References fill_path_and_lineno(), INT2FIX, and rb_trace_arg_struct::lineno.
Referenced by newobj_i(), tracepoint_attr_lineno(), and tracepoint_inspect().
VALUE rb_tracearg_method_id | ( | rb_trace_arg_t * | trace_arg | ) |
Definition at line 800 of file vm_trace.c.
References fill_id_and_klass(), rb_trace_arg_struct::id, ID2SYM, and Qnil.
Referenced by newobj_i(), tracepoint_attr_method_id(), and tracepoint_inspect().
VALUE rb_tracearg_object | ( | rb_trace_arg_t * | trace_arg | ) |
Definition at line 864 of file vm_trace.c.
References rb_trace_arg_struct::data, rb_trace_arg_struct::event, Qundef, rb_bug(), rb_eRuntimeError, rb_raise(), RUBY_INTERNAL_EVENT_FREEOBJ, and RUBY_INTERNAL_EVENT_NEWOBJ.
Referenced by freeobj_i(), and newobj_i().
VALUE rb_tracearg_path | ( | rb_trace_arg_t * | trace_arg | ) |
Definition at line 772 of file vm_trace.c.
References fill_path_and_lineno(), and rb_trace_arg_struct::path.
Referenced by newobj_i(), tracepoint_attr_path(), and tracepoint_inspect().
VALUE rb_tracearg_raised_exception | ( | rb_trace_arg_t * | trace_arg | ) |
Definition at line 849 of file vm_trace.c.
References rb_trace_arg_struct::data, rb_trace_arg_struct::event, Qundef, rb_bug(), rb_eRuntimeError, rb_raise(), and RUBY_EVENT_RAISE.
Referenced by tracepoint_attr_raised_exception().
VALUE rb_tracearg_return_value | ( | rb_trace_arg_t * | trace_arg | ) |
Definition at line 834 of file vm_trace.c.
References rb_trace_arg_struct::data, rb_trace_arg_struct::event, Qundef, rb_bug(), rb_eRuntimeError, rb_raise(), RUBY_EVENT_B_RETURN, RUBY_EVENT_C_RETURN, and RUBY_EVENT_RETURN.
Referenced by tracepoint_attr_return_value().
VALUE rb_tracearg_self | ( | rb_trace_arg_t * | trace_arg | ) |
Definition at line 828 of file vm_trace.c.
References rb_trace_arg_struct::self.
Referenced by tracepoint_attr_self(), and tracepoint_inspect().
Definition at line 1028 of file vm_trace.c.
References Qundef, rb_remove_event_hook_with_data(), rb_thread_remove_event_hook_with_data(), rb_thread_struct::self, rb_tp_struct::target_th, tp_call_trace(), tpptr(), and rb_tp_struct::tracing.
Referenced by trace_object_allocations_stop(), tracepoint_disable_m(), and tracepoint_enable_m().
Definition at line 1009 of file vm_trace.c.
References rb_tp_struct::events, Qundef, rb_add_event_hook2(), rb_thread_add_event_hook2(), RUBY_EVENT_HOOK_FLAG_RAW_ARG, RUBY_EVENT_HOOK_FLAG_SAFE, rb_thread_struct::self, rb_tp_struct::target_th, tp_call_trace(), tpptr(), and rb_tp_struct::tracing.
Referenced by trace_object_allocations_start(), tracepoint_disable_m(), tracepoint_enable_m(), and tracepoint_trace_s().
Definition at line 1156 of file vm_trace.c.
References Qfalse, Qtrue, tpptr(), and rb_tp_struct::tracing.
Referenced by Init_vm_trace().
VALUE rb_tracepoint_new | ( | VALUE | target_thread_not_supported_yet, |
rb_event_flag_t | events, | ||
void(*)(VALUE, void *) | func, | ||
void * | data | ||
) |
Definition at line 1179 of file vm_trace.c.
References rb_trace_arg_struct::data, func, GetThreadPtr, Qundef, rb_cTracePoint, RTEST, and tracepoint_new().
Referenced by trace_object_allocations_start().