aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-06-20 09:31:51 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-06-20 09:31:51 +0000
commit45f7b78d29cb4798b68e58c3c674631a90d8295d (patch)
tree21d95ae3cb4a2916f9090d24b655a3ca79ce11a1
parentc76ebddc9f46e577c9581327fcc84bd8d8809e02 (diff)
downloadruby-45f7b78d29cb4798b68e58c3c674631a90d8295d.tar.gz
* benchmark/gc/gcbench.rb: Do not use GC::Profiler::disable because
GC::Profiler::disable prohibit to access profiling data. It should be spec bug. Skip GC::Profiler::report if RUBY_VERSION < '2.0.0' git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41490 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog8
-rw-r--r--benchmark/gc/gcbench.rb5
2 files changed, 10 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 290fdb371b..77a5048781 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+Thu Jun 20 18:29:26 2013 Koichi Sasada <ko1@atdot.net>
+
+ * benchmark/gc/gcbench.rb: Do not use GC::Profiler::disable because
+ GC::Profiler::disable prohibit to access profiling data. It should
+ be spec bug.
+
+ Skip GC::Profiler::report if RUBY_VERSION < '2.0.0'
+
Thu Jun 20 17:59:08 2013 Koichi Sasada <ko1@atdot.net>
* benchmark/gc/gcbench.rb: stop GC::Profiler before output results.
diff --git a/benchmark/gc/gcbench.rb b/benchmark/gc/gcbench.rb
index aa92f0827d..12ab042ec3 100644
--- a/benchmark/gc/gcbench.rb
+++ b/benchmark/gc/gcbench.rb
@@ -12,12 +12,11 @@ GC::Profiler.enable
tms = Benchmark.measure{|x|
load script
}
+gc_time = GC::Profiler.total_time
+GC::Profiler.report if RUBY_VERSION >= '2.0.0' # before 1.9.3, report() may run infinite loop
GC::Profiler.disable
-GC::Profiler.report
pp GC.stat
-gc_time = GC::Profiler.total_time
-
puts
puts script
puts Benchmark::CAPTION