[webkit-reviews] review requested: [Bug 86553] JSGlobalData ScratchBuffers Are Not Visited During Garbage Collection : [Attachment 142493] Updated Patch with call to clearScratchBuffers()

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu May 17 09:59:56 PDT 2012


Michael Saboff <msaboff at apple.com> has asked  for review:
Bug 86553: JSGlobalData ScratchBuffers Are Not Visited During Garbage
Collection
https://bugs.webkit.org/show_bug.cgi?id=86553

Attachment 142493: Updated Patch with call to clearScratchBuffers()
https://bugs.webkit.org/attachment.cgi?id=142493&action=review

------- Additional Comments from Michael Saboff <msaboff at apple.com>
(In reply to comment #9)
> > My guess is that we are using some large scratch buffers in DSP.  I'll
investigate their size.
> 
> I'd be interested to know the average and max scratch buffer sizes we
encounter.
> 
> That said, it looks like the patch you posted doesn't include any calls to
clearScratchBuffers(). Your regression may be due to prolonging object
lifetimes indefinitely.

Added call to clearScratchBuffer().

Reran perf tests.  Things are improved, but there are still regressions in
V8Real-boyer (11%), V8Real-regexp (2%) and DSP-filtrr-posterize-tint (15%).

I'll instrument to find the avg and max scratch buffer sizes.

Benchmark report for SunSpider, V8, V8Real, Kraken, JSBench, JSRegress, and DSP
on msaboff-pro (MacPro5,1).

VMs tested:
"BaseLine" at
/Volumes/Data/src/webkit.baseline/WebKitBuild/Release/DumpRenderTree (r117391)
"VisitScratchBuffers" at
/Volumes/Data/src/webkit/WebKitBuild/Release/DumpRenderTree (r117391)

Collected 24 samples per benchmark/VM, with 4 VM invocations per benchmark. No
manual garbage collection invocations were
emitted. Used 1 benchmark iteration per VM invocation for warm-up. Used the
jsc-specific preciseTime() function to get
microsecond-level timing. Reporting benchmark execution times with 95%
confidence intervals in milliseconds.

						   BaseLine	      
VisitScratchBuffers				   
SunSpider:
   3d-cube					7.6382+-0.1017	   !	 
8.1743+-0.3596	      ! definitely 1.0702x slower
   3d-morph					7.3621+-0.0534	   ?	 
7.3885+-0.0471	      ?
   3d-raytrace					9.9905+-0.2774	   ?	
10.0949+-0.3039        ? might be 1.0104x slower
   access-binary-trees				1.8445+-0.0207		 
1.8380+-0.0194	      
   access-fannkuch				7.5688+-0.0393		 
7.5483+-0.0196	      
   access-nbody 				3.9595+-0.0532		 
3.9594+-0.0553	      
   access-nsieve				3.6748+-0.0372	   ?	 
3.6748+-0.0357	      ?
   bitops-3bit-bits-in-byte			1.4279+-0.0109		 
1.4236+-0.0070	      
   bitops-bits-in-byte				5.5123+-0.0472	   ?	 
5.5168+-0.0481	      ?
   bitops-bitwise-and				3.4382+-0.0144		 
3.4333+-0.0085	      
   bitops-nsieve-bits				3.3341+-0.0136	   ?	 
3.3558+-0.0215	      ?
   controlflow-recursive			2.4750+-0.0186		 
2.4709+-0.0192	      
   crypto-aes					7.9060+-0.1131		 
7.8586+-0.0957	      
   crypto-md5					3.4962+-0.0526	   ?	 
3.5057+-0.0476	      ?
   crypto-sha1					2.8158+-0.0306	   ?	 
2.8340+-0.0284	      ?
   date-format-tofte			       13.7028+-0.7998		
13.6085+-0.8305        
   date-format-xparb			       11.7095+-0.6318		
11.4952+-0.5794 	 might be 1.0186x faster
   math-cordic					4.3427+-0.0518	   ?	 
4.3489+-0.0604	      ?
   math-partial-sums				9.2762+-0.0821	   ^	 
9.1460+-0.0399	      ^ definitely 1.0142x faster
   math-spectral-norm				2.9644+-0.0323		 
2.9639+-0.0290	      
   regexp-dna					9.8113+-0.0776	   ?	 
9.9496+-0.0802	      ? might be 1.0141x slower
   string-base64				5.7630+-0.4708		 
5.2252+-0.3278		might be 1.1029x faster
   string-fasta 				7.8887+-0.2574		 
7.8652+-0.2491	      
   string-tagcloud			       13.4021+-0.2315	   ?	
13.5341+-0.2386        ?
   string-unpack-code			       24.6493+-1.2497	   ^	
22.3556+-0.5754        ^ definitely 1.1026x faster
   string-validate-input			8.6108+-0.5751	   ?	 
8.6282+-0.5595	      ?

   <arithmetic> *				7.0986+-0.1110		 
7.0076+-0.0584		might be 1.0130x faster
   <geometric>					5.7031+-0.0543		 
5.6756+-0.0283		might be 1.0048x faster
   <harmonic>					4.5681+-0.0276		 
4.5581+-0.0184		might be 1.0022x faster

						   BaseLine	      
VisitScratchBuffers				   
V8:
   crypto				       75.4699+-0.3748	   ?	
76.1831+-0.4941        ?
   deltablue				      156.7851+-1.0209	   ?   
159.0510+-1.5313	? might be 1.0145x slower
   earley-boyer 			       93.4869+-0.3133		
93.0661+-0.3407        
   raytrace				       55.4889+-0.9941		
55.3468+-0.9577        
   regexp				       94.7245+-0.4325		
94.6743+-0.4086        
   richards				      144.5699+-3.7234	   ?   
145.2562+-1.6123	?
   splay				      121.8940+-13.8473        
111.7071+-10.5208	  might be 1.0912x faster

   <arithmetic> 			      106.0599+-1.8881	       
105.0407+-1.4594	  might be 1.0097x faster
   <geometric> *			       99.8749+-1.4358		
99.0898+-1.2208 	 might be 1.0079x faster
   <harmonic>				       93.8181+-0.9615		
93.2795+-0.9191 	 might be 1.0058x faster

						   BaseLine	      
VisitScratchBuffers				   
V8Real:
   encrypt				       0.42686+-0.00061 	
0.42662+-0.00107       
   decrypt				       7.44261+-0.02793    ?	
7.44473+-0.01255       ?
   deltablue			      x2       0.95299+-0.00888 	
0.94254+-0.00671	 might be 1.0111x faster
   earley				       3.17639+-0.03090 	
3.15148+-0.03737       
   boyer				      15.62556+-0.07386    !   
17.39136+-0.06645	! definitely 1.1130x slower
   raytrace			      x2       6.93767+-0.08055    ?	
6.93848+-0.06828       ?
   regexp			      x2      26.97673+-0.10808    !   
27.53988+-0.15392	! definitely 1.0209x slower
   richards			      x2       0.38134+-0.00274    ?	
0.38363+-0.00302       ?
   splay			      x2       0.93975+-0.01782    ?	
0.94127+-0.01919       ?

   <arithmetic> 			       7.07488+-0.01734    !	
7.27899+-0.02245       ! definitely 1.0288x slower
   <geometric> *			       2.59907+-0.00637    !	
2.62400+-0.00827       ! definitely 1.0096x slower
   <harmonic>				       1.10272+-0.00378    ?	
1.10416+-0.00637       ? might be 1.0013x slower

						   BaseLine	      
VisitScratchBuffers				   
Kraken:
   ai-astar				       825.529+-6.831	   ?	
827.945+-5.930	       ?
   audio-beat-detection 		       202.458+-0.854	   ?	
203.063+-1.056	       ?
   audio-dft				       291.652+-0.912	   ?	
293.150+-0.658	       ?
   audio-fft				       119.908+-0.227	   ?	
120.103+-0.268	       ?
   audio-oscillator			       322.027+-0.433	   !	
323.395+-0.793	       ! definitely 1.0042x slower
   imaging-darkroom			       305.505+-1.329	   ?	
305.749+-1.708	       ?
   imaging-desaturate			       219.772+-0.200	   ?	
220.013+-0.260	       ?
   imaging-gaussian-blur		       457.636+-0.344		
457.345+-0.286	       
   json-parse-financial 			66.807+-0.260	   ^	 
66.310+-0.150	      ^ definitely 1.0075x faster
   json-stringify-tinderbox			84.468+-0.233	   !	 
85.364+-0.248	      ! definitely 1.0106x slower
   stanford-crypto-aes				88.754+-0.378	   ^	 
88.076+-0.261	      ^ definitely 1.0077x faster
   stanford-crypto-ccm				94.881+-0.394	   ?	 
95.091+-0.473	      ?
   stanford-crypto-pbkdf2		       193.877+-0.575		
193.384+-0.552	       
   stanford-crypto-sha256-iterative		95.064+-0.291		 
94.879+-0.218	      

   <arithmetic> *			       240.596+-0.473	   ?	
240.991+-0.466	       ? might be 1.0016x slower
   <geometric>				       183.907+-0.171	   ?	
184.056+-0.181	       ? might be 1.0008x slower
   <harmonic>				       146.859+-0.153		
146.835+-0.118		 might be 1.0002x faster

						   BaseLine	      
VisitScratchBuffers				   
JSBench:
   amazon				       18.0833+-0.2761		
18.0417+-0.2635        
   facebook				       72.7917+-2.5760		
70.7083+-2.4794 	 might be 1.0295x faster
   google				       97.3333+-2.3778	   ?	
99.0833+-2.2167        ? might be 1.0180x slower
   twitter				       51.9167+-0.2127		
51.7917+-0.2149        
   yahoo				       22.4583+-0.2149		
22.3333+-0.2033        

   <arithmetic> *			       52.5167+-0.5288		
52.3917+-0.6895 	 might be 1.0024x faster
   <geometric>				       43.0929+-0.2808		
42.9160+-0.3924 	 might be 1.0041x faster
   <harmonic>				       34.8956+-0.2225		
34.7447+-0.2568 	 might be 1.0043x faster

						   BaseLine	      
VisitScratchBuffers				   
JSRegress:
   adapt-to-double-divide		       72.7993+-0.1640		
72.7789+-0.1399        
   aliased-arguments-getbyval			3.6778+-0.1797	   ?	 
3.6864+-0.1811	      ?
   arity-mismatch-inlining			1.2527+-0.0226		 
1.2481+-0.0207	      
   big-int-mul				       29.1196+-0.3597	   ?	
29.4550+-0.4643        ? might be 1.0115x slower
   boolean-test 				3.9331+-0.0094		 
3.9291+-0.0117	      
   cast-int-to-double			       14.1323+-0.0103	   ?	
14.1396+-0.0198        ?
   cfg-simplify 				6.6048+-0.0230		 
6.5899+-0.0067	      
   cmpeq-obj-to-obj-other		       13.9148+-0.4460		
13.8551+-0.4528        
   constant-test			       27.1749+-0.0926		
27.1329+-0.0575        
   direct-arguments-getbyval			0.6942+-0.0080	   ?	 
0.6994+-0.0094	      ?
   double-pollution-getbyval			8.7667+-0.0126	   ?	 
8.8327+-0.0552	      ?
   double-pollution-putbyoffset 		4.7326+-0.0408		 
4.6795+-0.0406		might be 1.0113x faster
   external-arguments-getbyval			4.3451+-0.1865		 
4.3442+-0.1900	      
   external-arguments-putbyval			7.0146+-0.3043		 
6.9897+-0.3226	      
   Float32Array-matrix-mult		       11.3433+-0.4849		
11.3403+-0.5515        
   fold-double-to-int			       33.6169+-0.0770	   ?	
34.0122+-0.3748        ? might be 1.0118x slower
   function-test				4.5889+-0.0218		 
4.5652+-0.0292	      
   inline-arguments-access			3.6047+-0.0151	   ?	 
3.6108+-0.0218	      ?
   inline-arguments-local-escape	       39.7807+-1.5892		
39.5610+-1.2593        
   int-overflow-local			      102.6140+-0.1205	   ?   
102.6674+-0.1153	?
   Int16Array-bubble-sort		       70.4634+-1.3327		
69.1422+-1.1507 	 might be 1.0191x faster
   Int16Array-load-int-mul		       15.9369+-0.1157		
15.8395+-0.0913        
   Int8Array-load				4.7754+-0.0492		 
4.7634+-0.0626	      
   integer-divide			       14.8176+-0.0255	   ?	
14.8602+-0.0360        ?
   method-on-number			      190.9984+-2.0137	   ?   
192.6862+-2.4090	?
   number-test					3.9347+-0.0152		 
3.9147+-0.0152	      
   object-test					4.2352+-0.0257		 
4.2327+-0.0321	      
   poly-stricteq			       91.2725+-0.3988		
91.1868+-0.3670        
   rare-osr-exit-on-local		      151.3971+-0.2817	   ^   
150.8141+-0.1539	^ definitely 1.0039x faster
   simple-activation-demo		       55.1085+-0.0983		
55.0981+-0.1281        
   slow-convergence			       90.1628+-0.3554		
90.0917+-0.2935        
   string-hash				       14.6232+-0.2043		
14.4087+-0.1655 	 might be 1.0149x faster
   string-test					3.7646+-0.0249		 
3.7472+-0.0274	      
   tear-off-arguments				3.8142+-0.1890		 
3.7598+-0.1781		might be 1.0145x faster
   to-int32-boolean			       29.2344+-0.2806		
29.0884+-0.0999        
   undefined-test				4.2088+-0.0204	   ?	 
4.2117+-0.0232	      ?

   <arithmetic> 			       31.7350+-0.0858		
31.7212+-0.1114 	 might be 1.0004x faster
   <geometric> *			       13.0177+-0.0826		
12.9954+-0.0859 	 might be 1.0017x faster
   <harmonic>					5.7446+-0.0439		 
5.7415+-0.0455		might be 1.0005x faster

						   BaseLine	      
VisitScratchBuffers				   
DSP:
   filtrr-posterize-tint		       49.0858+-0.4281	   !	
56.3526+-1.3970        ! definitely 1.1480x slower
   filtrr-tint-contrast-sat-bright	       81.1976+-0.5604	   ?	
81.4146+-0.5446        ?
   filtrr-tint-sat-adj-contr-mult	       93.5226+-0.6975	   ?	
94.5968+-0.8942        ? might be 1.0115x slower
   filtrr-blur-overlay-sat-contr	      231.9381+-0.7855	   ^   
230.1953+-0.5450	^ definitely 1.0076x faster
   filtrr-sat-blur-mult-sharpen-contr	      289.8628+-1.8513	       
289.6081+-1.8766	
   filtrr-sepia-bias			       33.5683+-0.3988		
33.5252+-0.4178        
   route9-vp8			      x5     1599.6274+-7.4486	   ?  
1605.2971+-9.5441	 ?

   <arithmetic> 			      797.9375+-3.3477	   ?   
801.1071+-4.2938	? might be 1.0040x slower
   <geometric> *			      347.0646+-0.8033	   !   
352.1084+-1.3685	! definitely 1.0145x slower
   <harmonic>				      130.8101+-0.4321	   !   
135.1173+-0.9201	! definitely 1.0329x slower

						   BaseLine	      
VisitScratchBuffers				   
All benchmarks:
   <arithmetic> 			      128.9976+-0.3469	   ?   
129.2863+-0.4662	? might be 1.0022x slower
   <geometric>				       20.1577+-0.0748	   ?	
20.1655+-0.0590        ? might be 1.0004x slower
   <harmonic>					4.5103+-0.0171	   ?	 
4.5108+-0.0214	      ? might be 1.0001x slower

						   BaseLine	      
VisitScratchBuffers				   
Geomean of preferred means:
   <scaled-result>			       37.5389+-0.1292	   ?	
37.5443+-0.1006        ? might be 1.0001x slower


More information about the webkit-reviews mailing list