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

ruby-changes:51374

From: normal <ko1@a...>
Date: Wed, 6 Jun 2018 06:30:23 +0900 (JST)
Subject: [ruby-changes:51374] normal:r63580 (trunk): test/dtrace: enable Tracepoint for function calls

normal	2018-06-06 06:19:45 +0900 (Wed, 06 Jun 2018)

  New Revision: 63580

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=63580

  Log:
    test/dtrace: enable Tracepoint for function calls
    
    Since [Feature #14104], "trace" instructions are no
    longer emitted by default, so we must enable them explicitly
    for function tracing to work.
    
    [ruby-core:85965]

  Modified files:
    trunk/test/dtrace/test_function_entry.rb
    trunk/test/dtrace/test_singleton_function.rb
Index: test/dtrace/test_function_entry.rb
===================================================================
--- test/dtrace/test_function_entry.rb	(revision 63579)
+++ test/dtrace/test_function_entry.rb	(revision 63580)
@@ -18,7 +18,7 @@ ruby$target:::method-entry https://github.com/ruby/ruby/blob/trunk/test/dtrace/test_function_entry.rb#L18
 	}
 
 	assert_equal 10, foo_calls.length
-	line = '2'
+	line = '3'
 	foo_calls.each { |f| assert_equal line, f[3] }
 	foo_calls.each { |f| assert_equal rb_file, f[2] }
       }
@@ -39,7 +39,7 @@ ruby$target:::method-return https://github.com/ruby/ruby/blob/trunk/test/dtrace/test_function_entry.rb#L39
 	}
 
 	assert_equal 10, foo_calls.length
-	line = '2'
+	line = '3'
 	foo_calls.each { |f| assert_equal line, f[3] }
 	foo_calls.each { |f| assert_equal rb_file, f[2] }
       }
@@ -77,6 +77,7 @@ ruby$target:::method-return https://github.com/ruby/ruby/blob/trunk/test/dtrace/test_function_entry.rb#L77
     private
     def ruby_program
       <<-eoruby
+      TracePoint.new{}.enable
       class Foo
 	def foo; end
       end
Index: test/dtrace/test_singleton_function.rb
===================================================================
--- test/dtrace/test_singleton_function.rb	(revision 63579)
+++ test/dtrace/test_singleton_function.rb	(revision 63580)
@@ -18,7 +18,7 @@ ruby$target:::method-entry https://github.com/ruby/ruby/blob/trunk/test/dtrace/test_singleton_function.rb#L18
 	}
 
 	assert_equal 10, foo_calls.length
-	line = '2'
+	line = '3'
 	foo_calls.each { |f| assert_equal line, f[3] }
 	foo_calls.each { |f| assert_equal rb_file, f[2] }
       }
@@ -38,7 +38,7 @@ ruby$target:::method-return https://github.com/ruby/ruby/blob/trunk/test/dtrace/test_singleton_function.rb#L38
 	}
 
 	assert_equal 10, foo_calls.length
-	line = '2'
+	line = '3'
 	foo_calls.each { |f| assert_equal line, f[3] }
 	foo_calls.each { |f| assert_equal rb_file, f[2] }
       }
@@ -46,6 +46,7 @@ ruby$target:::method-return https://github.com/ruby/ruby/blob/trunk/test/dtrace/test_singleton_function.rb#L46
 
     def ruby_program
       <<-eoruby
+      TracePoint.new{}.enable
       class Foo
 	def self.foo; end
       end

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

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