Ruby  2.4.2p198(2017-09-14revision59899)
Data Structures | Macros | Functions
probes_helper.h File Reference
#include "ruby/ruby.h"
#include "probes.h"
Include dependency graph for probes_helper.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  ruby_dtrace_method_hook_args
 

Macros

#define RUBY_DTRACE_METHOD_HOOK(name, th, klazz, id)
 
#define RUBY_DTRACE_METHOD_ENTRY_HOOK(th, klass, id)   RUBY_DTRACE_METHOD_HOOK(METHOD_ENTRY, th, klass, id)
 
#define RUBY_DTRACE_METHOD_RETURN_HOOK(th, klass, id)   RUBY_DTRACE_METHOD_HOOK(METHOD_RETURN, th, klass, id)
 
#define RUBY_DTRACE_CMETHOD_ENTRY_HOOK(th, klass, id)   RUBY_DTRACE_METHOD_HOOK(CMETHOD_ENTRY, th, klass, id)
 
#define RUBY_DTRACE_CMETHOD_RETURN_HOOK(th, klass, id)   RUBY_DTRACE_METHOD_HOOK(CMETHOD_RETURN, th, klass, id)
 

Functions

 NOINLINE (int ruby_th_dtrace_setup(rb_thread_t *, VALUE, ID, struct ruby_dtrace_method_hook_args *))
 

Macro Definition Documentation

◆ RUBY_DTRACE_CMETHOD_ENTRY_HOOK

#define RUBY_DTRACE_CMETHOD_ENTRY_HOOK (   th,
  klass,
  id 
)    RUBY_DTRACE_METHOD_HOOK(CMETHOD_ENTRY, th, klass, id)

Definition at line 37 of file probes_helper.h.

Referenced by vm_call0(), vm_call0_cfunc_with_frame(), and vm_call_cfunc_with_frame().

◆ RUBY_DTRACE_CMETHOD_RETURN_HOOK

#define RUBY_DTRACE_CMETHOD_RETURN_HOOK (   th,
  klass,
  id 
)    RUBY_DTRACE_METHOD_HOOK(CMETHOD_RETURN, th, klass, id)

◆ RUBY_DTRACE_METHOD_ENTRY_HOOK

#define RUBY_DTRACE_METHOD_ENTRY_HOOK (   th,
  klass,
  id 
)    RUBY_DTRACE_METHOD_HOOK(METHOD_ENTRY, th, klass, id)

Definition at line 31 of file probes_helper.h.

Referenced by invoke_bmethod().

◆ RUBY_DTRACE_METHOD_HOOK

#define RUBY_DTRACE_METHOD_HOOK (   name,
  th,
  klazz,
  id 
)
Value:
do { \
if (UNLIKELY(RUBY_DTRACE_##name##_ENABLED())) { \
if (ruby_th_dtrace_setup(th, klazz, id, &args)) { \
RUBY_DTRACE_##name(args.classname, \
args.methodname, \
args.filename, \
args.line_no); \
} \
} \
} while (0)
#define UNLIKELY(x)
Definition: ffi_common.h:126
const char * name
Definition: nkf.c:208
int ruby_th_dtrace_setup(rb_thread_t *th, VALUE klass, ID id, struct ruby_dtrace_method_hook_args *args)
Definition: vm.c:331

Definition at line 18 of file probes_helper.h.

◆ RUBY_DTRACE_METHOD_RETURN_HOOK

#define RUBY_DTRACE_METHOD_RETURN_HOOK (   th,
  klass,
  id 
)    RUBY_DTRACE_METHOD_HOOK(METHOD_RETURN, th, klass, id)

Definition at line 34 of file probes_helper.h.

Referenced by hook_before_rewind(), and invoke_bmethod().

Function Documentation

◆ NOINLINE()

NOINLINE ( int   ruby_th_dtrace_setuprb_thread_t *, VALUE, ID, struct ruby_dtrace_method_hook_args *)