diff options
author | Koichi Sasada <ko1@atdot.net> | 2021-08-10 15:32:20 +0900 |
---|---|---|
committer | Koichi Sasada <ko1@atdot.net> | 2021-08-10 15:47:52 +0900 |
commit | 42b6dc84d3e0abb19432a1cf24f327b37b176fa8 (patch) | |
tree | dd0ed986c18be53388950dddc3a3b74b0dcda49f | |
parent | e3dcb6204d66c62aedaf94cac336d93d0275ce2c (diff) | |
download | ruby-42b6dc84d3e0abb19432a1cf24f327b37b176fa8.tar.gz |
add some lines to delete unused TracePoint
`TracePoint.stat` returns the "to be deleted" TP numbers, and
http://rubyci.s3.amazonaws.com/graviton2/ruby-master/log/20210810T030003Z.fail.html.gz
shows there is a "to be deleted" TP.
This patch uses only :line event and add some lines to allow MRI
deletes "to be deleted" TPs.
-rw-r--r-- | test/ruby/test_settracefunc.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/test/ruby/test_settracefunc.rb b/test/ruby/test_settracefunc.rb index dafe58d70c..1393caaf91 100644 --- a/test/ruby/test_settracefunc.rb +++ b/test/ruby/test_settracefunc.rb @@ -982,20 +982,24 @@ class TestSetTraceFunc < Test::Unit::TestCase def test_tracepoint_with_multithreads assert_nothing_raised do - TracePoint.new{ + TracePoint.new(:line){ 10.times{ Thread.pass } }.enable do (1..10).map{ Thread.new{ - 1000.times{ + 1_000.times{|i| + _a = i } } }.each{|th| th.join } end + _a = 1 + _b = 2 + _c = 3 # to make sure the deletion of unused TracePoints end end |