Commit Graph

20 Commits

Author SHA1 Message Date
Florian Loitsch 58550a2efc Fix fasta strong mode errors (and a lint).
Review-Url: https://codereview.chromium.org/2711053004 .
2017-02-24 14:01:36 +01:00
Sigmund Cherem 04cf44d89c Add script to run fasta as a benchmark
R=paulberry@google.com

Review-Url: https://codereview.chromium.org/2697403005 .
2017-02-17 14:33:56 -08:00
Paul Berry 9a82ada085 Remove hardcoded paths from perf.dart.
This lets perf.dart find the SDK and the .packages file regardless of
the architecture that's being tested and the working directory in
which the script is started.

Fixes #28676.

R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2687723002 .
2017-02-08 16:48:20 -08:00
Sigmund Cherem 25e94e2e0b Small fix to perf.dart.
This also makes perf_test.dart do something useful. It now executes perf.dart on
a small file from pkg/front_end. This may help to detect early when the
peformance bots will see a failure. I've only tested this in linux, but given
that's the OS of the perf bots, I'm ok skipping this in other OSs.

R=paulberry@google.com

Review-Url: https://codereview.chromium.org/2677423002 .
2017-02-07 15:07:57 -08:00
Paul Berry ba241c0c8d Use URIs rather than paths in front end API.
This carries a number of benefits:

- It allows the front end to trivially support schemes other than
  "file:" (e.g. "http:") by allowing the client to supply a FileSystem
  implementation that handles them.

- It is more consistent with the functionality of the ".packages" file
  (which allows packages to map to any kind of URI).

- It allows the "bazel root" feature to be rewritten to use a magic
  scheme rather than a magic path.  (This eliminates concerns about
  the magic path overlapping with a user's use case).  Note that this
  feature has been renamed to "multi root" since it is sufficiently
  generic to be applicable to build systems other than Bazel.

- It reduces the risk of forgetting to use the front end's FileSystem
  abstraction to access the file system, since the native file system
  interfaces do not accept URIs.

R=danrubel@google.com

Review-Url: https://codereview.chromium.org/2614063007 .
2017-01-09 11:19:38 -08:00
Sigmund Cherem 313190029a Fix perf.dart test.
These tests didn't cover much, but I still managed to break them...
TBR=paulberry@google.com

Review-Url: https://codereview.chromium.org/2613113002 .
2017-01-05 12:17:06 -08:00
Sigmund Cherem cc3682f134 fe: minor change to benchmarks to match what the runners expect and some minor refactoring.
I'm happy to split the style/refactorings as separate CLs if you prefer. Here is a summary of the changes:
  - update the reported strings to match the names expected by our benchmark runners ("unlinked summaize + parse" => "unlinked_summarize")
  - invert the benchmark results (like Paul did in 2551533003)
  - stop counting input-size while scanning, count that separately once
  - combine the multiple summarization steps into a single function
  - clean up the logic that dispatches into each benchmark

R=paulberry@google.com

Review-Url: https://codereview.chromium.org/2602003002 .
2017-01-05 11:31:35 -08:00
Paul Berry 62edaa7a63 Fix front end perf after addition of Source to kernel.
Commit aecb572d76 introduced errors into
the front end perf script by making it ambiguous whether "Source"
refers to the kernel's "Source" or the front end's.

R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2610753002 .
2017-01-03 13:25:54 -08:00
Paul Berry 0c81fbc411 Fix "unused import" warnings and sort declarations.
R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2562643006 .
2016-12-12 11:02:22 -08:00
Sigmund Cherem 02d557d134 Use sdk summaries in front_end/kernel_generator.
This CL adds support for using sdk summaries when building kernel using the
front_end entrypoint. I didn't expose this functionality in the dartk binary,
I'm hoping we can delay doing so until we integrate dartk and front_end.

I also switched front_end/tool/perf.dart to use kernel_generator directly.

This makes some observable difference for small scripts, but not so much with large apps like dart2js. Makes sense considering that the sdk is about 2Mb, and dart2js is 6Mb of sources.

The most interesting number I got is building the a library kernel file (not the whole program) for a small hello-world script on a warmed up vm:
no summaries: 500ms
with summaries: 30ms

R=asgerf@google.com, paulberry@google.com

Review-Url: https://codereview.chromium.org/2562923002 .
2016-12-09 13:29:41 -08:00
Paul Berry 926dfb751e Add a perf test for generating linked summaries.
R=sigmund@google.com

Review URL: https://codereview.chromium.org/2556723005 .
2016-12-07 16:27:27 -08:00
Paul Berry b8b68f5a5e Add a benchmark for summary prelinking.
R=sigmund@google.com

Review URL: https://codereview.chromium.org/2554573006 .
2016-12-06 13:18:51 -08:00
Sigmund Cherem d79ef86af7 Implement the generate-kernel api by invoking dartk. Add example that uses this API to generate a byte buffer with the results.
R=paulberry@google.com

Review URL: https://codereview.chromium.org/2508933003 .
2016-12-05 13:02:24 -08:00
Paul Berry fe1a684789 Subtract scan/parse time from unlinked summary perf statistic.
R=sigmund@google.com

Review URL: https://codereview.chromium.org/2545073004 .
2016-12-05 11:50:24 -08:00
Paul Berry cb2fef0c45 Add a front end perf test that computes unlinked summaries.
R=sigmund@google.com

Review URL: https://codereview.chromium.org/2544643002 .
2016-12-01 05:46:47 -08:00
Asger Feldthaus 709c1e0b75 Store library paths relative to a given application root folder.
In kernel, library import URIs now support an "app" scheme as an
alternative to the "file" scheme, representing a path relative to
the application root.

dartk takes an --app-root flag giving the application root. If none
is given, file URIs are used instead.

The intention is that kernel binaries should not carry irrelevant
path information, such as the path to the home directory of the
user who compiled a given file.

It is not the intention that end-users should see an app URI.
Import paths are currently not shown to users at all, and if we need
to do this, they should be translated to file paths first.

In theory we could stick to file URIs with relative paths, but the Uri
class from dart:core makes this difficult, as certain operations on it
assume that file paths should be absolute.

Source mapping URIs are not yet affected by this change.

R=kmillikin@google.com

Committed: https://github.com/dart-lang/sdk/commit/60adb852ad706ecf9424c77d47fa05583d543def

Review URL: https://codereview.chromium.org/2532053005 .

Reverted: https://github.com/dart-lang/sdk/commit/bb540416f27c39d75ee7f243899939fc37a2cd03
2016-11-30 10:39:48 +01:00
Sigmund Cherem 618cbad43a switch perf tool to use scanner in front_end
R=paulberry@google.com

Review URL: https://codereview.chromium.org/2507093003 .
2016-11-16 11:13:20 -08:00
Paul Berry 72fc9805d9 Add analysis options for front end, and fix a bug discovered by strong mode.
R=sigmund@google.com

Review URL: https://codereview.chromium.org/2489573002 .
2016-11-08 10:39:48 -08:00
Sigmund Cherem 2bcd189f2d add kernel generation to the front_end/tool/perf script
BUG=
R=paulberry@google.com

Review URL: https://codereview.chromium.org/2439053003 .
2016-10-21 09:10:19 -07:00
Sigmund Cherem 5964bdfa0b Copy perf.dart into front_end/tool.
This keeps analyzer_cli/perf.dart for now: I need to make the change in two
parts so I can update the benchmark runners after I submit this.

BUG=
R=paulberry@google.com

Review URL: https://codereview.chromium.org/2432043008 .
2016-10-21 09:07:48 -07:00