[前][次][番号順一覧][スレッド一覧]

ruby-changes:26480

From: ko1 <ko1@a...>
Date: Fri, 21 Dec 2012 20:23:03 +0900 (JST)
Subject: [ruby-changes:26480] ko1:r38531 (trunk): * vm_trace.c (tracepoint_new): add code to support specified thread.

ko1	2012-12-21 20:22:54 +0900 (Fri, 21 Dec 2012)

  New Revision: 38531

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=38531

  Log:
    * vm_trace.c (tracepoint_new): add code to support specified thread.
      But not tested and this feature is not supported officially.

  Modified files:
    trunk/ChangeLog
    trunk/vm_trace.c

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 38530)
+++ ChangeLog	(revision 38531)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Fri Dec 21 20:21:04 2012  Koichi Sasada  <ko1@a...>
+
+	* vm_trace.c (tracepoint_new): add code to support specified thread.
+	  But not tested and this feature is not supported officially.
+
 Fri Dec 21 19:37:15 2012  Koichi Sasada  <ko1@a...>
 
 	* ruby.c (process_options): need to acquire env from TOPLEVEL_BINDING
Index: vm_trace.c
===================================================================
--- vm_trace.c	(revision 38530)
+++ vm_trace.c	(revision 38531)
@@ -1082,11 +1082,14 @@ tracepoint_new(VALUE klass, rb_thread_t https://github.com/ruby/ruby/blob/trunk/vm_trace.c#L1082
 }
 
 VALUE
-rb_tracepoint_new(VALUE target_thread, rb_event_flag_t events, void (*func)(VALUE, void *), void *data)
+rb_tracepoint_new(VALUE target_thval, rb_event_flag_t events, void (*func)(VALUE, void *), void *data)
 {
     rb_thread_t *target_th = 0;
-    if (RTEST(target_thread)) {
-	/* TODO: now unsupported */
+    if (RTEST(target_thval)) {
+	GetThreadPtr(target_thval, target_th);
+	/* TODO: Test it!
+	 * Warning: This function is not tested.
+	 */
     }
     return tracepoint_new(rb_cTracePoint, target_th, events, func, data, Qundef);
 }

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]