aboutsummaryrefslogtreecommitdiffstats
path: root/vm_trace.c
diff options
context:
space:
mode:
author卜部昌平 <shyouhei@ruby-lang.org>2021-09-06 23:32:23 +0900
committer卜部昌平 <shyouhei@ruby-lang.org>2021-09-10 20:00:06 +0900
commit6420db8ab72e3348d0ddf59071c696cbdb270818 (patch)
tree2845fab59df4fb9c0ea7b3341803d29a2dd0f3f9 /vm_trace.c
parent1563526edffe4dfc8330ebdef23ffd25e2ac460c (diff)
downloadruby-6420db8ab72e3348d0ddf59071c696cbdb270818.tar.gz
include/ruby/debug.h: add doxygen
Must not be a bad idea to improve documents. [ci skip]
Diffstat (limited to 'vm_trace.c')
-rw-r--r--vm_trace.c30
1 files changed, 0 insertions, 30 deletions
diff --git a/vm_trace.c b/vm_trace.c
index cec5e42e31..ac65e61db1 100644
--- a/vm_trace.c
+++ b/vm_trace.c
@@ -1384,36 +1384,6 @@ tracepoint_new(VALUE klass, rb_thread_t *target_th, rb_event_flag_t events, void
return tpval;
}
-/*
- * Creates a tracepoint by registering a callback function for one or more
- * tracepoint events. Once the tracepoint is created, you can use
- * rb_tracepoint_enable to enable the tracepoint.
- *
- * Parameters:
- * 1. VALUE target_thval - Meant for picking the thread in which the tracepoint
- * is to be created. However, current implementation ignore this parameter,
- * tracepoint is created for all threads. Simply specify Qnil.
- * 2. rb_event_flag_t events - Event(s) to listen to.
- * 3. void (*func)(VALUE, void *) - A callback function.
- * 4. void *data - Void pointer that will be passed to the callback function.
- *
- * When the callback function is called, it will be passed 2 parameters:
- * 1)VALUE tpval - the TracePoint object from which trace args can be extracted.
- * 2)void *data - A void pointer which helps to share scope with the callback function.
- *
- * It is important to note that you cannot register callbacks for normal events and internal events
- * simultaneously because they are different purpose.
- * You can use any Ruby APIs (calling methods and so on) on normal event hooks.
- * However, in internal events, you can not use any Ruby APIs (even object creations).
- * This is why we can't specify internal events by TracePoint directly.
- * Limitations are MRI version specific.
- *
- * Example:
- * rb_tracepoint_new(Qnil, RUBY_INTERNAL_EVENT_NEWOBJ | RUBY_INTERNAL_EVENT_FREEOBJ, obj_event_i, data);
- *
- * In this example, a callback function obj_event_i will be registered for
- * internal events RUBY_INTERNAL_EVENT_NEWOBJ and RUBY_INTERNAL_EVENT_FREEOBJ.
- */
VALUE
rb_tracepoint_new(VALUE target_thval, rb_event_flag_t events, void (*func)(VALUE, void *), void *data)
{