* benchmark/bm_vm4_pass_flood.rb: new benchmark for GVL fairness.
* benchmark/bm_vm4_alive_check1.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32093 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
556cd0de07
commit
7f6e8625bb
@ -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>
|
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
|
* thread_pthread.c (gvl_yield): fix live lock issue on 1-2 cpus
|
||||||
|
6
benchmark/bm_vm4_alive_check1.rb
Normal file
6
benchmark/bm_vm4_alive_check1.rb
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
5000.times{
|
||||||
|
t = Thread.new{}
|
||||||
|
while t.alive?
|
||||||
|
Thread.pass
|
||||||
|
end
|
||||||
|
}
|
8
benchmark/bm_vm4_pass_flood.rb
Normal file
8
benchmark/bm_vm4_pass_flood.rb
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
1000.times{
|
||||||
|
Thread.new{loop{Thread.pass}}
|
||||||
|
}
|
||||||
|
|
||||||
|
i=0
|
||||||
|
while i<10000
|
||||||
|
i += 1
|
||||||
|
end
|
Loading…
x
Reference in New Issue
Block a user