summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--benchmark/bm_vm4_alive_check1.rb6
-rw-r--r--benchmark/bm_vm4_pass_flood.rb8
3 files changed, 19 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index c9c9e7d87f..e1e948a452 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Wed Jun 15 03:52:50 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+
+ * benchmark/bm_vm4_pass_flood.rb: new benchmark for GVL fairness.
+ * benchmark/bm_vm4_alive_check1.rb: ditto.
+
Wed Jun 15 01:27:53 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
* thread_pthread.c (gvl_yield): fix live lock issue on 1-2 cpus
diff --git a/benchmark/bm_vm4_alive_check1.rb b/benchmark/bm_vm4_alive_check1.rb
new file mode 100644
index 0000000000..aebe99875d
--- /dev/null
+++ b/benchmark/bm_vm4_alive_check1.rb
@@ -0,0 +1,6 @@
+5000.times{
+ t = Thread.new{}
+ while t.alive?
+ Thread.pass
+ end
+}
diff --git a/benchmark/bm_vm4_pass_flood.rb b/benchmark/bm_vm4_pass_flood.rb
new file mode 100644
index 0000000000..56b5b0a956
--- /dev/null
+++ b/benchmark/bm_vm4_pass_flood.rb
@@ -0,0 +1,8 @@
+1000.times{
+ Thread.new{loop{Thread.pass}}
+}
+
+i=0
+while i<10000
+ i += 1
+end