[#39954] Fwd: [ruby-cvs:33451] Ruby:r26235 (trunk): * trace.h: new file. wraps tracing mechanisms. — SASADA Koichi <ko1@...>

 ささだです.

16 messages 2010/01/04
[#39957] Re: Fwd: [ruby-cvs:33451] Ruby:r26235 (trunk): * trace.h: new file. wraps tracing mechanisms. — Yugui <yugui@...> 2010/01/04

2010/1/4 SASADA Koichi <ko1@atdot.net>:

[#39959] Re: Fwd: [ruby-cvs:33451] Ruby:r26235 (trunk): * trace.h: new file. wraps tracing mechanisms. — SASADA Koichi <ko1@...> 2010/01/04

 ささだです.

[#39975] [Feature #2571] 文字列のハミング距離 — Kenta Murata <redmine@...>

Feature #2571: 文字列のハミング距離

14 messages 2010/01/07

[#39978] "require 'logge'" fails on ruby 1.8.7 from http://github.com/shyouhei/ruby — MOROHASHI Kyosuke <moronatural@...>

諸橋です。

7 messages 2010/01/07

[#40004] [Bug:trunk] require_relative depends on current directory — Yusuke ENDOH <mame@...>

遠藤です。

13 messages 2010/01/09

[#40074] [Bug #2603] NetBSD 5.0以降でpthreadの処理に由来する不具合 — Takahiro Kambe <redmine@...>

Bug #2603: NetBSD 5.0以降でpthreadの処理に由来する不具合

29 messages 2010/01/14
[#40086] Re: [Bug #2603] NetBSD 5.0以降でpthreadの処理に由来する不具合 — f-miura@... (MIURA, Fumiaki) 2010/01/14

NTTレゾナントの三浦です。不完全なpatchを書いてすみません。

[#40088] Re: [Bug #2603] NetBSD 5.0以降でpthreadの処理に由来する不具合 — Takahiro Kambe <taca@...> 2010/01/14

こんばんは。

[#40091] Re: [Bug #2603] NetBSD 5.0以降でpthreadの処理に由来する不具合 — KOSAKI Motohiro <kosaki.motohiro@...> 2010/01/15

kosakiです

[#40092] Re: [Bug #2603] NetBSD 5.0以降でpthreadの処理に由来する不具合 — Takahiro Kambe <taca@...> 2010/01/15

こんにちは。

[#40077] [Bug #2604] test_dsa_sign_verify() in test/openssl/test_ec.rb failes — Takahiro Kambe <redmine@...>

Bug #2604: test_dsa_sign_verify() in test/openssl/test_ec.rb failes

11 messages 2010/01/14

[#40153] [Bug:trunk] three bugs of Matrix::Scalar — Yusuke ENDOH <mame@...>

連投すみません。

19 messages 2010/01/25
[#40184] Re: [Bug:trunk] three bugs of Matrix::Scalar — keiju@... (石塚圭樹) 2010/01/27

けいじゅ@いしつかです.

[#40189] Re: [Bug:trunk] three bugs of Matrix::Scalar — Yusuke ENDOH <mame@...> 2010/01/27

遠藤です。

[#40191] Re: [Bug:trunk] three bugs of Matrix::Scalar — keiju@... (石塚圭樹) 2010/01/27

けいじゅ@いしつかです.

[#40224] Re: [Bug:trunk] three bugs of Matrix::Scalar — Yukihiro Matsumoto <matz@...> 2010/01/28

まつもと ゆきひろです

[#40162] [Bug #2658] rubyspec: Ruby character strings interpolates the return value of Object#inspect, without ivars, if Object#to_s does not return a String instance ERROR — Yusuke Endoh <redmine@...>

Bug #2658: rubyspec: Ruby character strings interpolates the return value of Object#inspect, without ivars, if Object#to_s does not return a String instance ERROR

8 messages 2010/01/26
[#40163] Re: [Bug #2658] rubyspec: Ruby character strings interpolates the return value of Object#inspect, without ivars, if Object#to_s does not return a String instance ERROR — Tanaka Akira <akr@...> 2010/01/26

2010年1月26日20:39 Yusuke Endoh <redmine@ruby-lang.org>:

[#40168] [Bug #2662] BigDecimal#ceil, etc. should not return Integer — Yusuke Endoh <redmine@...>

Bug #2662: BigDecimal#ceil, etc. should not return Integer

10 messages 2010/01/26

[#40200] [Feature #2673] the length for an enumerator generated by Array#permutation and Array#combination — Kenta Murata <redmine@...>

Feature #2673: the length for an enumerator generated by Array#permutation and Array#combination

14 messages 2010/01/28

[#40221] [Bug:trunk] rubyspec: SimpleDelegator when frozen creates a frozen clone ERROR — Yusuke ENDOH <mame@...>

まつもとさん、または lib/delegator.rb についてわかる誰か

13 messages 2010/01/28

[#40265] MonitorMixin::ConditionVariable#wait timeout — Tanaka Akira <akr@...>

手元の Ubuntu 9.10 の環境で Ruby 1.9.2 を make test-all すると

38 messages 2010/01/30
[#40326] Re: MonitorMixin::ConditionVariable#wait timeout — Shugo Maeda <shugo@...> 2010/02/05

前田です。

[#41155] Re: MonitorMixin::ConditionVariable#wait timeout — Yusuke ENDOH <mame@...> 2010/05/05

前田さん、akr さん

[#41157] Re: MonitorMixin::ConditionVariable#wait timeout — Tanaka Akira <akr@...> 2010/05/05

2010年5月5日9:32 Yusuke ENDOH <mame@tsg.ne.jp>:

[#41158] Re: MonitorMixin::ConditionVariable#wait timeout — Yusuke ENDOH <mame@...> 2010/05/05

遠藤です。

[#41159] Re: MonitorMixin::ConditionVariable#wait timeout — Tanaka Akira <akr@...> 2010/05/05

2010年5月5日11:46 Yusuke ENDOH <mame@tsg.ne.jp>:

[#41160] Re: MonitorMixin::ConditionVariable#wait timeout — Yusuke ENDOH <mame@...> 2010/05/05

遠藤です。

[#41182] Re: MonitorMixin::ConditionVariable#wait timeout — Tanaka Akira <akr@...> 2010/05/06

2010年5月5日13:22 Yusuke ENDOH <mame@tsg.ne.jp>:

[#41183] Re: MonitorMixin::ConditionVariable#wait timeout — Yusuke ENDOH <mame@...> 2010/05/06

遠藤です。

[#41186] Re: MonitorMixin::ConditionVariable#wait timeout — Tanaka Akira <akr@...> 2010/05/06

2010年5月6日19:58 Yusuke ENDOH <mame@tsg.ne.jp>:

[#41205] Re: MonitorMixin::ConditionVariable#wait timeout — Yusuke ENDOH <mame@...> 2010/05/06

遠藤です。

[#41207] Re: MonitorMixin::ConditionVariable#wait timeout — KOSAKI Motohiro <kosaki.motohiro@...> 2010/05/06

2010年5月6日23:08 Yusuke ENDOH <mame@tsg.ne.jp>:

[#41208] Re: MonitorMixin::ConditionVariable#wait timeout — Tanaka Akira <akr@...> 2010/05/06

2010年5月6日23:15 KOSAKI Motohiro <kosaki.motohiro@gmail.com>:

[#41245] Re: MonitorMixin::ConditionVariable#wait timeout — Yusuke ENDOH <mame@...> 2010/05/10

遠藤です。

[#41252] Re: MonitorMixin::ConditionVariable#wait timeout — KOSAKI Motohiro <kosaki.motohiro@...> 2010/05/10

kosakiです

[#41255] Re: MonitorMixin::ConditionVariable#wait timeout — Yusuke ENDOH <mame@...> 2010/05/10

遠藤です。

[#41256] Re: MonitorMixin::ConditionVariable#wait timeout — Masaya TARUI <tarui@...> 2010/05/10

樽家です。

[#40269] [Feature #2695] Supported Platforms — Kazuhiro NISHIYAMA <redmine@...>

Feature #2695: Supported Platforms

17 messages 2010/01/31
[#40760] [Feature #2695] Supported Platforms — Yusuke Endoh <redmine@...> 2010/03/25

チケット #2695 が更新されました。 (by Yusuke Endoh)

[ruby-dev:40008] Re: yuguiさんのvm_probesのsystemtap対応

From: Nobuyoshi Nakada <nobu@...>
Date: 2010-01-09 19:30:00 UTC
List: ruby-dev #40008
なかだです。

At Sun, 10 Jan 2010 03:28:52 +0900,
KOSAKI Motohiro wrote in [ruby-dev:40006]:
> [ruby-core:27448] [Feature:trunk] adding hooks for better tracing
> でアナウンスされたDTraceパッチですが
> 以下のような変更を加えることによりSystemTapでも動くことを確認しました。

OS Xでもuniversal binaryに対応していないようだったのでパッチです。


diff --git a/depend b/depend
index ec2a9e8..bb7a712 100644
--- a/depend
+++ b/depend
@@ -1,11 +1,9 @@
-vm_probes.o: tracing_mechanism.h
-tracing_mechanism.h: $(TRACING_MECHANISM)_probes.h mkmf.log
-	cp $(TRACING_MECHANISM)_probes.h $@
+vm_probes.o: $(TRACING_MECHANISM)_probes.h
 
 dtrace_probes.h: dtrace.h
 dtrace.h: dtrace.d mkmf.log
-	$(DTRACE) -h $(ARCH_FLAGS) -o dtrace.h -s dtrace.d
-dtrace.$(OBJEXT): $(ORIG_OBJS) dtrace.d mkmf.log
-	$(DTRACE) -G $(ARCH_FLAGS) -o $@ -s dtrace.d $(ORIG_OBJS)
+	$(DTRACE) -h $(ARCH_FLAG) -o dtrace.h -s dtrace.d
+dtrace.o: $(ORIG_OBJS) dtrace.d mkmf.log
+	$(DTRACE) -G $(ARCH_FLAG) -o $@ -s dtrace.d $(ORIG_OBJS)
 dtrace.d: dtrace.d.erb mkmf.log
 	echo 'please re-run extconf.rb'
diff --git a/extconf.rb b/extconf.rb
index 6b56239..6f8b5a3 100644
--- a/extconf.rb
+++ b/extconf.rb
@@ -4,13 +4,13 @@ autoload :ERB, 'erb'
 
 DTRACE = 'dtrace'
-ARCH=$configure_args['with-arch']
 
 def choose_mechanism
-  case mechanism = $configure_args['tracing-mechanism']
+  mechanism = case RUBY_PLATFORM when /linux/; 'systemtap'; end
+  case mechanism = with_config('tracing-mechanism', mechanism)
   when 'dtrace', nil
     mechanism = 'dtrace'
     begin
       $objs = %w[ vm_probes.o ]
-      $objs << 'dtrace.o' if dtrace_needs_postprocessor?(ARCH)
+      $objs << 'dtrace.o' if dtrace_needs_postprocessor?
     rescue
       message "something wrong in checking dtrace. see mkmf.log\n"
@@ -19,4 +19,7 @@ def choose_mechanism
     end
     create_dtrace_d
+  when 'systemtap'
+    $objs = %w[ vm_probes.o dtrace.o ]
+    create_dtrace_d
   else
     message "unknown tracing mechanism #{mechanism}"
@@ -37,8 +40,8 @@ def create_dtrace_d
 end
 
-def dtrace_needs_postprocessor?(arch)
+def dtrace_needs_postprocessor?
   return $dtrace_needs_postprocessor unless $dtrace_needs_postprocessor.nil?
-  arch_arg = "--arch=#{arch}" if arch
-  Tempfile.open("conftest.d"){|f|
+  arch_arg = "$(ARCH_FLAG)"
+  Tempfile.open(%w[conftest .d]){|f|
     f.puts <<-EOS
       provider conftest {
@@ -95,5 +98,4 @@ def prepend_variables(mechanism)
     f.puts "DTRACE=#{DTRACE}"
     f.puts "TRACING_MECHANISM=#{mechanism}"
-    f.puts "ARCH_FLAGS=--arch #{ARCH}" if ARCH
 
     orig_objs = $objs.select{|x| x != "#{mechanism}.o"}
@@ -105,4 +107,5 @@ end
 
 mechanism = choose_mechanism
+$defs << %[-DTRACING_PROBES_H=\\"#{mechanism}_probes.h\\"]
 create_makefile('vm_probes')
 prepend_variables(mechanism)
diff --git a/vm_probes.c b/vm_probes.c
index 4f71743..126521e 100644
--- a/vm_probes.c
+++ b/vm_probes.c
@@ -1,4 +1,4 @@
 #include <ruby/ruby.h>
-#include "tracing_mechanism.h"
+#include TRACING_PROBES_H
 
 #define ALL_EVENTS (RUBY_EVENT_LINE \
@@ -11,5 +11,5 @@
 
 static void
-event_hook(rb_event_flag_t flags, VALUE data, VALUE obj, VALUE id, VALUE klass)
+event_hook(rb_event_flag_t flags, VALUE data, VALUE obj, ID id, VALUE klass)
 {
     if ((flags & RUBY_EVENT_LINE) && TRACE_LINE_ENABLED()) {


-- 
--- 僕の前にBugはない。
--- 僕の後ろにBugはできる。
    中田 伸悦

In This Thread