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

ruby-changes:62642

From: Aaron <ko1@a...>
Date: Wed, 19 Aug 2020 11:58:26 +0900 (JST)
Subject: [ruby-changes:62642] 7226f76255 (master): Reset object allocation trace information

https://git.ruby-lang.org/ruby.git/commit/?id=7226f76255

From 7226f76255ff0fc209c973c6560f2331a676232b Mon Sep 17 00:00:00 2001
From: Aaron Patterson <tenderlove@r...>
Date: Tue, 18 Aug 2020 19:56:42 -0700
Subject: Reset object allocation trace information

Compaction makes collisions in the weak map more likely.  For now, clear
the tracing information before the test run so we get accurate results

diff --git a/test/objspace/test_objspace.rb b/test/objspace/test_objspace.rb
index 42fbc3e..e479170 100644
--- a/test/objspace/test_objspace.rb
+++ b/test/objspace/test_objspace.rb
@@ -165,6 +165,7 @@ class TestObjSpace < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/objspace/test_objspace.rb#L165
   end
 
   def test_trace_object_allocations
+    ObjectSpace.trace_object_allocations_clear # clear object_table to get rid of erroneous detection for c0
     Class.name
     o0 = Object.new
     ObjectSpace.trace_object_allocations{
-- 
cgit v0.10.2


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

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