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

ruby-changes:25654

From: ngoto <ko1@a...>
Date: Mon, 19 Nov 2012 01:30:22 +0900 (JST)
Subject: [ruby-changes:25654] ngoto:r37711 (trunk): * vm_core.h, probes_helper.h (RUBY_DTRACE_FUNC_ENTRY_HOOK,

ngoto	2012-11-19 01:30:10 +0900 (Mon, 19 Nov 2012)

  New Revision: 37711

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

  Log:
    * vm_core.h, probes_helper.h (RUBY_DTRACE_FUNC_ENTRY_HOOK,
      RUBY_DTRACE_FUNC_RETURN_HOOK): move from vm_core.h to new file
      probes_helper.h for narrowing dependency to probes.h.
    * common.mk (VM_CORE_H_INCLUDES): remove dependency to probes.h.
    * common.mk (vm.$(OBJEXT)): add dependency to probes_helper.h.
    * vm.c, vm_insnhelper.c: include probes_helper.h.

  Added files:
    trunk/probes_helper.h
  Modified files:
    trunk/ChangeLog
    trunk/common.mk
    trunk/vm.c
    trunk/vm_core.h
    trunk/vm_insnhelper.c

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 37710)
+++ ChangeLog	(revision 37711)
@@ -1,3 +1,12 @@
+Mon Nov 19 01:11:59 2012  Naohisa Goto  <ngotogenome@g...>
+
+	* vm_core.h, probes_helper.h (RUBY_DTRACE_FUNC_ENTRY_HOOK,
+	  RUBY_DTRACE_FUNC_RETURN_HOOK): move from vm_core.h to new file
+	  probes_helper.h for narrowing dependency to probes.h.
+	* common.mk (VM_CORE_H_INCLUDES): remove dependency to probes.h.
+	* common.mk (vm.$(OBJEXT)): add dependency to probes_helper.h.
+	* vm.c, vm_insnhelper.c: include probes_helper.h.
+
 Sun Nov 18 20:46:08 2012  Tadayoshi Funaba  <tadf@d...>
 
 	* bignum.c (rb_cstr_to_inum): should accept underscores of
Index: vm_core.h
===================================================================
--- vm_core.h	(revision 37710)
+++ vm_core.h	(revision 37711)
@@ -23,7 +23,6 @@
 #include "id.h"
 #include "method.h"
 #include "ruby_atomic.h"
-#include "probes.h"
 
 #if   defined(_WIN32)
 #include "thread_win32.h"
@@ -899,35 +898,6 @@
     } \
 } while (0)
 
-#define RUBY_DTRACE_FUNC_ENTRY_HOOK(klass, id) \
-    if (RUBY_DTRACE_FUNCTION_ENTRY_ENABLED()) { \
-	const char * classname  = rb_class2name((klass)); \
-	const char * methodname = rb_id2name((id)); \
-	const char * filename   = rb_sourcefile(); \
-	if (classname && methodname && filename) { \
-	    RUBY_DTRACE_FUNCTION_ENTRY( \
-		    classname, \
-		    methodname, \
-		    filename, \
-		    rb_sourceline()); \
-	} \
-    } \
-
-#define RUBY_DTRACE_FUNC_RETURN_HOOK(klass, id) \
-    if (RUBY_DTRACE_FUNCTION_RETURN_ENABLED()) { \
-	const char * classname  = rb_class2name((klass)); \
-	const char * methodname = rb_id2name((id)); \
-	const char * filename   = rb_sourcefile(); \
-	if (classname && methodname && filename) { \
-	    RUBY_DTRACE_FUNCTION_RETURN( \
-		    classname, \
-		    methodname, \
-		    filename, \
-		    rb_sourceline()); \
-	} \
-    } \
-
-
 #if defined __GNUC__ && __GNUC__ >= 4
 #pragma GCC visibility push(default)
 #endif
Index: common.mk
===================================================================
--- common.mk	(revision 37710)
+++ common.mk	(revision 37711)
@@ -612,7 +612,7 @@
 PROBES_H_INCLUDES  = {$(VPATH)}probes.h
 VM_CORE_H_INCLUDES = {$(VPATH)}vm_core.h {$(VPATH)}thread_$(THREAD_MODEL).h \
 		     {$(VPATH)}node.h {$(VPATH)}method.h {$(VPATH)}ruby_atomic.h \
-		     $(ID_H_INCLUDES) $(PROBES_H_INCLUDES)
+		     $(ID_H_INCLUDES)
 
 addr2line.$(OBJEXT): {$(VPATH)}addr2line.c {$(VPATH)}addr2line.h {$(VPATH)}config.h
 array.$(OBJEXT): {$(VPATH)}array.c $(RUBY_H_INCLUDES) {$(VPATH)}util.h \
@@ -768,7 +768,8 @@
   {$(VPATH)}vm_insnhelper.c {$(VPATH)}vm_insnhelper.h {$(VPATH)}vm_exec.c \
   {$(VPATH)}vm_exec.h {$(VPATH)}insns.def {$(VPATH)}vmtc.inc \
   {$(VPATH)}vm.inc {$(VPATH)}insns.inc {$(VPATH)}debug.h \
-  {$(VPATH)}internal.h {$(VPATH)}vm.h {$(VPATH)}constant.h $(PROBES_H_INCLUDES)
+  {$(VPATH)}internal.h {$(VPATH)}vm.h {$(VPATH)}constant.h \
+  $(PROBES_H_INCLUDES) {$(VPATH)}probes_helper.h
 vm_dump.$(OBJEXT): {$(VPATH)}vm_dump.c $(RUBY_H_INCLUDES) \
   $(VM_CORE_H_INCLUDES) {$(VPATH)}debug.h {$(VPATH)}addr2line.h \
   {$(VPATH)}internal.h
Index: probes_helper.h
===================================================================
--- probes_helper.h	(revision 0)
+++ probes_helper.h	(revision 37711)
@@ -0,0 +1,35 @@
+#ifndef RUBY_PROBES_HELPER_H
+#define RUBY_PROBES_HELPER_H
+
+#include "ruby/ruby.h"
+#include "probes.h"
+
+#define RUBY_DTRACE_FUNC_ENTRY_HOOK(klass, id) \
+    if (RUBY_DTRACE_FUNCTION_ENTRY_ENABLED()) { \
+	const char * classname  = rb_class2name((klass)); \
+	const char * methodname = rb_id2name((id)); \
+	const char * filename   = rb_sourcefile(); \
+	if (classname && methodname && filename) { \
+	    RUBY_DTRACE_FUNCTION_ENTRY( \
+		    classname, \
+		    methodname, \
+		    filename, \
+		    rb_sourceline()); \
+	} \
+    } \
+
+#define RUBY_DTRACE_FUNC_RETURN_HOOK(klass, id) \
+    if (RUBY_DTRACE_FUNCTION_RETURN_ENABLED()) { \
+	const char * classname  = rb_class2name((klass)); \
+	const char * methodname = rb_id2name((id)); \
+	const char * filename   = rb_sourcefile(); \
+	if (classname && methodname && filename) { \
+	    RUBY_DTRACE_FUNCTION_RETURN( \
+		    classname, \
+		    methodname, \
+		    filename, \
+		    rb_sourceline()); \
+	} \
+    } \
+
+#endif /* RUBY_PROBES_HELPER_H */
Index: vm.c
===================================================================
--- vm.c	(revision 37710)
+++ vm.c	(revision 37711)
@@ -19,6 +19,7 @@
 #include "iseq.h"
 #include "eval_intern.h"
 #include "probes.h"
+#include "probes_helper.h"
 
 static inline VALUE *
 VM_EP_LEP(VALUE *ep)
Index: vm_insnhelper.c
===================================================================
--- vm_insnhelper.c	(revision 37710)
+++ vm_insnhelper.c	(revision 37711)
@@ -14,6 +14,7 @@
 #include "constant.h"
 #include "internal.h"
 #include "probes.h"
+#include "probes_helper.h"
 
 /* control stack frame */
 

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

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