Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(270)

Issue 21001003: test.py: First step towards support of caching dart2js compilations across runtimes (Closed)

Created:
7 years, 4 months ago by kustermann
Modified:
5 years, 7 months ago
Reviewers:
ricow1
CC:
reviews_dartlang.org
Visibility:
Public.

Description

test.py: First step towards support of caching dart2js compilations across runtimes This CL changes the way we run tests completely: When enqueueing TestCases we build up a dependency graph of Commands. This has the advantage that if more TestCases share common commands, we only execute it once. R=ricow@google.com Committed: https://code.google.com/p/dart/source/detail?r=25760

Patch Set 1 #

Total comments: 83

Patch Set 2 : #

Total comments: 51

Patch Set 3 : #

Patch Set 4 : rebased #

Total comments: 5
Unified diffs Side-by-side diffs Delta from patch set Stats (+1478 lines, -1137 lines) Patch
M tests/standalone/io/skipping_dart2js_compilations_test.dart View 1 2 3 4 chunks +13 lines, -20 lines 0 comments Download
M tests/standalone/io/test_runner_test.dart View 1 5 chunks +18 lines, -12 lines 0 comments Download
A tests/utils/dependency_graph_test.dart View 1 2 1 chunk +62 lines, -0 lines 0 comments Download
M tools/test.dart View 1 2 3 3 chunks +6 lines, -16 lines 0 comments Download
A tools/testing/dart/dependency_graph.dart View 1 2 1 chunk +147 lines, -0 lines 0 comments Download
M tools/testing/dart/record_and_replay.dart View 1 5 chunks +47 lines, -37 lines 0 comments Download
M tools/testing/dart/test_options.dart View 1 2 3 3 chunks +0 lines, -35 lines 0 comments Download
M tools/testing/dart/test_progress.dart View 1 2 15 chunks +32 lines, -32 lines 0 comments Download
M tools/testing/dart/test_runner.dart View 1 2 3 40 chunks +1031 lines, -904 lines 3 comments Download
M tools/testing/dart/test_suite.dart View 1 2 3 21 chunks +54 lines, -81 lines 0 comments Download
M tools/testing/dart/utils.dart View 1 2 2 chunks +68 lines, -0 lines 2 comments Download

Messages

Total messages: 15 (1 generated)
kustermann
Request for first round of comments on general approach.
7 years, 4 months ago (2013-07-29 12:28:19 UTC) #1
ricow1
Looks really good, I like the approach First round of comments: Add doc style comments ...
7 years, 4 months ago (2013-07-30 09:30:11 UTC) #2
kustermann
PTAL https://codereview.chromium.org/21001003/diff/1/tools/testing/dart/dependency_graph.dart File tools/testing/dart/dependency_graph.dart (right): https://codereview.chromium.org/21001003/diff/1/tools/testing/dart/dependency_graph.dart#newcode73 tools/testing/dart/dependency_graph.dart:73: Timer.run(() { On 2013/07/30 09:30:11, ricow1 wrote: > ...
7 years, 4 months ago (2013-07-31 15:53:53 UTC) #3
ricow1
I will take another closer look, but here are reponses and a style nits https://codereview.chromium.org/21001003/diff/1/tools/testing/dart/test_runner.dart ...
7 years, 4 months ago (2013-08-01 13:26:21 UTC) #4
ricow1
Some more comments https://codereview.chromium.org/21001003/diff/24001/tests/standalone/io/test_runner_test.dart File tests/standalone/io/test_runner_test.dart (right): https://codereview.chromium.org/21001003/diff/24001/tests/standalone/io/test_runner_test.dart#newcode80 tests/standalone/io/test_runner_test.dart:80: _makeCrashTestCase(name, expectations) { where do call ...
7 years, 4 months ago (2013-08-01 18:23:51 UTC) #5
ricow1
LGTM https://codereview.chromium.org/21001003/diff/24001/tools/testing/dart/test_runner.dart File tools/testing/dart/test_runner.dart (right): https://codereview.chromium.org/21001003/diff/24001/tools/testing/dart/test_runner.dart#newcode1735 tools/testing/dart/test_runner.dart:1735: Future<CommandOutput> runCommand(node, Command command, int timeout) { you ...
7 years, 4 months ago (2013-08-02 07:40:32 UTC) #6
kustermann
Try landing it soonish. https://codereview.chromium.org/21001003/diff/24001/tests/standalone/io/test_runner_test.dart File tests/standalone/io/test_runner_test.dart (right): https://codereview.chromium.org/21001003/diff/24001/tests/standalone/io/test_runner_test.dart#newcode80 tests/standalone/io/test_runner_test.dart:80: _makeCrashTestCase(name, expectations) { On 2013/08/01 ...
7 years, 4 months ago (2013-08-05 07:29:17 UTC) #7
kustermann
Committed patchset #4 manually as r25760 (presubmit successful).
7 years, 4 months ago (2013-08-05 07:54:27 UTC) #8
Emily Fortuna
https://codereview.chromium.org/21001003/diff/42001/tools/testing/dart/test_runner.dart File tools/testing/dart/test_runner.dart (left): https://codereview.chromium.org/21001003/diff/42001/tools/testing/dart/test_runner.dart#oldcode1727 tools/testing/dart/test_runner.dart:1727: print('$i. $command'); Is there some sort of equivalent of ...
7 years, 4 months ago (2013-08-06 23:42:35 UTC) #9
Emily Fortuna
https://codereview.chromium.org/21001003/diff/42001/tools/testing/dart/test_runner.dart File tools/testing/dart/test_runner.dart (left): https://codereview.chromium.org/21001003/diff/42001/tools/testing/dart/test_runner.dart#oldcode1727 tools/testing/dart/test_runner.dart:1727: print('$i. $command'); On 2013/08/06 23:42:36, Emily Fortuna wrote: > ...
7 years, 4 months ago (2013-08-06 23:44:53 UTC) #10
Emily Fortuna
https://codereview.chromium.org/21001003/diff/42001/tools/testing/dart/test_runner.dart File tools/testing/dart/test_runner.dart (left): https://codereview.chromium.org/21001003/diff/42001/tools/testing/dart/test_runner.dart#oldcode1727 tools/testing/dart/test_runner.dart:1727: print('$i. $command'); On 2013/08/06 23:44:53, Emily Fortuna wrote: > ...
7 years, 4 months ago (2013-08-06 23:46:37 UTC) #11
kustermann
On 2013/08/06 23:46:37, Emily Fortuna wrote: > https://codereview.chromium.org/21001003/diff/42001/tools/testing/dart/test_runner.dart > File tools/testing/dart/test_runner.dart (left): > > https://codereview.chromium.org/21001003/diff/42001/tools/testing/dart/test_runner.dart#oldcode1727 ...
7 years, 4 months ago (2013-08-07 11:18:37 UTC) #12
ahe
DBC in case anyone plans on copying this pattern elsewhere. https://codereview.chromium.org/21001003/diff/42001/tools/testing/dart/utils.dart File tools/testing/dart/utils.dart (right): https://codereview.chromium.org/21001003/diff/42001/tools/testing/dart/utils.dart#newcode136 ...
5 years, 7 months ago (2015-05-18 15:48:12 UTC) #13
kustermann
5 years, 7 months ago (2015-05-18 18:31:58 UTC) #15
Message was sent while issue was closed.
https://codereview.chromium.org/21001003/diff/42001/tools/testing/dart/utils....
File tools/testing/dart/utils.dart (right):

https://codereview.chromium.org/21001003/diff/42001/tools/testing/dart/utils....
tools/testing/dart/utils.dart:136: class HashCodeBuilder {
On 2015/05/18 15:48:12, ahe wrote:
> This way of computing a hashCode creates a lot of polymorphism and other kinds
> of code that is hard to optimize away. So it is probably rather slow.
> 
> I'd suggest a top-level function instead, for example:
> 
> int extendHashCode(int hashCode, int other) {
>   return ((((hashCode & 0x3FFFFFFF) * 31) & 0x3FFFFFFF) ^ (other &
0x3FFFFFFF))
> & 0x3FFFFFFF;
> }
> 
> Then use this function to compute hash codes like this:
> 
>   int computeHashCode() {
>     int hashCode = extendHashCode(0, commandLine.hashCode);
>     hashCode = extendHashCode(hashCode, displayName.hashCode)
>     return hashCode;
>   }
> 
> Compared to using the builder:
> 
>   void _buildHashCode(HashCodeBuilder builder) {
>     builder
>         ..add(commandLine)
>         ..add(displayName);
>   }
> 
> The advantage of the former is:
> 
> * No object allocation in order to compute hashCodes.
> 
> * No field access.
> 
> * High probability that .hashCode invocations are mono-morphic.
> 
> In addition, extendHashCode guarantees that all intermediate computations are
> within the 24-bit range (not just the result). This should also be faster.

Agreed, this is sub-optimal and could be optimized.

Powered by Google App Engine
This is Rietveld 408576698