Simple line layout: Small tweaks to improve performance.
[WebKit-https.git] / PerformanceTests / ChangeLog
1 2017-01-30  Zalan Bujtas  <zalan@apple.com>
2
3         Simple line layout: Small tweaks to improve performance.
4         https://bugs.webkit.org/show_bug.cgi?id=167611
5         <rdar://problem/30274294>
6
7         Reviewed by Simon Fraser.
8
9         * Layout/simple-line-layout-non-repeating-text.html: Added.
10
11 2017-01-13  Said Abou-Hallawa  <sabouhallawa@apple.com>
12
13         26 MotionMark performance tests failing
14         https://bugs.webkit.org/show_bug.cgi?id=166854
15
16         Reviewed by Ryosuke Niwa.
17         
18         Skip running MotionMark on WebKit perf bots.
19
20         * Skipped:
21
22 2017-01-06  Said Abou-Hallawa  <sabouhallawa@apple.com>
23
24         Rename the directory and the files of MotionMark from Animometer to MotionMark
25         https://bugs.webkit.org/show_bug.cgi?id=166659
26
27         Reviewed by Jon Lee.
28         
29         Rename the directory and the files of the benchmark to its new name.
30
31         * MotionMark/developer.html: Renamed from PerformanceTests/Animometer/developer.html.
32         * MotionMark/index.html: Renamed from PerformanceTests/Animometer/index.html.
33         * MotionMark/resources/debug-runner/d3.min.js: Renamed from PerformanceTests/Animometer/resources/debug-runner/d3.min.js.
34         * MotionMark/resources/debug-runner/graph.js: Renamed from PerformanceTests/Animometer/resources/debug-runner/graph.js.
35         * MotionMark/resources/debug-runner/motionmark.css: Renamed from PerformanceTests/Animometer/resources/debug-runner/animometer.css.
36         * MotionMark/resources/debug-runner/motionmark.js: Renamed from PerformanceTests/Animometer/resources/debug-runner/animometer.js.
37         * MotionMark/resources/debug-runner/tests.js: Renamed from PerformanceTests/Animometer/resources/debug-runner/tests.js.
38         * MotionMark/resources/extensions.js: Renamed from PerformanceTests/Animometer/resources/extensions.js.
39         * MotionMark/resources/runner/benchmark-runner.js: Renamed from PerformanceTests/Animometer/resources/runner/benchmark-runner.js.
40         * MotionMark/resources/runner/crystal.svg: Renamed from PerformanceTests/Animometer/resources/runner/crystal.svg.
41         * MotionMark/resources/runner/lines.svg: Renamed from PerformanceTests/Animometer/resources/runner/lines.svg.
42         * MotionMark/resources/runner/logo.svg: Renamed from PerformanceTests/Animometer/resources/runner/logo.svg.
43         * MotionMark/resources/runner/motionmark.css: Renamed from PerformanceTests/Animometer/resources/runner/animometer.css.
44         * MotionMark/resources/runner/motionmark.js: Renamed from PerformanceTests/Animometer/resources/runner/animometer.js.
45         * MotionMark/resources/runner/tests.js: Renamed from PerformanceTests/Animometer/resources/runner/tests.js.
46         * MotionMark/resources/statistics.js: Renamed from PerformanceTests/Animometer/resources/statistics.js.
47         * MotionMark/resources/strings.js: Renamed from PerformanceTests/Animometer/resources/strings.js.
48         * MotionMark/tests/3d/resources/webgl.js: Renamed from PerformanceTests/Animometer/tests/3d/resources/webgl.js.
49         * MotionMark/tests/3d/webgl.html: Renamed from PerformanceTests/Animometer/tests/3d/webgl.html.
50         * MotionMark/tests/bouncing-particles/bouncing-canvas-images.html: Renamed from PerformanceTests/Animometer/tests/bouncing-particles/bouncing-canvas-images.html.
51         * MotionMark/tests/bouncing-particles/bouncing-canvas-shapes.html: Renamed from PerformanceTests/Animometer/tests/bouncing-particles/bouncing-canvas-shapes.html.
52         * MotionMark/tests/bouncing-particles/bouncing-css-images.html: Renamed from PerformanceTests/Animometer/tests/bouncing-particles/bouncing-css-images.html.
53         * MotionMark/tests/bouncing-particles/bouncing-css-shapes.html: Renamed from PerformanceTests/Animometer/tests/bouncing-particles/bouncing-css-shapes.html.
54         * MotionMark/tests/bouncing-particles/bouncing-svg-images.html: Renamed from PerformanceTests/Animometer/tests/bouncing-particles/bouncing-svg-images.html.
55         * MotionMark/tests/bouncing-particles/bouncing-svg-shapes.html: Renamed from PerformanceTests/Animometer/tests/bouncing-particles/bouncing-svg-shapes.html.
56         * MotionMark/tests/bouncing-particles/bouncing-tagged-images.html: Renamed from PerformanceTests/Animometer/tests/bouncing-particles/bouncing-tagged-images.html.
57         * MotionMark/tests/bouncing-particles/resources/bouncing-canvas-images.js: Renamed from PerformanceTests/Animometer/tests/bouncing-particles/resources/bouncing-canvas-images.js.
58         * MotionMark/tests/bouncing-particles/resources/bouncing-canvas-particles.js: Renamed from PerformanceTests/Animometer/tests/bouncing-particles/resources/bouncing-canvas-particles.js.
59         * MotionMark/tests/bouncing-particles/resources/bouncing-canvas-shapes.js: Renamed from PerformanceTests/Animometer/tests/bouncing-particles/resources/bouncing-canvas-shapes.js.
60         * MotionMark/tests/bouncing-particles/resources/bouncing-css-images.js: Renamed from PerformanceTests/Animometer/tests/bouncing-particles/resources/bouncing-css-images.js.
61         * MotionMark/tests/bouncing-particles/resources/bouncing-css-shapes.js: Renamed from PerformanceTests/Animometer/tests/bouncing-particles/resources/bouncing-css-shapes.js.
62         * MotionMark/tests/bouncing-particles/resources/bouncing-svg-images.js: Renamed from PerformanceTests/Animometer/tests/bouncing-particles/resources/bouncing-svg-images.js.
63         * MotionMark/tests/bouncing-particles/resources/bouncing-svg-particles.js: Renamed from PerformanceTests/Animometer/tests/bouncing-particles/resources/bouncing-svg-particles.js.
64         * MotionMark/tests/bouncing-particles/resources/bouncing-svg-shapes.js: Renamed from PerformanceTests/Animometer/tests/bouncing-particles/resources/bouncing-svg-shapes.js.
65         * MotionMark/tests/bouncing-particles/resources/bouncing-tagged-images.js: Renamed from PerformanceTests/Animometer/tests/bouncing-particles/resources/bouncing-tagged-images.js.
66         * MotionMark/tests/bouncing-particles/resources/image1.jpg: Renamed from PerformanceTests/Animometer/tests/bouncing-particles/resources/image1.jpg.
67         * MotionMark/tests/bouncing-particles/resources/image2.jpg: Renamed from PerformanceTests/Animometer/tests/bouncing-particles/resources/image2.jpg.
68         * MotionMark/tests/bouncing-particles/resources/image3.jpg: Renamed from PerformanceTests/Animometer/tests/bouncing-particles/resources/image3.jpg.
69         * MotionMark/tests/bouncing-particles/resources/image4.jpg: Renamed from PerformanceTests/Animometer/tests/bouncing-particles/resources/image4.jpg.
70         * MotionMark/tests/bouncing-particles/resources/image5.jpg: Renamed from PerformanceTests/Animometer/tests/bouncing-particles/resources/image5.jpg.
71         * MotionMark/tests/dom/compositing-transforms.html: Renamed from PerformanceTests/Animometer/tests/dom/compositing-transforms.html.
72         * MotionMark/tests/dom/focus.html: Renamed from PerformanceTests/Animometer/tests/dom/focus.html.
73         * MotionMark/tests/dom/leaves.html: Renamed from PerformanceTests/Animometer/tests/dom/leaves.html.
74         * MotionMark/tests/dom/particles.html: Renamed from PerformanceTests/Animometer/tests/dom/particles.html.
75         * MotionMark/tests/dom/resources/compositing-transforms.js: Renamed from PerformanceTests/Animometer/tests/dom/resources/compositing-transforms.js.
76         * MotionMark/tests/dom/resources/dom-particles.js: Renamed from PerformanceTests/Animometer/tests/dom/resources/dom-particles.js.
77         * MotionMark/tests/dom/resources/focus.js: Renamed from PerformanceTests/Animometer/tests/dom/resources/focus.js.
78         * MotionMark/tests/dom/resources/leaves.js: Renamed from PerformanceTests/Animometer/tests/dom/resources/leaves.js.
79         * MotionMark/tests/master/canvas-stage.html: Renamed from PerformanceTests/Animometer/tests/master/canvas-stage.html.
80         * MotionMark/tests/master/focus.html: Renamed from PerformanceTests/Animometer/tests/master/focus.html.
81         * MotionMark/tests/master/image-data.html: Renamed from PerformanceTests/Animometer/tests/master/image-data.html.
82         * MotionMark/tests/master/leaves.html: Renamed from PerformanceTests/Animometer/tests/master/leaves.html.
83         * MotionMark/tests/master/multiply.html: Renamed from PerformanceTests/Animometer/tests/master/multiply.html.
84         * MotionMark/tests/master/resources/canvas-stage.js: Renamed from PerformanceTests/Animometer/tests/master/resources/canvas-stage.js.
85         * MotionMark/tests/master/resources/canvas-tests.js: Renamed from PerformanceTests/Animometer/tests/master/resources/canvas-tests.js.
86         * MotionMark/tests/master/resources/compass.svg: Renamed from PerformanceTests/Animometer/tests/master/resources/compass.svg.
87         * MotionMark/tests/master/resources/compass100.png: Renamed from PerformanceTests/Animometer/tests/master/resources/compass100.png.
88         * MotionMark/tests/master/resources/console.svg: Renamed from PerformanceTests/Animometer/tests/master/resources/console.svg.
89         * MotionMark/tests/master/resources/console100.png: Renamed from PerformanceTests/Animometer/tests/master/resources/console100.png.
90         * MotionMark/tests/master/resources/contribute.svg: Renamed from PerformanceTests/Animometer/tests/master/resources/contribute.svg.
91         * MotionMark/tests/master/resources/contribute100.png: Renamed from PerformanceTests/Animometer/tests/master/resources/contribute100.png.
92         * MotionMark/tests/master/resources/debugger.svg: Renamed from PerformanceTests/Animometer/tests/master/resources/debugger.svg.
93         * MotionMark/tests/master/resources/debugger100.png: Renamed from PerformanceTests/Animometer/tests/master/resources/debugger100.png.
94         * MotionMark/tests/master/resources/focus.js: Renamed from PerformanceTests/Animometer/tests/master/resources/focus.js.
95         * MotionMark/tests/master/resources/image-data.js: Renamed from PerformanceTests/Animometer/tests/master/resources/image-data.js.
96         * MotionMark/tests/master/resources/inspector.svg: Renamed from PerformanceTests/Animometer/tests/master/resources/inspector.svg.
97         * MotionMark/tests/master/resources/inspector100.png: Renamed from PerformanceTests/Animometer/tests/master/resources/inspector100.png.
98         * MotionMark/tests/master/resources/layout.svg: Renamed from PerformanceTests/Animometer/tests/master/resources/layout.svg.
99         * MotionMark/tests/master/resources/layout100.png: Renamed from PerformanceTests/Animometer/tests/master/resources/layout100.png.
100         * MotionMark/tests/master/resources/leaves.js: Renamed from PerformanceTests/Animometer/tests/master/resources/leaves.js.
101         * MotionMark/tests/master/resources/multiply.js: Renamed from PerformanceTests/Animometer/tests/master/resources/multiply.js.
102         * MotionMark/tests/master/resources/particles.js: Renamed from PerformanceTests/Animometer/tests/master/resources/particles.js.
103         * MotionMark/tests/master/resources/performance.svg: Renamed from PerformanceTests/Animometer/tests/master/resources/performance.svg.
104         * MotionMark/tests/master/resources/performance100.png: Renamed from PerformanceTests/Animometer/tests/master/resources/performance100.png.
105         * MotionMark/tests/master/resources/script.svg: Renamed from PerformanceTests/Animometer/tests/master/resources/script.svg.
106         * MotionMark/tests/master/resources/script100.png: Renamed from PerformanceTests/Animometer/tests/master/resources/script100.png.
107         * MotionMark/tests/master/resources/shortcuts.svg: Renamed from PerformanceTests/Animometer/tests/master/resources/shortcuts.svg.
108         * MotionMark/tests/master/resources/shortcuts100.png: Renamed from PerformanceTests/Animometer/tests/master/resources/shortcuts100.png.
109         * MotionMark/tests/master/resources/standards.svg: Renamed from PerformanceTests/Animometer/tests/master/resources/standards.svg.
110         * MotionMark/tests/master/resources/standards100.png: Renamed from PerformanceTests/Animometer/tests/master/resources/standards100.png.
111         * MotionMark/tests/master/resources/storage.svg: Renamed from PerformanceTests/Animometer/tests/master/resources/storage.svg.
112         * MotionMark/tests/master/resources/storage100.png: Renamed from PerformanceTests/Animometer/tests/master/resources/storage100.png.
113         * MotionMark/tests/master/resources/styles.svg: Renamed from PerformanceTests/Animometer/tests/master/resources/styles.svg.
114         * MotionMark/tests/master/resources/styles100.png: Renamed from PerformanceTests/Animometer/tests/master/resources/styles100.png.
115         * MotionMark/tests/master/resources/svg-particles.js: Renamed from PerformanceTests/Animometer/tests/master/resources/svg-particles.js.
116         * MotionMark/tests/master/resources/text.js: Renamed from PerformanceTests/Animometer/tests/master/resources/text.js.
117         * MotionMark/tests/master/resources/timeline.svg: Renamed from PerformanceTests/Animometer/tests/master/resources/timeline.svg.
118         * MotionMark/tests/master/resources/timeline100.png: Renamed from PerformanceTests/Animometer/tests/master/resources/timeline100.png.
119         * MotionMark/tests/master/svg-particles.html: Renamed from PerformanceTests/Animometer/tests/master/svg-particles.html.
120         * MotionMark/tests/master/text.html: Renamed from PerformanceTests/Animometer/tests/master/text.html.
121         * MotionMark/tests/resources/main.js: Renamed from PerformanceTests/Animometer/tests/resources/main.js.
122         * MotionMark/tests/resources/math.js: Renamed from PerformanceTests/Animometer/tests/resources/math.js.
123         * MotionMark/tests/resources/stage.css: Renamed from PerformanceTests/Animometer/tests/resources/stage.css.
124         * MotionMark/tests/resources/star.svg: Renamed from PerformanceTests/Animometer/tests/resources/star.svg.
125         * MotionMark/tests/resources/yin-yang.png: Renamed from PerformanceTests/Animometer/tests/resources/yin-yang.png.
126         * MotionMark/tests/resources/yin-yang.svg: Renamed from PerformanceTests/Animometer/tests/resources/yin-yang.svg.
127         * MotionMark/tests/simple/resources/simple-canvas-paths.js: Renamed from PerformanceTests/Animometer/tests/simple/resources/simple-canvas-paths.js.
128         * MotionMark/tests/simple/resources/simple-canvas.js: Renamed from PerformanceTests/Animometer/tests/simple/resources/simple-canvas.js.
129         * MotionMark/tests/simple/resources/tiled-canvas-image.js: Renamed from PerformanceTests/Animometer/tests/simple/resources/tiled-canvas-image.js.
130         * MotionMark/tests/simple/simple-canvas-paths.html: Renamed from PerformanceTests/Animometer/tests/simple/simple-canvas-paths.html.
131         * MotionMark/tests/simple/tiled-canvas-image.html: Renamed from PerformanceTests/Animometer/tests/simple/tiled-canvas-image.html.
132         * MotionMark/tests/template/resources/template-canvas.js: Renamed from PerformanceTests/Animometer/tests/template/resources/template-canvas.js.
133         * MotionMark/tests/template/resources/template-css.js: Renamed from PerformanceTests/Animometer/tests/template/resources/template-css.js.
134         * MotionMark/tests/template/resources/template-svg.js: Renamed from PerformanceTests/Animometer/tests/template/resources/template-svg.js.
135         * MotionMark/tests/template/template-canvas.html: Renamed from PerformanceTests/Animometer/tests/template/template-canvas.html.
136         * MotionMark/tests/template/template-css.html: Renamed from PerformanceTests/Animometer/tests/template/template-css.html.
137         * MotionMark/tests/template/template-svg.html: Renamed from PerformanceTests/Animometer/tests/template/template-svg.html.
138
139 2016-12-13  Brady Eidson  <beidson@apple.com>
140
141         Add a PerfTest targeting IDBObjectStore.get().
142         https://bugs.webkit.org/show_bug.cgi?id=165816
143
144         Reviewed by Alex Christensen.
145
146         * IndexedDB/objectstore-get.html: Added.
147
148 2016-12-13  Brady Eidson  <beidson@apple.com>
149
150         Add a PerfTest targeting IDBIndex.get().
151         https://bugs.webkit.org/show_bug.cgi?id=165803
152
153         Reviewed by Alex Christensen.
154
155         * IndexedDB/index-get.html: Added.
156
157 2016-12-12  Brady Eidson  <beidson@apple.com>
158
159         More IndexedDB perf tests.
160         https://bugs.webkit.org/show_bug.cgi?id=165634
161
162         Reviewed by Sam Weinig.
163
164         * IndexedDB/index-multientry.html:
165         * IndexedDB/large-number-of-inserts-responsiveness.html: Added.
166         * IndexedDB/large-number-of-inserts.html: Added.
167         * IndexedDB/objectstore-cursor.html: Added. Runtime cut in 1/4th compared to r209672.
168
169         * resources/runner.js:
170
171 2016-12-12  Commit Queue  <commit-queue@webkit.org>
172
173         Unreviewed, rolling out r209672.
174         https://bugs.webkit.org/show_bug.cgi?id=165766
175
176         IndexedDB/objectstore-cursor.html perf test always times out
177         (Requested by ap on #webkit).
178
179         Reverted changeset:
180
181         "More IndexedDB perf tests."
182         https://bugs.webkit.org/show_bug.cgi?id=165634
183         http://trac.webkit.org/changeset/209672
184
185 2016-12-10  Brady Eidson  <beidson@apple.com>
186
187         More IndexedDB perf tests.
188         https://bugs.webkit.org/show_bug.cgi?id=165634
189
190         Reviewed by Sam Weinig.
191
192         * IndexedDB/index-multientry.html:
193         * IndexedDB/large-number-of-inserts-responsiveness.html: Added.
194         * IndexedDB/large-number-of-inserts.html: Added.
195         * IndexedDB/objectstore-cursor.html: Added.
196         
197         * resources/runner.js: Add "track responsiveness" functionality to PerfTestRunner.
198
199 2016-12-06  Filip Pizlo  <fpizlo@apple.com>
200
201         Concurrent GC should be stable enough to land enabled
202         https://bugs.webkit.org/show_bug.cgi?id=164990
203
204         Reviewed by Geoffrey Garen.
205         
206         Made CDjs more configurable and refined the "large.js" configuration. I was using that one and
207         the new "long.js" configuration to tune concurrent eden GCs.
208         
209         Added a new way of running Splay in browser, which using chartjs to plot the execution times of
210         2000 iterations. This includes the minified chartjs.
211
212         * JetStream/Octane2/splay-detail.html: Added.
213         * JetStream/cdjs/benchmark.js:
214         (benchmarkImpl):
215         (benchmark):
216         * JetStream/cdjs/long.js: Added.
217
218 2016-12-07  Brady Eidson  <beidson@apple.com>
219
220         Add IDB perf tests stressing key size.
221         https://bugs.webkit.org/show_bug.cgi?id=165567
222
223         Reviewed by Alex Christensen.
224
225         * IndexedDB/large-array-keys.html: Added.
226         * IndexedDB/large-binary-keys.html: Added.
227         * IndexedDB/large-string-keys.html: Added.
228
229 2016-12-05  Brady Eidson  <beidson@apple.com>
230
231         Add an IndexedDB perf test to PerformanceTests.
232         https://bugs.webkit.org/show_bug.cgi?id=165430
233
234         Reviewed by Alex Christensen.
235
236         * IndexedDB/index-multientry.html: Added.
237
238 2016-12-02  Filip Pizlo  <fpizlo@apple.com>
239
240         ES6SampleBench should report an average for Steady State so that all of the numbers are comparable
241         https://bugs.webkit.org/show_bug.cgi?id=165325
242
243         Reviewed by Saam Barati.
244
245         This makes all of the numbers that ES6SampleBench reports comparable to each other: they all speak of the time
246         it took to run an iteration of something.
247
248         * ES6SampleBench/results.js:
249         (Results.prototype.reportResult):
250
251 2016-11-18  Jer Noble  <jer.noble@apple.com>
252
253         Add some performance tests for various aspects of media loading and playback.
254         https://bugs.webkit.org/show_bug.cgi?id=164977
255
256         Reviewed by Darin Adler.
257
258         Add new tests for a few aspects of media playback; namely: how quickly  media elements fire
259         the "canplaythrough" event when all data is immediately available, how quickly HLS playback
260         switches resolutions, and at what playback rate MSE-backed video can play without dropping
261         frames. Skip these tests by default, as they're not runnable on all ports, and they require
262         a webserver (run-webkit-httpd) to complete on macOS.
263
264         * Media/HLSCanPlayThrough.html: Added.
265         * Media/HLSGearChange.html: Added.
266         * Media/MSECanPlayThrough.html: Added.
267         * Media/MSEPlaybackRate.html: Added.
268         * Media/StandardCanPlayThrough.html: Added.
269         * Media/hls/1080p/iframe_index.m3u8: Added.
270         * Media/hls/1080p/prog_index.m3u8: Added.
271         * Media/hls/1080p/test.ts: Added.
272         * Media/hls/480p/iframe_index.m3u8: Added.
273         * Media/hls/480p/prog_index.m3u8: Added.
274         * Media/hls/480p/test.ts: Added.
275         * Media/hls/720p/iframe_index.m3u8: Added.
276         * Media/hls/720p/prog_index.m3u8: Added.
277         * Media/hls/720p/test.ts: Added.
278         * Media/hls/720p/test.ts.back: Added.
279         * Media/hls/index.m3u8: Added.
280         * Media/media-source-loader.js: Added.
281         (MediaSourceLoader):
282         (MediaSourceLoader.prototype.loadManifest):
283         (MediaSourceLoader.prototype.loadManifestSucceeded):
284         (MediaSourceLoader.prototype.loadManifestFailed):
285         (MediaSourceLoader.prototype.loadMediaData):
286         (MediaSourceLoader.prototype.loadMediaDataSucceeded):
287         (MediaSourceLoader.prototype.loadMediaDataFailed):
288         (MediaSourceLoader.prototype.get type):
289         (MediaSourceLoader.prototype.get duration):
290         (MediaSourceLoader.prototype.get initSegment):
291         (MediaSourceLoader.prototype.get mediaSegmentsLength):
292         (MediaSourceLoader.prototype.mediaSegments):
293         (MediaSourceLoader.prototype.get everyMediaSegment):
294         * Media/test-fragmented-video.json: Added.
295         * Media/test-fragmented-video.mp4: Added.
296         * Media/test.mp4: Added.
297         * Skipped:
298
299 2016-11-18  Filip Pizlo  <fpizlo@apple.com>
300
301         Concurrent GC should be able to run splay in debug mode and earley/raytrace in release mode with no perf regression
302         https://bugs.webkit.org/show_bug.cgi?id=164282
303
304         Reviewed by Geoffrey Garen and Oliver Hunt.
305         
306         CDjs is a fun benchmark for stressing concurrent GCs, but to really give the GC a good
307         workout you need to increase the amount of work that the test does. This adds a second
308         configuration of the benchmark that has more aircraft. It uses much more memory and causes us
309         to do more GCs and those GCs take longer.
310
311         * JetStream/cdjs/benchmark.js:
312         (benchmarkImpl):
313         (benchmark):
314         * JetStream/cdjs/large.js: Added.
315
316 2016-11-14  Filip Pizlo  <fpizlo@apple.com>
317
318         Unreviewed, revert unintended change.
319
320         * ES6SampleBench/Air/benchmark.js:
321
322 2016-10-03  Saam Barati  <sbarati@apple.com>
323
324         MapHash should speculate on the type of its child node
325         https://bugs.webkit.org/show_bug.cgi?id=161922
326
327         Reviewed by Filip Pizlo.
328
329         I gave the main generator a name so it's easier to see what
330         it is when using the sampling profiler.
331
332         * ES6SampleBench/Basic/ast.js:
333         (Basic.Program):
334
335 2016-09-19  Sergio Villar Senin  <svillar@igalia.com>
336
337         [css-grid] Remove the x2 computation of row sizes with indefinite heights
338         https://bugs.webkit.org/show_bug.cgi?id=162150
339
340         Reviewed by Darin Adler.
341
342         Added a new test case which checks the layout performance of grids inside other grids, i.e,
343         grids acting both as grid container and grid item.
344
345         * Layout/nested-grid.html: Added.
346
347 2016-09-09  Simon Fraser  <simon.fraser@apple.com>
348
349         Perf test Animation/css-accelerated-animation.html failing
350         https://bugs.webkit.org/show_bug.cgi?id=161795
351
352         Skip Animation/css-accelerated-animation.html since this only works as a MobileSafari
353         perf test.
354
355         * Skipped:
356
357 2016-09-08  Simon Fraser  <simon.fraser@apple.com>
358
359         Add a content-animation test with accelerated CSS animations
360         https://bugs.webkit.org/show_bug.cgi?id=161776
361
362         Reviewed by Dean Jackson.
363
364         Add a test that measures the frame rate of accelerated CSS animations.
365
366         This is like css-animation.html (which animates 'left' and 'top') but animates
367         transforms instead. In order to get animation in X and Y we make two nested elements
368         and set transformX() on one, and transformY() on the other.
369
370         * Animation/css-accelerated-animation.html: Added.
371
372 2016-08-23  Saam Barati  <sbarati@apple.com>
373
374         It should be easy to run ES6SampleBench from the jsc shell
375         https://bugs.webkit.org/show_bug.cgi?id=161085
376
377         Reviewed by Yusuke Suzuki.
378
379         This patch makes ES6 sample bench runnable through the `jsc` shell.
380         To do that, you need to be in the PerformanceTests/ES6SampleBench
381         directory and run `jsc cli.js`. To make this work, the benchmark
382         is now aware of being run in two modes: via the browser, and via
383         the shell. Each entry point will set a variable `isInBrowser`,
384         and the benchmark will do different things based on if that
385         variable is true or false.
386
387         * ES6SampleBench/Air/benchmark.js:
388         * ES6SampleBench/Air/stress-test.js:
389         * ES6SampleBench/Basic/benchmark.js:
390         (runBenchmark):
391         * ES6SampleBench/Basic/stress-test.js:
392         * ES6SampleBench/air_benchmark.js:
393         * ES6SampleBench/basic_benchmark.js:
394         * ES6SampleBench/cli.js: Added.
395         (return.doRun):
396         (makeBenchmarkRunner):
397         * ES6SampleBench/driver.js:
398         (Driver):
399         (Driver.prototype._recomputeSummary):
400         (Driver.prototype._iterate.window.setTimeout):
401         (Driver.prototype._iterate):
402         (Driver.prototype._updateIterations):
403         * ES6SampleBench/glue.js:
404         (reportResult):
405         * ES6SampleBench/index.html:
406         * ES6SampleBench/results.js:
407         (Results):
408         (Results.prototype.reportRunning):
409         (Results.prototype.reportDone):
410         (Results.prototype.reportError):
411         * ES6SampleBench/stats.js:
412         (Stats):
413         (Stats.prototype.toString):
414         (Stats.prototype._update):
415
416 2016-08-01  Said Abou-Hallawa  <sabouhallawa@apple.com>
417
418         Add an option to run the MotionMark tests with classic tile size (512x512)
419         https://bugs.webkit.org/show_bug.cgi?id=160371
420
421         Reviewed by Darin Adler.
422
423         Setting the body to large size (3000x3000) and overflow to scroll forces
424         the classic tile size (512x512). This option does not affect the canvas
425         tests because the canvas is displayed on one tile regardless of its size.
426
427         * Animometer/developer.html:
428         * Animometer/resources/debug-runner/animometer.css:
429         (body.showing-test-container.tiles-big):
430         (body.showing-test-container.tiles-classic):
431         * Animometer/resources/debug-runner/animometer.js:
432         * Animometer/resources/runner/animometer.js:
433         (window.benchmarkController.startBenchmark):
434
435 2016-06-29  Filip Pizlo  <fpizlo@apple.com>
436
437         Generators violate bytecode liveness validation
438         https://bugs.webkit.org/show_bug.cgi?id=159279
439
440         Reviewed by Yusuke Suzuki.
441
442         Add Basic to our test harness.
443
444         Also made some cosmetic changes to the benchmark harness.
445
446         * ES6SampleBench/Basic/basic-tests.yaml: Added.
447         * ES6SampleBench/Basic/stress-test.js: Added.
448         (preciseTime):
449         * ES6SampleBench/driver.js:
450         (Driver):
451         (Driver.prototype.start):
452         (Driver.prototype.reportError):
453         * ES6SampleBench/glue.js:
454         * ES6SampleBench/index.html:
455
456 2016-06-28  Filip Pizlo  <fpizlo@apple.com>
457
458         ES6SampleBench should have a harness
459         https://bugs.webkit.org/show_bug.cgi?id=159246
460
461         Reviewed by Saam Barati.
462         
463         This adds a simple web harness for ES6SampleBench. It runs Air and Basic 10 times for 200
464         iterations each and reports three metrics:
465         
466         First iteration: the time it takes for the first iteration to run. This is the first
467         iteration after the benchmark is loaded into the iframe, so it's representative of what
468         would happen if one of these workloads only ran for a short time.
469         
470         Worst 2%: of the last 199 iterations, the average of the worst 2% iterations. If code like
471         any of these workloads was used in an important event handler, you'd want that code to run
472         well in the worst case in addition to having great throughput.
473         
474         Steady state: the total of the last 199 iterations. This is representative of what would
475         happen if you ran code like this for a long time.
476         
477         The total score is the geomean of the firstIteration/worstCase/steadyState numbers of the
478         two benchmarks.
479         
480         The harness does statistics using Student's T-distribution confidence intervals.
481
482         * ES6SampleBench/Basic/benchmark.js:
483         (Benchmark):
484         * ES6SampleBench/air_benchmark.js: Added.
485         * ES6SampleBench/basic_benchmark.js: Added.
486         * ES6SampleBench/driver.js: Added.
487         (Driver):
488         (Driver.prototype.addBenchmark):
489         (Driver.prototype.start):
490         (Driver.prototype.reportResult):
491         (Driver.prototype.reportError):
492         (Driver.prototype._recomputeSummary.Geomean):
493         (Driver.prototype._recomputeSummary.Geomean.prototype.add):
494         (Driver.prototype._recomputeSummary.Geomean.prototype.get result):
495         (Driver.prototype._recomputeSummary):
496         (Driver.prototype._iterate):
497         (Driver.prototype._updateIterations):
498         * ES6SampleBench/glue.js: Added.
499         * ES6SampleBench/index.html: Added.
500         * ES6SampleBench/results.js: Added.
501         (Results):
502         (Results.prototype.get benchmark):
503         (Results.prototype.reset):
504         (Results.prototype.reportRunning):
505         (Results.prototype.reportDone):
506         (Results.prototype.reportResult.averageAbovePercentile):
507         (Results.prototype.reportResult):
508         (Results.prototype.reportError):
509         * ES6SampleBench/stats.js: Added.
510         (Stats):
511         (Stats.prototype.reset):
512         (Stats.prototype.add):
513         (Stats.prototype.get numIterations):
514         (Stats.prototype.valueForIteration):
515         (Stats.get result.tDist):
516         (Stats.prototype.get result):
517         (Stats.prototype.toString):
518         (Stats.prototype._update):
519         * ES6SampleBench/style.css: Added.
520         (body):
521         (body, th, tr):
522         (h1, h2, h3, h4):
523         (h1):
524         (h2):
525         (h3):
526         (hr):
527         (address):
528         (img):
529         (.underline):
530         (ol.loweralpha):
531         (ol.upperalpha):
532         (ol.lowerroman):
533         (ol.upperroman):
534         (ol.arabic):
535         (.banner-link:link, .banner-link:visited):
536         (:link, :visited):
537         (h4 :link, h4 :visited, h5 :link, h5 :visited, h6 :link, h6 :visited):
538         (.anchor:link, .anchor:visited):
539         (* > .anchor:link, * > .anchor:visited):
540         (span:hover .anchor):
541         (a.forbidden, span.forbidden):
542         (a.missing:hover):
543         (a.closed:link, a.closed:visited, span.closed):
544         (pre):
545         (div.code):
546         (div.code pre):
547         (dt):
548         (dd):
549         (dd:last-child):
550         (.site-logo):
551         (.site-logo .tagline):
552         (table):
553         (#contents):
554         (p):
555         (p:last-child):
556         (th):
557         (td):
558
559 2016-06-28  Jon Lee  <jonlee@apple.com>
560
561         Update focus test
562         https://bugs.webkit.org/show_bug.cgi?id=159242
563         rdar://problem/27070007
564
565         Reviewed by Dean Jackson.
566         Provisionally reviewed by Said Abou-Hallawa.
567
568         Move previous test to dom suite, and update the test for better reporting of frame rate, although
569         it uses a different rendering path.
570
571         * Animometer/resources/debug-runner/tests.js: Add to dom suite.
572         * Animometer/tests/dom/focus.html: Copied from PerformanceTests/Animometer/tests/master/focus.html.
573         * Animometer/tests/dom/resources/focus.js: Copied from PerformanceTests/Animometer/tests/master/resources/focus.js.
574         * Animometer/tests/master/focus.html: Remove center element.
575         * Animometer/tests/master/resources/focus.js: Use narrower size range with smaller particles. Remove the
576         container elements. Inline getBlurValue and getOpacityValue since they are only called once.
577
578 2016-06-28  Filip Pizlo  <fpizlo@apple.com>
579
580         Move Air.js and Basic into ES6SampleBench
581
582         Rubber stamped by Geoffrey Garen.
583         
584         We want to group our ES6 benchmarks together, and eventually, we want to give them a
585         common harness.
586
587         * Air.js: Removed.
588         * Air.js/README.md: Removed.
589         * Air.js/airjs-tests.yaml: Removed.
590         * Air.js/all.js: Removed.
591         * Air.js/allocate_stack.js: Removed.
592         * Air.js/arg.js: Removed.
593         * Air.js/basic_block.js: Removed.
594         * Air.js/benchmark.js: Removed.
595         * Air.js/code.js: Removed.
596         * Air.js/custom.js: Removed.
597         * Air.js/frequented_block.js: Removed.
598         * Air.js/insertion_set.js: Removed.
599         * Air.js/inst.js: Removed.
600         * Air.js/liveness.js: Removed.
601         * Air.js/make_dist.sh: Removed.
602         * Air.js/opcode.js: Removed.
603         * Air.js/payload-airjs-ACLj8C.js: Removed.
604         * Air.js/payload-gbemu-executeIteration.js: Removed.
605         * Air.js/payload-imaging-gaussian-blur-gaussianBlur.js: Removed.
606         * Air.js/payload-typescript-scanIdentifier.js: Removed.
607         * Air.js/reg.js: Removed.
608         * Air.js/stack_slot.js: Removed.
609         * Air.js/stress-test.js: Removed.
610         * Air.js/strip-hash.rb: Removed.
611         * Air.js/symbols.js: Removed.
612         * Air.js/test.html: Removed.
613         * Air.js/test.js: Removed.
614         * Air.js/tmp.js: Removed.
615         * Air.js/tmp_base.js: Removed.
616         * Air.js/util.js: Removed.
617         * Basic: Removed.
618         * Basic/ast.js: Removed.
619         * Basic/basic.js: Removed.
620         * Basic/benchmark.js: Removed.
621         * Basic/caseless_map.js: Removed.
622         * Basic/lexer.js: Removed.
623         * Basic/number.js: Removed.
624         * Basic/parser.js: Removed.
625         * Basic/random.js: Removed.
626         * Basic/state.js: Removed.
627         * Basic/test.html: Removed.
628         * Basic/test.js: Removed.
629         * Basic/util.js: Removed.
630         * ES6SampleBench: Added.
631         * ES6SampleBench/Air: Copied from PerformanceTests/Air.js.
632         * ES6SampleBench/Basic: Copied from PerformanceTests/Basic.
633         * Skipped:
634
635 2016-06-24  Filip Pizlo  <fpizlo@apple.com>
636
637         Add a ES6 generator benchmark
638         https://bugs.webkit.org/show_bug.cgi?id=159101
639
640         Rubber stamped by Keith Miller.
641         
642         This adds a Basic interpreter loosely based on ECMA-55:
643         
644         http://www.ecma-international.org/publications/files/ECMA-ST-WITHDRAWN/ECMA-55,%201st%20Edition,%20January%201978.pdf
645         
646         It includes a lexer that is a generator, a parser that uses regular expressions, and an AST
647         walk interpreter where the walking functions for statements are generators that call each
648         other with yield*. This enables the interpreter to look like an AST walk even though it can
649         yield at INPUT and PRINT statements.
650         
651         This also uses for-of, classes, Map, and WeakMap. It also uses deprecated-but-awesome RegExp
652         features like RegExp.lastMatch and RegExp.rightContext. I did it that way because this is
653         how I've always written lexers in dynamic languages; see offlineasm's lex() method in
654         parser.rb for example.
655         
656         The benchmark runs a handful of simple Basic programs. The longest-running one computes
657         prime numbers.
658         
659         Includes a command-line and web harness. On my machine it runs in 2-3 seconds.
660
661         * Basic: Added.
662         * Basic/ast.js: Added.
663         (Basic.NumberApply):
664         (Basic.Variable):
665         (Basic.Const):
666         (Basic.NumberPow):
667         (Basic.NumberMul):
668         (Basic.NumberDiv):
669         (Basic.NumberNeg):
670         (Basic.NumberAdd):
671         (Basic.NumberSub):
672         (Basic.StringVar):
673         (Basic.Equals):
674         (Basic.NotEquals):
675         (Basic.LessThan):
676         (Basic.GreaterThan):
677         (Basic.LessEqual):
678         (Basic.GreaterEqual):
679         (Basic.GoTo):
680         (Basic.GoSub):
681         (Basic.Def):
682         (Basic.Let):
683         (Basic.If):
684         (Basic.Return):
685         (Basic.Stop):
686         (Basic.On):
687         (sideState.shouldStop):
688         (Basic.For):
689         (Basic.Next):
690         (Basic.Print):
691         (Basic.Input):
692         (Basic.Read):
693         (Basic.Restore):
694         (Basic.Dim):
695         (Basic.Randomize):
696         (Basic.End):
697         (Basic.Program):
698         * Basic/basic.js: Added.
699         (prepare):
700         (simulate):
701         * Basic/benchmark.js: Added.
702         (Benchmark):
703         (Benchmark.prototype.runIteration.expect):
704         (Benchmark.prototype.runIteration):
705         (runBenchmark):
706         * Basic/caseless_map.js: Added.
707         (CaselessMap):
708         * Basic/lexer.js: Added.
709         (lex.consumeWhitespace):
710         (lex.consume):
711         (lex):
712         * Basic/lexer_test.js: Added.
713         * Basic/number.js: Added.
714         (NumberValue):
715         (NumberValue.prototype.get value):
716         (NumberValue.prototype.apply):
717         (NumberValue.prototype.leftApply):
718         (NumberValue.prototype.assign):
719         (NumberArray.):
720         (NumberArray):
721         (NumberArray.prototype.apply):
722         (NumberArray.prototype.leftApply):
723         (NumberFunction):
724         (NumberFunction.prototype.apply):
725         (NumberFunction.prototype.leftApply):
726         (NativeFunction):
727         (NativeFunction.prototype.apply):
728         (NativeFunction.prototype.leftApply):
729         * Basic/parser.js: Added.
730         (parse):
731         (parse.pushToken):
732         (parse.peekToken):
733         (parse.consumeKind):
734         (parse.consumeToken):
735         (parse.parseVariable):
736         (parse.parseNumericExpression.parsePrimary):
737         (parse.parseNumericExpression.parseFactor):
738         (parse.parseNumericExpression.parseTerm):
739         (parse.parseNumericExpression):
740         (parse.parseConstant):
741         (parse.parseStringExpression):
742         (parse.isStringExpression):
743         (parse.parseRelationalExpression):
744         (parse.parseNonNegativeInteger):
745         (parse.parseGoToStatement):
746         (parse.parseGoSubStatement):
747         (parse.parseStatement):
748         (parse.parseStatements):
749         * Basic/random.js: Added.
750         (createRNG):
751         (createRNGWithFixedSeed):
752         (createRNGWithRandomSeed):
753         * Basic/state.js: Added.
754         (State):
755         (State.prototype.getValue):
756         (State.prototype.getSideState):
757         (State.prototype.abort):
758         (State.prototype.validate):
759         * Basic/test.html: Added.
760         * Basic/test.js: Added.
761         * Basic/util.js: Added.
762         (this.performance.performance.now.currentTime):
763         (else.this.preciseTime.currentTime):
764         (else.currentTime):
765         * Skipped: Make sure that we don't run Basic yet.
766
767 2016-06-21  Jon Lee  <jonlee@apple.com>
768
769         Update canvas size when benchmark begins
770         https://bugs.webkit.org/show_bug.cgi?id=159010
771
772         Reviewed by Dean Jackson.
773
774         Previously we would evaluate the media queries and assign the canvas size to the test
775         on body.onload. Instead, do it once the user starts the benchmark.
776
777         * Animometer/resources/debug-runner/animometer.js: Move benchmarkController.determineCanvasSize()
778         to benchmarkController._startBenchmark.
779         * Animometer/resources/runner/animometer.js: Ditto.
780
781 2016-06-21  Jon Lee  <jonlee@apple.com>
782
783         Add new timestamp option
784         https://bugs.webkit.org/show_bug.cgi?id=159006
785
786         Reviewed by Dean Jackson.
787
788         Add a new option to take timestamps from the rAF callback.
789
790         * Animometer/developer.html: Added option.
791         * Animometer/tests/resources/main.js:
792         (Benchmark): Fall back to using the rAF timestamp if performance.now()
793         is not available.
794         (Benchmark._animateLoop): Update how timestamp is set. Prefer to use
795         local var instead of accessing private var.
796
797 2016-06-21  Jon Lee  <jonlee@apple.com>
798
799         Improvements to Animometer benchmark
800         https://bugs.webkit.org/show_bug.cgi?id=157738
801
802         Reviewed by Dean Jackson.
803         Provisionally reviewed by Said Abou-Hallawa.
804
805         Update tests.
806
807         * Animometer/tests/master/text.html: Ensure only three text sizes for
808         the three canvases.
809         * Animometer/tests/master/focus.html: Reduce the text size to fit with smaller
810         particle sizes.
811         * Animometer/tests/master/resources/focus.js: Remove the quadratic distribution for
812         particle sizes, and make it linear. Reduce the size variance. Shuffle the math to
813         reduce some calculations per frame. Fix the placement of the particles which might
814         otherwise be culled.
815         * Animometer/tests/master/resources/image-data.js: Reduce the particle size
816         to encourage larger scores.
817
818 2016-06-21  Jon Lee  <jonlee@apple.com>
819
820         Improvements to Animometer benchmark
821         https://bugs.webkit.org/show_bug.cgi?id=157738
822
823         Reviewed by Dean Jackson.
824         Provisionally reviewed by Said Abou-Hallawa.
825
826         Include confidence interval for the final score, and store the canvas
827         size in the serialization so that it is accurately shown in results.
828
829         * Animometer/developer.html: Add a "confidence" div.
830         * Animometer/index.html: Ditto. Convert "mean" to "confidence".
831         * Animometer/resources/debug-runner/animometer.js: Look at options, and
832         if the configuration is included, update the body class based on it
833         (similar to what we do when we first load the page). That way, if you
834         drag-and-drop previous results in, that configuration is reflected in
835         the dashboard. Show the full confidence interval.
836
837         * Animometer/resources/debug-runner/animometer.css:
838         * Animometer/resources/debug-runner/animometer.js: Style update.
839         * Animometer/resources/runner/animometer.css:
840
841         * Animometer/resources/runner/animometer.js:
842         (_processData): Propagate the confidence interval values out and calculate
843         the lower and upper bounds. For now, shortcut the aggregate calculation,
844         since we only go through one iteration.
845         (this._processData.calculateScore): Propagate the confidence interval out
846         to be next to the score. Depending on the controller these values are
847         calculated differently.
848         (this._processData._getResultsProperty): Convenience function.
849         (this._processData.get score): Refactor.
850         (this._processData.get scoreLowerBound): Get the aggregate lower bound.
851         (this._processData.get scoreUpperBound): Get the aggregate upper bound.
852         (window.sectionsManager.setSectionScore):
853         (window.benchmarkController._startBenchmark): When the benchmark starts, note
854         the canvas size and add it to options. That way it will be automatically be
855         serialized.
856         (window.benchmarkController.showResults): Include the maximum deviation
857         percentage.
858         * Animometer/resources/runner/lines.svg: Make the background line up with the
859         skew.
860         * Animometer/resources/runner/tests.js:
861         (Headers.details.text): Refactor.
862         * Animometer/resources/statistics.js:
863         (Statistics.largestDeviationPercentage): Convenience function to calculate
864         the deviation percentage on either end and return the largest deviation.
865         * Animometer/resources/strings.js:
866
867         Allow specifying a regression profile to use instead of taking the one
868         with the lowest error.
869
870         Address an issue in the focus test when the regression calculated ends
871         up overestimating the change point, causing a cascade of tougher
872         ramps. The reason behind this is that at max complexity of an initial
873         ramp, the frame length is very high, and it influences the second
874         segment of the piecewise regression strongly, causing it to be very
875         steep. As a result, the first segment, expected to be flat, ends up
876         covering a higher range of complexity. That makes the change point
877         much higher than it should be. To avoid this, we will add a sanity
878         check on the maximum value of the ramp. If the regression's projected
879         value at the maximum complexity of the current ramp is very slow (less
880         than 20 fps), 1) reduce the maximum complexity by 20%, and 2) do not
881         include the regression's change point in the change point estimator.
882         That estimator is used as the midpoint of the next ramp, and including
883         the change point from a poor regression can bake in the error. The
884         controller already knows how to adjust for ramps that are too easy for
885         the system.
886
887         * Animometer/resources/runner/animometer.js:
888         (this._processData.findRegression): Takes a preferred profile and gives that to
889         Regression.
890         (this._processData.calculateScore): With the ramp controller, take the profile
891         of the ramp that was used the most when calculating the ramp's regression. That
892         profile is what is used for the test's score.
893         * Animometer/resources/statistics.js:
894         (Regression.Utilities.createClass): Update to take an options object which can
895         specify a profile to calculate with. Otherwise it will continue to use both and
896         select the one with the lower error.
897         (_calculateRegression): Fix an issue where we claim 0 error if the regression
898         calculation fails due to divide-by-zero. Instead reject that regression calculation
899         by giving it Number.MAX_VALUE.
900         * Animometer/resources/strings.js: New strings for marking a regression as flat
901         or slope.
902         * Animometer/tests/resources/main.js:
903         (RampController): Rename the thresholds for clarity. Add a threshold that, if
904         exceeded, will lower the maximum complexity of the next ramp.
905         (tune): Relax the cdf check to consider whether the interval definitely falls in
906         the desired frame length threshold.
907         (processSamples): Include the profile in the ramp.
908
909         Update ramp controller test. Increase the length of the test to 30 seconds, and extend
910         the interval to 120 ms during sampling. Improve the estimation of the ramp parameters.
911
912         * Animometer/developer.html: Change default to 30 seconds, and don't show the progress bar
913         by default.
914         * Animometer/resources/runner/animometer.js: Change default to 30 seconds.
915         * Animometer/tests/resources/main.js: A number of improvements to the ramp controller, in
916         the order in which they appear in the patch:
917
918         - With a longer test length use longer ramps with longer intervals to get more data at each
919         complexity. Keep the 100 ms interval length during the ramp up phase since we don't need to
920         spend more time there to find the right order of magnitude, but increase it during the
921         ramps to 120 ms.
922         - The ramp linearly interpolates the complexity to render based on its timestamp, but it would
923         never sample the minimum complexity. Instead of lerping max to min complexity from time
924         0 to t where t is the ramp length, instead lerp from 0 to (t - intervalSampleLength) so that
925         we can have at least one interval sample at the min complexity for that ramp.
926         - Some regression calculations only come out with one line segment rather than the two
927         we expect. This could be due to a noisy ramp or the ramp's range is too narrow. If that's the
928         case, influence the minimum complexity of the next ramp towards the lowest bound of 1, so that
929         we ensure that at least part of the ramp is covering a complexity range that the system can
930         handle at full 60.
931         - Remove an assignment to interpolatedFrameLength since that is never subsequently used.
932
933         Update the format used to serialize the results for analysis.
934
935         Each data point used to have named properties for fields like complexity and frame rate.
936         In addition the serialized numbers had rounding errors that took up many characters.
937         Update the format by introducing a new data container called SampleData, which contains a
938         field map. The map maps a string to an array index. Each data point is an array, so, to
939         get a stat, use the field map to get the array index into the data point. This allows future
940         versions to track other data, and reduces the size of the output string by two-thirds.
941
942         * Animometer/resources/extensions.js:
943         (Utilities.toFixedNumber): Add convenience function that truncates the number to a fixed
944         precision, and converts it back to a number.
945         (SampleData): New class that contains sample data and a field map that maps properties to
946         an array index.
947         (get length): Number of data points.
948         (addField): Add a field to the field map.
949         (push): Add a data point.
950         (sort): Sort the data.
951         (slice): Return new SampleData object with sliced data.
952         (forEach): Iterate over the data with provided function.
953         (createDatum):
954         (getFieldInDatum): Returns the data point associated with the field name by looking it up
955         in the field map in the datum provided, which can be the datum object itself (an array) or
956         an index into the data member variable.
957         (setFieldInDatum): Sets the data point associated with the field name.
958         (at): Returns the data point at the provided index.
959         (toArray): Serializes the data where the field map serves as property names for each point.
960
961         * Animometer/resources/debug-runner/graph.js:
962         (updateGraphData): Remove unused _testData. Convert the data to the old array format for the
963         graph to use, since the old format was much easier to work with when displaying the graphs.
964         (onGraphTypeChanged): For some controllers, no alternative score or mean is provided.
965         * Animometer/resources/runner/animometer.css:
966         * Animometer/resources/runner/animometer.js: Refactor to use SampleData. Update JSON output
967         to only go to 3 digits of precision for purposes of reducing the data size.
968         * Animometer/resources/strings.js: Add new strings to put into the field maps.
969         * Animometer/tests/resources/main.js: Refactor to use SampleData.
970
971         * Animometer/developer.html:
972         * Animometer/index.html: Restructure results table for both pages. Add charset attribute to
973         tests.js include.
974         * Animometer/resources/debug-runner/animometer.css: Clear out styles from release runner.
975         * Animometer/resources/debug-runner/graph.js:
976         (onGraphTypeChanged): Update score and mean if bootstrap results are available from the
977         controller, since not all controllers do bootstrapping.
978         * Animometer/resources/debug-runner/tests.js: Update header text.
979         * Animometer/resources/runner/animometer.css: Include confidence interval in results.
980         * Animometer/resources/runner/animometer.js:
981         (ResultsTable._addHeader): Header contents can be HTML, so use innerHTML instead.
982         (ResultsTable._addBody): Add tbody element.
983         (ResultsTable._addTest): Allow a data cell to invoke a JS function to get its contents.
984         (window.benchmarkController.showResults): Add table that includes tests' confidence intervals.
985         * Animometer/resources/runner/tests.js:
986         (Headers.details.text): Add new details table that includes bootstrap confidence interval.
987         The interval can be asymmetric, but for simplicity, report the maximum deviation percentage
988         on either side of the bootstrap median.
989         * Animometer/resources/statistics.js:
990         (bootstrap): Include the confidence percentage in the return object.
991
992         Report canvas size in results.
993
994         * Animometer/developer.html: Add markup to indicate whether a small, medium, or large
995         canvas was used.
996         * Animometer/index.html: Ditto.
997         * Animometer/resources/debug-runner/animometer.js: Call determineCanvasSize().
998         * Animometer/resources/runner/animometer.css: Update styles to set the canvas based on the
999         body class size.
1000         * Animometer/resources/runner/animometer.js:
1001         (window.benchmarkController.initialize): Update styles to set the canvas based on the
1002         body class size.
1003         (window.benchmarkController.determineCanvasSize): Run various media queries and set the body
1004         class based on the size of the device.
1005
1006         * Animometer/developer.html: Refactor to include the main CSS file, and redo
1007         the layout so that it doesn't rely on flexbox.
1008         * Animometer/resources/debug-runner/animometer.css:
1009         * Animometer/resources/debug-runner/animometer.js:
1010         (updateDisplay): Since various parts of the script alter the body class, we can't
1011         replace the className directly. Instead, remove all display-based values and then add
1012         the one that was selected.
1013         * Animometer/resources/debug-runner/graph.js:
1014         (updateGraphData): To set the size of the graph, use window.innerHeight.
1015         * Animometer/resources/runner/animometer.js:
1016         (window.sectionsManager.showSection): Since various parts of the script alter the body
1017         class, we can't replace the className directly. Remove all of the section classes
1018         individually and then add the one desired.
1019         * Animometer/tests/resources/stage.css: Remove -apple-system as a font to use in the
1020         stage.
1021
1022 2016-06-12  Filip Pizlo  <fpizlo@apple.com>
1023
1024         Fix round-down goof in Air.js's ShuffleCustom.forEachArg
1025         https://bugs.webkit.org/show_bug.cgi?id=158674
1026
1027         Reviewed by Michael Saboff.
1028         
1029         x / 3 * 3 is not how you round down to multiples of 3 in JavaScript. You need to do
1030         Math.floor(x / 3) * 3 instead.
1031         
1032         This is a benign change, because having extra arguments to a Shuffle is not something we
1033         actually take advantage of yet. But I think it's best to match the original C++ code's
1034         intent.
1035
1036         * Air.js/custom.js:
1037         (const.ShuffleCustom.forEachArg):
1038
1039 2016-06-11  Filip Pizlo  <fpizlo@apple.com>
1040
1041         Unreviewed, skip Air.js. It got unskipped when I renamed it from JSAir.
1042
1043         * Skipped:
1044
1045 2016-06-10  Filip Pizlo  <fpizlo@apple.com>
1046
1047         Make it easy to package Air.js
1048         https://bugs.webkit.org/show_bug.cgi?id=158652
1049
1050         Reviewed by Benjamin Poulain.
1051         
1052         If you want to give Air.js to someone, you can now do:
1053         
1054         cd PerformanceTests/Air.js
1055         ./make_dist.sh
1056         
1057         This will create Air.js.tar.gz and a directory called Air.js. If you want to send someone
1058         the benchmark, just send either of those things and tell them to look at index.html.
1059         
1060         You may have to edit make_dist.sh for wherever you have Markdown.pl. You can get that from
1061         https://daringfireball.net/projects/markdown/
1062
1063         * Air.js/make_dist.sh: Added.
1064         * Air.js/test.html:
1065
1066 2016-06-10  Filip Pizlo  <fpizlo@apple.com>
1067
1068         Unreviewed, make the link to test.html into an actual link.
1069
1070         * Air.js/README.md:
1071
1072 2016-06-10  Filip Pizlo  <fpizlo@apple.com>
1073
1074         Fix some text in Air.js/README.md
1075         https://bugs.webkit.org/show_bug.cgi?id=158650
1076
1077         Reviewed by Benjamin Poulain.
1078         
1079         I read the text again and found bugs:
1080         
1081         - We never actually say how to run the benchmark. This change adds a blurb about how to run
1082           it.
1083
1084         - We both say that allocateStack is responsible for the bulk of the running time and that
1085           we haven't measured where the bulk of the time is spent. This changes the text to say that
1086           it was a goal to make allocateStack be the hottest part of the benchmark, but that we did
1087           not measure this.
1088
1089         * Air.js/README.md:
1090
1091 2016-06-10  Filip Pizlo  <fpizlo@apple.com>
1092
1093         Air.js should have some documentation
1094         https://bugs.webkit.org/show_bug.cgi?id=158648
1095
1096         Reviewed by Keith Miller.
1097         
1098         I want to be able to point people at a document if they want to know more about this
1099         benchmark.
1100
1101         * Air.js/README.md: Added.
1102
1103 2016-06-10  Filip Pizlo  <fpizlo@apple.com>
1104
1105         Rename JSAir to Air.js.
1106
1107         Rubber stamped by Mark Lam.
1108
1109         * Air.js: Copied from PerformanceTests/JSAir.
1110         * Air.js/airjs-tests.yaml: Copied from PerformanceTests/JSAir/jsair-tests.yaml.
1111         * Air.js/benchmark.js: Copied from PerformanceTests/JSAir/benchmark.js.
1112         (Benchmark):
1113         * Air.js/jsair-tests.yaml: Removed.
1114         * Air.js/payload-airjs-ACLj8C.js: Copied from PerformanceTests/JSAir/payload-jsair-ACLj8C.js.
1115         * Air.js/payload-jsair-ACLj8C.js: Removed.
1116         * Air.js/stress-test.js: Copied from PerformanceTests/JSAir/stress-test.js.
1117         * Air.js/test.html: Copied from PerformanceTests/JSAir/test.html.
1118         * Air.js/test.js: Copied from PerformanceTests/JSAir/test.js.
1119         * JSAir: Removed.
1120         * JSAir/all.js: Removed.
1121         * JSAir/allocate_stack.js: Removed.
1122         * JSAir/arg.js: Removed.
1123         * JSAir/basic_block.js: Removed.
1124         * JSAir/benchmark.js: Removed.
1125         * JSAir/code.js: Removed.
1126         * JSAir/custom.js: Removed.
1127         * JSAir/frequented_block.js: Removed.
1128         * JSAir/insertion_set.js: Removed.
1129         * JSAir/inst.js: Removed.
1130         * JSAir/jsair-tests.yaml: Removed.
1131         * JSAir/liveness.js: Removed.
1132         * JSAir/opcode.js: Removed.
1133         * JSAir/payload-gbemu-executeIteration.js: Removed.
1134         * JSAir/payload-imaging-gaussian-blur-gaussianBlur.js: Removed.
1135         * JSAir/payload-jsair-ACLj8C.js: Removed.
1136         * JSAir/payload-typescript-scanIdentifier.js: Removed.
1137         * JSAir/reg.js: Removed.
1138         * JSAir/stack_slot.js: Removed.
1139         * JSAir/stress-test.js: Removed.
1140         * JSAir/strip-hash.rb: Removed.
1141         * JSAir/symbols.js: Removed.
1142         * JSAir/test.html: Removed.
1143         * JSAir/test.js: Removed.
1144         * JSAir/tmp.js: Removed.
1145         * JSAir/tmp_base.js: Removed.
1146         * JSAir/util.js: Removed.
1147
1148 2016-06-10  Filip Pizlo  <fpizlo@apple.com>
1149
1150         JSC Stress Test failing: jsair-tests.yaml/test.js.ftl-eager-no-cjit
1151         https://bugs.webkit.org/show_bug.cgi?id=158571
1152
1153         Reviewed by Keith Miller.
1154         
1155         Introduce a different harness for run-jsc-stress-tests, which runs for a minimum of 10
1156         iterations and then tries to do any number of "bonus" iterations until it's been running for
1157         two seconds. Since this is the sort of test that isn't really meant to stress anything in
1158         particular, I think it's OK if it is time-limited in this way. The worst case is that some
1159         of its failures will be flaky, but I think that they would have been flaky anyway given the
1160         complexity of the test.
1161
1162         * JSAir/benchmark.js:
1163         (Benchmark):
1164         (Benchmark.prototype.runIteration):
1165         (benchmark): Deleted.
1166         * JSAir/jsair-tests.yaml:
1167         * JSAir/stress-test.js: Added.
1168         (preciseTime):
1169         * JSAir/test.html:
1170         * JSAir/test.js:
1171
1172 2016-06-09  Filip Pizlo  <fpizlo@apple.com>
1173
1174         Unreviewed, teach the perf bots not to run JSAir.
1175
1176         * Skipped:
1177
1178 2016-06-08  Filip Pizlo  <fpizlo@apple.com>
1179
1180         Use more ES6 features in JSAir
1181         https://bugs.webkit.org/show_bug.cgi?id=158497
1182
1183         Reviewed by Keith Miller.
1184         
1185         This improves JSAir with the following ES6 features suggested by JoePeck:
1186         
1187         - String interpolation.
1188         - Destructuring inside PatchCustom.
1189         - Default arguments.
1190         
1191         All of these things are on hot paths.
1192         
1193         Note that I didn't use string interpolation everywhere that I could, only in those places
1194         where it made the code more readable. In Ruby, I used the style that if the interpolation
1195         expression has any non-trivial stuff (like a ternary operator, a chain of calls, or embedded
1196         strings) then it's better to use regular strcat. I think that's what I carried over to here.
1197         
1198         Note that the previous change (Add result validation to JSAir) also made the Proxy code not
1199         dead, though it's not necessarily on the hot path. The Proxy isn't called into frequently
1200         but it's used from a function that is otherwise hot, so if calling into the Proxy prevents
1201         that function from being optimized then it will hurt so good.
1202         
1203         I also reenabled tail calls in a few places.
1204         
1205         This change doesn't seem to change the performance of the benchmark for us. That's expected
1206         since these ES6 features are cheap. Note that this claim doesn't include Proxy, which was
1207         added in a separate change and that change did make the benchmark overall more expensive.
1208
1209         * JSAir/allocate_stack.js:
1210         (allocateStack):
1211         * JSAir/arg.js:
1212         (Arg.createBitImm64):
1213         (Arg.createAddr):
1214         (Arg.createStack):
1215         (Arg.logScale):
1216         (Arg.createIndex):
1217         * JSAir/basic_block.js:
1218         (BasicBlock.get headerString):
1219         (BasicBlock.prototype.get if):
1220         (BasicBlock):
1221         * JSAir/benchmark.js:
1222         (benchmark):
1223         * JSAir/code.js:
1224         (Code):
1225         (Code.prototype.addBlock):
1226         (Code.prototype.addStackSlot):
1227         (Code.prototype.newTmp):
1228         (Code.prototype.get size):
1229         (Code.prototype.get blocks):
1230         (Code.prototype.get stackSlots):
1231         (Code.prototype.tmps):
1232         (Code.prototype.get callArgAreaSize):
1233         (Code.prototype.toString):
1234         * JSAir/custom.js:
1235         (const.PatchCustom.forEachArg):
1236         * JSAir/inst.js:
1237         (Inst):
1238         * JSAir/reg.js:
1239         (Reg.prototype.toString):
1240         * JSAir/util.js:
1241         (symbolName):
1242         (lowerSymbolName):
1243
1244 2016-06-07  Filip Pizlo  <fpizlo@apple.com>
1245
1246         Add result validation to JSAir
1247         https://bugs.webkit.org/show_bug.cgi?id=158493
1248
1249         Reviewed by Saam Barati.
1250         
1251         This adds the ability to hash a Code in a way that matches the C++ code's hashing of Code.
1252         This allows us to check if the Code that JSAir sees is the code that C++ saw. We use this to
1253         check the Code before and after allocateStack, and compare against hashes we got from C++.
1254         
1255         Doing this uncovered bugs. roundUpToMultipleOf wasn't doing anything. allocateStack was not
1256         allocating things correctly because I was concatting a Set to an Array, which doesn't really
1257         work. Now these bugs are fixed.
1258         
1259         The checking step adds to the running time so I reduced the number of iterations. The
1260         benchmark spends a decent amount of its time computing Code hashes; I think it's around 1/3
1261         total. This is probably OK. It's better to verify the results even if the running time is
1262         not all in the "core" of the algorithm.
1263         
1264         Also add a run-jsc-stress-tests yaml file to allow this to run as a test.
1265
1266         * JSAir/allocate_stack.js:
1267         * JSAir/arg.js:
1268         (Arg.createImm):
1269         (Arg.createBigImm):
1270         (Arg.createBitImm):
1271         (Arg.createBitImm64):
1272         (Arg.createWidth):
1273         (Arg.createSpecial):
1274         (Arg.prototype.get kind):
1275         (Arg.prototype.get isTmp):
1276         (Arg.prototype.get isImm):
1277         (Arg.prototype.get isSomeImm):
1278         (Arg.prototype.get isSomeBigImm):
1279         (Arg.prototype.get isCondition):
1280         (Arg.prototype.get isWidth):
1281         (Arg.prototype.get isSpecial):
1282         (Arg.prototype.get isAlive):
1283         (Arg.prototype.get tmp):
1284         (Arg.prototype.get value):
1285         (Arg.prototype.get lowValue):
1286         (Arg.prototype.get highValue):
1287         (Arg.prototype.get base):
1288         (Arg.prototype.get isGP):
1289         (Arg.prototype.get isFP):
1290         (Arg.prototype.isValidForm):
1291         (Arg.prototype.get isInvertible):
1292         (Arg.kindCode):
1293         (Arg.prototype.hash):
1294         (Arg.prototype.toString):
1295         (Arg):
1296         * JSAir/basic_block.js:
1297         (BasicBlock.get successorBlocks):
1298         * JSAir/benchmark.js:
1299         (benchmark):
1300         * JSAir/code.js:
1301         (Code.prototype.setFrameSize):
1302         (Code.prototype.hash):
1303         (Code.prototype.toString):
1304         (Code):
1305         * JSAir/inst.js:
1306         (Inst.prototype.get hasNonArgEffects):
1307         (Inst.prototype.hash):
1308         (Inst.prototype.toString):
1309         (Inst):
1310         * JSAir/jsair-tests.yaml: Added.
1311         * JSAir/opcode.js:
1312         (Inst_forEachArg):
1313         (Inst_hasNonArgEffects):
1314         (opcodeCode):
1315         * JSAir/payload-gbemu-executeIteration.js:
1316         (createPayloadGbemuExecuteIteration):
1317         * JSAir/payload-imaging-gaussian-blur-gaussianBlur.js:
1318         (createPayloadImagingGaussianBlurGaussianBlur):
1319         * JSAir/payload-jsair-ACLj8C.js:
1320         (createPayloadJSAirACLj8C):
1321         * JSAir/payload-typescript-scanIdentifier.js:
1322         (createPayloadTypescriptScanIdentifier):
1323         * JSAir/reg.js:
1324         (Reg.prototype.get isReg):
1325         (Reg.prototype.hash):
1326         (Reg.prototype.toString):
1327         * JSAir/stack_slot.js:
1328         (StackSlot.prototype.setOffsetFromFP):
1329         (StackSlot.prototype.hash):
1330         (StackSlot.prototype.toString):
1331         * JSAir/symbols.js:
1332         (relCondCode):
1333         (resCondCode):
1334         (doubleCondCode):
1335         * JSAir/test.html:
1336         * JSAir/tmp.js:
1337         (Tmp.prototype.get isReg):
1338         (Tmp.prototype.hash):
1339         (Tmp.prototype.toString):
1340         * JSAir/util.js:
1341         (roundUpToMultipleOf):
1342         (symbolName):
1343
1344 2016-06-07  Filip Pizlo  <fpizlo@apple.com>
1345
1346         Implement Air::allocateStack() in ES6 to see how much of a bad idea that is
1347         https://bugs.webkit.org/show_bug.cgi?id=158318
1348
1349         Reviewed by Saam Barati.
1350         
1351         This adds a new benchmark for us to play with called JSAir. It's a complete ES6
1352         implementation of Air's allocateStack() phase along with all of Air needed to run that
1353         phase. This includes things like stack slots, registers, temporaries, basic blocks,
1354         instructions, and all of the code for iterating over, inspecting, and modifying those
1355         things.
1356         
1357         To make this work, JSC can now dump Air just before allocateStack() in the form of JS code
1358         that creates a Code object that matches exactly what C++ Air saw. This benchmark comprises
1359         four Air IRs:
1360         
1361         - Octane/gbemu's largest function, executeIteration.
1362         - Kraken/imaging-gaussian-blur's largest function in OSR entry mode, gaussuanBlur.
1363         - Octane/typescript's largest function that is actually hot, scanIdentifier.
1364         - JSAir's largest hot function, which is anonymous, so we call it by its hash (ACLj8C).
1365         
1366         This runs in about 2 seconds on my machine in JSC trunk. It includes both a commandline
1367         harness and a web harness. JSAir is almost exactly 100x slower in ES6 in WebKit than the
1368         C++ Air::allocateStack() phase on which it is based.
1369         
1370         JSAir uses the following ES6 features:
1371         
1372         - Symbol.
1373         - for-of.
1374         - arrow functions.
1375         - Map/Set.
1376         - let/const.
1377         - classes.
1378         
1379         All of these things are used in anger and should end up on the hot path. There is also code
1380         that uses Proxies, but it ends up being dead.
1381         
1382         We can improve this even more:
1383         I still need to add result validation: https://bugs.webkit.org/show_bug.cgi?id=158493
1384         I want to make it use more ES6 features: https://bugs.webkit.org/show_bug.cgi?id=158497
1385         
1386         * JSAir: Added.
1387         * JSAir/all.js: Added.
1388         * JSAir/allocate_stack.js: Added.
1389         (allocateStack.attemptAssignment):
1390         (allocateStack.assign):
1391         (allocateStack.interfere):
1392         (allocateStack.):
1393         (allocateStack):
1394         * JSAir/arg.js: Added.
1395         (Arg):
1396         (Arg.isAnyUse):
1397         (Arg.isColdUse):
1398         (Arg.isWarmUse):
1399         (Arg.cooled):
1400         (Arg.isEarlyUse):
1401         (Arg.isLateUse):
1402         (Arg.isAnyDef):
1403         (Arg.isEarlyDef):
1404         (Arg.isLateDef):
1405         (Arg.isZDef):
1406         (Arg.typeForB3Type):
1407         (Arg.widthForB3Type):
1408         (Arg.conservativeWidth):
1409         (Arg.minimumWidth):
1410         (Arg.bytes):
1411         (Arg.widthForBytes):
1412         (Arg.createTmp):
1413         (Arg.fromReg):
1414         (Arg.createImm):
1415         (Arg.createBigImm):
1416         (Arg.createBitImm):
1417         (Arg.createBitImm64):
1418         (Arg.createAddr):
1419         (Arg.createStack):
1420         (Arg.createCallArg):
1421         (Arg.createStackAddr):
1422         (Arg.isValidScale):
1423         (Arg.logScale):
1424         (Arg.createIndex):
1425         (Arg.createRelCond):
1426         (Arg.createResCond):
1427         (Arg.createDoubleCond):
1428         (Arg.createWidth):
1429         (Arg.prototype.get kind):
1430         (Arg.prototype.get isTmp):
1431         (Arg.prototype.get isImm):
1432         (Arg.prototype.get isBigImm):
1433         (Arg.prototype.get isBitImm):
1434         (Arg.prototype.get isBitImm64):
1435         (Arg.prototype.get isSomeImm):
1436         (Arg.prototype.get isAddr):
1437         (Arg.prototype.get isStack):
1438         (Arg.prototype.get isCallArg):
1439         (Arg.prototype.get isIndex):
1440         (Arg.prototype.get isMemory):
1441         (Arg.prototype.get isStackMemory):
1442         (Arg.prototype.get isRelCond):
1443         (Arg.prototype.get isResCond):
1444         (Arg.prototype.get isDoubleCond):
1445         (Arg.prototype.get isCondition):
1446         (Arg.prototype.get isWidth):
1447         (Arg.prototype.get isAlive):
1448         (Arg.prototype.get tmp):
1449         (Arg.prototype.get value):
1450         (Arg.prototype.get base):
1451         (Arg.prototype.get hasOffset):
1452         (Arg.prototype.get offset):
1453         (Arg.prototype.get stackSlot):
1454         (Arg.prototype.get index):
1455         (Arg.prototype.get scale):
1456         (Arg.prototype.get logScale):
1457         (Arg.prototype.get width):
1458         (Arg.prototype.get isGPTmp):
1459         (Arg.prototype.get isFPTmp):
1460         (Arg.prototype.get isGP):
1461         (Arg.prototype.get isFP):
1462         (Arg.prototype.get hasType):
1463         (Arg.prototype.get type):
1464         (Arg.prototype.isType):
1465         (Arg.prototype.isCompatibleType):
1466         (Arg.prototype.get isGPR):
1467         (Arg.prototype.get gpr):
1468         (Arg.prototype.get isFPR):
1469         (Arg.prototype.get fpr):
1470         (Arg.prototype.get isReg):
1471         (Arg.prototype.get reg):
1472         (Arg.isValidImmForm):
1473         (Arg.isValidBitImmForm):
1474         (Arg.isValidBitImm64Form):
1475         (Arg.isValidAddrForm):
1476         (Arg.isValidIndexForm):
1477         (Arg.prototype.isValidForm):
1478         (Arg.prototype.forEachTmpFast):
1479         (Arg.prototype.usesTmp):
1480         (Arg.prototype.forEachTmp):
1481         (Arg.prototype.is):
1482         (Arg.prototype.as):
1483         (Arg.prototype.forEachFast):
1484         (Arg.prototype.forEach):
1485         (Arg.extract):
1486         (Arg.forEachFast):
1487         (Arg.forEach):
1488         (Arg.prototype.get condition):
1489         (Arg.prototype.get isInvertible):
1490         (Arg.prototype.toString):
1491         * JSAir/basic_block.js: Added.
1492         (BasicBlock):
1493         (BasicBlock.prototype.get index):
1494         (BasicBlock.prototype.get size):
1495         (BasicBlock.prototype.Symbol.iterator):
1496         (BasicBlock.prototype.at):
1497         (BasicBlock.get last):
1498         (BasicBlock.get insts):
1499         (BasicBlock.get numSuccessors):
1500         (BasicBlock.get successors):
1501         (BasicBlock.get successorBlocks.):
1502         (BasicBlock.get successorBlocks):
1503         (BasicBlock.set get numPredecessors):
1504         (BasicBlock.get predecessors):
1505         (BasicBlock.get frequency):
1506         (BasicBlock.get headerString):
1507         (BasicBlock.get footerString):
1508         * JSAir/benchmark.js: Added.
1509         (benchmark):
1510         * JSAir/code.js: Added.
1511         (Code):
1512         (Code.prototype.addBlock):
1513         (Code.prototype.addStackSlot):
1514         (Code.prototype.newTmp):
1515         (Code.prototype.get size):
1516         (Code.prototype.at):
1517         (Code.prototype.Symbol.iterator):
1518         (Code.prototype.get blocks):
1519         (Code.prototype.get stackSlots):
1520         (Code.prototype.tmps):
1521         (Code.prototype.get callArgAreaSize):
1522         (Code.prototype.requestCallArgAreaSize):
1523         (Code.prototype.get frameSize):
1524         (Code.prototype.setFrameSize):
1525         (Code.prototype.toString):
1526         * JSAir/custom.js: Added.
1527         (const.ShuffleCustom.forEachArg):
1528         (const.ShuffleCustom.hasNonArgNonControlEffects):
1529         (const.PatchCustom.forEachArg):
1530         (const.PatchCustom.hasNonArgNonControlEffects):
1531         (const.CCallCustom.forEachArg):
1532         (const.CCallCustom.hasNonArgNonControlEffects):
1533         (const.ColdCCallCustom.forEachArg):
1534         (const.ColdCCallCustom.hasNonArgNonControlEffects):
1535         * JSAir/frequented_block.js: Added.
1536         (FrequentedBlock):
1537         (FrequentedBlock.prototype.toString):
1538         * JSAir/insertion_set.js: Added.
1539         (Insertion):
1540         (Insertion.prototype.get index):
1541         (Insertion.prototype.get element):
1542         (Insertion.prototype.lessThan):
1543         (InsertionSet):
1544         (InsertionSet.prototype.appendInsertion):
1545         (InsertionSet.prototype.append):
1546         (InsertionSet.prototype.execute):
1547         * JSAir/inst.js: Added.
1548         (Inst):
1549         (Inst.prototype.append):
1550         (Inst.prototype.clear):
1551         (Inst.prototype.get opcode):
1552         (Inst.prototype.get args):
1553         (Inst.prototype.visitArg):
1554         (Inst.prototype.forEachTmpFast):
1555         (Inst.prototype.forEachArg):
1556         (Inst.prototype.forEachTmp):
1557         (Inst.prototype.forEach):
1558         (Inst.forEachDef):
1559         (Inst.forEachDefWithExtraClobberedRegs):
1560         (Inst.prototype.get hasNonArgEffects):
1561         (Inst.prototype.toString):
1562         * JSAir/liveness.js: Added.
1563         (Liveness):
1564         (Liveness.prototype.get thing):
1565         (Liveness.prototype.get code):
1566         (Liveness.prototype.get liveAtHead):
1567         (Liveness.prototype.get liveAtTail):
1568         (Liveness.prototype.localCalc.LocalCalc):
1569         (Liveness.prototype.localCalc.LocalCalc.prototype.get liveSet):
1570         (Liveness.prototype.localCalc.LocalCalc.prototype.execute):
1571         (Liveness.prototype.localCalc):
1572         * JSAir/opcode.js: Added.
1573         (Inst_forEachArg):
1574         (Inst_hasNonArgEffects):
1575         * JSAir/payload-gbemu-executeIteration.js: Added.
1576         (createPayloadGbemuExecuteIteration):
1577         * JSAir/payload-imaging-gaussian-blur-gaussianBlur.js: Added.
1578         (createPayloadImagingGaussianBlurGaussianBlur):
1579         * JSAir/payload-jsair-ACLj8C.js: Added.
1580         (createPayloadJSAirACLj8C):
1581         * JSAir/payload-typescript-scanIdentifier.js: Added.
1582         (createPayloadTypescriptScanIdentifier):
1583         * JSAir/reg.js: Added.
1584         (Reg):
1585         (Reg.fromReg):
1586         (Reg.prototype.get index):
1587         (Reg.prototype.get type):
1588         (Reg.prototype.get name):
1589         (Reg.prototype.get isCalleeSave):
1590         (Reg.prototype.get isReg):
1591         (Reg.prototype.toString):
1592         (Reg.extract):
1593         (Reg.forEachFast):
1594         (Reg.forEach):
1595         (newGPR):
1596         (Reg.gprs.Reg.fprs.Reg.calleeSaveGPRs.Reg.calleeSaveFPRs.Reg.calleeSaves):
1597         * JSAir/stack_slot.js: Added.
1598         (StackSlot):
1599         (StackSlot.prototype.get byteSize):
1600         (StackSlot.prototype.get kind):
1601         (StackSlot.prototype.get isLocked):
1602         (StackSlot.prototype.get isSpill):
1603         (StackSlot.prototype.get index):
1604         (StackSlot.prototype.ensureSize):
1605         (StackSlot.prototype.get alignment):
1606         (StackSlot.prototype.get offsetFromFP):
1607         (StackSlot.prototype.setOffsetFromFP):
1608         (StackSlot.prototype.toString):
1609         (StackSlot.extract):
1610         (StackSlot.forEachFast):
1611         (StackSlot.forEach):
1612         * JSAir/symbols.js: Added.
1613         * JSAir/test.html: Added.
1614         * JSAir/test.js: Added.
1615         * JSAir/tmp.js: Added.
1616         (Tmp):
1617         (Tmp.fromReg):
1618         (Tmp.prototype.get index):
1619         (Tmp.prototype.get type):
1620         (Tmp.prototype.get isReg):
1621         (Tmp.prototype.toString):
1622         (Tmp.extract):
1623         (Tmp.forEachFast):
1624         (Tmp.forEach):
1625         * JSAir/tmp_base.js: Added.
1626         (TmpBase.prototype.get isGP):
1627         (TmpBase.prototype.get isFP):
1628         (TmpBase.prototype.get isGPR):
1629         (TmpBase.prototype.get isFPR):
1630         (TmpBase.prototype.get reg):
1631         (TmpBase.prototype.get gpr):
1632         (TmpBase.prototype.get fpr):
1633         (TmpBase):
1634         * JSAir/util.js: Added.
1635         (isRepresentableAsInt32):
1636         (addIndexed):
1637         (roundUpToMultipleOf):
1638         (symbolName):
1639         (mergeIntoSet):
1640         (nonEmptyRangesOverlap):
1641         (rangesOverlap):
1642         (removeAllMatching):
1643         (swap):
1644         (bubble):
1645         (bubbleSort):
1646         (currentTime):
1647         (else.currentTime):
1648
1649 2016-05-26  Yusuke Suzuki  <utatane.tea@gmail.com>
1650
1651         [JSC] Allow JSBench to use precise time
1652         https://bugs.webkit.org/show_bug.cgi?id=158050
1653
1654         Reviewed by Geoffrey Garen.
1655
1656         * JSBench/amazon-chrome-win/urem.js:
1657         (else.window.performance.window.performance.now.currentTimeInMS):
1658         (else.else.typeof.preciseTime.string_appeared_here.currentTimeInMS):
1659         (else.else.currentTimeInMS):
1660         (onload.cb):
1661         (onload):
1662         * JSBench/amazon-chrome/urem.js:
1663         (else.window.performance.window.performance.now.currentTimeInMS):
1664         (else.else.typeof.preciseTime.string_appeared_here.currentTimeInMS):
1665         (else.else.currentTimeInMS):
1666         (onload.cb):
1667         (onload):
1668         * JSBench/amazon-firefox-win/urm.js:
1669         (else.window.performance.window.performance.now.currentTimeInMS):
1670         (else.else.typeof.preciseTime.string_appeared_here.currentTimeInMS):
1671         (else.else.currentTimeInMS):
1672         (onload.cb):
1673         (onload):
1674         * JSBench/amazon-firefox/urm.js:
1675         (else.window.performance.window.performance.now.currentTimeInMS):
1676         (else.else.typeof.preciseTime.string_appeared_here.currentTimeInMS):
1677         (else.else.currentTimeInMS):
1678         (onload.cb):
1679         (onload):
1680         * JSBench/amazon-safari/urem.js:
1681         (else.window.performance.window.performance.now.currentTimeInMS):
1682         (else.else.typeof.preciseTime.string_appeared_here.currentTimeInMS):
1683         (else.else.currentTimeInMS):
1684         (onload.cb):
1685         (onload):
1686         * JSBench/facebook-chrome-win/urem.js:
1687         (else.window.performance.window.performance.now.currentTimeInMS):
1688         (else.else.typeof.preciseTime.string_appeared_here.currentTimeInMS):
1689         (else.else.currentTimeInMS):
1690         (onload.cb):
1691         (onload):
1692         * JSBench/facebook-chrome/urem.js:
1693         (else.window.performance.window.performance.now.currentTimeInMS):
1694         (else.else.typeof.preciseTime.string_appeared_here.currentTimeInMS):
1695         (else.else.currentTimeInMS):
1696         (onload.cb):
1697         (onload):
1698         * JSBench/facebook-firefox-win/urem.js:
1699         (else.window.performance.window.performance.now.currentTimeInMS):
1700         (else.else.typeof.preciseTime.string_appeared_here.currentTimeInMS):
1701         (else.else.currentTimeInMS):
1702         (onload.cb):
1703         (onload):
1704         * JSBench/facebook-firefox/urem.js:
1705         (else.window.performance.window.performance.now.currentTimeInMS):
1706         (else.else.typeof.preciseTime.string_appeared_here.currentTimeInMS):
1707         (else.else.currentTimeInMS):
1708         (onload.cb):
1709         (onload):
1710         * JSBench/facebook-safari/urem.js:
1711         (else.window.performance.window.performance.now.currentTimeInMS):
1712         (else.else.typeof.preciseTime.string_appeared_here.currentTimeInMS):
1713         (else.else.currentTimeInMS):
1714         (onload.cb):
1715         (onload):
1716         * JSBench/google-chrome-win/urem.js:
1717         (else.window.performance.window.performance.now.currentTimeInMS):
1718         (else.else.typeof.preciseTime.string_appeared_here.currentTimeInMS):
1719         (else.else.currentTimeInMS):
1720         (onload.cb):
1721         (onload):
1722         * JSBench/google-chrome/urem.js:
1723         (else.window.performance.window.performance.now.currentTimeInMS):
1724         (else.else.typeof.preciseTime.string_appeared_here.currentTimeInMS):
1725         (else.else.currentTimeInMS):
1726         (onload.cb):
1727         (onload):
1728         * JSBench/google-firefox-win/urem.js:
1729         (else.window.performance.window.performance.now.currentTimeInMS):
1730         (else.else.typeof.preciseTime.string_appeared_here.currentTimeInMS):
1731         (else.else.currentTimeInMS):
1732         (onload.cb):
1733         (onload):
1734         * JSBench/google-firefox/uem.js:
1735         (else.window.performance.window.performance.now.currentTimeInMS):
1736         (else.else.typeof.preciseTime.string_appeared_here.currentTimeInMS):
1737         (else.else.currentTimeInMS):
1738         (onload.cb):
1739         (onload):
1740         * JSBench/google-safari/urem.js:
1741         (else.window.performance.window.performance.now.currentTimeInMS):
1742         (else.else.typeof.preciseTime.string_appeared_here.currentTimeInMS):
1743         (else.else.currentTimeInMS):
1744         (onload.cb):
1745         (onload):
1746         * JSBench/harness.js:
1747         (runBenchmark.window.currentTimeInMS):
1748         (runBenchmark.else.window.currentTimeInMS):
1749         * JSBench/twitter-chrome-win/rem.js:
1750         (else.window.performance.window.performance.now.currentTimeInMS):
1751         (else.else.typeof.preciseTime.string_appeared_here.currentTimeInMS):
1752         (else.else.currentTimeInMS):
1753         (onload.cb):
1754         (onload):
1755         * JSBench/twitter-chrome/urem.js:
1756         (else.window.performance.window.performance.now.currentTimeInMS):
1757         (else.else.typeof.preciseTime.string_appeared_here.currentTimeInMS):
1758         (else.else.currentTimeInMS):
1759         (onload.cb):
1760         (onload):
1761         * JSBench/twitter-firefox-win/urem.js:
1762         (else.window.performance.window.performance.now.currentTimeInMS):
1763         (else.else.typeof.preciseTime.string_appeared_here.currentTimeInMS):
1764         (else.else.currentTimeInMS):
1765         (onload.cb):
1766         (onload):
1767         * JSBench/twitter-firefox/urem.js:
1768         (else.window.performance.window.performance.now.currentTimeInMS):
1769         (else.else.typeof.preciseTime.string_appeared_here.currentTimeInMS):
1770         (else.else.currentTimeInMS):
1771         (onload.cb):
1772         (onload):
1773         * JSBench/twitter-safari/urem.js:
1774         (else.window.performance.window.performance.now.currentTimeInMS):
1775         (else.else.typeof.preciseTime.string_appeared_here.currentTimeInMS):
1776         (else.else.currentTimeInMS):
1777         (onload.cb):
1778         (onload):
1779         * JSBench/yahoo-chrome-win/urem.js:
1780         (else.window.performance.window.performance.now.currentTimeInMS):
1781         (else.else.typeof.preciseTime.string_appeared_here.currentTimeInMS):
1782         (else.else.currentTimeInMS):
1783         (onload.cb):
1784         (onload):
1785         * JSBench/yahoo-chrome/urem.js:
1786         (else.window.performance.window.performance.now.currentTimeInMS):
1787         (else.else.typeof.preciseTime.string_appeared_here.currentTimeInMS):
1788         (else.else.currentTimeInMS):
1789         (onload.cb):
1790         (onload):
1791         * JSBench/yahoo-firefox-win/urem.js:
1792         (else.window.performance.window.performance.now.currentTimeInMS):
1793         (else.else.typeof.preciseTime.string_appeared_here.currentTimeInMS):
1794         (else.else.currentTimeInMS):
1795         (onload.cb):
1796         (onload):
1797         * JSBench/yahoo-firefox/urem.js:
1798         (else.window.performance.window.performance.now.currentTimeInMS):
1799         (else.else.typeof.preciseTime.string_appeared_here.currentTimeInMS):
1800         (else.else.currentTimeInMS):
1801         (onload.cb):
1802         (onload):
1803         * JSBench/yahoo-safari/urem.js:
1804         (else.window.performance.window.performance.now.currentTimeInMS):
1805         (else.else.typeof.preciseTime.string_appeared_here.currentTimeInMS):
1806         (else.else.currentTimeInMS):
1807         (onload.cb):
1808         (onload):
1809
1810 2016-05-25  Geoffrey Garen  <ggaren@apple.com>
1811
1812         replaceable own properties seem to ignore replacement after property caching
1813         https://bugs.webkit.org/show_bug.cgi?id=158091
1814
1815         Reviewed by Darin Adler.
1816
1817         * MallocBench/MallocBench.xcodeproj/project.pbxproj:
1818         * MallocBench/MallocBench/Benchmark.cpp:
1819         * MallocBench/MallocBench/Interpreter.cpp:
1820         (Interpreter::doMallocOp):
1821         * MallocBench/MallocBench/Interpreter.h:
1822         * MallocBench/MallocBench/fastMallocLog.63316.ops: Added.
1823         * MallocBench/MallocBench/jetstream.cpp: Added.
1824         (benchmark_jetstream):
1825         * MallocBench/MallocBench/jetstream.h: Added.
1826
1827 2016-05-25  Keith Miller  <keith_miller@apple.com>
1828
1829         Unreviewed, add JSBench to the skipped list for now since it doesn't
1830         work currently.
1831
1832         * Skipped:
1833
1834 2016-05-17  Keith Miller  <keith_miller@apple.com>
1835         We should have JSBench in PerformanceTests
1836         https://bugs.webkit.org/show_bug.cgi?id=157952
1837
1838         Rubber-stamped by Saam Barati.
1839
1840         There are some slight changes to the layout of the test directory
1841         to make it work nicely with run-jsc-benchmarks. Before JSBench
1842         had each of the browser specific sub-tests in a sub-directory.
1843         These have been flattened e.g. amazon/safari/ has become
1844         amazon-safari/.
1845
1846         * JSBench/amazon-chrome-win/urem.html: Added.
1847         * JSBench/amazon-chrome-win/urem.js: Added.
1848         * JSBench/amazon-chrome/urem.html: Added.
1849         * JSBench/amazon-chrome/urem.js: Added.
1850         * JSBench/amazon-firefox-win/urm.html: Added.
1851         * JSBench/amazon-firefox-win/urm.js: Added.
1852         * JSBench/amazon-firefox/urm.html: Added.
1853         * JSBench/amazon-firefox/urm.js: Added.
1854         * JSBench/amazon-safari/urem.html: Added.
1855         * JSBench/amazon-safari/urem.js: Added.
1856         * JSBench/browsercheck.js: Added.
1857         * JSBench/facebook-chrome-win/urem.html: Added.
1858         * JSBench/facebook-chrome-win/urem.js: Added.
1859         * JSBench/facebook-chrome/urem.html: Added.
1860         * JSBench/facebook-chrome/urem.js: Added.
1861         * JSBench/facebook-firefox-win/urem.html: Added.
1862         * JSBench/facebook-firefox-win/urem.js: Added.
1863         * JSBench/facebook-firefox/urem.html: Added.
1864         * JSBench/facebook-firefox/urem.js: Added.
1865         * JSBench/facebook-safari/urem.html: Added.
1866         * JSBench/facebook-safari/urem.js: Added.
1867         * JSBench/google-chrome-win/urem.html: Added.
1868         * JSBench/google-chrome-win/urem.js: Added.
1869         * JSBench/google-chrome/urem.html: Added.
1870         * JSBench/google-chrome/urem.js: Added.
1871         * JSBench/google-firefox-win/urem.html: Added.
1872         * JSBench/google-firefox-win/urem.js: Added.
1873         * JSBench/google-firefox/uem.html: Added.
1874         * JSBench/google-firefox/uem.js: Added.
1875         * JSBench/google-safari/urem.html: Added.
1876         * JSBench/google-safari/urem.js: Added.
1877         * JSBench/harness.html: Added.
1878         * JSBench/harness.js: Added.
1879         * JSBench/harness.py: Added.
1880         * JSBench/index.html: Added.
1881         * JSBench/reload.html: Added.
1882         * JSBench/twitter-chrome-win/rem.html: Added.
1883         * JSBench/twitter-chrome-win/rem.js: Added.
1884         * JSBench/twitter-chrome/urem.html: Added.
1885         * JSBench/twitter-chrome/urem.js: Added.
1886         * JSBench/twitter-firefox-win/urem.html: Added.
1887         * JSBench/twitter-firefox-win/urem.js: Added.
1888         * JSBench/twitter-firefox/urem.html: Added.
1889         * JSBench/twitter-firefox/urem.js: Added.
1890         * JSBench/twitter-safari/urem.html: Added.
1891         * JSBench/twitter-safari/urem.js: Added.
1892         * JSBench/yahoo-chrome-win/urem.html: Added.
1893         * JSBench/yahoo-chrome-win/urem.js: Added.
1894         * JSBench/yahoo-chrome/urem.html: Added.
1895         * JSBench/yahoo-chrome/urem.js: Added.
1896         * JSBench/yahoo-firefox-win/urem.html: Added.
1897         * JSBench/yahoo-firefox-win/urem.js: Added.
1898         * JSBench/yahoo-firefox/urem.html: Added.
1899         * JSBench/yahoo-firefox/urem.js: Added.
1900         * JSBench/yahoo-safari/urem.html: Added.
1901         * JSBench/yahoo-safari/urem.js: Added.
1902
1903 2016-05-20  Ryosuke Niwa  <rniwa@webkit.org>
1904
1905         run-benchmark's results should contain Animometer's debug output
1906         https://bugs.webkit.org/show_bug.cgi?id=157941
1907
1908         Reviewed by Stephanie Lewis.
1909
1910         Made developer.html support the JSON generated by run-benchmark which stores everything under debugOutput.
1911
1912         * Animometer/resources/debug-runner/animometer.js:
1913         (Utilities.initialize): Unwrap debugOutput in the case run-benchmark's result JSON is used.
1914
1915 2016-05-18  Timothy Hatcher  <timothy@apple.com>
1916
1917         Make Animometer work in all browsers
1918         https://bugs.webkit.org/show_bug.cgi?id=157855
1919         rdar://problem/26338521
1920
1921         Reviewed by Jon Lee.
1922
1923         * Animometer/resources/runner/logo.svg: Use a symbol instead
1924         of putting the id on the root svg. This works in all browsers.
1925
1926 2016-05-07  Timothy Hatcher  <timothy@apple.com>
1927
1928         Update Animometer design
1929         https://bugs.webkit.org/show_bug.cgi?id=157449
1930
1931         Reviewed by Darin Adler.
1932
1933         * Animometer/developer.html: Stop including runner/animometer.css.
1934         * Animometer/index.html: Udpated elements to fit new styles.
1935
1936         * Animometer/resources/debug-runner/animometer.css:
1937         Copy the old runner/animometer.css to here so the debug runner is unaffected.
1938
1939         * Animometer/resources/runner/animometer.css:
1940         New styles for the design. Drop flex box for broad browser support.
1941
1942         * Animometer/resources/runner/animometer.js:
1943         (ResultsTable.clear): Use textContent.
1944         (window.sectionsManager.showSection): Add class to the body.
1945         (window.sectionsManager.setSectionScore): Use textContent, not innerHTML.
1946
1947         * Animometer/resources/runner/crystal.svg: Added.
1948         * Animometer/resources/runner/lines.svg: Added.
1949         * Animometer/resources/runner/logo.svg: Added.
1950
1951         * Animometer/resources/runner/tests.js: Shorten test name and title case them.
1952
1953 2016-05-06  Manuel Rego Casasnovas  <rego@igalia.com>
1954
1955         [css-grid] Unprefix CSS Grid Layout properties
1956         https://bugs.webkit.org/show_bug.cgi?id=157137
1957
1958         Reviewed by Simon Fraser.
1959
1960         Remove "-webkit" prefix from all the grid layout properties,
1961         including the display value.
1962         Update the source code to remove the prefix where it was used too.
1963
1964         * Layout/auto-grid-lots-of-data.html:
1965         * Layout/fixed-grid-lots-of-data.html:
1966         * Layout/fixed-grid-lots-of-stretched-data.html:
1967
1968 2016-04-25  Geoffrey Garen  <ggaren@apple.com>
1969
1970         bmalloc: Misc improvements to MallocBench
1971         https://bugs.webkit.org/show_bug.cgi?id=157004
1972
1973         Reviewed by Darin Adler.
1974
1975         * MallocBench/run-malloc-benchmarks: Added --memory and --memory_warning
1976         modes for focused memory testing.
1977
1978         * MallocBench/MallocBench/Benchmark.cpp:
1979         (Benchmark::printReport): Clarified output.
1980
1981         (Benchmark::currentMemoryBytes): Added compressed memory because top
1982         does the same. (It always happens to zero in the benchmarks we run. But
1983         this is good for sanity.)
1984
1985         * MallocBench/MallocBench/CommandLine.cpp: Moved up to 8 runs to reduce
1986         variance.
1987
1988         * MallocBench/MallocBench/alloc_free.cpp:
1989         (benchmark_alloc_free): Cycle a single allocation in order to stress
1990         the effect of merging on calls to madvise.
1991
1992         * MallocBench/MallocBench/big.cpp:
1993         (benchmark_big): Graduated to 8kB-128kB because medium tests up to 8 and
1994         our large allocator doesn't kick in until 64kB.
1995
1996         * MallocBench/MallocBench/medium.cpp:
1997         (benchmark_medium): Test all the way down to 1kB because our large
1998         allocator used to service 1kB allocations and 1kB is an interesting
1999         middle size where memory is unusually large but allocation throughput
2000         still matters.
2001
2002         * MallocBench/MallocBench/stress.cpp:
2003         (benchmark_stress): Reduced the churn count to match stress_aligned
2004         because this test was taking too long to complete.
2005
2006         * MallocBench/MallocBench/stress_aligned.cpp:
2007         (benchmark_stress_aligned): Our new large allocator can handle even
2008         more absurdly large values.
2009
2010 2016-04-25  Simon Fraser  <simon.fraser@apple.com>
2011
2012         Add a content animation test that uses SVG animation.
2013         https://bugs.webkit.org/show_bug.cgi?id=156827
2014
2015         * Animation/svg-animation.html: Added.
2016         * Skipped:
2017
2018 2016-04-22  Simon Fraser  <simon.fraser@apple.com>
2019
2020         Skip two content animation tests which are only meant for iOS testing.
2021
2022         * Animation/css-animation.html: Added.
2023         * Animation/raf-animation.html: Added.
2024
2025         * Skipped:
2026
2027 2016-04-20  Simon Fraser  <simon.fraser@apple.com>
2028
2029         Add content animation tests to benchmark_runner, and allow the runner to collect device data as part of the results
2030         https://bugs.webkit.org/show_bug.cgi?id=156827
2031
2032         Add two files missing from the previous commit.
2033
2034         * Animation/css-animation.html: Added.
2035         * Animation/raf-animation.html: Added.
2036
2037 2016-04-20  Simon Fraser  <simon.fraser@apple.com>
2038
2039         Add content animation tests to benchmark_runner, and allow the runner to collect device data as part of the results
2040         https://bugs.webkit.org/show_bug.cgi?id=156827
2041
2042         Reviewed by Stephanie Lewis.
2043
2044         Two new files for the content-animation suite.
2045
2046         After patching for use in the benchmark, these tests are a little different to other benchmarks.
2047         The test content itself does not collect performance data; the tests spit out a boilerplate JSON
2048         result with a placeholder for framerate, which is collected in native code.
2049
2050         When run as a benchmark, test completion involves a couple of bounces between the test and MobileSafari.
2051         Test completion is initiated by a setTimeout() in the test, at which point location.hash is set to "#done".
2052         MobileSafari detects that, and asynchronously dumps performance data. Once this is complete, MobileSafari
2053         changes the URL has to "#submit", which triggers the XHR to the test relay that indicates the test is
2054         complete.
2055
2056         * Animation/css-animation.html: Added.
2057         * Animation/raf-animation.html: Added.
2058
2059 2016-04-15  Jon Lee  <jonlee@apple.com>
2060
2061         Animometer test could report a NaN
2062         https://bugs.webkit.org/show_bug.cgi?id=156646
2063
2064         Reviewed by Darin Adler.
2065         Provisionally reviewed by Said Abou-Hallawa.
2066
2067         * Animometer/tests/resources/main.js:
2068         (didFinishInterval): The ramp controller has a first phase where it ramps up the complexity and
2069         reacts based on how well the system handles the load. The assumption was that it would handle at least
2070         1 particle easily. That is not always the case. As a result, an interpolation calculation could
2071         end up setting an upper bound of NaN.
2072
2073         This occurs because we never get out of the first tier, so this._lastTierComplexity is undefined.
2074         Now that we guarantee a minimum complexity of 1, modify the conditional to check for this._lastTierComplexity
2075         before interpolating the upper bound of the first ramp. In the case where the system struggles with
2076         1 particle, set it to currentComplexity.
2077
2078 2016-04-09  Jon Lee  <jonlee@apple.com>
2079
2080         Update Animometer to accommodate different screens
2081         https://bugs.webkit.org/show_bug.cgi?id=156449
2082
2083         Reviewed by Darin Adler.
2084         Provisionally reviewed by Said Abou-Hallawa.
2085
2086         * Animometer/index.html: Wrap button in a container to add padding at the bottom.
2087         * Animometer/resources/debug-runner/animometer.css:
2088         (@media screen and (min-device-width: 1800px)): Deleted.
2089         (@media screen and (min-width: 1800px)): Cannot use min-device-width since it may match incorrectly.
2090         (screen and (max-device-height: 414px) and (orientation: landscape)): Some devices swap device width
2091         and height with orientation change.
2092         * Animometer/resources/runner/animometer.css: Similar.
2093         (screen and (min-device-width: 1024px) and (orientation: landscape)):
2094         (screen and (max-device-height: 414px) and (orientation: landscape)):
2095         (.frame-container): On smaller iPhones, adding 1px prevents the navigation bars from appearing.
2096         (@media screen and (min-device-width: 768px) and (max-device-width: 1024px)): Deleted.
2097         (@media (min-device-height: 768px) and (max-device-height: 1024px)): Target iPad Airs and similar.
2098         (@media screen and (min-device-width: 1024px) and (max-device-width: 1366px)): Deleted.
2099         (@media screen and (max-device-width: 1024px) and (min-device-height: 1366px)): Target iPad Pro.
2100         (#results footer): Add padding below the button for testing again.
2101         * Animometer/tests/master/multiply.html: Remove the center text.
2102         * Animometer/tests/master/resources/text.js: Update the test so that in every frame the text moves.
2103         * Animometer/tests/master/text.html: Update the text sizing depending on the size of the device.
2104
2105 2016-04-08  Jon Lee  <jonlee@apple.com>
2106
2107         Have Animometer benchmark always start with complexity of 1
2108         https://bugs.webkit.org/show_bug.cgi?id=156432
2109
2110         Reviewed by Ryosuke Niwa.
2111
2112         * Animometer/tests/resources/main.js: Update the default Controller and RampController to
2113         set its minimum complexities to 1 instead of 0.
2114
2115 2016-04-08  Jon Lee  <jonlee@apple.com>
2116
2117         Fix SVG benchmark test
2118         https://bugs.webkit.org/show_bug.cgi?id=156410
2119
2120         Reviewed by Dean Jackson.
2121
2122         * Animometer/resources/extensions.js: Update Point.zero to be a static Point.
2123         * Animometer/tests/simple/resources/tiled-canvas-image.js:
2124         (Stage.call._setupTiles): Refactor.
2125         * Animometer/tests/master/resources/particles.js:
2126         (Particle.prototype.reset): Use Point.center.
2127         (complexity): We are not using a gradient background anymore, so remove the +1.
2128         * Animometer/tests/master/resources/svg-particles.js: Update to use SVG transform
2129         instead of CSS transform.
2130
2131 2016-04-06  Jon Lee  <jonlee@apple.com>
2132
2133         Update master benchmark with SVG test
2134         https://bugs.webkit.org/show_bug.cgi?id=156273
2135
2136         Reviewed by Dean Jackson.
2137         Provisionally reviewed by Said Abou-Hallawa.
2138
2139         Switch masks tests for SVG path test.
2140
2141         * Animometer/resources/debug-runner/tests.js: Move mask test here.
2142         * Animometer/resources/runner/tests.js: Add SVG test here.
2143         * Animometer/tests/dom/particles.html: Renamed from PerformanceTests/Animometer/tests/master/particles.html.
2144         * Animometer/tests/dom/resources/dom-particles.js: Renamed from PerformanceTests/Animometer/tests/master/resources/dom-particles.js.
2145
2146         * Animometer/tests/master/resources/particles.js: Add minPosition for bounds checking. Prevents particle from being
2147         partially obscured.
2148         * Animometer/tests/master/resources/svg-particles.js: Added.
2149         (Particle): The particle is either a path object or a rect using a path as a clip. The
2150         same path is used either way. For each particle create a linear gradient with a random
2151         rotation.
2152         (SVGParticlesStage): Look in #shapes to see how many different kinds of paths are available.
2153         This makes the test more generic in case other shapes need to be tested.
2154         * Animometer/tests/master/svg-particles.html: Added. Have two defs, one that houses each
2155         particle's gradient, and one that holds the shape templates.
2156
2157 2016-03-27  Hunseop Jeong  <hs85.jeong@samsung.com>
2158
2159         [EFL] REGRESSION(r188793): It made 200 layout tests and Bindings/event-target-wrapper.html performance test fail
2160         https://bugs.webkit.org/show_bug.cgi?id=148470 
2161
2162         Reviewed by Darin Adler.
2163
2164         * Skipped: Unskip the Bindings/event-target-wrapper test.
2165
2166 2016-03-23  Jon Lee  <jonlee@apple.com>
2167
2168         Update focus and leaves tests
2169         https://bugs.webkit.org/show_bug.cgi?id=155825
2170
2171         Reviewed by Simon Fraser.
2172
2173         Particles would improperly disappear, before they were fully off stage. Update the calculation.
2174         * Animometer/tests/dom/resources/leaves.js:
2175         * Animometer/tests/master/resources/leaves.js:
2176
2177         * Animometer/tests/master/focus.html: Update the center element styling.
2178         * Animometer/tests/master/resources/focus.js:
2179         (FocusElement.Utilities.createClass): Give enough space in the container for each particle for the blur
2180         to spread. It should be about 3x more space than the blur radius on each side.
2181         (Stage.call.initialize): Ditto for the center element.
2182
2183 2016-03-23  Jon Lee  <jonlee@apple.com>
2184
2185         Update support for other platforms
2186         https://bugs.webkit.org/show_bug.cgi?id=155824
2187
2188         Reviewed by Simon Fraser.
2189
2190         * Animometer/resources/debug-runner/animometer.css: Remove extraneous media query. All of it should
2191         be handled in the release stylesheet.
2192         * Animometer/resources/debug-runner/animometer.js: Add support for browsers that return an HTMLCollection
2193         when retrieving radio elements with a name, instead of the selected value.
2194         * Animometer/resources/runner/animometer.css: Adjust the queries for devices of varying widths.
2195         (.frame-container): Move overflow:hidden to #stage.
2196         * Animometer/tests/master/resources/stage.css: Consolidate into tests/resources/stage.css.
2197         * Animometer/tests/resources/stage.css:
2198         (body): Remove overflow:hidden.
2199         (#stage): Set overflow:hidden here.
2200         (#center-text): Moved from master/resources/stage.css.
2201
2202         Update stylesheet hrefs.
2203         * Animometer/tests/master/canvas-stage.html:
2204         * Animometer/tests/master/focus.html:
2205         * Animometer/tests/master/leaves.html:
2206         * Animometer/tests/master/multiply.html:
2207         * Animometer/tests/master/particles.html:
2208         * Animometer/tests/master/text.html: Adjust text size to fit in the device screen.
2209
2210 2016-03-23  Jon Lee  <jonlee@apple.com>
2211
2212         Make the benchmark require device to be in landscape orientation
2213         https://bugs.webkit.org/show_bug.cgi?id=155822
2214         rdar://problem/25258650
2215
2216         Reviewed by Ryosuke Niwa.
2217
2218         Check that the device is in landscape orientation. If not, disable the button to start it,
2219         and show a warning message.
2220
2221         * Animometer/developer.html: Add a message about how the browser should be set up. Include a
2222         warning message that appears if the orientation is incorrect on mobile devices.
2223         * Animometer/index.html: Ditto.
2224
2225         * Animometer/resources/debug-runner/animometer.css: Migrate the .hidden rule into the release
2226         stylesheet. Update the style to accommodate the new UI.
2227         * Animometer/resources/runner/animometer.css:
2228
2229         * Animometer/resources/runner/animometer.js:
2230         (window.benchmarkController.initialize): Add the orientation listener is needed.
2231         (window.benchmarkController.addOrientationListenerIfNecessary): Only mobile devices need this. Check
2232         to see for support of window.orientation.
2233         (window.benchmarkController._orientationChanged): Toggle the warning based on whether we match the
2234         landscape query. Set a state variable, which is needed for the debug harness. Call updateStartButtonState.
2235         (window.benchmarkController.updateStartButtonState):
2236         * Animometer/resources/debug-runner/animometer.js: Change _updateStartButtonState to return
2237         a boolean about whether at least one test is selected. That will be used in
2238         benchmarkController.updateStartButtonState(). Move the load event listener to the release version.
2239         (window.benchmarkController.updateStartButtonState): Override the release version, and also check
2240         that at least one test is selected.
2241
2242 2016-03-22  Geoffrey Garen  <ggaren@apple.com>
2243
2244         MallocBench: consolidate regression testing for aligned allocation
2245         https://bugs.webkit.org/show_bug.cgi?id=155762
2246
2247         Reviewed by Michael Saboff.
2248
2249         * MallocBench/MallocBench.xcodeproj/project.pbxproj:
2250         * MallocBench/MallocBench/Benchmark.cpp:
2251         * MallocBench/MallocBench/memalign.cpp: Removed.
2252         * MallocBench/MallocBench/memalign.h: Removed. The stress_aligned test
2253         covers this and much more.
2254
2255         * MallocBench/MallocBench/stress_aligned.cpp:
2256         (benchmark_stress_aligned): Include specific tests for extreme sizes
2257         and alignments.
2258
2259 2016-03-21  Jon Lee  <jonlee@apple.com>
2260
2261         Update benchmark tests
2262         https://bugs.webkit.org/show_bug.cgi?id=155723
2263
2264         Reviewed by Darin Adler.
2265         Provisionally reviewed by Said Abou-Hallawa.
2266
2267         Add quadratic and bezier segments to the canvas path test.
2268
2269         * Animometer/resources/runner/tests.js: Some of the query strings are unnecessary.
2270         Rename the test.
2271         * Animometer/tests/master/resources/canvas-stage.js:
2272         (tune): Update to be able to take an array of possible constructors. Choose one randomly.
2273         * Animometer/tests/master/resources/canvas-tests.js:
2274         (CanvasLinePoint.Utilities.createClass): Move the point selection out to a separate
2275         function called randomPoint() for reuse. Move X_LOOPS, Y_LOOPS, and offsets into the
2276         class definition.
2277         (randomPoint): Scale the grid down a little bit so that the lines along the edge of the
2278         canvas are not cut off when the stroke size is thick.
2279         (CanvasQuadraticSegment): Added.
2280         (CanvasBezierSegment): Added.
2281         (SimpleCanvasStage): Pass in an array of the different segment types. Since line segments
2282         are short compared to the curved ones, make it twice as likely to render a line segment.
2283         (SimpleCanvasStage.animate): Update the drawing code so that we render all line segments.
2284
2285         Add a helper method that selects a random element from an array.
2286
2287         * Animometer/tests/resources/main.js:
2288         (Stage.randomElementInArray): Select a random element from the provided array.
2289
2290         * Animometer/tests/bouncing-particles/resources/bouncing-tagged-images.js: Refactor.
2291         * Animometer/tests/dom/resources/leaves.js: Ditto.
2292         * Animometer/tests/master/resources/dom-particles.js: Ditto.
2293         * Animometer/tests/master/resources/image-data.js: Ditto.
2294         * Animometer/tests/master/resources/leaves.js: Ditto.
2295         * Animometer/tests/simple/resources/simple-canvas-paths.js: Ditto.
2296
2297         Add canvas tests that includes all stroke and fill paths. This makes it possible to avoid having to
2298         include the full simple canvas suite for perf testing.
2299
2300         * Animometer/resources/debug-runner/tests.js: Add new tests. Move the canvas test into the Canvas
2301         suite.
2302         * Animometer/tests/simple/resources/simple-canvas-paths.js: Add a CanvasStroke and CanvasFill particle
2303         that random selects an object to render.
2304
2305         * Animometer/resources/debug-runner/tests.js: Move 3D suite before basic canvas suite.
2306         When updating the perf bot script, we will include the suites up to this one, but exclude
2307         the basic canvas suite.
2308
2309         Move compositing transforms test to HTML suite and remove the empty Miscellaneous suite.
2310
2311         * Animometer/resources/debug-runner/tests.js:
2312         * Animometer/tests/dom/compositing-transforms.html: Renamed from PerformanceTests/Animometer/tests/misc/compositing-transforms.html.
2313         * Animometer/tests/dom/resources/compositing-transforms.js: Renamed from PerformanceTests/Animometer/tests/misc/resources/compositing-transforms.js.
2314
2315         Clean up miscellaneous test suite. Add a canvas ellipse test, and remove the other
2316         canvas tests.
2317
2318         * Animometer/resources/debug-runner/tests.js: Add ellipse tests to the simple suite.
2319         * Animometer/tests/misc/canvas-electrons.html: Removed.
2320         * Animometer/tests/misc/canvas-stars.html: Removed.
2321         * Animometer/tests/misc/resources/canvas-electrons.js: Removed.
2322         * Animometer/tests/misc/resources/canvas-stars.js: Removed.
2323         * Animometer/tests/simple/resources/simple-canvas-paths.js: Add ellipse primitives.
2324
2325         Merge text tests together into one.
2326
2327         * Animometer/resources/runner/tests.js: Remove international.html.
2328         * Animometer/tests/master/international.html: Removed.
2329         * Animometer/tests/master/resources/text.js:
2330         (animate): Update styling. Manually calculate gradients for the shadow particles.
2331         Reduce the step size for y direction to avoid cutting text off at the margins. Increase
2332         step for x since there will be a little more room.
2333         * Animometer/tests/master/text.html: Add more translations and lay it out in a table.
2334
2335 2016-03-20  Jon Lee  <jonlee@apple.com>
2336
2337         Add a link to show debug data
2338         https://bugs.webkit.org/show_bug.cgi?id=155724
2339
2340         Reviewed by Simon Fraser.
2341
2342         * Animometer/developer.html: Attach the onclick handler to the score.
2343         * Animometer/index.html: Ditto.
2344
2345 2016-03-18  Dean Jackson  <dino@apple.com>
2346
2347         Add a basic WebGL test to Animometer
2348         https://bugs.webkit.org/show_bug.cgi?id=155475
2349         <rdar://problem/25156860>
2350
2351         Reviewed by Simon Fraser and Jon Lee.
2352
2353         Add a pretty simple WebGL test to Animometer
2354         which tries to draw a number of animated triangles.
2355         The result still needs a bit of tuning.
2356
2357         * Animometer/resources/debug-runner/tests.js: Add a new
2358         Suite for "3D" tests.
2359         * Animometer/tests/3d/resources/webgl.js: Added.
2360         * Animometer/tests/3d/webgl.html: Added.
2361
2362 2016-03-18  Jon Lee  <jonlee@apple.com>
2363
2364         Add support for statically linking to a specific test
2365         https://bugs.webkit.org/show_bug.cgi?id=155631
2366
2367         Rubber-stamped by Darin Adler.
2368
2369         * Animometer/developer.html: Update to call restartBenchmark instead so that it works for
2370         both the preset and the manually set test sessions.
2371         * Animometer/resources/debug-runner/animometer.css:
2372         (.tree .link): Style the "link" UI.
2373         * Animometer/resources/debug-runner/animometer.js: Move updateDisplay from suitesManager
2374         to optionsManager since this is a visual option and has nothing to do with the suites
2375         settings. Update the construction of the test UI by including a "link" after each test.
2376         Clicking on that link brings up a JS prompt with a URL and a query string with the current
2377         parameters of the controller, and selected test. Pasting this URL into the location bar will
2378         automatically start running the selected test.
2379         (suitesManager.suitesFromQueryString): Iterate through the Suites and tests and find the one
2380         that matches the provided parameters. Returns an object similar to the form in
2381         suitesManager.updateLocalStorageFromUI.
2382         (benchmarkController.initialize): After settings up the events and options, try parsing the
2383         query string and running the benchmark immediately. Otherwise, fall back to the form.
2384         (benchmarkController.startBenchmark): Store the options and suites into member variables for
2385         reuse in restartBenchmark.
2386         (benchmarkController.startBenchmarkImmediatelyIfEncoded): Convert the query string to an object.
2387         If that's successful, find the suite and test referenced in the query string. Start the benchmark if
2388         the search for the test succeeded.
2389         * Animometer/resources/extensions.js:
2390         (Utilities.stripNonASCIICharacters): Helper method to convert the name of the suite and test
2391         into a query-string-friendly version.
2392         (Utilities.convertObjectToQueryString): Helper method to convert an object to query string
2393         format.
2394         (Utilities.convertQueryStringToObject): Helper method to convert query string into an object
2395         with properties and values.
2396
2397 2016-03-16  Jon Lee  <jonlee@apple.com>
2398
2399         Add a new benchmark test
2400         https://bugs.webkit.org/show_bug.cgi?id=155570
2401
2402         Reviewed by Simon Fraser.
2403
2404         New Leaves test includes various image sizes and opacity.
2405
2406         * Animometer/resources/debug-runner/tests.js: Add it to the HTML test suite.
2407         * Animometer/tests/dom/leaves.html: Added.
2408         * Animometer/tests/dom/resources/leaves.js: Added. Override the
2409         (Particle.call.reset): Uses a range of sizes, and opacity.
2410         (Particle.call.animate): Opacity goes up then down. When it hits 0, reset the particle.
2411         (Particle.call.move): Set transform and opacity.
2412         * Animometer/tests/master/resources/leaves.js: Get rid of the closure so that it
2413         can be used in this test. Update the relative path so that it works in both the master
2414         and dom test suite.
2415
2416 2016-03-15  Simon Fraser  <simon.fraser@apple.com>
2417
2418         Add developer Animometer test that bounces P3-tagged images
2419         https://bugs.webkit.org/show_bug.cgi?id=155511
2420
2421         Reviewed by Tim Horton.
2422         
2423         Add a test for rendering performance of tagged images. The 5 images are tagged
2424         with the Display P3 colorspace.
2425
2426         * Animometer/resources/debug-runner/tests.js:
2427         * Animometer/tests/bouncing-particles/bouncing-tagged-images.html: Added.
2428         * Animometer/tests/bouncing-particles/resources/bouncing-tagged-images.js: Added.
2429         * Animometer/tests/bouncing-particles/resources/image1.jpg: Added.
2430         * Animometer/tests/bouncing-particles/resources/image2.jpg: Added.
2431         * Animometer/tests/bouncing-particles/resources/image3.jpg: Added.
2432         * Animometer/tests/bouncing-particles/resources/image4.jpg: Added.
2433         * Animometer/tests/bouncing-particles/resources/image5.jpg: Added.
2434
2435 2016-03-09  Jon Lee  <jonlee@apple.com>
2436
2437         Enhance existing Animometer tests
2438         https://bugs.webkit.org/show_bug.cgi?id=155261
2439
2440         Reviewed by Simon Fraser.
2441
2442         * Animometer/tests/master/resources/canvas-tests.js: Add a gradient to
2443         the filled circles. To expose more of the gradient, add another circle.
2444         (SimpleCanvasStage.call.animate): For each frame, create a gradient with
2445         undulating stop points and colors. Fill the circles twice; once with
2446         the solid color, and once with the gradient.
2447
2448         * Animometer/tests/master/resources/dom-particles.js: Refactor the
2449         emission variables into a separate stage for this test. Add a colorOffset
2450         variable to make the colors of each particle slightly different, since
2451         the ramp controller can add large numbers of particles all at once, which
2452         would otherwise get all the same color.
2453         * Animometer/tests/master/resources/particles.js:
2454         (initialize): Remove the code specific to the SVG mask test.
2455
2456         * Animometer/tests/master/resources/image-data.js:
2457         (initialize): Remove unused local variable.
2458         * Animometer/tests/master/resources/multiply.js:
2459         (initialize): Make the test harder by adding more total particles.
2460
2461 2016-03-09  Jon Lee  <jonlee@apple.com>
2462
2463         Add text tests
2464         https://bugs.webkit.org/show_bug.cgi?id=155257
2465
2466         Reviewed by Simon Fraser.
2467
2468         * Animometer/resources/extensions.js:
2469         (UnitBezier.Utilities.createClass): Add a class that computes Bezier points
2470         assuming that two of the control points are at (0,0) and (1,1). Taken from
2471         WebCore/platform/graphics/UnitBezier.h
2472         * Animometer/resources/runner/tests.js: Add a test for English text and one
2473         for international text.
2474         * Animometer/tests/master/international.html: Added.
2475         * Animometer/tests/master/resources/text.js: Added. The test assumes there is
2476         #template div which it will copy. The copies are placed behind the template, and
2477         are set with different colors each frame. They are moved around with CSS transform.
2478         * Animometer/tests/master/text.html: Added.
2479
2480         Remove the other text tests, since these ones cover the same techniques.
2481         * Animometer/tests/text/layering-text.html: Removed.
2482         * Animometer/tests/text/resources/layering-text.js: Removed.
2483         * Animometer/tests/text/resources/text-boxes.js: Removed.
2484         * Animometer/tests/text/text-boxes.html: Removed.
2485         * Animometer/resources/debug-runner/tests.js:
2486
2487 2016-03-09  Jon Lee  <jonlee@apple.com>
2488
2489         Add a new image test
2490         https://bugs.webkit.org/show_bug.cgi?id=155232
2491
2492         Reviewed by Dean Jackson.
2493         Provisionally reviewed by Said Abou-Hallawa.
2494
2495         The image test renders PNGs and moves them with translate and rotate
2496         transforms. Each particle has a lifetime, and when the lifetime ends or
2497         the particle goes offscreen, it resets itself somewhere on the stage.
2498
2499         * Animometer/resources/debug-runner/tests.js: Remove the CSS bouncing PNG
2500         images test, because this one tests the same technique.
2501         * Animometer/resources/runner/tests.js: Added here as "Leaves".
2502         * Animometer/tests/master/leaves.html: Added.
2503         * Animometer/tests/master/resources/particles.js: Refactor out the parts
2504         specific to the DOM particles test. Consequently make velocity a public
2505         member.
2506         (initialize): The options parameter is never used, so remove it.
2507         (animate): Remove unused local variable.
2508         * Animometer/tests/master/resources/leaves.js: Maintains a focal point that
2509         moves back and forth across the canvas. That point affects the velocity
2510         of the particles. When the focal point is on the leftmost side, it is
2511         between [-6, -2], and set in reset(). When the focal point is on the rightmost
2512         side, it will be from [2, 6].
2513         * Animometer/tests/master/resources/dom-particles.js: Move JS specific to
2514         this test here from particles.js.
2515
2516         New images.
2517         * Animometer/tests/master/resources/compass100.png: Added.
2518         * Animometer/tests/master/resources/console100.png: Added.
2519         * Animometer/tests/master/resources/contribute100.png: Added.
2520         * Animometer/tests/master/resources/debugger100.png: Added.
2521         * Animometer/tests/master/resources/inspector100.png: Added.
2522         * Animometer/tests/master/resources/layout100.png: Added.
2523         * Animometer/tests/master/resources/performance100.png: Added.
2524         * Animometer/tests/master/resources/script100.png: Added.
2525         * Animometer/tests/master/resources/shortcuts100.png: Added.
2526         * Animometer/tests/master/resources/standards100.png: Added.
2527         * Animometer/tests/master/resources/storage100.png: Added.
2528         * Animometer/tests/master/resources/styles100.png: Added.
2529         * Animometer/tests/master/resources/timeline100.png: Added.
2530
2531 2016-03-03  Jon Lee  <jonlee@apple.com>
2532
2533         Add ability to retrieve raw data from release harness
2534         https://bugs.webkit.org/show_bug.cgi?id=155026
2535
2536         Reviewed by Simon Fraser.
2537
2538         * Animometer/developer.html: Remove the special UI in the debug
2539         harness.
2540         * Animometer/resources/runner/animometer.css: Add styles for the
2541         overlay.
2542         * Animometer/resources/runner/animometer.js: Let 'j' show the JSON
2543         results, but only if the overlay doesn't exist. Add 'esc' key to dismiss
2544         the overlay.
2545         (window.benchmarkController.selectResults): Cycle the cases around
2546         so that the first 's' press selects both the benchmark score and
2547         the individual test scores.
2548         * Animometer/resources/debug-runner/animometer.css: Remove
2549         unneeded rules.
2550         * Animometer/resources/debug-runner/animometer.js: Make the same
2551         call to handleKeyPress.
2552
2553 2016-03-03  Jon Lee  <jonlee@apple.com>
2554
2555         Make sure multiply test particles have at least some opacity
2556         https://bugs.webkit.org/show_bug.cgi?id=155027
2557
2558         Reviewed by Simon Fraser.
2559
2560         * Animometer/tests/master/resources/multiply.js:
2561         (initialize): Have the elements spin a little faster to make it
2562         more obvious when the system is being stressed.
2563         (_addTile):
2564         (animate): Make sure each element being animated has at least 1%
2565         opacity.
2566
2567 2016-03-03  Jon Lee  <jonlee@apple.com>
2568
2569         Update image test
2570         https://bugs.webkit.org/show_bug.cgi?id=154962
2571
2572         Rubber-stamped by Darin Adler.
2573
2574         * Animometer/tests/master/image-data.html: Make each canvas have a compositing layer.
2575         * Animometer/tests/master/resources/image-data.js:
2576         (initialize): Update to load multiple images serially.
2577         (_loadImage):
2578         (tune): Use display instead of visibility. When showing an element anew, move it somewhere else.
2579         (_createTestElement): Set up the element, refactor out placement of element to _refreshElement.
2580         (_refreshElement): Place element in a tile grid.
2581         (animate):
2582         (_getRandomNeighboringPixelIndex): Use a more conservative distribution to make the effect last a little longer.
2583         * Animometer/tests/master/resources/compass.svg: Added.
2584         * Animometer/tests/master/resources/console.svg: Added.
2585         * Animometer/tests/master/resources/contribute.svg: Added.
2586         * Animometer/tests/master/resources/debugger.svg: Added.
2587         * Animometer/tests/master/resources/inspector.svg: Added.
2588         * Animometer/tests/master/resources/layout.svg: Added.
2589         * Animometer/tests/master/resources/performance.svg: Added.
2590         * Animometer/tests/master/resources/script.svg: Added.
2591         * Animometer/tests/master/resources/shortcuts.svg: Added.
2592         * Animometer/tests/master/resources/standards.svg: Added.
2593         * Animometer/tests/master/resources/storage.svg: Added.
2594         * Animometer/tests/master/resources/styles.svg: Added.
2595         * Animometer/tests/master/resources/timeline.svg: Added.
2596
2597 2016-03-02  Jon Lee  <jonlee@apple.com>
2598
2599         Add some new controllers, and refine tests
2600         https://bugs.webkit.org/show_bug.cgi?id=154914
2601
2602         Reviewed by Simon Fraser.
2603
2604         Improve tests.
2605
2606         * Animometer/tests/master/focus.html: Move each particle into a layer. Put the particle
2607         in a container element. Expand the container element by the max blur radius, and clip
2608         overflow. This way, when the blur is applied, it avoids causing layer resizes.
2609         * Animometer/tests/master/resources/focus.js:
2610         (FocusElement.Utilities.createClass): Create a container element, and put the particle
2611         inside.
2612         (hide): Set display:none.
2613         (show): Set display:block.
2614         (animate): Apply filters to the container element.
2615         (FocusStage.call.initialize): Instead of inserting and removing elements from the DOM,
2616         keep them in the stage, but set the display style instead. Use this._offsetIndex to
2617         keep track of which elements are displayed.
2618         (FocusStage.call.animate): Move some calculations around to avoid doing unneeded math.
2619         (FocusStage.call.getBlurValue): Make sure elements are always blurred.
2620         (FocusStage.call.getOpacityValue): Make sure elements have some opacity.
2621         * Animometer/tests/master/resources/multiply.js: Have the particles on the edge of the
2622         stage appear less black when the complexity gets large enough.
2623         (tune): Have this._distanceFactor calculate the factor. Avoid calculating square root each
2624         frame.
2625
2626 2016-03-02  Jon Lee  <jonlee@apple.com>
2627
2628         Add some new controllers, and refine tests
2629         https://bugs.webkit.org/show_bug.cgi?id=154914
2630
2631         Reviewed by Simon Fraser.
2632
2633         Add a controller that centers around 30 fps instead of 60 fps.
2634
2635         * Animometer/developer.html: Add a new option.
2636         * Animometer/resources/debug-runner/animometer.js:
2637         * Animometer/resources/runner/animometer.js:
2638         (this._processData.findRegression): When calculating the complexity-frameLength regression,
2639         check the controller, and use a 30 fps baseline if needed.
2640         * Animometer/resources/statistics.js:
2641         (Regression.Utilities.createClass): Update to allow clients to specify the baseline
2642         frame length.
2643         * Animometer/tests/resources/main.js:
2644         (tune): Override some of the constants in RampController. Move those constants out for
2645         easier reading.
2646
2647         Add a fixed controller, with no step.
2648
2649         * Animometer/developer.html: Add a controller that takes no step.
2650         * Animometer/resources/debug-runner/animometer.js:
2651         * Animometer/tests/resources/main.js:
2652         (Rotater.Utilities.createClass):
2653
2654         Switch to ramp controller as default.
2655
2656         * Animometer/developer.html: Increase the test length to 20 seconds.
2657         * Animometer/resources/debug-runner/animometer.js: Rename the "adjustment" field to "controller"
2658         since that is a more accurate description.
2659         * Animometer/resources/debug-runner/graph.js:
2660         * Animometer/resources/runner/animometer.js: Update preferences for release suite.
2661
2662 2016-02-26  Jon Lee  <jonlee@apple.com>
2663
2664         Address Dean's comments in 154673.
2665
2666         * Animometer/developer.html:
2667         * Animometer/resources/debug-runner/animometer.js:
2668         * Animometer/resources/debug-runner/graph.js:
2669
2670 2016-02-25  Jon Lee  <jonlee@apple.com>
2671
2672         Update animation benchmark and tests
2673         https://bugs.webkit.org/show_bug.cgi?id=154673
2674
2675         Reviewed by Dean Jackson.
2676
2677         Update test visuals.
2678
2679         * Animometer/tests/master/resources/canvas-tests.js:
2680         (CanvasLineSegment.Utilities.createClass): Line segments near the edge of the stage get clipped.
2681         Update circle position and radius to minimize impact.
2682         * Animometer/tests/master/resources/particles.js: Get rid of rotating gradient background, and
2683         have 3 locations for emitting particles.
2684         * Animometer/tests/master/resources/multiply.js: Update distance metric so that fringe tiles get
2685         more color.
2686         (initialize): Fix some of the math for laying out the tiles.
2687         (animate): When a tile isn't used, set visibility: hidden.
2688
2689 2016-02-24  Jon Lee  <jonlee@apple.com>
2690
2691         Update animation benchmark and tests
2692         https://bugs.webkit.org/show_bug.cgi?id=154673
2693
2694         Reviewed by Dean Jackson.
2695
2696         Update the ramp controller.
2697
2698         The controller refines the complexity interval to test across.
2699
2700         * Animometer/resources/statistics.js: Add functions that estimate cumulative distribution function.
2701         (Regression): For the flat regression, force the first segment to be at 60 fps.
2702         (valueAt): Add convenience function to return interpolated value based on the regression used.
2703         (_calculateRegression): Include the number of points included for both segments, and the piecewise
2704         errors.
2705         * Animometer/tests/resources/math.js: Make the Kalman estimator subclass Experiment, and allow it
2706         to be reset.
2707
2708         * Animometer/tests/resources/main.js: Initialize the tier such that it starts at 10^0 = 1.
2709         Increase the number of ramps. Maintain three FPS thresholds-- the frame rate of interest, a limit
2710         on the lowest FPS we care to go for later interpolation, and a minimum FPS threshold we want to
2711         aim for each ramp. Also keep three estimators: a running average of the change point, a minimum
2712         boundary for each ramp, and an estimator for all the frames within an interval. The first two
2713         are used to determine the parameters of the next ramp, and the latter allows us to refine the
2714         parameters.
2715         (update): During the tier phase, it is possible that the highest complexity possible for a test
2716         won't stress the system enough to trigger stopping the tier phase and transitioning to the ramps.
2717         If the complexity doesn't change when going to the next tier, we've maxed the test out, and move
2718         on. When the tier phase completed, turn off Controller.frameLengthEstimator, which estimates the
2719         FPS at each tier.
2720         (tune): At each interval, look at the confidence distribution of being on the 60 FPS side or the
2721         slow side. If the slowest FPS we achieve at the ramp's maximum complexity is not at least
2722         _fpsRampSlowThreshold, then increase the maximum complexity. If we ever achieve 60 FPS, increase
2723         the ramp's minimum complexity to that level. If, at an even lower complexity, a glitch causes the
2724         FPS to drop, we reset the minimum complexity.
2725
2726         Have the bootstrap calculation occur between tests. Clean up harness.
2727
2728         * Animometer/resources/debug-runner/animometer.js: Run bootstrap after a test has
2729         completed to avoid doing all of it at the end before showing the results. Clean up
2730         parameters being passed around.
2731         * Animometer/resources/debug-runner/tests.js:
2732         (text):
2733         * Animometer/resources/runner/animometer.js:
2734         (this._processData.calculateScore): Save the results to the same object holding the data.
2735         (this._processData._processData): In the case where a file is dragged, calculate the score
2736         serially. Grab the results object and move it to the results variable and remove it from
2737         the data object. This avoids serializing the results into the JSON.
2738         (this._processData.findRegression): Include the samples used for bootstrapping. Reduce the
2739         resample size to shorten the wait.
2740         * Animometer/resources/runner/benchmark-runner.js:
2741         * Animometer/resources/statistics.js:
2742         (bootstrap): Update how bootstrapData is sorted. In some regression results the mix of
2743         floats and integers causes an alphabetical sort to occur.
2744         * Animometer/resources/strings.js:
2745
2746         Add meta charset so that encodings between harness and test match.
2747
2748         * Animometer/tests/bouncing-particles/bouncing-canvas-images.html:
2749         * Animometer/tests/bouncing-particles/bouncing-canvas-shapes.html:
2750         * Animometer/tests/bouncing-particles/bouncing-css-images.html:
2751         * Animometer/tests/bouncing-particles/bouncing-css-shapes.html:
2752         * Animometer/tests/bouncing-particles/bouncing-svg-images.html:
2753         * Animometer/tests/bouncing-particles/bouncing-svg-shapes.html:
2754         * Animometer/tests/master/canvas-stage.html:
2755         * Animometer/tests/master/focus.html:
2756         * Animometer/tests/master/image-data.html:
2757         * Animometer/tests/master/multiply.html:
2758         * Animometer/tests/master/particles.html:
2759         * Animometer/tests/misc/canvas-electrons.html:
2760         * Animometer/tests/misc/canvas-stars.html:
2761         * Animometer/tests/misc/compositing-transforms.html:
2762         * Animometer/tests/simple/simple-canvas-paths.html:
2763         * Animometer/tests/simple/tiled-canvas-image.html:
2764         * Animometer/tests/template/template-canvas.html:
2765         * Animometer/tests/template/template-css.html:
2766         * Animometer/tests/template/template-svg.html:
2767         * Animometer/tests/text/layering-text.html:
2768         * Animometer/tests/text/text-boxes.html:
2769
2770         Update test harness reporting.
2771
2772         * Animometer/developer.html: Add missing meta charset.
2773         * Animometer/index.html: Remove unnecessary utf-8 declaration.
2774         * Animometer/resources/debug-runner/animometer.css: Add convenience classes for
2775         formatting the results table.
2776         * Animometer/resources/debug-runner/animometer.js: Adjust which stats are shown.
2777         * Animometer/resources/debug-runner/tests.js: Display bootstrapping statistics.
2778         * Animometer/resources/strings.js: Move strings not used by the release harness.
2779
2780         Switch to a pseudo-random number generator.
2781
2782         * Animometer/resources/statistics.js: Add a Pseudo class, with a simple
2783         pseudo-random number generator.
2784         (_calculateRegression): Reset the generator before running bootstrap.
2785         (bootstrap): Deleted.
2786
2787         Replace Math.random with Pseudo.random.
2788         * Animometer/tests/master/resources/canvas-tests.js:
2789         * Animometer/tests/master/resources/focus.js:
2790         * Animometer/tests/master/resources/particles.js:
2791         * Animometer/tests/resources/main.js:
2792
2793         Use bootstrapping to get confidence interval in the breakpoint.
2794
2795         For the ramp controller, calculate the piecewise regression, and then use
2796         bootstrapping in order to find the 95% confidence interval. Use the raw data.
2797
2798         * Animometer/developer.html: Default to the complexity graph. Add a legend
2799         checkbox to toggle visibility of the bootstrap score and histogram.
2800         * Animometer/resources/debug-runner/animometer.css: Make some more space to show
2801         the old raw and average scores in the legend. Add new styles for the data.
2802         * Animometer/resources/debug-runner/graph.js:
2803         (_addRegressionLine): Allow passing an array for the variance bar tied to the
2804         regression line. Now |stdev| is |range|.
2805         (createComplexityGraph): Add bootstrap median, and overlay a histogram of
2806         the bootstrap samples. Switch raw samples from circles to X's.
2807         (onComplexityGraphOptionsChanged): Allow toggling of the bootstrap data.
2808         (onGraphTypeChanged): Move the regressions for the raw and average samples to the
2809         legend. In the subtitle use the bootstrap median, and include the 95% confidence
2810         interval.
2811         * Animometer/resources/runner/animometer.js:
2812         (this._processData.findRegression): Factor out the code that determines which
2813         samples to include when calculating the piecewise regression. For series that have
2814         many samples, or a wider range of recorded complexities, throw away the 2.5%
2815         lowest and highest samples before calculating the regression. Keep all samples
2816         if the number of samples to regress is small or the range of complexities is
2817         narrow.
2818         (this._processData._calculateScore): Factor out regression calculation to
2819         findRegression(). Bootstrap the change point of the regression. The score is the
2820         median.
2821         * Animometer/resources/statistics.js:
2822         (_calculateRegression): Correct an issue in the calculation of the regression, where
2823         the denominator can be 0.
2824         (bootstrap): Template for bootstrapping. Create a bootstrap sample array, Create
2825         re-samples by random selection with replacement. Return the 95% confidence samples,
2826         the bootstrap median, mean, and the data itself.
2827         * Animometer/resources/strings.js: Add bootstrap.
2828         * Animometer/tests/resources/main.js:
2829         (processSamples): Don't prematurely cut the sample data.
2830
2831         Fix graph drawing.
2832
2833         * Animometer/resources/debug-runner/animometer.js: Add spacing in the JSON output.
2834         Multiple tests output a lot of JSON and can hang when selecting JSON with no whitespace.
2835         * Animometer/resources/debug-runner/animometer.css:
2836         (#complexity-graph .series.raw circle): Update the color.
2837         * Animometer/resources/debug-runner/graph.js: Use the FPS axis instead of the
2838         complexity axis, which can vary in domain. For determining the complexity domain,
2839         only use samples after samplingTimeOffset.
2840
2841         Allow dropping results JSON.
2842
2843         * Animometer/developer.html: Add a button.
2844         * Animometer/resources/debug-runner/animometer.css:
2845         * Animometer/resources/debug-runner/animometer.js: Read the data and go straight
2846         to the dashboard. With JSON output, write out only the options and the raw data.
2847
2848         Teach the harness to evaluate the samples and determine the test score.
2849
2850         This will allow us to update how the score is calculated separately from the samples recorded.
2851         This also prepares the harness to be able to accept JSON of prior runs.
2852
2853         * Animometer/resources/strings.js: Clean up and remove unneeded strings and reduce some of the
2854         hierarchy.
2855         * Animometer/resources/debug-runner/tests.js: Update to use the new strings.
2856
2857         * Animometer/tests/resources/main.js: Allow all controllers to show a complexity-FPS graph.
2858         (_processComplexitySamples): Factor out some of the sample processing done in the ramp
2859         controller for the benefit of the other controllers. |complexitySamples| contains a list of
2860         samples. Sort the samples by complexity. Optionally remove the top x% of samples.
2861         Group them, and calculate distribution of samples within the same complexity, and add those as
2862         new entries into |complexityAverageSamples|.
2863         (Controller.processSamples): Move the code responsible for determining the complexity and FPS
2864         scores out to ResultsDashboard. The structure of the data returned by the controller is:
2865
2866         {
2867             controller: [time-regression, time-regression, ...], // optional, data specific to controller
2868             marks: [...],
2869             samples: {                    // all of the sample data
2870                 controller: [...],
2871                 complexity: [...],        // processed from controller samples
2872                 complexityAverage: [...], // processed from complexity samples
2873             }
2874         }
2875
2876         (AdaptiveController.processSamples): Adding the target frame length is no longer necessary; we
2877         now pass the test options to the graph.
2878         (Regression): Move to statistics.js.
2879         * Animometer/resources/statistics.js: Move Regression to here. Add a check if the sampling range
2880         only contains one sample, since we cannot calculate a regression from one sample point.
2881
2882         Teach the test harness to evaluate the data.
2883         * Animometer/resources/runner/animometer.js:
2884         (ResultsDashboard): Store the options used to run the test and the computed results/score separately
2885         from the data. The results are stored as:
2886
2887         {
2888             score: /* geomean of iteration score */,
2889             iterationsResults: [
2890                 {
2891                     score: /* geomean of tests */,
2892                     testsResults: {
2893                         suiteName: {
2894                             testName: {
2895                                 controller: {
2896                                     average:
2897                                     concern:
2898                                     stdev:
2899                                     percent:
2900                                 },
2901                                 frameLength: { ... },
2902                                 complexity: {
2903                                     complexity:
2904                                     stdev:
2905                                     segment1:
2906                                     segment2:
2907                                 },
2908                                 complexityAverage: { ... }
2909                             },
2910                             testName: { ... },
2911                         },
2912                         ... next suite ...
2913                     }
2914                 },
2915                 { ...next iteration... }
2916             ]
2917         }
2918
2919         * Animometer/resources/debug-runner/animometer.js: Pass options around instead of relying
2920         on what was selected in the form. This will later allow for dropping previous results, and
2921         using those runs' options when calculating scores.
2922         (ResultsTable._addGraphButton): Simplify button action by using attached test data.
2923         * Animometer/resources/debug-runner/graph.js: Refactor to use the data.
2924
2925         Consolidate JS files, and move statistics out to a separate JS.
2926
2927         Preparation for having the Controller only handle recording and storage of the samples,
2928         and leave the evaluation of the test score out to the harness. Move Experiment to
2929         a new statistics.js, where Regression will also eventually go. Get rid of algorithm.js
2930         and move it to utilities.js since the Heap is used only for Experiments.
2931
2932         * Animometer/tests/resources/algorithm.js: Removed. Heap is in utilities.js.
2933         * Animometer/tests/resources/sampler.js: Removed. Experiment is in statistics.js,
2934         Sampler in main.js.
2935         * Animometer/tests/resources/main.js: Move Sampler here.
2936         * Animometer/resources/statistics.js: Added. Move Statistics and Experiment here.
2937         * Animometer/resources/extensions.js: Move Heap here. Attach static method to create
2938         a max or min heap to Heap, instead of a new Algorithm object.
2939
2940         Update JS files.
2941         * Animometer/developer.html:
2942         * Animometer/index.html:
2943         * Animometer/tests/bouncing-particles/bouncing-canvas-images.html:
2944         * Animometer/tests/bouncing-particles/bouncing-canvas-shapes.html:
2945         * Animometer/tests/bouncing-particles/bouncing-css-images.html:
2946         * Animometer/tests/bouncing-particles/bouncing-css-shapes.html:
2947         * Animometer/tests/bouncing-particles/bouncing-svg-images.html:
2948         * Animometer/tests/bouncing-particles/bouncing-svg-shapes.html:
2949         * Animometer/tests/master/canvas-stage.html:
2950         * Animometer/tests/master/focus.html:
2951         * Animometer/tests/master/image-data.html:
2952         * Animometer/tests/master/multiply.html:
2953         * Animometer/tests/master/particles.html:
2954         * Animometer/tests/misc/canvas-electrons.html:
2955         * Animometer/tests/misc/canvas-stars.html:
2956         * Animometer/tests/misc/compositing-transforms.html:
2957         * Animometer/tests/simple/simple-canvas-paths.html:
2958         * Animometer/tests/simple/tiled-canvas-image.html:
2959         * Animometer/tests/template/template-canvas.html:
2960         * Animometer/tests/template/template-css.html:
2961         * Animometer/tests/template/template-svg.html:
2962         * Animometer/tests/text/layering-text.html:
2963         * Animometer/tests/text/text-boxes.html:
2964
2965         Fix the cursor in the graph analysis when the min
2966         complexity is not 0.
2967
2968         * Animometer/resources/debug-runner/graph.js:
2969         (_addRegression):
2970         (createComplexityGraph):
2971
2972 2016-02-23  Geoffrey Garen  <ggaren@apple.com>
2973
2974         Fix some issues in MallocBench
2975         https://bugs.webkit.org/show_bug.cgi?id=154600
2976
2977         Reviewed by Oliver Hunt.
2978
2979         * MallocBench/MallocBench.xcodeproj/project.pbxproj: Make nimlang.ops
2980         a part of the build so that it copies to the right place for execution.
2981
2982         * MallocBench/MallocBench/Interpreter.cpp:
2983         (Interpreter::Interpreter): Don't try to open .ops files for writing
2984         because we're only going to read and we might need extra permissions to
2985         write.
2986
2987         (Interpreter::~Interpreter): Give more context when opening a file fails
2988         to help with debugging.
2989
2990         * MallocBench/MallocBench/stress.cpp:
2991         (benchmark_stress): Reduce iterations to complete in less than 10 seconds.
2992
2993 2016-02-23  Michael Saboff  <msaboff@apple.com>
2994
2995         Unreviewed change to revert extraneous changes made part of change set 196955.
2996
2997         * MallocBench/MallocBench/Interpreter.cpp:
2998         (Interpreter::doMallocOp):
2999         (Interpreter::Thread::switchTo):
3000         (writeData): Deleted.
3001
3002 2016-02-19  Michael Saboff  <msaboff@apple.com>
3003
3004         MallocBench: Added recording for nimlang website, new recording details and added new options
3005         https://bugs.webkit.org/show_bug.cgi?id=154485
3006
3007         Reviewed by Geoff Garen.
3008
3009         Added new capabilities to MallocBench.  These include:
3010             Added a recording of http://nim-lang.org/docs/lib.html.
3011             Added thread id to the recording and the ability to playback switching threads in MallocBench
3012             Added aligned allocations to recordings and the ability to playback
3013             Added --use-thread-id option to honor recorded thread ids
3014             Added --detailed-report to output remaining allocations by size after playback
3015             Added --no-warmup to not run the warm up iteration
3016
3017         Changed the way that options are passed down to the benchmarks.  Instead of passing individual
3018         boolean or numeric option values, just pass a reference the CommandLine itself.  Each benchmark
3019         can access the options that are appropriate.  The Benchmark class also uses the options for
3020         is parallel, run counts and warm up.
3021
3022         Added thread id and aligned malloc to the Op by noticing that structure padding and Opcode allowed
3023         for another 32 bits of data.  Breaking that unused 32 bits into a 16 bit thread id value and a
3024         16 bit log base 2 of the alignment for aligned malloc allowed for existing recordings to playback
3025         without any incompatibilities.
3026
3027         Threaded operation is simulated by creating threads as needed.  As long as the next Op's thread id
3028         is the same as the last, operation continues as normal.  When the next Op has a different thread id,
3029         we switch to that thread using the shared Op stream to continue playing back.  There is a mutex to
3030         assure that only one thread is really running at a time and a condition variable used to wait
3031         that the current thread id matches each block thread's thread id.  This doesn't simulate true
3032         concurrent threading, but is instead plays back Ops recorded for multiple thread faithfully.
3033
3034         * MallocBench/MallocBench.xcodeproj/project.pbxproj:
3035         * MallocBench/MallocBench/Benchmark.cpp:
3036         (deallocateHeap):
3037         (Benchmark::Benchmark):
3038         (Benchmark::runOnce):
3039         (Benchmark::run):
3040         * MallocBench/MallocBench/Benchmark.h:
3041         (Benchmark::isValid):
3042         * MallocBench/MallocBench/CommandLine.cpp:
3043         (CommandLine::printUsage):
3044         * MallocBench/MallocBench/CommandLine.h:
3045         (CommandLine::isValid):
3046         (CommandLine::benchmarkName):
3047         (CommandLine::isParallel):
3048         (CommandLine::useThreadID):
3049         (CommandLine::detailedReport):
3050         (CommandLine::warmUp):
3051         (CommandLine::heapSize):
3052         (CommandLine::runs):
3053         * MallocBench/MallocBench/Interpreter.cpp:
3054         (Interpreter::Interpreter):
3055         (Interpreter::run):
3056         (Interpreter::readOps):
3057         (Interpreter::doOnSameThread):
3058         (Interpreter::switchToThread):
3059         (Interpreter::detailedReport):
3060         (compute2toPower):
3061         (writeData):
3062         (Interpreter::doMallocOp):
3063         (Interpreter::Thread::Thread):
3064         (Interpreter::Thread::stop):
3065         (Interpreter::Thread::~Thread):
3066         (Interpreter::Thread::runThread):
3067         (Interpreter::Thread::waitToRun):
3068         (Interpreter::Thread::switchTo):
3069         * MallocBench/MallocBench/Interpreter.h:
3070         (Interpreter::Thread::isMainThread):
3071         * MallocBench/MallocBench/alloc_free.cpp: Added.
3072         (benchmark_alloc_free):
3073         * MallocBench/MallocBench/alloc_free.h: Added.
3074         * MallocBench/MallocBench/balloon.cpp:
3075         (benchmark_balloon):
3076         * MallocBench/MallocBench/balloon.h:
3077         * MallocBench/MallocBench/big.cpp:
3078         (benchmark_big):
3079         * MallocBench/MallocBench/big.h:
3080         * MallocBench/MallocBench/churn.cpp:
3081         (benchmark_churn):
3082         * MallocBench/MallocBench/churn.h:
3083         * MallocBench/MallocBench/facebook.cpp:
3084         (benchmark_facebook):
3085         * MallocBench/MallocBench/facebook.h:
3086         * MallocBench/MallocBench/flickr.cpp:
3087         (benchmark_flickr):
3088         (benchmark_flickr_memory_warning):
3089         * MallocBench/MallocBench/flickr.h:
3090         * MallocBench/MallocBench/fragment.cpp:
3091         (validate):
3092         (benchmark_fragment):
3093         (benchmark_fragment_iterate):
3094         * MallocBench/MallocBench/fragment.h:
3095         * MallocBench/MallocBench/list.cpp:
3096         (benchmark_list_allocate):
3097         (benchmark_list_traverse):
3098         * MallocBench/MallocBench/list.h:
3099         * MallocBench/MallocBench/main.cpp:
3100         (main):
3101         * MallocBench/MallocBench/medium.cpp:
3102         (benchmark_medium):
3103         * MallocBench/MallocBench/medium.h:
3104         * MallocBench/MallocBench/memalign.cpp:
3105         (test):
3106         (benchmark_memalign):
3107         * MallocBench/MallocBench/memalign.h:
3108         * MallocBench/MallocBench/message.cpp:
3109         (benchmark_message_one):
3110         (benchmark_message_many):
3111         * MallocBench/MallocBench/message.h:
3112         * MallocBench/MallocBench/nimlang.cpp: Added.
3113         (benchmark_nimlang):
3114         * MallocBench/MallocBench/nimlang.h: Added.
3115         * MallocBench/MallocBench/nimlang.ops: Added.
3116         * MallocBench/MallocBench/realloc.cpp:
3117         (benchmark_realloc):
3118         * MallocBench/MallocBench/realloc.h:
3119         * MallocBench/MallocBench/reddit.cpp:
3120         (benchmark_reddit):
3121         (benchmark_reddit_memory_warning):
3122         * MallocBench/MallocBench/reddit.h:
3123         * MallocBench/MallocBench/stress.cpp:
3124         (deallocate):
3125         (benchmark_stress):
3126         * MallocBench/MallocBench/stress.h:
3127         * MallocBench/MallocBench/stress_aligned.cpp:
3128         (benchmark_stress_aligned):
3129         * MallocBench/MallocBench/stress_aligned.h:
3130         * MallocBench/MallocBench/theverge.cpp:
3131         (benchmark_theverge):
3132         (benchmark_theverge_memory_warning):
3133         * MallocBench/MallocBench/theverge.h:
3134         * MallocBench/MallocBench/tree.cpp:
3135         (benchmark_tree_allocate):
3136         (benchmark_tree_traverse):
3137         (benchmark_tree_churn):
3138         * MallocBench/MallocBench/tree.h:
3139         * MallocBench/run-malloc-benchmarks:
3140
3141 2016-02-11  Jon Lee  <jonlee@apple.com>
3142
3143         Fix a missing refactoring.
3144
3145         * Animometer/tests/master/resources/multiply.js:
3146         (animate): Move to Utilities.lerp.
3147         (_lerp): Deleted.
3148
3149 2016-02-10  Jon Lee  <jonlee@apple.com>
3150
3151         Add new benchmark tests.
3152         https://bugs.webkit.org/show_bug.cgi?id=154063
3153
3154         Provisionally reviewed by Said Abou-Hallawa.
3155
3156         Add tests for get/put image data, filters, opacity, and css transforms.
3157
3158         * Animometer/resources/runner/benchmark-runner.js:
3159         (_runBenchmarkAndRecordResults): Update the body background color to match that of
3160         the stage.
3161         (this._runNextIteration): Clear the background color style for the results page.
3162         * Animometer/resources/runner/tests.js:
3163         * Animometer/tests/master/focus.html: Added.
3164         * Animometer/tests/master/image-data.html: Added.
3165         * Animometer/tests/master/multiply.html: Added.
3166         * Animometer/tests/master/resources/focus.js: Added.
3167         * Animometer/tests/master/resources/image-data.js: Added.
3168         * Animometer/tests/master/resources/multiply.js: Added.
3169         * Animometer/tests/master/resources/stage.css: Move common styles out.
3170         * Animometer/tests/resources/main.js: Update Stage.randomBool to use Math.random.
3171         Add Stage.randomSign for randomly setting a direction. Add the notion of the
3172         current timestamp of the test to Benchmark, since some animations cycle through
3173         colors and rely on an incremental counter like the time.
3174
3175 2016-02-09  Said Abou-Hallawa  <sabouhallawa@apple.com>
3176
3177         Add internal benchmark tests for CSS mix-blend-modes and filters
3178         https://bugs.webkit.org/show_bug.cgi?id=154058
3179
3180         Provisionally reviewed by Jon Lee.
3181
3182         * Animometer/resources/debug-runner/tests.js: Include the new tests in the
3183         "HTML suite" of the debug runner.
3184
3185         * Animometer/resources/extensions.js:
3186         (Utilities.browserPrefix):
3187         (Utilities.setElementPrefixedProperty): Utility functions to allow setting
3188         prefixed style properties.
3189
3190         * Animometer/tests/bouncing-particles/resources/bouncing-css-shapes.js:
3191         Set the mix-blend-mode and the filter to some random values if the options
3192         of the test requested that.
3193
3194         * Animometer/tests/bouncing-particles/resources/bouncing-particles.js:
3195         (parseShapeParameters): Parse the url options "blend" and "filter" and set
3196         the corresponding flags.
3197
3198         * Animometer/tests/resources/main.js:
3199         (randomStyleMixBlendMode):
3200         (randomStyleFilter): Return random mix-blend-mode and filter.
3201
3202 2016-02-08  Jon Lee  <jonlee@apple.com>
3203
3204         Add a ramp controller
3205         https://bugs.webkit.org/show_bug.cgi?id=154028
3206
3207         Provisionally reviewed by Said Abou-Hallawa.
3208
3209         Enhance the graph to include a complexity-fps graph, in addition
3210         to the time graph.
3211
3212         * Animometer/developer.html: Add a ramp option.
3213         * Animometer/resources/debug-runner/animometer.css: Update the style.
3214         * Animometer/resources/strings.js: Flatten the Strings.text constants.
3215         * Animometer/resources/debug-runner/animometer.js:
3216         (ResultsTable.call._addGraphButton): Refactor.
3217         (ResultsTable.call._addTest): Add regression data.
3218         (benchmarkController): Add a form that allows the user to switch between the two forms,
3219         Add a form that allows the user to toggle different data. Hide certain header columns
3220         depending on the selected controller.
3221         * Animometer/resources/debug-runner/graph.js: Add the complexity regressions.
3222         * Animometer/resources/debug-runner/tests.js: Add headers for the ramp results.
3223         * Animometer/resources/runner/animometer.js:
3224         (ResultsTable): If a header is disabled don't include them in _flattenedHeaders.
3225         * Animometer/tests/resources/main.js:
3226         (Controller): Allow options to specify the capacity for sample arrays.
3227         (Regression): A piecewise regression that tries to fit a slope and a flat profile.
3228         (_calculateRegression): Options can fix the slope and bias when calculating the minimal
3229         error. Sweep across the samples in time (which could be backward depending on the controller)
3230         and calculate the intersection point.
3231         (RampController): This controller assumes that the target frame rate is below
3232         58 FPS. It runs in two stages. The first stage quickly determines the order of
3233         magnitude of objects needed to stress the system by the setting the complexity
3234         to increasingly difficult tiers. Perform a series of ramps descending from a
3235         high-water mark of complexity. The complexity needed to reach the target frame
3236         length is done by performing a piecewise regression on each ramp, and track a
3237         running average of these values. For the next ramp, make that running average
3238         the center of the ramp. With a minimum complexity of 0, the high-water mark is
3239         twice that average. The score is based on the highest complexity that can
3240         reach 60 fps.
3241
3242 2016-02-08  Jon Lee  <jonlee@apple.com>
3243
3244         Address Said's comments on the benchmark, and do some clean up.
3245
3246         * Animometer/developer.html:
3247         * Animometer/resources/debug-runner/animometer.css: Add styles for averages.
3248         * Animometer/resources/debug-runner/animometer.js: Use the right
3249         Strings constants.
3250         * Animometer/resources/debug-runner/graph.js:
3251         (_addRegressionLine): Add missing code to draw the line and standard
3252         deviation highlight.
3253         (onGraphTypeChanged): Remove unneeded variables
3254         (onTimeGraphOptionsChanged):
3255         * Animometer/resources/runner/benchmark-runner.js:
3256         (_runBenchmarkAndRecordResults): Rename samplers to suiteResults and
3257         _suitesSamplers to _suitesResults.
3258         * Animometer/tests/resources/main.js:
3259         (results): Call processSamples().
3260         (update): Change sampling timestamp comparison.
3261         (_animateLoop): Move shouldStop call to before the update.
3262         * Animometer/tests/resources/sampler.js:
3263         (process): Rename to processSamples().
3264
3265 2016-02-07  Jon Lee  <jonlee@apple.com>
3266
3267         Teach Controller to measure intervals, and turn off the frame length estimator.
3268
3269         * Animometer/tests/resources/main.js: Default interval length is 100 ms.
3270         (start): Set the first interval.
3271         (_measureAndResetInterval): Reports the average frame length of the interval that just
3272         completed, and sets up the next interval.
3273         (update): If there is no length, then just use the estimator per frame, otherwise the
3274         estimator measures per interval. Add a didFinishInterval for subclasses to process
3275         prior to recording the sample. Update tune() to include whether an interval had
3276         finished.
3277         (StepController): Step controllers don't measure on an interval basis.
3278
3279 2016-02-07  Jon Lee  <jonlee@apple.com>
3280
3281         Minor refactoring. Rename Controller._estimator to Controller._frameLengthEstimator
3282         and switch the parameters for start(), update(), and tune(), so that the timestamp
3283         is first and stage is second.
3284
3285         * Animometer/tests/resources/main.js:
3286
3287 2016-02-07  Jon Lee  <jonlee@apple.com>
3288
3289         Move ResultsTable functionality not needed for release tests out.
3290         Move reporting of score and mean to selection of the time-based graph.
3291
3292         * Animometer/developer.html: Rename graph-options to time-graph-options.
3293         * Animometer/resources/debug-runner/animometer.js:
3294         (DeveloperResultsTable): Moved from runner/animometer.js. Switch from mean
3295         values to "average" objects which can hold stdev. Move graph button and
3296         calculation of noisy measurements here. Sophisticated header processing
3297         is not needed in release suite.
3298         (populateTable): Use DeveloperResultsTable.
3299         * Animometer/resources/debug-runner/graph.js: Pull time graph creation to
3300         its own function, and add a new onGraphTypeChanged handler in preparation
3301         of a complexity graph to be added later.
3302         * Animometer/resources/runner/animometer.js:
3303         (ResultsTable): Simplify to just handle test names and scores.
3304
3305 2016-02-07  Jon Lee  <jonlee@apple.com>
3306
3307         Tests: reuse objects already made.
3308
3309         Avoid thrash of object creation and removal by maintaining an index that
3310         moves along the array as the adjust values change. If the tune value
3311         requires more objects than the maximum size of the object array, then create
3312         new objects. This means that the object array size never decreases.
3313
3314         * Animometer/tests/master/resources/canvas-stage.js: Maintain a separate
3315         offsetIndex. For these tests, we want to avoid drawing the oldest objects,
3316         so the scene will draw the object at offsetIndex to the end of the array.
3317         (tune): Reverse the logic since "removal" of objects is much simpler and
3318         involves simply changing the offsetIndex.
3319         (animate): Update the for loop to draw from offsetIndex to the end.
3320         (complexity): Update the definition.
3321         * Animometer/tests/master/resources/canvas-tests.js: Maintain a separate
3322         offsetIndex. For these tests, we want to avoid drawing the newest objects,
3323         so the scene will draw the object at index 0 to the object at offsetIndex.
3324         (SimpleCanvasStage.animate): Fly-by removal of local stage variable,
3325         which is unneeded. Update the for loop to draw from offsetIndex to the end.
3326         * Animometer/tests/simple/resources/simple-canvas-paths.js:
3327         (SimpleCanvasStage.animate): Update the for loop to draw from 0 to
3328         offsetIndex.
3329         * Animometer/tests/simple/resources/simple-canvas.js:
3330         (tune): Update logic. Here, offsetIndex represents the boundary of the last
3331         index to render.
3332         (animate): Update the for loop to draw from 0 to offsetIndex.
3333         (complexity): Update the definition.
3334
3335 2016-02-07  Jon Lee  <jonlee@apple.com>
3336
3337         Tests: refactor and update styles.
3338
3339         * Animometer/tests/resources/main.js: Add helper methods that return
3340         a color that hue rotates based on the date, and a counter value that
3341         increases based on the date. Fix randomInt() to not bias against the min and
3342         max values.
3343
3344         * Animometer/tests/master/resources/canvas-tests.js: Use new helper methods.
3345         * Animometer/tests/master/resources/dom-particles.js: Ditto.
3346         * Animometer/tests/master/resources/particles.js: Ditto.
3347         * Animometer/tests/simple/resources/simple-canvas-paths.js: Refactor to
3348         use a rotating color instead of a random color. The fast switching of color
3349         is too vivid to watch.
3350
3351         * Animometer/tests/bouncing-particles/resources/bouncing-svg-shapes.js:
3352         (BouncingSvgParticlesStage.call.createGradient): Fix the gradient so
3353         that the last stop is located at the end.
3354
3355 2016-02-07  Jon Lee  <jonlee@apple.com>
3356
3357         Refactor tune() to not return the complexity of the scene.
3358
3359         We have stage.complexity() now, so returning the complexity through tune
3360         is unnecessary.
3361
3362         * Animometer/tests/bouncing-particles/resources/bouncing-particles.js:
3363         * Animometer/tests/master/resources/canvas-stage.js:
3364         * Animometer/tests/master/resources/particles.js:
3365         * Animometer/tests/misc/resources/canvas-electrons.js:
3366         * Animometer/tests/misc/resources/canvas-stars.js:
3367         * Animometer/tests/resources/main.js:
3368         * Animometer/tests/simple/resources/simple-canvas.js:
3369         * Animometer/tests/simple/resources/tiled-canvas-image.js:
3370         * Animometer/tests/template/resources/template-canvas.js:
3371         * Animometer/tests/template/resources/template-css.js:
3372         * Animometer/tests/template/resources/template-svg.js:
3373         * Animometer/tests/text/resources/layering-text.js:
3374
3375 2016-02-07  Jon Lee  <jonlee@apple.com>
3376
3377         Make the fixed controller a step controller instead. Halfway through the test
3378         it will bump up the complexity 4-fold. Calculate the step timestamp using options
3379         instead of a separate parameter to the Controller constructor.
3380
3381         * Animometer/developer.html: Change value to "step"
3382         * Animometer/resources/debug-runner/animometer.js:
3383         (window.suitesManager.updateEditsElementsState): Show number inputs when set to "step".
3384         * Animometer/tests/resources/main.js:
3385         (update): Provide a hook for subclasses to tune.
3386         (StepController): Maintain a flag determining whether we've stepped, and the time
3387         we should step.
3388         (Benchmark): Use the new StepController.
3389
3390 2016-02-07  Jon Lee  <jonlee@apple.com>
3391
3392         Adjust the FPS graph scale.
3393
3394         Instead of making the FPS graph linearly scale, scale it based on the frame length,
3395         but show the data in terms of FPS. Because it is inversely proportional, and most
3396         of the data never gets below 20, concentrate the axis from 20-60 FPS, since otherwise
3397         over half of the available graph space ends up blank.
3398
3399         This means we should convert all of the FPS data to frame length data.
3400
3401         * Animometer/resources/debug-runner/graph.js: Update the domain to be based on
3402         frame length in milliseconds instead of FPS. Update the cursor to consider all of the
3403         values being shown, and then pick the min and max values to represent the length of the
3404         cursor.
3405         * Animometer/resources/runner/animometer.js:
3406         * Animometer/resources/strings.js:
3407         * Animometer/tests/resources/main.js:
3408         (processSamples): Add the ability to only sample a range of the data instead of everything
3409         after an offset index. Update sampler to record the frame lengths instead of the frame
3410         rate.
3411
3412 2016-02-07  Jon Lee  <jonlee@apple.com>
3413
3414         Add option to use different methods for retrieving a timestamp.
3415
3416         * Animometer/developer.html: Add performance.now and Date.now options.
3417         * Animometer/resources/runner/animometer.js: Default to performance.now.
3418         (window.benchmarkController.startBenchmark):
3419         * Animometer/tests/resources/main.js: Tie the desired method to _getTimestamp.
3420         (run): Use _getTimestamp.
3421         (_animateLoop): Ditto.
3422
3423 2016-02-07  Jon Lee  <jonlee@apple.com>
3424
3425         Allow adding any number of markers to the graph. The markers can be labeled
3426         and contain timestamp and sample index data. Make it a part of the controller
3427         rather than keeping it in the sampler.
3428
3429         * Animometer/resources/debug-runner/animometer.css: Add styles for markers
3430         * Animometer/resources/debug-runner/graph.js: Create the markers and add
3431         text labels.
3432         * Animometer/resources/runner/animometer.js: Assume the samplingTimeOffset
3433         is just one of the marks provided.
3434         * Animometer/resources/strings.js: Add Strings.json.marks.
3435         * Animometer/tests/resources/main.js:
3436         (Controller): Keep marks here. They are keyed by the marker name, so no two
3437         markers should have the same name.
3438         (recordFirstSample): Refactor to use mark.
3439         (mark): Allows for arbitrary data if needed later. The timestamp maintained
3440         is relative to the absolute start timestamp.
3441         (containsMark): Checks whether a mark with a specific comment exists.
3442         (processSamples): Removes the _startTimestamp offset from the marks before
3443         setting it in results.
3444         * Animometer/tests/resources/sampler.js: Remove marks.
3445
3446 2016-02-07  Jon Lee  <jonlee@apple.com>
3447
3448         Get rid of options member variable in Benchmark.
3449
3450         Options are only needed when initializing the stage or benchmark, so there's no
3451         need to also keep a reference to it.
3452
3453         * Animometer/tests/resources/main.js: Get rid of options variable in Benchmark.
3454         Pass options to Controllers and Stages.
3455         (Controller.Utilities.createClass):
3456         (Benchmark.Utilities.createClass):
3457         (get options): Deleted.
3458
3459         * Animometer/tests/bouncing-particles/resources/bouncing-canvas-images.js:
3460         * Animometer/tests/bouncing-particles/resources/bouncing-canvas-particles.js:
3461         * Animometer/tests/bouncing-particles/resources/bouncing-canvas-shapes.js:
3462         * Animometer/tests/bouncing-particles/resources/bouncing-css-images.js:
3463         * Animometer/tests/bouncing-particles/resources/bouncing-css-shapes.js:
3464         * Animometer/tests/bouncing-particles/resources/bouncing-particles.js:
3465         * Animometer/tests/bouncing-particles/resources/bouncing-svg-images.js:
3466         * Animometer/tests/bouncing-particles/resources/bouncing-svg-shapes.js:
3467         * Animometer/tests/master/resources/canvas-stage.js:
3468         * Animometer/tests/master/resources/canvas-tests.js:
3469         * Animometer/tests/master/resources/particles.js:
3470         * Animometer/tests/misc/resources/canvas-electrons.js:
3471         * Animometer/tests/misc/resources/canvas-stars.js:
3472         * Animometer/tests/misc/resources/compositing-transforms.js:
3473         * Animometer/tests/simple/resources/simple-canvas-paths.js:
3474         * Animometer/tests/simple/resources/tiled-canvas-image.js:
3475         * Animometer/tests/template/resources/template-canvas.js:
3476         * Animometer/tests/template/resources/template-css.js:
3477         * Animometer/tests/template/resources/template-svg.js:
3478         * Animometer/tests/text/resources/layering-text.js:
3479
3480 2016-02-07  Jon Lee  <jonlee@apple.com>
3481
3482         Update how the benchmark is run
3483         https://bugs.webkit.org/show_bug.cgi?id=153960
3484
3485         Provisionally reviewed by Said Abou-Hallawa.
3486
3487         Introduce the notion of a Controller. It is responsible for recording, updating,
3488         and processing the statistics and complexity of the benchmark. This allows
3489         plugging in different Controllers.
3490
3491         This strips most of the functionality from Animator and BenchmarkState, so fold
3492         what's left into Benchmark. Now, Benchmarks only own a stage and a controller, but
3493         are responsible for driving the animation loop.
3494
3495         Rewrite Animator._shouldRequestAnotherFrame into two different Controllers. One
3496         maintains a fixed complexity, and the other adapts the complexity to meet a
3497         fixed FPS.
3498
3499         Fix the Kalman estimator to be modeled on a scalar variable with no model.
3500
3501         * Animometer/tests/resources/main.js: Remove BenchmarkState and Animator, and
3502         replace it with a Controller. Add a FixedController and refactor the previous controller
3503         to an AdaptiveController.
3504
3505         (Controller): Controllers own the estimator and the sampler. When a new frame is
3506         displayed, the animation loop calls update(). The estimator and sampler record
3507         stats, then tune. Samplers can track multiple series of data. The basic controller
3508         tracks timestamp, complexity, and estimated frame rate.
3509                 The Kalman estimation is based on the frame length rather than the frame
3510         rate. Because FPS is inverse proportional to frame length, in the case where the measured
3511         frame length is very small, the FPS ends up being a wildly large number (in the order of
3512         600-1000 "FPS"), and it pulls the estimator up drastically enough that it takes a while
3513         for it to settle back down. Using frame length reduces the impact of these spikes.
3514                 Converging the estimation takes enough time to avoid initializing it immediately
3515         when the benchmark starts. Instead, the benchmark runs for a brief period of time (100ms)
3516         before running it in earnest. Allow controllers an opportunity to set the complexity
3517         before starting recording.
3518                 When the benchmark is complete, the controller has an opportunity to process
3519         the samples. The default implementation calculates the raw FPS based on the time
3520         difference of the samples, and calculates the complexity score. This is moved from
3521         Benchmark.processSamples.
3522
3523         (Controller): Initialize timestamps. These are at first relative to the start of the
3524         benchmark, but are offset by the absolute start time during start(). By default maintain
3525         3 data series, but subclasses can override.
3526         (start): Calls recordFirstSample() for subclasses to override if needed.
3527         (recordFirstSample): For basic controller, start sampling at the beginning.
3528         (update): Update the frame length estimator and sample.
3529         (shouldStop): Checks that the time is before _endTimestamp.
3530         (results): Returns the processed samples.
3531         (processSamples): Iterate through the sample data and collate them. Include scores.
3532
3533         (FixedComplexityController): Controller that tunes the stage to the desired complexity
3534         prior to starting, and keeps it at that complexity.
3535
3536         (AdaptiveController): Have the estimator estimate the interval frame rate instead of the
3537         raw frame rate.
3538                 The previous version of this controller ignored the frame that came after the
3539         adjustment. The raw FPS show that whatever noise the scene change adds is negligible
3540         compared to the noise of the system overall. Stop ignoring that frame and include all
3541         frames in the measurements.
3542
3543         (Benchmark): Remove dependency on animator, and instantiate a runner based on what is
3544         selected. Most of the loop's functionality is in Controller, so remove here.
3545         (Benchmark.run): Remove start() since it is only called from run(), and fold it in here.
3546         (Benchmark._animateLoop): Fold in from Animator.animateLoop. Let the benchmark run for
3547         a brief period before calling Controller.start().
3548
3549         * Animometer/tests/resources/math.js: Fix the Kalman estimator. The filter estimates
3550         a scalar variable, and makes basic assumptions regarding the model. As a result
3551         none of the linear algebra classes are needed, so remove Matrix, Vector3, and Matrix3.
3552         (SimpleKalmanEstimator): Calculate the gain based on the provided process and
3553         measurement errors.
3554         (KalmanEstimator): Deleted.
3555         (IdentityEstimator): Deleted.
3556         (PIDController): Refactor to use the Utilities.createClass() helper.
3557
3558         The Kalman filter algorithm is explained here http://greg.czerniak.info/guides/kalman1/.
3559         The state, represented by a scalar, is the estimated frame length. There is no user
3560         transition of the state, and the state is the same as the measurement. With this model,
3561         the estimation error converges, so calculate the gain ahead of time.
3562
3563         * Animometer/developer.html: Remove fixed-after-warmup since it is not useful.
3564         Replace the option to toggle the estimator, and make it possible to customize the
3565         estimator's error parameters. Show raw FPS by default, and remove interval FPS,
3566         which will be shown instead of the filtered raw FPS.
3567         * Animometer/resources/debug-runner/animometer.css: Put the header behind the graph.
3568         Remove #intervalFPS rules; move the color to #filteredFPS.
3569         * Animometer/resources/debug-runner/graph.js:
3570         (updateGraphData): Update the hr style to force the layout to be calculated
3571         correctly. Change the tick format to be in terms of seconds, since the timestamps
3572         are in milliseconds. Remove interval data.
3573         * Animometer/resources/runner/animometer.js:
3574         (window.benchmarkController.startBenchmark): Set Kalman parameters.
3575         * Animometer/resources/runner/benchmark-runner.js:
3576         (_runBenchmarkAndRecordResults): When a benchmark completes, expect it to return
3577         the final data, rather than passing a sampler from the controller. This avoids
3578         needing to expose the sampler variable in the benchmark.
3579         * Animometer/tests/resources/sampler.js:
3580         (process): Move the setting of the target frame rate to AdaptiveController.
3581
3582 2016-02-06  Jon Lee  <jonlee@apple.com>
3583
3584         Code clean up: Move Rotater function closer to Stage static methods.
3585         The Rotater is used together with those methods; keep them close.
3586
3587         * Animometer/tests/resources/main.js:
3588
3589 2016-02-06  Jon Lee  <jonlee@apple.com>
3590
3591         Update the JS includes due to ResultsTable move.
3592
3593         * Animometer/developer.html:
3594         * Animometer/index.html:
3595
3596 2016-02-06  Jon Lee  <jonlee@apple.com>
3597
3598         Move createElement and createSVGElement to Utilities.
3599
3600         * Animometer/resources/extensions.js:
3601         (Utilities.createElement): Added.
3602         (Utilities.createSVGElement): Added.
3603         (DocumentExtension.createElement): Deleted.
3604         (DocumentExtension.createSvgElement): Deleted.
3605
3606         * Animometer/resources/debug-runner/animometer.js:
3607         * Animometer/resources/runner/animometer.js:
3608         * Animometer/tests/bouncing-particles/resources/bouncing-svg-images.js:
3609         * Animometer/tests/bouncing-particles/resources/bouncing-svg-particles.js:
3610         * Animometer/tests/bouncing-particles/resources/bouncing-svg-shapes.js:
3611
3612 2016-02-06  Jon Lee  <jonlee@apple.com>
3613
3614         Add a convenience function for creating a class.
3615
3616         The pattern for creating a class is common enough to add as a Utilities
3617         helper function. It also makes it easy to collapse class definitions when
3618         editing.
3619
3620         * Animometer/resources/debug-runner/animometer.js: Move ProgressBar definition,
3621         since it is only used here.
3622         * Animometer/resources/runner/animometer.js: Move ResultsDashboard and
3623         ResultsTable definition, since it is only used here.
3624         * Animometer/resources/extensions.js: Move Utilities definition to the top. Convert
3625         Point, Insets, SimplePromise.
3626         (ProgressBar): Moved to animometer.js.
3627         (ResultsDashboard): Moved to animometer.js.
3628         (ResultsTable): Moved to animometer.js.
3629         * Animometer/resources/runner/benchmark-runner.js: Convert BenchmarkRunnerState,
3630         BenchmarkRunner.
3631         * Animometer/tests/resources/main.js: Convert Rotater, Stage, Animator, Benchmark.
3632         * Animometer/tests/resources/sampler.js: Convert Experiment, Sampler.
3633
3634         Convert test primitives.
3635         * Animometer/tests/master/resources/canvas-tests.js: Convert CanvasLineSegment,
3636         CanvasArc, CanvasLinePoint.
3637         * Animometer/tests/simple/resources/simple-canvas-paths.js: Convert CanvasLineSegment,
3638         CanvasLinePoint, CanvasQuadraticSegment, CanvasQuadraticPoint, CanvasBezierSegment,
3639         CanvasBezierPoint, CanvasArcToSegment, CanvasArcToSegmentFill, CanvasArcSegment,
3640         CanvasArcSegmentFill, CanvasRect, CanvasRectFill.
3641         * Animometer/tests/simple/resources/tiled-canvas-image.js: Convert CanvasImageTile.
3642
3643 2016-02-06  Jon Lee  <jonlee@apple.com>
3644
3645         Minor improvements to debug harness.
3646
3647         * Animometer/developer.html:
3648         * Animometer/resources/debug-runner/animometer.css:
3649         (#suites): Put the complexity text boxes closer to the test names.
3650         (#options):
3651         (#rawFPS circle): Make the interval FPS appear as a separate data series, with a line.
3652         (#intervalFPS path):
3653         (#intervalFPS circle):
3654         * Animometer/resources/debug-runner/animometer.js:
3655         (window.optionsManager.updateLocalStorageFromUI): Convert number inputs from text.
3656         (window.suitesManager._onChangeTestCheckbox): Refactor to take a checkbox.
3657         (window.suitesManager._createTestElement): Enhance such that typing into the complexity
3658         input will automatically select that test for running.
3659         (window.suitesManager.updateLocalStorageFromJSON): Make the harness work for private
3660         browsing.
3661         * Animometer/resources/debug-runner/graph.js: Separate the intervalFPS data, and show
3662         more accuracy in timestamps.
3663
3664 2016-02-06  Jon Lee  <jonlee@apple.com>
3665
3666         Refactor helper methods for getting random values for a stage.
3667
3668         Instead of requiring a Stage instance, just attach it to the Stage object.
3669
3670         * Animometer/tests/bouncing-particles/resources/bouncing-canvas-shapes.js:
3671         * Animometer/tests/bouncing-particles/resources/bouncing-css-shapes.js:
3672         * Animometer/tests/bouncing-particles/resources/bouncing-particles.js:
3673         * Animometer/tests/bouncing-particles/resources/bouncing-svg-shapes.js:
3674         * Animometer/tests/master/resources/canvas-tests.js:
3675         * Animometer/tests/master/resources/particles.js:
3676         * Animometer/tests/misc/resources/canvas-electrons.js:
3677         * Animometer/tests/misc/resources/canvas-stars.js:
3678         * Animometer/tests/misc/resources/compositing-transforms.js:
3679         * Animometer/tests/resources/main.js:
3680         * Animometer/tests/simple/resources/simple-canvas-paths.js:
3681
3682 2016-02-05  Said Abou-Hallawa  <sabouhallawa@apple.com>
3683
3684         Add a new graphics test for CanvasRenderingContext2D functions: getImageData and putImageData
3685         https://bugs.webkit.org/show_bug.cgi?id=151716
3686
3687         Reviewed by Darin Adler.
3688
3689         The purpose of this test is to measure the performance of getImageData
3690         and putImageData functions. This test draws a background on the canvas
3691         and then gets some random tiles from this background and draw them in
3692         destinations different from their original sources.
3693
3694         * Animometer/resources/debug-runner/tests.js: Adding the new test to the canvas simple tests suite.
3695
3696         * Animometer/resources/extensions.js:
3697         (Array.prototype.shuffle): Shuffles the elements of an array.
3698
3699         (Point.zero): Returns a new Point object whose x and y are equal zero.
3700         (Point.prototype.str): Used for debugging the Point object.
3701
3702         * Animometer/tests/simple/resources/tiled-canvas-image.js: Added.
3703         (CanvasImageTile):
3704         (CanvasImageTile.prototype.getImageData):
3705         (CanvasImageTile.prototype.putImageData):
3706         (Stage.call.initialize):
3707         (Stage.call._createTiles):
3708         (Stage.call._nextTilePosition):
3709         (Stage.call.tune):
3710         (Stage.call._drawBackground):
3711         (Stage.call.animate):
3712         (Stage.call.complexity):
3713         (Stage.call):
3714         * Animometer/tests/simple/tiled-canvas-image.html: Added.
3715
3716 2016-01-07  Jon Lee  <jonlee@apple.com>
3717
3718         Fix new test.
3719
3720         * Animometer/resources/runner/tests.js: Wrong URL from an
3721         old patch.
3722         * Animometer/tests/master/particles.html:
3723         * Animometer/tests/master/resources/dom-particles.js:
3724         (Particle.call.reset): Figured out a simpler way to set up
3725         the particles.
3726         (this.move.reset): Deleted.
3727         (this.move._applyAttributes): Deleted.
3728         * Animometer/tests/master/resources/particles.js:
3729         (Particle): Call move() after reset().
3730
3731 2016-01-07  Jon Lee  <jonlee@apple.com>
3732
3733         Update benchmark test suite
3734         https://bugs.webkit.org/show_bug.cgi?id=152679
3735
3736         Reviewed by Simon Fraser.
3737
3738         Add a new test. The test has a rotating background
3739         gradient, and does a better job physically simulating
3740         particles.
3741
3742         * Animometer/resources/extensions.js: Teach Point to take constants as well as other Points.
3743         (Point.prototype.length): Added.
3744         (Point.prototype.normalize): Added.
3745         * Animometer/resources/runner/tests.js: Add the test to the master suite.
3746         * Animometer/tests/master/particles.html: Added.
3747         * Animometer/tests/master/resources/particles.js: Added. Parent class for different kinds of particles.
3748         (Particle):
3749         (Particle.prototype.reset): If the particle starts slowing down in terms of its animation,
3750         reset it.
3751         (Particle.prototype.animate): Bounce off the walls elastically, and include gravity.
3752         (Particle.prototype.move): Subclasses should override.
3753         (ParticlesStage): Stage includes a rotating gradient background.
3754         * Animometer/tests/master/resources/dom-particles.js: Added. Creates a <div> and adds it to
3755         the stage.
3756         * Animometer/tests/resources/star.svg: Added.
3757
3758 2016-01-03  Jon Lee  <jonlee@apple.com>
3759
3760         Update benchmark test suite
3761         https://bugs.webkit.org/show_bug.cgi?id=152679
3762
3763         Reviewed by Simon Fraser.
3764
3765         Move algorithm.js and sampler.js to tests/ and benchmark-runner.js to runner/.
3766
3767         Needed by both harnesses.
3768         * Animometer/resources/runner/benchmark-runner.js: Renamed from PerformanceTests/Animometer/resources/debug-runner/benchmark-runner.js.
3769         * Animometer/developer.html:
3770         * Animometer/index.html:
3771
3772         Needed only by the tests. Move to tests/. Statistics, in sampler.js, is used by ResultsDashboard, so move that
3773         into extensions.js.
3774         * Animometer/resources/extensions.js:
3775         * Animometer/tests/resources/algorithm.js: Renamed from PerformanceTests/Animometer/resources/algorithm.js.
3776         * Animometer/tests/resources/sampler.js: Renamed from PerformanceTests/Animometer/resources/sampler.js.
3777         * Animometer/tests/bouncing-particles/bouncing-canvas-images.html:
3778         * Animometer/tests/bouncing-particles/bouncing-canvas-shapes.html:
3779         * Animometer/tests/bouncing-particles/bouncing-css-images.html:
3780         * Animometer/tests/bouncing-particles/bouncing-css-shapes.html:
3781         * Animometer/tests/bouncing-particles/bouncing-svg-images.html:
3782         * Animometer/tests/bouncing-particles/bouncing-svg-shapes.html:
3783         * Animometer/tests/master/canvas-stage.html:
3784         * Animometer/tests/misc/canvas-electrons.html:
3785         * Animometer/tests/misc/canvas-stars.html:
3786         * Animometer/tests/misc/compositing-transforms.html:
3787         * Animometer/tests/simple/simple-canvas-paths.html:
3788         * Animometer/tests/template/template-canvas.html:
3789         * Animometer/tests/template/template-css.html:
3790         * Animometer/tests/template/template-svg.html:
3791         * Animometer/tests/text/layering-text.html:
3792         * Animometer/tests/text/text-boxes.html:
3793
3794 2016-01-07  Jon Lee  <jonlee@apple.com>
3795
3796         Update benchmark test suite
3797         https://bugs.webkit.org/show_bug.cgi?id=152679
3798
3799         Reviewed by Simon Fraser.
3800
3801         Fix tests for other browsers.
3802
3803         * Animometer/resources/extensions.js:
3804         (Point.elementClientSize): Some browsers return 0 for SVG clientWidth and clientHeight.
3805         Use getBoundingClientRect() instead.
3806         * Animometer/tests/misc/resources/canvas-electrons.js:
3807         (CanvasElectron.prototype._draw): Some browsers don't support ellipse.
3808
3809 2016-01-07  Jon Lee  <jonlee@apple.com>
3810
3811         Add a waitUntilReady() step
3812         https://bugs.webkit.org/show_bug.cgi?id=152862
3813
3814         Reviewed by Simon Fraser.
3815
3816         Add a waitUntilReady() callback that lets the benchmark complete
3817         its setup before running the benchmark.
3818
3819         * Animometer/tests/resources/main.js:
3820         (Benchmark.prototype.run): First call waitUntilReady, which returns
3821         a promise. When the promise resolves, run everything that was in this
3822         function.
3823         (Benchmark.prototype.waitUntilReady): Default implementation returns