Ruby
2.5.0dev(2017-10-22revision60238)
|
Go to the source code of this file.
Data Structures | |
struct | rb_event_hook_struct |
struct | rb_tp_struct |
struct | rb_postponed_job_struct |
Macros | |
#define | MAX_EVENT_NUM 32 |
#define | C(name, NAME) case RUBY_EVENT_##NAME: CONST_ID(id, #name); return id; |
#define | C(name, NAME) CONST_ID(id, #name); if (sym == ID2SYM(id)) return RUBY_EVENT_##NAME |
#define | MAX_POSTPONED_JOB 1000 |
#define | MAX_POSTPONED_JOB_SPECIAL_ADDITION 24 |
Typedefs | |
typedef struct rb_event_hook_struct | rb_event_hook_t |
typedef void(* | rb_event_hook_raw_arg_func_t) (VALUE data, const rb_trace_arg_t *arg) |
typedef struct rb_tp_struct | rb_tp_t |
typedef struct rb_postponed_job_struct | rb_postponed_job_t |
Enumerations | |
enum | postponed_job_register_result { PJRR_SUCESS = 0, PJRR_FULL = 1, PJRR_INTERRUPTED = 2 } |
#define MAX_EVENT_NUM 32 |
Definition at line 42 of file vm_trace.c.
#define MAX_POSTPONED_JOB 1000 |
Definition at line 1506 of file vm_trace.c.
#define MAX_POSTPONED_JOB_SPECIAL_ADDITION 24 |
Definition at line 1507 of file vm_trace.c.
typedef void(* rb_event_hook_raw_arg_func_t) (VALUE data, const rb_trace_arg_t *arg) |
Definition at line 40 of file vm_trace.c.
typedef struct rb_event_hook_struct rb_event_hook_t |
typedef struct rb_postponed_job_struct rb_postponed_job_t |
typedef struct rb_tp_struct rb_tp_t |
Enumerator | |
---|---|
PJRR_SUCESS | |
PJRR_FULL | |
PJRR_INTERRUPTED |
Definition at line 1517 of file vm_trace.c.
void Init_vm_trace | ( | void | ) |
Definition at line 1402 of file vm_trace.c.
References rb_define_global_function().
void rb_add_event_hook | ( | rb_event_hook_func_t | func, |
rb_event_flag_t | events, | ||
VALUE | data | ||
) |
Definition at line 135 of file vm_trace.c.
void rb_add_event_hook2 | ( | rb_event_hook_func_t | func, |
rb_event_flag_t | events, | ||
VALUE | data, | ||
rb_event_hook_flag_t | hook_flags | ||
) |
Definition at line 148 of file vm_trace.c.
Referenced by rb_set_coverages().
void rb_clear_trace_func | ( | void | ) |
Definition at line 206 of file vm_trace.c.
References GET_VM, and rb_vm_struct::living_threads.
Referenced by ruby_options().
void rb_postponed_job_flush | ( | rb_vm_t * | vm | ) |
Definition at line 1592 of file vm_trace.c.
References ATOMIC_CAS, rb_postponed_job_struct::data, rb_thread_struct::ec, rb_execution_context_struct::errinfo, EXEC_TAG, rb_postponed_job_struct::func, GET_THREAD, rb_thread_struct::interrupt_mask, rb_vm_struct::postponed_job_buffer, rb_vm_struct::postponed_job_index, POSTPONED_JOB_INTERRUPT_MASK, Qnil, TAG_NONE, TH_POP_TAG, TH_PUSH_TAG, and TRAP_INTERRUPT_MASK.
int rb_postponed_job_register | ( | unsigned int | flags, |
rb_postponed_job_func_t | func, | ||
void * | data | ||
) |
Definition at line 1551 of file vm_trace.c.
References GET_THREAD, 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 1567 of file vm_trace.c.
References rb_postponed_job_struct::func, GET_THREAD, rb_vm_struct::postponed_job_buffer, rb_vm_struct::postponed_job_index, RUBY_VM_SET_POSTPONED_JOB_INTERRUPT, and rb_thread_struct::vm.
int rb_remove_event_hook | ( | rb_event_hook_func_t | func | ) |
Definition at line 194 of file vm_trace.c.
int rb_remove_event_hook_with_data | ( | rb_event_hook_func_t | func, |
VALUE | data | ||
) |
Definition at line 200 of file vm_trace.c.
Definition at line 376 of file vm_trace.c.
void rb_thread_add_event_hook | ( | VALUE | thval, |
rb_event_hook_func_t | func, | ||
rb_event_flag_t | events, | ||
VALUE | data | ||
) |
Definition at line 129 of file vm_trace.c.
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_flags | ||
) |
Definition at line 142 of file vm_trace.c.
int rb_thread_remove_event_hook | ( | VALUE | thval, |
rb_event_hook_func_t | func | ||
) |
Definition at line 182 of file vm_trace.c.
int rb_thread_remove_event_hook_with_data | ( | VALUE | thval, |
rb_event_hook_func_t | func, | ||
VALUE | data | ||
) |
Definition at line 188 of file vm_trace.c.
void rb_threadptr_exec_event_hooks | ( | rb_trace_arg_t * | trace_arg | ) |
Definition at line 370 of file vm_trace.c.
void rb_threadptr_exec_event_hooks_and_pop_frame | ( | rb_trace_arg_t * | trace_arg | ) |
Definition at line 364 of file vm_trace.c.
VALUE rb_tracearg_binding | ( | rb_trace_arg_t * | trace_arg | ) |
Definition at line 807 of file vm_trace.c.
References rb_trace_arg_struct::cfp, Qnil, rb_vm_get_binding_creatable_next_cfp(), rb_vm_make_binding(), and rb_trace_arg_struct::th.
VALUE rb_tracearg_callee_id | ( | rb_trace_arg_t * | trace_arg | ) |
Definition at line 793 of file vm_trace.c.
VALUE rb_tracearg_defined_class | ( | rb_trace_arg_t * | trace_arg | ) |
Definition at line 800 of file vm_trace.c.
VALUE rb_tracearg_event | ( | rb_trace_arg_t * | trace_arg | ) |
Definition at line 729 of file vm_trace.c.
References ID2SYM.
rb_event_flag_t rb_tracearg_event_flag | ( | rb_trace_arg_t * | trace_arg | ) |
Definition at line 723 of file vm_trace.c.
References rb_trace_arg_struct::event.
struct rb_trace_arg_struct* rb_tracearg_from_tracepoint | ( | VALUE | tpval | ) |
Definition at line 717 of file vm_trace.c.
VALUE rb_tracearg_lineno | ( | rb_trace_arg_t * | trace_arg | ) |
Definition at line 752 of file vm_trace.c.
VALUE rb_tracearg_method_id | ( | rb_trace_arg_t * | trace_arg | ) |
Definition at line 786 of file vm_trace.c.
VALUE rb_tracearg_object | ( | rb_trace_arg_t * | trace_arg | ) |
Definition at line 857 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.
VALUE rb_tracearg_path | ( | rb_trace_arg_t * | trace_arg | ) |
Definition at line 758 of file vm_trace.c.
VALUE rb_tracearg_raised_exception | ( | rb_trace_arg_t * | trace_arg | ) |
Definition at line 842 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.
VALUE rb_tracearg_return_value | ( | rb_trace_arg_t * | trace_arg | ) |
Definition at line 827 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.
VALUE rb_tracearg_self | ( | rb_trace_arg_t * | trace_arg | ) |
Definition at line 821 of file vm_trace.c.
References rb_trace_arg_struct::self.
Definition at line 1030 of file vm_trace.c.
Definition at line 1011 of file vm_trace.c.
Definition at line 1158 of file vm_trace.c.
VALUE rb_tracepoint_new | ( | VALUE | target_thval, |
rb_event_flag_t | events, | ||
void(*)(VALUE, void *) | func, | ||
void * | data | ||
) |
Definition at line 1211 of file vm_trace.c.
void rb_vm_trace_mark_event_hooks | ( | rb_hook_list_t * | hooks | ) |
Definition at line 49 of file vm_trace.c.
References rb_event_hook_struct::data, rb_hook_list_struct::hooks, rb_event_hook_struct::next, and rb_gc_mark().
Referenced by rb_thread_mark(), and rb_vm_mark().