RESOLVED FIXED Bug 74362
DFG should know exactly why recompilation was triggered
https://bugs.webkit.org/show_bug.cgi?id=74362
Summary DFG should know exactly why recompilation was triggered
Filip Pizlo
Reported 2011-12-12 15:44:24 PST
Currently the DFG can update predictions on OSR failure, which, in the case of recompilation, greatly reduces the likelihood that the DFG will repeat a broken type speculation on recompilation. But the same is not true of slow case profiles.
Attachments
work in progress (22.14 KB, patch)
2011-12-12 15:57 PST, Filip Pizlo
no flags
work in progress (105.81 KB, patch)
2011-12-12 16:36 PST, Filip Pizlo
no flags
work in progress (114.98 KB, patch)
2011-12-12 16:52 PST, Filip Pizlo
no flags
work in progress (119.87 KB, patch)
2011-12-12 17:22 PST, Filip Pizlo
no flags
the patch (118.29 KB, patch)
2011-12-13 00:38 PST, Filip Pizlo
no flags
the patch (118.28 KB, patch)
2011-12-13 00:54 PST, Filip Pizlo
webkit-ews: commit-queue-
the patch (153.34 KB, patch)
2011-12-13 01:17 PST, Filip Pizlo
webkit-ews: commit-queue-
the patch (154.99 KB, patch)
2011-12-13 01:33 PST, Filip Pizlo
no flags
Filip Pizlo
Comment 1 2011-12-12 15:44:51 PST
Filip Pizlo
Comment 2 2011-12-12 15:57:05 PST
Created attachment 118894 [details] work in progress Still working on it.
Filip Pizlo
Comment 3 2011-12-12 16:36:57 PST
Created attachment 118905 [details] work in progress Patched in the code that identifies the kind of an OSR exit. Still need to patch it into the parser as well, so that it can use this new information.
Filip Pizlo
Comment 4 2011-12-12 16:52:04 PST
Created attachment 118909 [details] work in progress Patched it into the parser, as well.
Filip Pizlo
Comment 5 2011-12-12 17:22:18 PST
Created attachment 118920 [details] work in progress I've checked that this does what it claims to do on simple programs, but I still need to run a bunch more tests.
Filip Pizlo
Comment 6 2011-12-13 00:24:24 PST
Looks like this is a minor win on some benchmarks, and never a major regression. [pizlo@nitroflex bencher] ./bencher TipOfTree:/Volumes/Data/pizlo/quinary/OpenSource/WebKitBuild/Release/jsc SlowPathFreq:/Volumes/Data/pizlo/tertiary/OpenSource/WebKitBuild/Release/jsc --remote oldmac,bigmac Packaging VM builds for remote hosts... Sending VM builds to oldmac... Running on oldmac... 376/376 Generating benchmark report at TipOfTree_SlowPathFreq_SunSpiderV8Kraken_20111213_0019_benchReport.txt Benchmark report for SunSpider, V8, and Kraken on oldmac.local (MacPro4,1). VMs tested: "TipOfTree" at /Volumes/Data/pizlo/quinary/OpenSource/WebKitBuild/Release/jsc (r102562) "SlowPathFreq" at /Volumes/Data/pizlo/tertiary/OpenSource/WebKitBuild/Release/jsc (r102562) Collected 12 samples per benchmark/VM, with 4 VM invocations per benchmark. Emitted a call to gc() between sample measurements. 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. TipOfTree SlowPathFreq SunSpider: 3d-cube 8.8537+-0.0418 8.8348+-0.0360 3d-morph 10.0126+-0.0337 ? 10.0364+-0.0569 ? 3d-raytrace 9.2705+-0.0833 ? 9.3075+-0.0829 ? access-binary-trees 1.9180+-0.0113 1.9117+-0.0096 access-fannkuch 9.0954+-0.0176 ? 9.1007+-0.0099 ? access-nbody 4.7385+-0.0082 ? 4.7480+-0.0106 ? access-nsieve 3.7839+-0.0161 3.7817+-0.0047 bitops-3bit-bits-in-byte 1.5116+-0.0262 1.4914+-0.0073 might be 1.0136x faster bitops-bits-in-byte 6.1183+-0.0333 6.1153+-0.0153 bitops-bitwise-and 3.9754+-0.0045 3.9723+-0.0054 bitops-nsieve-bits 6.8446+-0.0439 ? 6.8711+-0.0342 ? controlflow-recursive 2.8318+-0.0134 2.8117+-0.0151 crypto-aes 8.6727+-0.0778 ? 8.7265+-0.0741 ? crypto-md5 2.9831+-0.0511 2.9571+-0.0347 crypto-sha1 2.6242+-0.0427 ? 2.6282+-0.0349 ? date-format-tofte 12.8675+-0.0976 ? 13.0371+-0.2123 ? might be 1.0132x slower date-format-xparb 12.0446+-0.0974 12.0009+-0.1378 math-cordic 8.6462+-0.0370 8.6418+-0.0214 math-partial-sums 12.5511+-0.0403 ? 12.5806+-0.0218 ? math-spectral-norm 3.1285+-0.0067 ? 3.1378+-0.0046 ? regexp-dna 10.7195+-0.0460 10.6978+-0.0606 string-base64 5.1285+-0.0427 ? 5.1960+-0.0392 ? might be 1.0132x slower string-fasta 8.7138+-0.0261 8.7121+-0.0231 string-tagcloud 15.0303+-0.0631 ^ 14.7932+-0.0552 ^ definitely 1.0160x faster string-unpack-code 26.0091+-0.1118 ^ 25.5598+-0.2073 ^ definitely 1.0176x faster string-validate-input 6.7967+-0.0649 6.7567+-0.0726 <arithmetic> * 7.8796+-0.0276 7.8619+-0.0286 might be 1.0023x faster <geometric> 6.3770+-0.0228 6.3696+-0.0224 might be 1.0012x faster <harmonic> 5.0324+-0.0197 5.0210+-0.0185 might be 1.0023x faster TipOfTree SlowPathFreq V8: crypto 91.9402+-0.2729 ? 92.4680+-0.3077 ? deltablue 210.3022+-2.0088 ^ 202.4297+-0.9445 ^ definitely 1.0389x faster earley-boyer 119.7940+-1.0201 ? 119.9616+-1.7648 ? raytrace 63.2143+-0.2426 ? 63.6921+-0.4632 ? regexp 146.0133+-0.2159 ! 147.0763+-0.3609 ! definitely 1.0073x slower richards 168.4466+-0.5277 ? 169.0543+-0.9127 ? splay 108.6495+-0.8520 107.1163+-1.0375 might be 1.0143x faster <arithmetic> 129.7657+-0.3659 ^ 128.8283+-0.4251 ^ definitely 1.0073x faster <geometric> * 121.5136+-0.2987 121.0456+-0.3954 might be 1.0039x faster <harmonic> 113.2842+-0.2703 113.1795+-0.3618 might be 1.0009x faster TipOfTree SlowPathFreq Kraken: ai-astar 895.9352+-0.8130 ? 896.4024+-0.4021 ? audio-beat-detection 248.6911+-0.5466 248.5920+-0.6787 audio-dft 333.3400+-2.7790 331.6210+-3.0525 audio-fft 161.0966+-0.4296 161.0934+-0.7409 audio-oscillator 342.2135+-5.6457 ? 353.6643+-7.7995 ? might be 1.0335x slower imaging-darkroom 413.3798+-8.7537 ^ 392.9760+-7.6859 ^ definitely 1.0519x faster imaging-desaturate 287.2541+-0.2385 ? 287.2603+-0.1409 ? imaging-gaussian-blur 759.8175+-1.6110 758.5884+-0.3347 json-parse-financial 84.5241+-0.4509 ! 85.9248+-0.2761 ! definitely 1.0166x slower json-stringify-tinderbox 99.8472+-0.2651 ? 100.0103+-0.2507 ? stanford-crypto-aes 142.0881+-0.9562 141.3378+-0.5837 stanford-crypto-ccm 135.5311+-0.5801 ? 135.7462+-0.6035 ? stanford-crypto-pbkdf2 278.7077+-1.7176 ? 279.0637+-2.1180 ? stanford-crypto-sha256-iterative 116.7660+-0.4616 116.2726+-0.0987 <arithmetic> * 307.0851+-0.7445 306.3252+-0.8887 might be 1.0025x faster <geometric> 238.7213+-0.5459 238.4980+-0.6135 might be 1.0009x faster <harmonic> 192.0314+-0.3293 ? 192.2999+-0.3633 ? might be 1.0014x slower TipOfTree SlowPathFreq All benchmarks: <arithmetic> 115.1579+-0.2095 114.7821+-0.3217 might be 1.0033x faster <geometric> 29.0997+-0.0711 29.0564+-0.0847 might be 1.0015x faster <harmonic> 8.8659+-0.0342 8.8463+-0.0321 might be 1.0022x faster TipOfTree SlowPathFreq Geomean of preferred means: <scaled-result> 66.4958+-0.1303 66.3057+-0.1910 might be 1.0029x faster Sending VM builds to bigmac... Running on bigmac... 376/376 Generating benchmark report at TipOfTree_SlowPathFreq_SunSpiderV8Kraken_20111213_0023_benchReport.txt Benchmark report for SunSpider, V8, and Kraken on bigmac.local (MacPro5,1). VMs tested: "TipOfTree" at /Volumes/Data/pizlo/quinary/OpenSource/WebKitBuild/Release/jsc (r102562) "SlowPathFreq" at /Volumes/Data/pizlo/tertiary/OpenSource/WebKitBuild/Release/jsc (r102562) Collected 12 samples per benchmark/VM, with 4 VM invocations per benchmark. Emitted a call to gc() between sample measurements. 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. TipOfTree SlowPathFreq SunSpider: 3d-cube 7.3496+-0.0191 7.3342+-0.0248 3d-morph 8.3914+-0.1279 ? 8.4922+-0.1617 ? might be 1.0120x slower 3d-raytrace 7.7298+-0.0734 7.7275+-0.0661 access-binary-trees 1.5971+-0.0062 ? 1.6089+-0.0161 ? access-fannkuch 7.5285+-0.0065 ? 7.5354+-0.0162 ? access-nbody 3.9722+-0.0376 3.9436+-0.0082 access-nsieve 3.2177+-0.0644 3.1874+-0.0412 bitops-3bit-bits-in-byte 1.2329+-0.0050 ? 1.2454+-0.0142 ? might be 1.0101x slower bitops-bits-in-byte 5.0886+-0.0433 5.0775+-0.0170 bitops-bitwise-and 3.2872+-0.0044 3.2872+-0.0057 bitops-nsieve-bits 5.6650+-0.0341 ? 5.6770+-0.0306 ? controlflow-recursive 2.3524+-0.0171 2.3325+-0.0282 crypto-aes 7.1755+-0.0338 ? 7.2163+-0.0356 ? crypto-md5 2.4668+-0.0273 ? 2.4882+-0.0270 ? crypto-sha1 2.1764+-0.0247 ? 2.1816+-0.0341 ? date-format-tofte 10.5628+-0.0405 ? 10.7561+-0.1757 ? might be 1.0183x slower date-format-xparb 9.8099+-0.0632 ! 10.1406+-0.1309 ! definitely 1.0337x slower math-cordic 7.2481+-0.0737 7.1668+-0.0421 might be 1.0113x faster math-partial-sums 10.4499+-0.0604 10.4214+-0.0482 math-spectral-norm 2.6001+-0.0034 ? 2.6060+-0.0026 ? regexp-dna 8.8181+-0.0134 ? 8.8221+-0.0136 ? string-base64 4.2187+-0.0183 ? 4.2351+-0.0269 ? string-fasta 7.1984+-0.0136 7.1975+-0.0083 string-tagcloud 12.4292+-0.0447 ^ 12.2340+-0.0319 ^ definitely 1.0159x faster string-unpack-code 20.9372+-0.1241 20.7755+-0.2039 string-validate-input 5.5901+-0.0305 ? 5.6698+-0.0779 ? might be 1.0143x slower <arithmetic> * 6.5036+-0.0209 ? 6.5138+-0.0189 ? might be 1.0016x slower <geometric> 5.2804+-0.0171 ? 5.2912+-0.0176 ? might be 1.0020x slower <harmonic> 4.1695+-0.0140 ? 4.1804+-0.0172 ? might be 1.0026x slower TipOfTree SlowPathFreq V8: crypto 75.9742+-0.1769 ? 76.3517+-0.2398 ? deltablue 172.8290+-0.4310 ^ 168.2014+-0.7885 ^ definitely 1.0275x faster earley-boyer 99.1258+-0.9898 ? 99.3990+-1.3403 ? raytrace 52.6548+-0.3492 52.6276+-0.4544 regexp 122.8457+-0.3108 ? 123.3843+-0.7095 ? richards 139.8939+-0.5605 ? 140.1635+-0.4490 ? splay 92.0049+-1.4515 ? 92.0586+-1.7017 ? <arithmetic> 107.9040+-0.3600 107.4552+-0.3193 might be 1.0042x faster <geometric> * 101.1485+-0.3840 100.9556+-0.3413 might be 1.0019x faster <harmonic> 94.3474+-0.3875 94.3129+-0.3536 might be 1.0004x faster TipOfTree SlowPathFreq Kraken: ai-astar 826.8116+-0.6011 817.1519+-11.0256 might be 1.0118x faster audio-beat-detection 203.4016+-0.7946 203.0116+-0.5714 audio-dft 275.2446+-2.4037 ? 276.8894+-1.9989 ? audio-fft 131.7718+-0.2776 131.7168+-0.2538 audio-oscillator 285.5972+-4.8680 284.5543+-4.3878 imaging-darkroom 345.3616+-7.5269 ^ 323.4195+-6.6397 ^ definitely 1.0678x faster imaging-desaturate 237.5173+-0.0433 ? 237.6266+-0.1685 ? imaging-gaussian-blur 626.0200+-0.1894 ? 626.1248+-0.2975 ? json-parse-financial 69.9829+-0.2149 ! 70.9664+-0.4633 ! definitely 1.0141x slower json-stringify-tinderbox 82.6340+-0.3166 82.4322+-0.1534 stanford-crypto-aes 117.9230+-0.8331 ? 119.7628+-1.7808 ? might be 1.0156x slower stanford-crypto-ccm 114.0365+-0.4470 113.6476+-0.5184 stanford-crypto-pbkdf2 228.7191+-0.6243 ? 230.2047+-1.7885 ? stanford-crypto-sha256-iterative 96.2021+-0.7075 96.0268+-0.4065 <arithmetic> * 260.0874+-0.6421 ^ 258.1097+-1.1704 ^ definitely 1.0077x faster <geometric> 199.0161+-0.4565 198.3234+-0.6149 might be 1.0035x faster <harmonic> 159.1484+-0.2925 ? 159.2616+-0.3870 ? might be 1.0007x slower TipOfTree SlowPathFreq All benchmarks: <arithmetic> 97.1414+-0.2101 ^ 96.4911+-0.3598 ^ definitely 1.0067x faster <geometric> 24.1635+-0.0588 24.1587+-0.0625 might be 1.0002x faster <harmonic> 7.3461+-0.0242 ? 7.3649+-0.0297 ? might be 1.0026x slower TipOfTree SlowPathFreq Geomean of preferred means: <scaled-result> 55.5148+-0.1256 55.3673+-0.1331 might be 1.0027x faster
Filip Pizlo
Comment 7 2011-12-13 00:38:37 PST
Created attachment 118969 [details] the patch
WebKit Review Bot
Comment 8 2011-12-13 00:40:38 PST
Attachment 118969 [details] did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/JavaScriptCore/ChangeLog', u'Source..." exit_code: 1 Source/JavaScriptCore/dfg/DFGOSRExit.h:85: The parameter name "kind" adds no information, so it should be removed. [readability/parameter_name] [5] Source/JavaScriptCore/bytecode/DFGExitProfile.h:162: The parameter name "site" adds no information, so it should be removed. [readability/parameter_name] [5] Total errors found: 2 in 18 files If any of these errors are false positives, please file a bug against check-webkit-style.
Filip Pizlo
Comment 9 2011-12-13 00:54:36 PST
Created attachment 118970 [details] the patch Fix style.
Early Warning System Bot
Comment 10 2011-12-13 01:07:21 PST
Filip Pizlo
Comment 11 2011-12-13 01:17:22 PST
Created attachment 118973 [details] the patch Ooops, forgot to write the same code twice.
Early Warning System Bot
Comment 12 2011-12-13 01:28:27 PST
Filip Pizlo
Comment 13 2011-12-13 01:33:36 PST
Created attachment 118976 [details] the patch Forgot to add some build stuff.
WebKit Review Bot
Comment 14 2011-12-13 11:50:06 PST
Comment on attachment 118976 [details] the patch Clearing flags on attachment: 118976 Committed r102694: <http://trac.webkit.org/changeset/102694>
WebKit Review Bot
Comment 15 2011-12-13 11:50:16 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.