Ruby 2.7.0p0(2019-12-25revision647ee6f091eafcce70ffb75ddf7e121e192ab217)

Data Structures | Macros | Functions
probes_helper.h File Reference
`#include "ruby/ruby.h"`

Go to the source code of this file.

## Data Structures
struct | ruby_dtrace_method_hook_args

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

## Functions
| NOINLINE (int rb_dtrace_setup(rb_execution_context_t *, VALUE, ID, struct ruby_dtrace_method_hook_args *))

## Macro Definition Documentation

## ◆ RUBY_DTRACE_CMETHOD_ENTRY_HOOK

#define RUBY_DTRACE_CMETHOD_ENTRY_HOOK | ( |  | ec,
|  |  | klass,
|  |  | id
| ) |  | RUBY_DTRACE_METHOD_HOOK(CMETHOD_ENTRY, ec, klass, id)

Definition at line 36 of file probes_helper.h.

## ◆ RUBY_DTRACE_CMETHOD_RETURN_HOOK

#define RUBY_DTRACE_CMETHOD_RETURN_HOOK | ( |  | ec,
|  |  | klass,
|  |  | id
| ) |  | RUBY_DTRACE_METHOD_HOOK(CMETHOD_RETURN, ec, klass, id)

Definition at line 39 of file probes_helper.h.

## ◆ RUBY_DTRACE_METHOD_ENTRY_HOOK

#define RUBY_DTRACE_METHOD_ENTRY_HOOK | ( |  | ec,
|  |  | klass,
|  |  | id
| ) |  | RUBY_DTRACE_METHOD_HOOK(METHOD_ENTRY, ec, klass, id)

Definition at line 30 of file probes_helper.h.

## ◆ RUBY_DTRACE_METHOD_HOOK

#define RUBY_DTRACE_METHOD_HOOK | ( |  | name,
|  |  | ec,
|  |  | klazz,
|  |  | id
| ) |  |

Value:
do { \
if (UNLIKELY(RUBY_DTRACE_##name##_ENABLED())) { \
struct ruby_dtrace_method_hook_args args; \
if (rb_dtrace_setup(ec, klazz, id, &args)) { \
RUBY_DTRACE_##name(args.classname, \
args.methodname, \
args.filename, \
args.line_no); \
} \
} \
} while (0)

Definition at line 17 of file probes_helper.h.

## ◆ RUBY_DTRACE_METHOD_RETURN_HOOK

#define RUBY_DTRACE_METHOD_RETURN_HOOK | ( |  | ec,
|  |  | klass,
|  |  | id
| ) |  | RUBY_DTRACE_METHOD_HOOK(METHOD_RETURN, ec, klass, id)

Definition at line 33 of file probes_helper.h.

## Function Documentation

## ◆ NOINLINE()

NOINLINE | ( | int | rb_dtrace_setuprb_execution_context_t *, VALUE, ID, struct ruby_dtrace_method_hook_args * | ) |

UNLIKELY
#define UNLIKELY(x)
Definition: ffi_common.h:126
rb_dtrace_setup
MJIT_FUNC_EXPORTED int rb_dtrace_setup(rb_execution_context_t *ec, VALUE klass, ID id, struct ruby_dtrace_method_hook_args *args)
Definition: vm.c:392
ruby_dtrace_method_hook_args
Definition: probes_helper.h:6
name
const char * name
Definition: nkf.c:208