Commit graph

164 commits

Author SHA1 Message Date
Daco Harkes
92e5746494 Reland "[vm/ffi] Add class modifiers"
This is a reland of commit 1755f89092

Can land after (or with) the Flutter PR:
https://github.com/flutter/engine/pull/40434

Original change's description:
> [vm/ffi] Add class modifiers
>
> Adds class modifiers to `dart:ffi`.
>
> Migrates all user-defined subclasses of `Struct`, `Union`, `Opaque`,
> and `AbiSpecificInteger` to be `final class`es.
>
> Does not remove the manual error checking, so some errors will show up
> twice now in language version 3.0. In language version <3.0, only the
> FFI-specific error will show up.
>
> In a follow-up CL, we will try to make the language-errors to show up
> also <3.0 so that we can remove the FFI-specific errors.
>
> Examples of duplicated errors:
> pkg/analyzer/test/src/diagnostics/subtype_of_ffi_class_test.dart
>
> TEST=pkg/analyzer/test/ (for the analyzer)
> TEST=pkg/front_end/testcases/ (for the CFE)
> TEST=test/ffi/ (for the VM)
>
> CoreLibraryReviewExempt: No need for dart2js to review.
> Bug: https://github.com/dart-lang/sdk/issues/51683
> Change-Id: I2964ceccb7db59fbdaf6be5319f5e4ec2dabe0f3
> Cq-Include-Trybots: luci.dart.try:pkg-linux-debug-try,pkg-win-release-try,pkg-mac-release-try,vm-precomp-ffi-qemu-linux-release-riscv64-try,vm-precomp-ffi-qemu-linux-release-arm-try,vm-ffi-android-debug-arm64c-try,vm-ffi-android-debug-arm-try,vm-reload-rollback-linux-debug-x64-try,analyzer-analysis-server-linux-try,analyzer-linux-release-try
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/289223
> Reviewed-by: Johnni Winther <johnniwinther@google.com>
> Reviewed-by: Devon Carew <devoncarew@google.com>
> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
> Reviewed-by: Jackson Gardner <jacksongardner@google.com>
> Reviewed-by: Lasse Nielsen <lrn@google.com>
> Commit-Queue: Daco Harkes <dacoharkes@google.com>

TEST=pkg/analyzer/test/ (for the analyzer)
TEST=pkg/front_end/testcases/ (for the CFE)
TEST=test/ffi/ (for the VM)
CoreLibraryReviewExempt: No need for dart2js to review.
Bug: https://github.com/dart-lang/sdk/issues/51683
Change-Id: I2ee3f0ac31d4162068a2346a06320029b2263ee2
Cq-Include-Trybots: luci.dart.try:pkg-linux-debug-try,pkg-win-release-try,pkg-mac-release-try,vm-precomp-ffi-qemu-linux-release-riscv64-try,vm-precomp-ffi-qemu-linux-release-arm-try,vm-ffi-android-debug-arm64c-try,vm-ffi-android-debug-arm-try,vm-reload-rollback-linux-debug-x64-try,analyzer-analysis-server-linux-try,analyzer-linux-release-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/289781
Reviewed-by: Devon Carew <devoncarew@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-03-21 15:25:10 +00:00
Zach Anderson
7471994270 Revert "[vm/ffi] Add class modifiers"
This reverts commit 1755f89092.

Reason for revert: This is a breaking change and is blocking the Dart -> Flutter roll. See https://ci.chromium.org/ui/p/flutter/builders/try/Mac%20Unopt/26896/overview.

Original change's description:
> [vm/ffi] Add class modifiers
>
> Adds class modifiers to `dart:ffi`.
>
> Migrates all user-defined subclasses of `Struct`, `Union`, `Opaque`,
> and `AbiSpecificInteger` to be `final class`es.
>
> Does not remove the manual error checking, so some errors will show up
> twice now in language version 3.0. In language version <3.0, only the
> FFI-specific error will show up.
>
> In a follow-up CL, we will try to make the language-errors to show up
> also <3.0 so that we can remove the FFI-specific errors.
>
> Examples of duplicated errors:
> pkg/analyzer/test/src/diagnostics/subtype_of_ffi_class_test.dart
>
> TEST=pkg/analyzer/test/ (for the analyzer)
> TEST=pkg/front_end/testcases/ (for the CFE)
> TEST=test/ffi/ (for the VM)
>
> CoreLibraryReviewExempt: No need for dart2js to review.
> Bug: https://github.com/dart-lang/sdk/issues/51683
> Change-Id: I2964ceccb7db59fbdaf6be5319f5e4ec2dabe0f3
> Cq-Include-Trybots: luci.dart.try:pkg-linux-debug-try,pkg-win-release-try,pkg-mac-release-try,vm-precomp-ffi-qemu-linux-release-riscv64-try,vm-precomp-ffi-qemu-linux-release-arm-try,vm-ffi-android-debug-arm64c-try,vm-ffi-android-debug-arm-try,vm-reload-rollback-linux-debug-x64-try,analyzer-analysis-server-linux-try,analyzer-linux-release-try
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/289223
> Reviewed-by: Johnni Winther <johnniwinther@google.com>
> Reviewed-by: Devon Carew <devoncarew@google.com>
> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
> Reviewed-by: Jackson Gardner <jacksongardner@google.com>
> Reviewed-by: Lasse Nielsen <lrn@google.com>
> Commit-Queue: Daco Harkes <dacoharkes@google.com>

Bug: https://github.com/dart-lang/sdk/issues/51683
Change-Id: Ie5b8a08aea6d64b1991ace4814322b21ffb670c7
Cq-Include-Trybots: luci.dart.try:pkg-linux-debug-try,pkg-win-release-try,pkg-mac-release-try,vm-precomp-ffi-qemu-linux-release-riscv64-try,vm-precomp-ffi-qemu-linux-release-arm-try,vm-ffi-android-debug-arm64c-try,vm-ffi-android-debug-arm-try,vm-reload-rollback-linux-debug-x64-try,analyzer-analysis-server-linux-try,analyzer-linux-release-try
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/289640
Commit-Queue: Slava Egorov <vegorov@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
2023-03-20 11:15:59 +00:00
Daco Harkes
1755f89092 [vm/ffi] Add class modifiers
Adds class modifiers to `dart:ffi`.

Migrates all user-defined subclasses of `Struct`, `Union`, `Opaque`,
and `AbiSpecificInteger` to be `final class`es.

Does not remove the manual error checking, so some errors will show up
twice now in language version 3.0. In language version <3.0, only the
FFI-specific error will show up.

In a follow-up CL, we will try to make the language-errors to show up
also <3.0 so that we can remove the FFI-specific errors.

Examples of duplicated errors:
pkg/analyzer/test/src/diagnostics/subtype_of_ffi_class_test.dart

TEST=pkg/analyzer/test/ (for the analyzer)
TEST=pkg/front_end/testcases/ (for the CFE)
TEST=test/ffi/ (for the VM)

CoreLibraryReviewExempt: No need for dart2js to review.
Bug: https://github.com/dart-lang/sdk/issues/51683
Change-Id: I2964ceccb7db59fbdaf6be5319f5e4ec2dabe0f3
Cq-Include-Trybots: luci.dart.try:pkg-linux-debug-try,pkg-win-release-try,pkg-mac-release-try,vm-precomp-ffi-qemu-linux-release-riscv64-try,vm-precomp-ffi-qemu-linux-release-arm-try,vm-ffi-android-debug-arm64c-try,vm-ffi-android-debug-arm-try,vm-reload-rollback-linux-debug-x64-try,analyzer-analysis-server-linux-try,analyzer-linux-release-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/289223
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Jackson Gardner <jacksongardner@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2023-03-17 19:29:41 +00:00
Ben Konyi
dcd65d0122 [ Benchmarks ] Update SDKArtifactSizes benchmarks to include dart2wasm and DevTools
TEST=N/A

Change-Id: I8633762410c9df753f147b3010294ed56e82e6ee
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/289520
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Sigurd Meldgaard <sigurdm@google.com>
2023-03-17 16:08:02 +00:00
Daco Harkes
c1aa671a4d [benchmarks/ffi] FfiCall macos_arm64 support
We're not running benchmarks on M1s, but it's useful to be able to.

TEST=manually tested locally

Change-Id: Ic42ed8e4e61e7590ea03734f46fbec8b955be2ff
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/288203
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Jonas Termansen <sortie@google.com>
2023-03-13 14:07:16 +00:00
Stephen Adams
6ca7571e2b [benchmark] Benchmark for switch on various constant types
AOT:
SwitchFSM.enum(RunTime): 29.549523327947906 us.
SwitchFSM.int(RunTime): 37.73789702628717 us.
SwitchFSM.class(RunTime): 138.6418530572675 us.
SwitchFSM.string(RunTime): 797.54075 us.

dart2js+V8:
SwitchFSM.enum(RunTime): 31.484299349840917 us.
SwitchFSM.int(RunTime): 26.022895908416366 us.
SwitchFSM.class(RunTime): 91.67433302667894 us.
SwitchFSM.string(RunTime): 92.31338451577098 us.

Both AOT and dart2js are 'good at' switches on enum values.

When compiled with --enable-experiment=records,patterns:

AOT:
SwitchFSM.enum(RunTime): 141.75470079359405 us.
SwitchFSM.int(RunTime): 145.25322604030737 us.
SwitchFSM.class(RunTime): 138.45460840662005 us.
SwitchFSM.string(RunTime): 797.226 us.

dart2js+V8:
SwitchFSM.enum(RunTime): 98.93787283573403 us.
SwitchFSM.int(RunTime): 29.459852700736498 us.
SwitchFSM.class(RunTime): 98.62184338405162 us.
SwitchFSM.string(RunTime): 92.035889371936 us.

There is work to be done to recover the performance.

Change-Id: I1197129cb32615a06a63a05d7ba300b46c68b4d2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/287246
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2023-03-10 04:21:13 +00:00
Brian Quinlan
b04cb92b73 Await the benchmark reports
Change-Id: I9de7fdbadcf454b1d2069580a0e5c96722b3c7ca
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/287620
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Brian Quinlan <bquinlan@google.com>
2023-03-08 22:38:21 +00:00
Daco Harkes
1c08a41f16 [benchmarks/ffi] Add @Native calls to FfiCall benchmark
The benchmarks contain some duplicated code, but we want to avoid
starting to measure indirection and the compiler not inlining in
these benchmarks, so it's better to keep them as plain as possible.

Bug: https://github.com/dart-lang/sdk/issues/47625
Change-Id: I7fedd31ce6df83bde3931835ae4e493a252d25b6
Cq-Include-Trybots: luci.dart.try:benchmark-linux-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/284340
Auto-Submit: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2023-03-02 15:23:16 +00:00
Alexander Markov
8627463c23 [tests, benchmarks] Reformat using new Dart formatter
Certain tests and benchmarks are reformatted using the new version of
"dart format" which supports records.

TEST=ci

Change-Id: I6132e8000317bfcc56c8d96682dc9771c728076d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/286201
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2023-03-01 18:15:09 +00:00
Brian Quinlan
987a45da4a [io] Add a benchmark for the IOSink returned by File.openWrite
Change-Id: Ic27d24633a305d0567c19f3694b1a477b3a1eef2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/285706
Commit-Queue: Brian Quinlan <bquinlan@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2023-02-28 20:40:40 +00:00
Daco Harkes
675d0dc6fc [benchmarks/ffi] Generate repetitive FfiCall benchmark
This makes it easier to maintain and extend this benchmark.
Benchmark results should not change by this CL.

Deletes the legacy version of this benchmark.

Satisfies lints in this benchmark.

Closes: https://github.com/dart-lang/sdk/issues/37581
Change-Id: Icf03d0f4f0e668f9d4a843b11d8ef1565b404ca4
Cq-Include-Trybots: luci.dart.try:benchmark-linux-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/284142
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Jonas Termansen <sortie@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2023-02-23 20:50:09 +00:00
Lasse R.H. Nielsen
bee7ab2b32 Make record positional field getters start at $1.
An update for co19 is available at https://github.com/dart-lang/co19/pull/1759

TEST=Existing tests run after change, two new tests for edge cases.

Change-Id: I408e398d532ba2c2e8e60777bb4f7bd0057e27fe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/278912
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
2023-01-30 08:14:28 +00:00
Alexander Thomas
b9b6511ca6 Spelling sdk
Closes https://github.com/dart-lang/sdk/pull/50918

Co-authored-by: Josh Soref <jsoref@gmail.com>
GitOrigin-RevId: 1fd275051c561b63d374fb47e76a22424c4a12a9
Change-Id: I97790d9c79ff659f2c1fa2d2d46d041fe67957cb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/278530
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
Reviewed-by: Tess Strickland <sstrickl@google.com>
2023-01-20 12:37:49 +00:00
Josh Soref
9e4dc755cb Spelling pkg
Closes https://github.com/dart-lang/sdk/pull/50921

GitOrigin-RevId: 6b1ca502b6722b0a987f33ace66f65cbd2c24e23
Change-Id: I74e4ff3c8e759c576036d6b791bd7734ebd215d8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/278536
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2023-01-19 10:06:29 +00:00
Josh Soref
1ab011a2a7 Spelling tests web
Closes https://github.com/dart-lang/sdk/pull/50879

TEST=only changes to spelling to comments and internal string messages
GitOrigin-RevId: 3fa4104fa17054ea2247118a1b6213c62f2749e0
Change-Id: I776120bb2492c662dd32612dd2f6a670b5891e42
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/278060
Reviewed-by: Michael Thomsen <mit@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2023-01-05 01:26:52 +00:00
Martin Kustermann
150635653e Revert accidental change in ObjectHash benchmark
The change in [0] made ObjectHash.hash.5 benchmark accidentally hash one
more value (i.e. 6 instead of 5). This CL reverts that change.

[0] https://dart-review.googlesource.com/c/sdk/+/276161

TEST=ci

Change-Id: Idee8cd445683b89d1a4013beae3ea544a5e3a8e5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/277988
Commit-Queue: Lasse Nielsen <lrn@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
2023-01-03 09:50:38 +00:00
Lasse R.H. Nielsen
ece7da8009 Make final parameter of SystemHash.hashX not be optional.
Issue https://github.com/dart-lang/sdk/issues/50693

Change-Id: Ib587b70bcb57cbd2d16319b7814e2569c7e41213
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/276161
Commit-Queue: Lasse Nielsen <lrn@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2023-01-02 12:44:23 +00:00
Daco Harkes
a7163dba81 [benchmarks/ffi] Add FfiStructCopy benchmark
`_memCopy` inside `dart:ffi` is currently doing a per-byte copy in
Dart. This is rather slow, we should optimize this with the
`MemoryCopyInstr` in the VM.

This CL adds benchmarks to report the number of bytes copied per
second.

Adds only benchmarks with copies of 32^(0..3), as non-power-of-two
benchmarks did not seem to behave differently.

Since legacy mode is no longer benchmarked, the dart2 version of this
benchmark is omitted.

Benchmarks set up according to
https://dart-review.googlesource.com/c/sdk/+/200188

Bug: https://github.com/dart-lang/sdk/issues/43967
Change-Id: I3d9be8de725820fd3365a7dc85d15174bddc1ae6
Cq-Include-Trybots: luci.dart.try:benchmark-linux-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/277522
Reviewed-by: Jonas Termansen <sortie@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2022-12-29 10:21:19 +00:00
Josh Soref
4d7839dfda Spelling benchmarks
Closes https://github.com/dart-lang/sdk/pull/50787

GitOrigin-RevId: 7cf1129d9bee2a4c1a857767dadae11d81e927f1
Change-Id: Ie7028f94966755d565843b8f6e2590f2243ff937
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/276685
Reviewed-by: Jonas Termansen <sortie@google.com>
Commit-Queue: Jonas Termansen <sortie@google.com>
2022-12-20 12:36:37 +00:00
Alexander Markov
c673119d9e [benchmarks] Add benchmark for lists/maps/sets of records
Issue: https://github.com/dart-lang/sdk/issues/49719
Change-Id: I1cb36cc4e690ef463c26c8aa58a2186dfe3290e6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/273823
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2022-12-13 19:38:56 +00:00
Alexander Aprelev
d1a34df210 [benchmarks] Add IsolateRegExp benchmark for regexp passing between isolates.
BUG=https://github.com/dart-lang/sdk/issues/50639
TEST=ci

Change-Id: I81bab7c61ce34d1b3a608a1fb0cc7cfd7a2d8e62
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/274120
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2022-12-07 20:56:02 +00:00
Alexander Thomas
2a035279af [3.0 alpha] Use equals for default values in the SDK
The colons cause test failures when the language version is bumped to 3.0. This CL can be landed before the 3.0 version bump.

Bug: https://github.com/dart-lang/language/issues/2357
Change-Id: Id8396034b16adc18b476689314e28b9617d25f18
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/272200
Commit-Queue: Alexander Thomas <athom@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
2022-11-30 10:33:31 +00:00
Ryan Macnak
edaaa70e31 [benchmarks] Use gen_kernel instead of dart2js for isolate group benchmarks.
- dart2js does not run in NNBD but gen_kernel does.
 - Changes to dart2js to not trigger VM benchmarks to run on Golem, allowing performance differences to accumulate until the next unrelated VM change. Changes to the front end or package:vm cause a binary diff in the platform file or kernel-service snapshot and so do trigger VM benchmarks to run on Golem.
 - These benchmarks don't care about running dart2js in particular, just some large program.

Change-Id: I85e339c32edbf9d0261081623378475fa0b9507a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/270022
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Jonas Termansen <sortie@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2022-11-21 22:25:59 +00:00
William Hesse
80a16a16cb [dart] Move LongStringCompare benchmark to correct directory
Bug: https://github.com/dart-lang/sdk/issues/50190
Change-Id: If9d350622217100a6882c10978e4434d51f4fba3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/271081
Commit-Queue: Jonas Termansen <sortie@google.com>
Reviewed-by: Jonas Termansen <sortie@google.com>
Auto-Submit: William Hesse <whesse@google.com>
2022-11-21 12:03:33 +00:00
Alexander Aprelev
d1e76c6ea0 [vm/benchmark] Improve LongStringCompare benchmark.
Follow-up to address comments on https://dart-review.git.corp.google.com/c/sdk/+/269380

BUG=https://github.com/dart-lang/sdk/issues/50190
TEST=ci

Change-Id: I5a979a4504e205f493ee71c74d405f1b65246781
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/269602
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2022-11-16 18:32:07 +00:00
Alexander Aprelev
bc17724feb [benchmarks] Add LongStringCompare benchmark that measure string comparison performance.
BUG=https://github.com/dart-lang/sdk/issues/50190
TEST=ci

Change-Id: I1cb93455283b19cf1a712132920b7d3e1dabcd8a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/269380
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2022-11-11 23:22:58 +00:00
Alexander Markov
6897b9e331 [benchmarks] Micro-benchmark for multiple returns
The new micro-benchmark measures performance of returning 2 values
via list, dedicated class, record and a record with named fields.
Requires '--enable-experiment=records' flag to run.

Issue: https://github.com/dart-lang/sdk/issues/49719
Change-Id: I895d955efb2fc4f1c04b31b113cd8e01db47132a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/265121
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2022-10-25 17:02:21 +00:00
Stephen Adams
a4294c354c Benchmark for comparing reading Uint8List vs UnmodifiableUint8ListView
The benchmark reports per-element times for summing the elements of a typed-data List.

----

The VM implementation is quite good but it looks like there is still a little room for improvement since the views are 2x slower than a simple array.

dart compile exe:

TypedDataPoly.mono.array.2(RunTime): 1.9670880036279512 ns.
TypedDataPoly.A_V.array.2(RunTime): 4.392355 ns.
TypedDataPoly.A_V.view.2(RunTime): 5.730097499999999 ns.
TypedDataPoly.A_UV.array.2(RunTime): 4.455393750000001 ns.
TypedDataPoly.A_UV.view.2(RunTime): 5.811122500000001 ns.
TypedDataPoly.A_VUV.array.2(RunTime): 4.386336250000001 ns.
TypedDataPoly.A_VUV.view.2(RunTime): 5.7639675 ns.
TypedDataPoly.A_UVx5.array.2(RunTime): 4.62768 ns.
TypedDataPoly.A_UVx5.view.2(RunTime): 5.7099649999999995 ns.
TypedDataPoly.mega.array.2(RunTime): 5.272632499999999 ns.
TypedDataPoly.mega.mixed.2(RunTime): 5.62861 ns.

TypedDataPoly.mono.array.100(RunTime): 0.6455633088733822 ns.
TypedDataPoly.A_V.array.100(RunTime): 3.1558100965636964 ns.
TypedDataPoly.A_V.view.100(RunTime): 4.476973567105732 ns.
TypedDataPoly.A_UV.array.100(RunTime): 3.149724878714137 ns.
TypedDataPoly.A_UV.view.100(RunTime): 4.500062299750802 ns.
TypedDataPoly.A_VUV.array.100(RunTime): 3.1438380581862146 ns.
TypedDataPoly.A_VUV.view.100(RunTime): 4.499246259421757 ns.
TypedDataPoly.A_UVx5.array.100(RunTime): 3.1570175999999996 ns.
TypedDataPoly.A_UVx5.view.100(RunTime): 4.482889818440727 ns.
TypedDataPoly.mega.array.100(RunTime): 3.649420567570034 ns.
TypedDataPoly.mega.mixed.100(RunTime): 4.068594455581881 ns.


On the other hand, there is a massive performance tax for using UnmodifiableUint8ListView on the web, especially views of views.
https://github.com/dart-lang/sdk/issues/50255 discusses how this might be fixed.

compile js -O3:

TypedDataPoly.mono.array.2(RunTime): 2.209502118308509 ns.
TypedDataPoly.A_V.array.2(RunTime): 2.58625 ns.
TypedDataPoly.A_V.view.2(RunTime): 2.32 ns.
TypedDataPoly.A_UV.array.2(RunTime): 51.633530557495135 ns.
TypedDataPoly.A_UV.view.2(RunTime): 302.4986387561256 ns.
TypedDataPoly.A_VUV.array.2(RunTime): 52.19476512355694 ns.
TypedDataPoly.A_VUV.view.2(RunTime): 302.84394312113756 ns.
TypedDataPoly.A_UVx5.array.2(RunTime): 55.649763488505165 ns.
TypedDataPoly.A_UVx5.view.2(RunTime): 849.458699173131 ns.
TypedDataPoly.mega.array.2(RunTime): 59.75952192382461 ns.
TypedDataPoly.mega.mixed.2(RunTime): 142.7126082991336 ns.

TypedDataPoly.mono.array.100(RunTime): 0.9815000000000002 ns.
TypedDataPoly.A_V.array.100(RunTime): 1.1626947678735444 ns.
TypedDataPoly.A_V.view.100(RunTime): 1.2075 ns.
TypedDataPoly.A_UV.array.100(RunTime): 17.17602868362643 ns.
TypedDataPoly.A_UV.view.100(RunTime): 231.5 ns.
TypedDataPoly.A_VUV.array.100(RunTime): 16.85678073510773 ns.
TypedDataPoly.A_VUV.view.100(RunTime): 229.7 ns.
TypedDataPoly.A_UVx5.array.100(RunTime): 17.01657458563536 ns.
TypedDataPoly.A_UVx5.view.100(RunTime): 697.5524475524476 ns.
TypedDataPoly.mega.array.100(RunTime): 22.770700636942674 ns.
TypedDataPoly.mega.mixed.100(RunTime): 94.4 ns.

Change-Id: If8878efd4c57bbd87effcd1d3f1339bc0cffbd75
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/264897
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2022-10-21 00:53:59 +00:00
Daco Harkes
b113fffb65 Reland "[vm/ffi] Throw on returning Error in Handle"
Fix: Check handle contents for Smi.
Closes: https://github.com/flutter/flutter/issues/112726

Orignal CL description:

Makes `Dart_Handle` FFI returns behave as the following snippet:

```
Dart_Handle ExampleSnippet() {
  Dart_Handle result = ...;
  if (Dart_IsError(result)) {
    Dart_PropagateError(result);
  }
  return result;
}
```

Also makes FFI consistent with Dart_NativeFunctions, which will
automatically throw upon return if Dart_SetReturnValue set the result
to an error.

`UnhandledExceptions` cannot flow out into Dart generated code. So,
the implementation needs to be in `FfiCallInstr::EmitNativeCode`.

Using `Dart_IsError` is slow compared to a machine code class id
check. So, we should do the handle unwrapping and class id check in
machine code.

Unwrapping Handles in machine code is only safe when the GC is
guaranteed to not run: Either (1) in `kThreadInGenerated`, or (2) in
`kThreadInNative`, but only when transitioned into safepoint. So, the
handle cannot be unwrapped immediately after the FFI call in machine code. We first need to transition back to generated.

This means we need to transition again to native to do the actual
`Dart_PropagateError` call. We can do so without the stub in JIT
because we never return with normal control flow.

Performance impact of this change is within benchmark noise in both
JIT and AOT.
Size impact is 42 bytes on x64, which is 10% in AOT and 12% in JIT.

For more numbers see: go/dart-ffi-handle-error

TEST=runtime/bin/ffi_test/ffi_test_functions_vmspecific.cc
TEST=tests/ffi/vmspecific_handle_test.dart

Closes: https://github.com/dart-lang/sdk/issues/49936
Change-Id: Id8edfd841a7d6246438386007d83747868a0a151
Cq-Include-Trybots: luci.dart.try:vm-canary-linux-debug-try,vm-ffi-android-debug-arm64c-try,vm-ffi-android-debug-arm-try,vm-kernel-gcc-linux-try,vm-kernel-linux-debug-x64-try,vm-kernel-linux-debug-x64c-try,vm-kernel-msvc-windows-try,vm-kernel-optcounter-threshold-linux-release-x64-try,vm-kernel-precomp-asan-linux-release-x64-try,vm-kernel-precomp-linux-debug-x64-try,vm-kernel-reload-linux-debug-x64-try,vm-kernel-reload-rollback-linux-debug-x64-try,vm-kernel-tsan-linux-release-x64-try,vm-kernel-win-debug-x64-try,vm-kernel-win-debug-ia32-try,vm-precomp-ffi-qemu-linux-release-arm-try,vm-precomp-ffi-qemu-linux-release-riscv64-try,vm-kernel-linux-debug-ia32-try,vm-kernel-mac-release-arm64-try,vm-kernel-precomp-win-debug-x64c-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/262342
Reviewed-by: Martin Kustermann <kustermann@google.com>
Auto-Submit: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2022-10-03 12:25:08 +00:00
Zach Anderson
2742d90033 Revert "[vm/ffi] Throw on returning Error in Handle"
This reverts commit d9c442bce8.

Reason for revert: https://github.com/flutter/flutter/issues/112726

Original change's description:
> [vm/ffi] Throw on returning `Error` in `Handle`
>
> Makes `Dart_Handle` FFI returns behave as the following snippet:
>
> ```
> Dart_Handle ExampleSnippet() {
>   Dart_Handle result;
>   if (Dart_IsError(result)) {
>     Dart_PropagateError(result);
>   }
>   return result;
> }
> ```
>
> Also makes FFI consistent with Dart_NativeFunctions, which will
> automatically throw upon return if Dart_SetReturnValue set the result
> to an error.
>
> `UnhandledExceptions` cannot flow out into Dart generated code. So,
> the implementation needs to be in `FfiCallInstr::EmitNativeCode`.
>
> Using `Dart_IsError` is slow compared to a machine code class id
> check. So, we should do the handle unwrapping and class id check in
> machine code.
>
> Unwrapping Handles in machine code is only safe when the GC is
> guaranteed to not run: Either (1) in `kThreadInGenerated`, or (2) in
> `kThreadInNative`, but only when transitioned into safepoint. So, the
> handle cannot be unwrapped immediately after the FFI call in machine code. We first need to transition back to generated.
>
> This means we need to transition again to native to do the actual
> `Dart_PropagateError` call. We can do so without the stub in JIT
> because we never return with normal control flow.
>
> Performance impact of this change is within benchmark noise in both
> JIT and AOT.
> Size impact is 42 bytes on x64, which is 10% in AOT and 12% in JIT.
>
> For more numbers see: go/dart-ffi-handle-error
>
> TEST=runtime/bin/ffi_test/ffi_test_functions_vmspecific.cc
> TEST=tests/ffi/vmspecific_handle_test.dart
>
> Closes: https://github.com/dart-lang/sdk/issues/49936
> Change-Id: Ie8fabeb6d53bc80689541bc4470cb37ee2200581
> Cq-Include-Trybots: luci.dart.try:vm-canary-linux-debug-try,vm-ffi-android-debug-arm64c-try,vm-ffi-android-debug-arm-try,vm-kernel-gcc-linux-try,vm-kernel-linux-debug-x64-try,vm-kernel-linux-debug-x64c-try,vm-kernel-msvc-windows-try,vm-kernel-optcounter-threshold-linux-release-x64-try,vm-kernel-precomp-asan-linux-release-x64-try,vm-kernel-precomp-linux-debug-x64-try,vm-kernel-reload-linux-debug-x64-try,vm-kernel-reload-rollback-linux-debug-x64-try,vm-kernel-tsan-linux-release-x64-try,vm-kernel-win-debug-x64-try,vm-kernel-win-debug-ia32-try,vm-precomp-ffi-qemu-linux-release-arm-try,vm-precomp-ffi-qemu-linux-release-riscv64-try,vm-kernel-linux-debug-ia32-try,vm-kernel-mac-release-arm64-try,vm-kernel-precomp-win-debug-x64c-try
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/261603
> Reviewed-by: Ryan Macnak <rmacnak@google.com>
> Reviewed-by: Martin Kustermann <kustermann@google.com>
> Commit-Queue: Daco Harkes <dacoharkes@google.com>

TBR=kustermann@google.com,rmacnak@google.com,dacoharkes@google.com,dart-scoped@luci-project-accounts.iam.gserviceaccount.com

Change-Id: I94cc63de16b54db2b0a4f92759c39a1e569b8e63
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Cq-Include-Trybots: luci.dart.try:vm-canary-linux-debug-try,vm-ffi-android-debug-arm64c-try,vm-ffi-android-debug-arm-try,vm-kernel-gcc-linux-try,vm-kernel-linux-debug-x64-try,vm-kernel-linux-debug-x64c-try,vm-kernel-msvc-windows-try,vm-kernel-optcounter-threshold-linux-release-x64-try,vm-kernel-precomp-asan-linux-release-x64-try,vm-kernel-precomp-linux-debug-x64-try,vm-kernel-reload-linux-debug-x64-try,vm-kernel-reload-rollback-linux-debug-x64-try,vm-kernel-tsan-linux-release-x64-try,vm-kernel-win-debug-x64-try,vm-kernel-win-debug-ia32-try,vm-precomp-ffi-qemu-linux-release-arm-try,vm-precomp-ffi-qemu-linux-release-riscv64-try,vm-kernel-linux-debug-ia32-try,vm-kernel-mac-release-arm64-try,vm-kernel-precomp-win-debug-x64c-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/262270
Reviewed-by: Zach Anderson <zra@google.com>
Reviewed-by: Liam Appelbe <liama@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
2022-09-30 21:51:59 +00:00
Daco Harkes
d9c442bce8 [vm/ffi] Throw on returning Error in Handle
Makes `Dart_Handle` FFI returns behave as the following snippet:

```
Dart_Handle ExampleSnippet() {
  Dart_Handle result;
  if (Dart_IsError(result)) {
    Dart_PropagateError(result);
  }
  return result;
}
```

Also makes FFI consistent with Dart_NativeFunctions, which will
automatically throw upon return if Dart_SetReturnValue set the result
to an error.

`UnhandledExceptions` cannot flow out into Dart generated code. So,
the implementation needs to be in `FfiCallInstr::EmitNativeCode`.

Using `Dart_IsError` is slow compared to a machine code class id
check. So, we should do the handle unwrapping and class id check in
machine code.

Unwrapping Handles in machine code is only safe when the GC is
guaranteed to not run: Either (1) in `kThreadInGenerated`, or (2) in
`kThreadInNative`, but only when transitioned into safepoint. So, the
handle cannot be unwrapped immediately after the FFI call in machine code. We first need to transition back to generated.

This means we need to transition again to native to do the actual
`Dart_PropagateError` call. We can do so without the stub in JIT
because we never return with normal control flow.

Performance impact of this change is within benchmark noise in both
JIT and AOT.
Size impact is 42 bytes on x64, which is 10% in AOT and 12% in JIT.

For more numbers see: go/dart-ffi-handle-error

TEST=runtime/bin/ffi_test/ffi_test_functions_vmspecific.cc
TEST=tests/ffi/vmspecific_handle_test.dart

Closes: https://github.com/dart-lang/sdk/issues/49936
Change-Id: Ie8fabeb6d53bc80689541bc4470cb37ee2200581
Cq-Include-Trybots: luci.dart.try:vm-canary-linux-debug-try,vm-ffi-android-debug-arm64c-try,vm-ffi-android-debug-arm-try,vm-kernel-gcc-linux-try,vm-kernel-linux-debug-x64-try,vm-kernel-linux-debug-x64c-try,vm-kernel-msvc-windows-try,vm-kernel-optcounter-threshold-linux-release-x64-try,vm-kernel-precomp-asan-linux-release-x64-try,vm-kernel-precomp-linux-debug-x64-try,vm-kernel-reload-linux-debug-x64-try,vm-kernel-reload-rollback-linux-debug-x64-try,vm-kernel-tsan-linux-release-x64-try,vm-kernel-win-debug-x64-try,vm-kernel-win-debug-ia32-try,vm-precomp-ffi-qemu-linux-release-arm-try,vm-precomp-ffi-qemu-linux-release-riscv64-try,vm-kernel-linux-debug-ia32-try,vm-kernel-mac-release-arm64-try,vm-kernel-precomp-win-debug-x64c-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/261603
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2022-09-30 13:29:51 +00:00
Ahmed Ashour
5fe480b788 Fix typos
Fix #49864

TEST=ci

Change-Id: I9a7e06d604cd0b4f56f2ac229ab3fc9f01cb9d76
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/256824
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
Reviewed-by: Liam Appelbe <liama@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
2022-09-16 19:35:00 +00:00
Alexander Aprelev
995f542d79 [gardening] Fix copyright statement typo.
TEST=ci

Change-Id: Iaccabdf361d491d2a6c5a82d0ac23db0036d6e4e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/259461
Reviewed-by: Brian Quinlan <bquinlan@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2022-09-15 18:00:59 +00:00
Alexander Aprelev
2ca5300faf [benchmarks] Add sets of integers lookup benchmarks.
This measures performance of integer hashCode.

BUG=https://github.com/dart-lang/sdk/issues/48641
TEST=ci

Change-Id: I276d26127137c70d59581b3689b2319b8e123c1e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/259240
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2022-09-14 22:52:43 +00:00
mnordine
dbd65b829f Fix typo
Closes https://github.com/dart-lang/sdk/pull/49591

GitOrigin-RevId: 9af48bbb20623b93b2c68f87ebc7cda3d6b481c7
Change-Id: I565d52b7781fd85ea39c87e51534aaec1e266149
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/253610
Reviewed-by: Michael Thomsen <mit@google.com>
2022-08-04 09:22:39 +00:00
Tess Strickland
27dc7de6d6 [benchmarks] Address post-review comments for InstantiateTypeArgs.
Change-Id: I7af16d3b10867f0cebabaf4579539889627cd234
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/252741
Commit-Queue: Tess Strickland <sstrickl@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2022-07-27 08:54:57 +00:00
Tess Strickland
2df264a2a8 [benchmarks] Adding benchmarks for type argument instantiation.
The primary focus of the new benchmarks is measuring the current
overhead of caching instantiated versions of the type arguments
in the uninstantiated type argument.

Change-Id: If611e72ac4f7a94c82f58d06cc34dcef2b8382df
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/252423
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Tess Strickland <sstrickl@google.com>
2022-07-26 07:53:17 +00:00
Anis Alibegić
40e18905f2 Fixed various typos in a lot of files
Closes https://github.com/dart-lang/sdk/pull/49478

TEST=Manual

GitOrigin-RevId: f4c9c6869dfe73639295e86574a021523b3d374d
Change-Id: I134a97caed4eec59d70e9cbca16b7e9a472cf2c1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/251902
Reviewed-by: Michael Thomsen <mit@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Kevin Chisholm <kevinjchisholm@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2022-07-25 12:21:59 +00:00
William Hesse
3eaf01a242 Remove dartanalyzer from SDKArtifactSizes benchmark
Bug: https://github.com/dart-lang/sdk/issues/48457
Change-Id: I42d2053e193f903ccf1eb9f351c0890dbd2231d6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/251945
Reviewed-by: Michael Thomsen <mit@google.com>
2022-07-19 10:51:45 +00:00
Stephen Adams
87c5c968cd Add MapCopy to Omnibus benchmarks
Change-Id: I911f914294b275600be894f227250927f05d74af
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/231535
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Joshua Litt <joshualitt@google.com>
2022-06-28 19:53:23 +00:00
William Hesse
eb12216408 Move benchmark IsolateSendExitLatency to correct directory
A benchmark should be in a directory with the same name as
the benchmark main file.

Bug: https://github.com/dart-lang/sdk/issues/49050
Change-Id: I31c0a9f276d313ab43d61be8ac3833b77ae8ee47
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/247387
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
Auto-Submit: William Hesse <whesse@google.com>
2022-06-07 16:50:40 +00:00
Alexander Aprelev
74b606f7f7 [benchmark] Add IsolateSendExitLatency benchmark.
This measures latency induced by one isolate send-and-exiting on concurrently running isolates.

The benchmark report format mimics EventLoopLatency benchmark, in a way it reports "runtime" as a latency.

TEST=manual run of benchmarks

Bug: https://github.com/dart-lang/sdk/issues/49050
Change-Id: I20642fd75bd24870658d553b0775f62083544bdb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/246620
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2022-06-01 16:09:24 +00:00
Martin Kustermann
e566f9a14b [vm/concurrency] Add IsolateBaseOverhead benchmark
Issue b/190877061

TEST=ci

Change-Id: Ifa570492b440849252a9bd01c7782656bcce7fd2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/245984
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2022-05-30 08:14:52 +00:00
William Hesse
55082e9cd7 [benchmarks] Follow-up to "Roll benchmark_harness"
The dart2/Isolate benchmark restricts the view of benchmark_harness
with a "show" clause. Removed it, and fixed the benchmark.

Change-Id: I99a4bdf00b88a3a69d8e6db1c0fa46dd85cc4aab
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/243264
Auto-Submit: William Hesse <whesse@google.com>
Reviewed-by: Jonas Termansen <sortie@google.com>
Commit-Queue: Jonas Termansen <sortie@google.com>
2022-05-02 12:26:41 +00:00
Jonas Termansen
630302b710 Roll benchmark_harness and use AsyncBenchmarkBase.
Change-Id: I9089b566082d06cb4947e9720cbafedccc901a60
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/242872
Reviewed-by: Alexander Aprelev <aam@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Jonas Termansen <sortie@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2022-05-02 09:27:49 +00:00
Ryan Macnak
b4b0868b40 [benchmarks] Apparently Golem has a metric called StartupTime.
Change-Id: Id4375435ffeda6a442dc6963323d8d494e8344ff
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/242360
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2022-04-25 16:44:33 +00:00
Martin Kustermann
b341480a72 [vm] Add TypeLiteral benchmark
This benchmark tests the performance of uninstantiated type literal
usages.

Issue https://github.com/dart-lang/sdk/issues/48757

TEST=ci

Change-Id: I5eb881a2b8e397997505af41b24240afcbe9d1ac
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/242104
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2022-04-25 08:49:12 +00:00
Ryan Macnak
633803df35 [benchmarks] Use the RunTimeRaw metric for Startup.
It makes more sense for Golem to display the benchmark results as a time than as a rate.

Change-Id: Iba262c98e9dc0d07983107966fa9b8d479e1b529
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/242064
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2022-04-21 23:05:38 +00:00
Ryan Macnak
6cea65bab7 [benchmarks] Add benchmark to record various startup durations.
TEST=ci
Change-Id: I65b298aa3f4a1ddf7752dc787e0a2ff1c2cacff8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/241840
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2022-04-20 22:48:38 +00:00
Alexander Markov
b55dc762fa [benchmarks] Add micro-benchmark for async/await with live variables
Issue: https://github.com/dart-lang/sdk/issues/48594
Issue: https://github.com/dart-lang/sdk/issues/48378
Change-Id: Ib5bd65c149342bb5d9bb2b5176a4a3b968a08a81
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/238980
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2022-03-30 18:25:00 +00:00