Ruby  2.1.10p492(2016-04-01revision54464)
Data Structures | Macros | Typedefs | Enumerations | Functions | Variables
vm_trace.c File Reference
#include "ruby/ruby.h"
#include "ruby/debug.h"
#include "ruby/encoding.h"
#include "internal.h"
#include "vm_core.h"
#include "eval_intern.h"

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 }
 

Functions

void rb_vm_trace_mark_event_hooks (rb_hook_list_t *hooks)
 
static void recalc_add_ruby_vm_event_flags (rb_event_flag_t events)
 
static void recalc_remove_ruby_vm_event_flags (rb_event_flag_t events)
 
static rb_thread_tthval2thread_t (VALUE thval)
 
static rb_event_hook_talloc_event_hook (rb_event_hook_func_t func, rb_event_flag_t events, VALUE data, rb_event_hook_flag_t hook_flags)
 
static void connect_event_hook (rb_hook_list_t *list, rb_event_hook_t *hook)
 
static void rb_threadptr_add_event_hook (rb_thread_t *th, rb_event_hook_func_t func, rb_event_flag_t events, VALUE data, rb_event_hook_flag_t hook_flags)
 
void rb_thread_add_event_hook (VALUE thval, rb_event_hook_func_t func, rb_event_flag_t events, VALUE data)
 
void rb_add_event_hook (rb_event_hook_func_t func, rb_event_flag_t events, VALUE data)
 
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)
 
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)
 
static int remove_event_hook (rb_hook_list_t *list, rb_event_hook_func_t func, VALUE data)
 
static int rb_threadptr_remove_event_hook (rb_thread_t *th, rb_event_hook_func_t func, VALUE data)
 
int rb_thread_remove_event_hook (VALUE thval, rb_event_hook_func_t func)
 
int rb_thread_remove_event_hook_with_data (VALUE thval, rb_event_hook_func_t func, VALUE data)
 
int rb_remove_event_hook (rb_event_hook_func_t func)
 
int rb_remove_event_hook_with_data (rb_event_hook_func_t func, VALUE data)
 
static int clear_trace_func_i (st_data_t key, st_data_t val, st_data_t flag)
 
void rb_clear_trace_func (void)
 
static void clean_hooks (rb_hook_list_t *list)
 
static void exec_hooks_body (rb_thread_t *th, rb_hook_list_t *list, const rb_trace_arg_t *trace_arg)
 
static int exec_hooks_precheck (rb_thread_t *th, rb_hook_list_t *list, const rb_trace_arg_t *trace_arg)
 
static void exec_hooks_unprotected (rb_thread_t *th, rb_hook_list_t *list, const rb_trace_arg_t *trace_arg)
 
static int exec_hooks_protected (rb_thread_t *th, rb_hook_list_t *list, const rb_trace_arg_t *trace_arg)
 
static void rb_threadptr_exec_event_hooks_orig (rb_trace_arg_t *trace_arg, int pop_p)
 
void rb_threadptr_exec_event_hooks_and_pop_frame (rb_trace_arg_t *trace_arg)
 
void rb_threadptr_exec_event_hooks (rb_trace_arg_t *trace_arg)
 
VALUE rb_suppress_tracing (VALUE(*func)(VALUE), VALUE arg)
 
static void call_trace_func (rb_event_flag_t, VALUE data, VALUE self, ID id, VALUE klass)
 
static VALUE set_trace_func (VALUE obj, VALUE trace)
 
static void thread_add_trace_func (rb_thread_t *th, VALUE trace)
 
static VALUE thread_add_trace_func_m (VALUE obj, VALUE trace)
 
static VALUE thread_set_trace_func_m (VALUE obj, VALUE trace)
 
static const char * get_event_name (rb_event_flag_t event)
 
static ID get_event_id (rb_event_flag_t event)
 
static void tp_mark (void *ptr)
 
static size_t tp_memsize (const void *ptr)
 
static VALUE tp_alloc (VALUE klass)
 
static rb_event_flag_t symbol2event_flag (VALUE v)
 
static rb_tp_ttpptr (VALUE tpval)
 
static rb_trace_arg_tget_trace_arg (void)
 
struct rb_trace_arg_structrb_tracearg_from_tracepoint (VALUE tpval)
 
rb_event_flag_t rb_tracearg_event_flag (rb_trace_arg_t *trace_arg)
 
VALUE rb_tracearg_event (rb_trace_arg_t *trace_arg)
 
static void fill_path_and_lineno (rb_trace_arg_t *trace_arg)
 
VALUE rb_tracearg_lineno (rb_trace_arg_t *trace_arg)
 
VALUE rb_tracearg_path (rb_trace_arg_t *trace_arg)
 
static void fill_id_and_klass (rb_trace_arg_t *trace_arg)
 
VALUE rb_tracearg_method_id (rb_trace_arg_t *trace_arg)
 
VALUE rb_tracearg_defined_class (rb_trace_arg_t *trace_arg)
 
VALUE rb_tracearg_binding (rb_trace_arg_t *trace_arg)
 
VALUE rb_tracearg_self (rb_trace_arg_t *trace_arg)
 
VALUE rb_tracearg_return_value (rb_trace_arg_t *trace_arg)
 
VALUE rb_tracearg_raised_exception (rb_trace_arg_t *trace_arg)
 
VALUE rb_tracearg_object (rb_trace_arg_t *trace_arg)
 
static VALUE tracepoint_attr_event (VALUE tpval)
 
static VALUE tracepoint_attr_lineno (VALUE tpval)
 
static VALUE tracepoint_attr_path (VALUE tpval)
 
static VALUE tracepoint_attr_method_id (VALUE tpval)
 
static VALUE tracepoint_attr_defined_class (VALUE tpval)
 
static VALUE tracepoint_attr_binding (VALUE tpval)
 
static VALUE tracepoint_attr_self (VALUE tpval)
 
static VALUE tracepoint_attr_return_value (VALUE tpval)
 
static VALUE tracepoint_attr_raised_exception (VALUE tpval)
 
static void tp_call_trace (VALUE tpval, rb_trace_arg_t *trace_arg)
 
VALUE rb_tracepoint_enable (VALUE tpval)
 
VALUE rb_tracepoint_disable (VALUE tpval)
 
static VALUE tracepoint_enable_m (VALUE tpval)
 
static VALUE tracepoint_disable_m (VALUE tpval)
 
VALUE rb_tracepoint_enabled_p (VALUE tpval)
 
static VALUE tracepoint_new (VALUE klass, rb_thread_t *target_th, rb_event_flag_t events, void(func)(VALUE, void *), void *data, VALUE proc)
 
VALUE rb_tracepoint_new (VALUE target_thval, rb_event_flag_t events, void(*func)(VALUE, void *), void *data)
 
static VALUE tracepoint_new_s (int argc, VALUE *argv, VALUE self)
 
static VALUE tracepoint_trace_s (int argc, VALUE *argv, VALUE self)
 
static VALUE tracepoint_inspect (VALUE self)
 
static void Init_postponed_job (void)
 
void Init_vm_trace (void)
 
static enum postponed_job_register_result postponed_job_register (rb_thread_t *th, rb_vm_t *vm, unsigned int flags, rb_postponed_job_func_t func, void *data, int max, int expected_index)
 
int rb_postponed_job_register (unsigned int flags, rb_postponed_job_func_t func, void *data)
 
int rb_postponed_job_register_one (unsigned int flags, rb_postponed_job_func_t func, void *data)
 
void rb_postponed_job_flush (rb_vm_t *vm)
 

Variables

static int ruby_event_flag_count [MAX_EVENT_NUM] = {0}
 
static VALUE rb_cTracePoint
 
static const rb_data_type_t tp_data_type
 

Macro Definition Documentation

◆ C [1/2]

#define C (   name,
  NAME 
)    case RUBY_EVENT_##NAME: CONST_ID(id, #name); return id;

Referenced by get_event_id(), and symbol2event_flag().

◆ C [2/2]

#define C (   name,
  NAME 
)    CONST_ID(id, #name); if (sym == ID2SYM(id)) return RUBY_EVENT_##NAME

◆ MAX_EVENT_NUM

#define MAX_EVENT_NUM   32

Definition at line 44 of file vm_trace.c.

Referenced by recalc_add_ruby_vm_event_flags(), and recalc_remove_ruby_vm_event_flags().

◆ MAX_POSTPONED_JOB

#define MAX_POSTPONED_JOB   1000

◆ MAX_POSTPONED_JOB_SPECIAL_ADDITION

#define MAX_POSTPONED_JOB_SPECIAL_ADDITION   24

Definition at line 1429 of file vm_trace.c.

Referenced by rb_postponed_job_register_one().

Typedef Documentation

◆ rb_event_hook_raw_arg_func_t

typedef void(* rb_event_hook_raw_arg_func_t) (VALUE data, const rb_trace_arg_t *arg)

Definition at line 42 of file vm_trace.c.

◆ rb_event_hook_t

◆ rb_postponed_job_t

◆ rb_tp_t

typedef struct rb_tp_struct rb_tp_t

Enumeration Type Documentation

◆ postponed_job_register_result

Enumerator
PJRR_SUCESS 
PJRR_FULL 
PJRR_INTERRUPTED 

Definition at line 1439 of file vm_trace.c.

Function Documentation

◆ alloc_event_hook()

static rb_event_hook_t* alloc_event_hook ( rb_event_hook_func_t  func,
rb_event_flag_t  events,
VALUE  data,
rb_event_hook_flag_t  hook_flags 
)
static

◆ call_trace_func()

static void call_trace_func ( rb_event_flag_t  event,
VALUE  data,
VALUE  self,
ID  id,
VALUE  klass 
)
static

◆ clean_hooks()

static void clean_hooks ( rb_hook_list_t list)
static

◆ clear_trace_func_i()

static int clear_trace_func_i ( st_data_t  key,
st_data_t  val,
st_data_t  flag 
)
static

Definition at line 216 of file vm_trace.c.

References GetThreadPtr, key, Qundef, rb_threadptr_remove_event_hook(), and ST_CONTINUE.

Referenced by rb_clear_trace_func().

◆ connect_event_hook()

static void connect_event_hook ( rb_hook_list_t list,
rb_event_hook_t hook 
)
static

◆ exec_hooks_body()

static void exec_hooks_body ( rb_thread_t th,
rb_hook_list_t list,
const rb_trace_arg_t trace_arg 
)
static

◆ exec_hooks_precheck()

static int exec_hooks_precheck ( rb_thread_t th,
rb_hook_list_t list,
const rb_trace_arg_t trace_arg 
)
static

◆ exec_hooks_protected()

static int exec_hooks_protected ( rb_thread_t th,
rb_hook_list_t list,
const rb_trace_arg_t trace_arg 
)
static

◆ exec_hooks_unprotected()

static void exec_hooks_unprotected ( rb_thread_t th,
rb_hook_list_t list,
const rb_trace_arg_t trace_arg 
)
static

Definition at line 285 of file vm_trace.c.

References exec_hooks_body(), exec_hooks_precheck(), and list.

Referenced by rb_threadptr_exec_event_hooks_orig().

◆ fill_id_and_klass()

static void fill_id_and_klass ( rb_trace_arg_t trace_arg)
static

◆ fill_path_and_lineno()

static void fill_path_and_lineno ( rb_trace_arg_t trace_arg)
static

◆ get_event_id()

static ID get_event_id ( rb_event_flag_t  event)
static

Definition at line 584 of file vm_trace.c.

References C, CALL, CONST_ID, END, id, RETURN, RUBY_EVENT_LINE, and RUBY_EVENT_SPECIFIED_LINE.

Referenced by rb_tracearg_event().

◆ get_event_name()

static const char* get_event_name ( rb_event_flag_t  event)
static

◆ get_trace_arg()

static rb_trace_arg_t* get_trace_arg ( void  )
static

◆ Init_postponed_job()

static void Init_postponed_job ( void  )
static

◆ Init_vm_trace()

void Init_vm_trace ( void  )

◆ postponed_job_register()

static enum postponed_job_register_result postponed_job_register ( rb_thread_t th,
rb_vm_t vm,
unsigned int  flags,
rb_postponed_job_func_t  func,
void *  data,
int  max,
int  expected_index 
)
static

◆ rb_add_event_hook()

void rb_add_event_hook ( rb_event_hook_func_t  func,
rb_event_flag_t  events,
VALUE  data 
)

◆ rb_add_event_hook2()

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 
)

◆ rb_clear_trace_func()

void rb_clear_trace_func ( void  )

Definition at line 225 of file vm_trace.c.

References clear_trace_func_i(), GET_VM, rb_remove_event_hook(), st_data_t, and st_foreach().

Referenced by ruby_finalize_0(), and ruby_options().

◆ rb_postponed_job_flush()

void rb_postponed_job_flush ( rb_vm_t vm)

◆ rb_postponed_job_register()

int rb_postponed_job_register ( unsigned int  flags,
rb_postponed_job_func_t  func,
void *  data 
)

◆ rb_postponed_job_register_one()

int rb_postponed_job_register_one ( unsigned int  flags,
rb_postponed_job_func_t  func,
void *  data 
)

◆ rb_remove_event_hook()

int rb_remove_event_hook ( rb_event_hook_func_t  func)

Definition at line 204 of file vm_trace.c.

References func, GET_VM, Qundef, and remove_event_hook().

Referenced by rb_clear_trace_func(), rb_reset_coverages(), and set_trace_func().

◆ rb_remove_event_hook_with_data()

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().

◆ rb_suppress_tracing()

VALUE rb_suppress_tracing ( VALUE(*)(VALUE func,
VALUE  arg 
)

◆ rb_thread_add_event_hook()

void rb_thread_add_event_hook ( VALUE  thval,
rb_event_hook_func_t  func,
rb_event_flag_t  events,
VALUE  data 
)

◆ rb_thread_add_event_hook2()

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 
)

◆ rb_thread_remove_event_hook()

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().

◆ rb_thread_remove_event_hook_with_data()

int rb_thread_remove_event_hook_with_data ( VALUE  thval,
rb_event_hook_func_t  func,
VALUE  data 
)

◆ rb_threadptr_add_event_hook()

static void rb_threadptr_add_event_hook ( rb_thread_t th,
rb_event_hook_func_t  func,
rb_event_flag_t  events,
VALUE  data,
rb_event_hook_flag_t  hook_flags 
)
static

◆ rb_threadptr_exec_event_hooks()

void rb_threadptr_exec_event_hooks ( rb_trace_arg_t trace_arg)

Definition at line 384 of file vm_trace.c.

References rb_threadptr_exec_event_hooks_orig().

◆ rb_threadptr_exec_event_hooks_and_pop_frame()

void rb_threadptr_exec_event_hooks_and_pop_frame ( rb_trace_arg_t trace_arg)

Definition at line 378 of file vm_trace.c.

References rb_threadptr_exec_event_hooks_orig().

◆ rb_threadptr_exec_event_hooks_orig()

static void rb_threadptr_exec_event_hooks_orig ( rb_trace_arg_t trace_arg,
int  pop_p 
)
static

◆ rb_threadptr_remove_event_hook()

static int rb_threadptr_remove_event_hook ( rb_thread_t th,
rb_event_hook_func_t  func,
VALUE  data 
)
static

◆ rb_tracearg_binding()

VALUE rb_tracearg_binding ( rb_trace_arg_t trace_arg)

◆ rb_tracearg_defined_class()

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().

◆ rb_tracearg_event()

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_tracearg_event_flag()

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_tracearg_from_tracepoint()

struct rb_trace_arg_struct* 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().

◆ rb_tracearg_lineno()

VALUE rb_tracearg_lineno ( rb_trace_arg_t trace_arg)

◆ rb_tracearg_method_id()

VALUE rb_tracearg_method_id ( rb_trace_arg_t trace_arg)

◆ rb_tracearg_object()

VALUE rb_tracearg_object ( rb_trace_arg_t trace_arg)

◆ rb_tracearg_path()

VALUE rb_tracearg_path ( rb_trace_arg_t trace_arg)

◆ rb_tracearg_raised_exception()

VALUE rb_tracearg_raised_exception ( rb_trace_arg_t trace_arg)

◆ rb_tracearg_return_value()

VALUE rb_tracearg_return_value ( rb_trace_arg_t trace_arg)

◆ rb_tracearg_self()

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().

◆ rb_tracepoint_disable()

VALUE rb_tracepoint_disable ( VALUE  tpval)

◆ rb_tracepoint_enable()

VALUE rb_tracepoint_enable ( VALUE  tpval)

◆ rb_tracepoint_enabled_p()

VALUE rb_tracepoint_enabled_p ( VALUE  tpval)

Definition at line 1156 of file vm_trace.c.

References Qfalse, Qtrue, tpptr(), and rb_tp_struct::tracing.

Referenced by Init_vm_trace().

◆ rb_tracepoint_new()

VALUE rb_tracepoint_new ( VALUE  target_thval,
rb_event_flag_t  events,
void(*)(VALUE, void *)  func,
void *  data 
)

◆ rb_vm_trace_mark_event_hooks()

void rb_vm_trace_mark_event_hooks ( rb_hook_list_t hooks)

◆ recalc_add_ruby_vm_event_flags()

static void recalc_add_ruby_vm_event_flags ( rb_event_flag_t  events)
static

◆ recalc_remove_ruby_vm_event_flags()

static void recalc_remove_ruby_vm_event_flags ( rb_event_flag_t  events)
static

◆ remove_event_hook()

static int remove_event_hook ( rb_hook_list_t list,
rb_event_hook_func_t  func,
VALUE  data 
)
static

◆ set_trace_func()

static VALUE set_trace_func ( VALUE  obj,
VALUE  trace 
)
static

◆ symbol2event_flag()

static rb_event_flag_t symbol2event_flag ( VALUE  v)
static

◆ thread_add_trace_func()

static void thread_add_trace_func ( rb_thread_t th,
VALUE  trace 
)
static

◆ thread_add_trace_func_m()

static VALUE thread_add_trace_func_m ( VALUE  obj,
VALUE  trace 
)
static

Definition at line 530 of file vm_trace.c.

References GetThreadPtr, and thread_add_trace_func().

Referenced by Init_vm_trace().

◆ thread_set_trace_func_m()

static VALUE thread_set_trace_func_m ( VALUE  obj,
VALUE  trace 
)
static

◆ thval2thread_t()

static rb_thread_t* thval2thread_t ( VALUE  thval)
static

◆ tp_alloc()

static VALUE tp_alloc ( VALUE  klass)
static

Definition at line 680 of file vm_trace.c.

References tp_data_type, and TypedData_Make_Struct.

Referenced by tracepoint_new().

◆ tp_call_trace()

static void tp_call_trace ( VALUE  tpval,
rb_trace_arg_t trace_arg 
)
static

◆ tp_mark()

static void tp_mark ( void *  ptr)
static

◆ tp_memsize()

static size_t tp_memsize ( const void *  ptr)
static

Definition at line 668 of file vm_trace.c.

◆ tpptr()

static rb_tp_t* tpptr ( VALUE  tpval)
static

◆ tracepoint_attr_binding()

static VALUE tracepoint_attr_binding ( VALUE  tpval)
static

Definition at line 960 of file vm_trace.c.

References get_trace_arg(), and rb_tracearg_binding().

Referenced by Init_vm_trace().

◆ tracepoint_attr_defined_class()

static VALUE tracepoint_attr_defined_class ( VALUE  tpval)
static

Definition at line 951 of file vm_trace.c.

References get_trace_arg(), and rb_tracearg_defined_class().

Referenced by Init_vm_trace().

◆ tracepoint_attr_event()

static VALUE tracepoint_attr_event ( VALUE  tpval)
static

Definition at line 884 of file vm_trace.c.

References get_trace_arg(), and rb_tracearg_event().

Referenced by Init_vm_trace().

◆ tracepoint_attr_lineno()

static VALUE tracepoint_attr_lineno ( VALUE  tpval)
static

Definition at line 893 of file vm_trace.c.

References get_trace_arg(), and rb_tracearg_lineno().

Referenced by Init_vm_trace().

◆ tracepoint_attr_method_id()

static VALUE tracepoint_attr_method_id ( VALUE  tpval)
static

Definition at line 911 of file vm_trace.c.

References get_trace_arg(), and rb_tracearg_method_id().

Referenced by Init_vm_trace().

◆ tracepoint_attr_path()

static VALUE tracepoint_attr_path ( VALUE  tpval)
static

Definition at line 902 of file vm_trace.c.

References get_trace_arg(), and rb_tracearg_path().

Referenced by Init_vm_trace().

◆ tracepoint_attr_raised_exception()

static VALUE tracepoint_attr_raised_exception ( VALUE  tpval)
static

Definition at line 990 of file vm_trace.c.

References get_trace_arg(), and rb_tracearg_raised_exception().

Referenced by Init_vm_trace().

◆ tracepoint_attr_return_value()

static VALUE tracepoint_attr_return_value ( VALUE  tpval)
static

Definition at line 981 of file vm_trace.c.

References get_trace_arg(), and rb_tracearg_return_value().

Referenced by Init_vm_trace().

◆ tracepoint_attr_self()

static VALUE tracepoint_attr_self ( VALUE  tpval)
static

Definition at line 972 of file vm_trace.c.

References get_trace_arg(), and rb_tracearg_self().

Referenced by Init_vm_trace().

◆ tracepoint_disable_m()

static VALUE tracepoint_disable_m ( VALUE  tpval)
static

◆ tracepoint_enable_m()

static VALUE tracepoint_enable_m ( VALUE  tpval)
static

◆ tracepoint_inspect()

static VALUE tracepoint_inspect ( VALUE  self)
static

◆ tracepoint_new()

static VALUE tracepoint_new ( VALUE  klass,
rb_thread_t target_th,
rb_event_flag_t  events,
void(func)(VALUE, void *)  ,
void *  data,
VALUE  proc 
)
static

◆ tracepoint_new_s()

static VALUE tracepoint_new_s ( int  argc,
VALUE argv,
VALUE  self 
)
static

◆ tracepoint_trace_s()

static VALUE tracepoint_trace_s ( int  argc,
VALUE argv,
VALUE  self 
)
static

Definition at line 1261 of file vm_trace.c.

References argc, argv, rb_tracepoint_enable(), and tracepoint_new_s().

Referenced by Init_vm_trace().

Variable Documentation

◆ rb_cTracePoint

VALUE rb_cTracePoint
static

Definition at line 645 of file vm_trace.c.

Referenced by Init_vm_trace(), and rb_tracepoint_new().

◆ ruby_event_flag_count

int ruby_event_flag_count[MAX_EVENT_NUM] = {0}
static

Definition at line 46 of file vm_trace.c.

Referenced by recalc_add_ruby_vm_event_flags(), and recalc_remove_ruby_vm_event_flags().

◆ tp_data_type

const rb_data_type_t tp_data_type
static
Initial value:
= {
"tracepoint",
}
#define RUBY_TYPED_FREE_IMMEDIATELY
Definition: ruby.h:1015
static size_t tp_memsize(const void *ptr)
Definition: vm_trace.c:668
#define RUBY_TYPED_NEVER_FREE
Definition: ruby.h:1012
static void tp_mark(void *ptr)
Definition: vm_trace.c:658
#define NULL
Definition: _sdbm.c:102

Definition at line 673 of file vm_trace.c.

Referenced by tp_alloc(), tpptr(), and tracepoint_new().