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