summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-07-23 23:08:48 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-07-23 23:08:48 +0000
commite93e38d165f510aefb541235491347bb69a80d62 (patch)
treea2edfd9824d3d3da9fd07c05c2f099c7027ffff8
parent182cf90d30f1319f094adcf4c37ea8921c348453 (diff)
* test/-ext-/tracepoint/test_tracepoint.rb: add GC on/off to count
GC events strictly. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42147 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--test/-ext-/tracepoint/test_tracepoint.rb4
2 files changed, 9 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 471ffe0b900..d0d02f0c952 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Wed Jul 24 08:04:49 2013 Koichi Sasada <ko1@atdot.net>
+
+ * test/-ext-/tracepoint/test_tracepoint.rb: add GC on/off to count
+ GC events strictly.
+
Tue Jul 23 23:19:24 2013 NARUSE, Yui <naruse@ruby-lang.org>
* ext/openssl/extconf.rb (CRYPTO_THREADID): check exist or not.
diff --git a/test/-ext-/tracepoint/test_tracepoint.rb b/test/-ext-/tracepoint/test_tracepoint.rb
index efbf40b4609..7d079779a82 100644
--- a/test/-ext-/tracepoint/test_tracepoint.rb
+++ b/test/-ext-/tracepoint/test_tracepoint.rb
@@ -25,11 +25,15 @@ class TestTracepointObj < Test::Unit::TestCase
stat1 = {}
stat2 = {}
+ GC.disable
GC.stat(stat1)
result = Bug.tracepoint_track_objspace_events{
+ GC.enable
1_000_000.times{''}
+ GC.disable
}
GC.stat(stat2)
+ GC.enable
newobj_count, free_count, gc_start_count, gc_end_count, *newobjs = *result