mirror of
				https://github.com/ruby/ruby.git
				synced 2022-11-09 12:17:21 -05:00 
			
		
		
		
	* benchmark/bm_vm1_gc_wb_ary(_promoted).rb: separate fastpath and
slowpath for WB. Before this change bm_vm1_gc_wb_ary.rb tried to check the performance for WB slowpath (making a reference from oldobj to newobj). However, from Ruby 2.2, 3 GCs are needed to promote new objects because only 3 age objects are promted objects. To compare fastpath and slowpath, introduce new "promoted" version benchmark. bm_vm1_gc_wb_ary.rb is for fastpath and bm_vm1_gc_wb_ary_promoted.rb is for slowpath. * benchmark/bm_vm1_gc_wb_obj(_promtoed).rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49985 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
		
							parent
							
								
									110d8d4f2c
								
							
						
					
					
						commit
						f6e9452b23
					
				
					 5 changed files with 53 additions and 8 deletions
				
			
		
							
								
								
									
										18
									
								
								ChangeLog
									
										
									
									
									
								
							
							
						
						
									
										18
									
								
								ChangeLog
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -1,3 +1,21 @@
 | 
			
		|||
Tue Mar 17 18:51:43 2015  Koichi Sasada  <ko1@atdot.net>
 | 
			
		||||
 | 
			
		||||
	* benchmark/bm_vm1_gc_wb_ary(_promoted).rb: separate fastpath and
 | 
			
		||||
	  slowpath for WB.
 | 
			
		||||
 | 
			
		||||
	  Before this change bm_vm1_gc_wb_ary.rb tried to check the performance
 | 
			
		||||
	  for WB slowpath (making a reference from oldobj to newobj). However,
 | 
			
		||||
	  from Ruby 2.2, 3 GCs are needed to promote new objects because
 | 
			
		||||
	  only 3 age objects are promted objects.
 | 
			
		||||
 | 
			
		||||
	  To compare fastpath and slowpath, introduce new "promoted" version
 | 
			
		||||
	  benchmark.
 | 
			
		||||
 | 
			
		||||
	  bm_vm1_gc_wb_ary.rb is for fastpath and
 | 
			
		||||
	  bm_vm1_gc_wb_ary_promoted.rb is for slowpath.
 | 
			
		||||
 | 
			
		||||
	* benchmark/bm_vm1_gc_wb_obj(_promtoed).rb: ditto.
 | 
			
		||||
 | 
			
		||||
Tue Mar 17 17:23:11 2015  Nobuyoshi Nakada  <nobu@ruby-lang.org>
 | 
			
		||||
 | 
			
		||||
	* dir.c (glob_helper): distinguish not-yet-stated and DT_UNKNOWN
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,10 +1,8 @@
 | 
			
		|||
long_lived = []
 | 
			
		||||
GC.start
 | 
			
		||||
GC.start
 | 
			
		||||
short_lived_ary = []
 | 
			
		||||
 | 
			
		||||
i = 0
 | 
			
		||||
short_lived = ''
 | 
			
		||||
while i<30_000_000 # while loop 1
 | 
			
		||||
  long_lived[0] = short_lived # write barrier
 | 
			
		||||
  short_lived_ary[0] = short_lived # write barrier
 | 
			
		||||
  i+=1
 | 
			
		||||
end
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										14
									
								
								benchmark/bm_vm1_gc_wb_ary_promoted.rb
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										14
									
								
								benchmark/bm_vm1_gc_wb_ary_promoted.rb
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,14 @@
 | 
			
		|||
long_lived = []
 | 
			
		||||
 | 
			
		||||
if RUBY_VERSION > "2.2.0"
 | 
			
		||||
  3.times{ GC.start(immediate_mark: false, lazy_sweep: false) }
 | 
			
		||||
elsif
 | 
			
		||||
  GC.start
 | 
			
		||||
end
 | 
			
		||||
 | 
			
		||||
i = 0
 | 
			
		||||
short_lived = ''
 | 
			
		||||
while i<30_000_000 # while loop 1
 | 
			
		||||
  long_lived[0] = short_lived # write barrier
 | 
			
		||||
  i+=1
 | 
			
		||||
end
 | 
			
		||||
| 
						 | 
				
			
			@ -1,13 +1,11 @@
 | 
			
		|||
class C
 | 
			
		||||
  attr_accessor :foo
 | 
			
		||||
end
 | 
			
		||||
long_lived = C.new
 | 
			
		||||
GC.start
 | 
			
		||||
GC.start
 | 
			
		||||
short_lived_obj = C.new
 | 
			
		||||
 | 
			
		||||
i = 0
 | 
			
		||||
short_lived = ''
 | 
			
		||||
while i<30_000_000 # while loop 1
 | 
			
		||||
  long_lived.foo = short_lived # write barrier
 | 
			
		||||
  short_lived_obj.foo = short_lived # write barrier
 | 
			
		||||
  i+=1
 | 
			
		||||
end
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										17
									
								
								benchmark/bm_vm1_gc_wb_obj_promoted.rb
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										17
									
								
								benchmark/bm_vm1_gc_wb_obj_promoted.rb
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,17 @@
 | 
			
		|||
class C
 | 
			
		||||
  attr_accessor :foo
 | 
			
		||||
end
 | 
			
		||||
long_lived = C.new
 | 
			
		||||
 | 
			
		||||
if RUBY_VERSION > "2.2.0"
 | 
			
		||||
  3.times{ GC.start(immediate_mark: false, lazy_sweep: false) }
 | 
			
		||||
elsif
 | 
			
		||||
  GC.start
 | 
			
		||||
end
 | 
			
		||||
 | 
			
		||||
i = 0
 | 
			
		||||
short_lived = ''
 | 
			
		||||
while i<30_000_000 # while loop 1
 | 
			
		||||
  long_lived.foo = short_lived # write barrier
 | 
			
		||||
  i+=1
 | 
			
		||||
end
 | 
			
		||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue