 +			RUBY_RUBY_PROBE(probe_name, probe_data);
 +		ret = Qnil;
 +	}
-+	#endif
++#endif
 +    	return ret;
 +}
 +

===================================================================
--- tracer.c	(revision 0)
+++ tracer.c	(revision 0)
@@ -0,0 +1,63 @@
+#include "ruby.h"
+
+#ifdef ENABLE_DTRACE

 #if defined _WIN32 || defined __CYGWIN__
 #include <windows.h>
 #endif
@@ -68,6 +73,31 @@
 #endif
 #endif
 
+#ifdef ENABLE_DTRACE
+
+#define FIRE_OBJECT_FREE_PROBE(obj) \
+	if (RUBY_OBJECT_FREE_ENABLED()) { \
+		RUBY_OBJECT_FREE(rb_class2name(CLASS_OF(obj))); \
+	} \
+
+#define FIRE_GC_BEGIN_PROBE() \
+	if (RUBY_GC_BEGIN_ENABLED()) { \
+	   RUBY_GC_BEGIN(); \
+	}
+
+#define FIRE_GC_END_PROBE() \
+    if (RUBY_GC_END_ENABLED()) { \
+        RUBY_GC_END(); \
+    }
+
+#else
+
+#define FIRE_OBJECT_FREE_PROBE(obj)  /* NOOP */
+#define FIRE_GC_BEGIN_PROBE()        /* NOOP */
+#define FIRE_GC_END_PROBE()          /* NOOP */
+
+#endif
+
 static unsigned long malloc_increase = 0;
 static unsigned long malloc_limit = GC_MALLOC_LIMIT;
 static void run_final();
@@ -1159,6 +1189,7 @@
 	break;
     }
 
+    FIRE_OBJECT_FREE_PROBE(obj);
     if (FL_TEST(obj, FL_EXIVAR)) {
 	rb_free_generic_ivar((VALUE)obj);
     }
@@ -1322,6 +1353,7 @@
 {
     struct gc_list *list;
     struct FRAME * volatile frame; /* gcc 2.7.2.3 -O2 bug??  */
+    FIRE_GC_BEGIN_PROBE();
     jmp_buf save_regs_gc_mark;
     SET_STACK_END;
 
@@ -1414,6 +1446,7 @@
     } while (!MARK_STACK_EMPTY);
 
     gc_sweep();
+    FIRE_GC_END_PROBE();
 }
 
 void
