So far tree shaking was removing fields which are not used at all.
This change improves tree shaking of fields so fields
which are only written or used as interface targets can be removed.
The following limitations apply:
* Field is not removed if there is a constant object with that field, as
it may impact identity of constant objects which is an observable
behavior.
* Field is not removed if it has a non-trivial initializer as it may
have side-effects.
* Late final fields are not removed, as writing such fields may have
side-effect.
* When field is removed, we may need to introduce an abstract getter
or abstract setter if field is used as a target of an interface call.
If a field was written, then setter would be non-abstract (but empty).
Fixes https://github.com/dart-lang/sdk/issues/35310
Change-Id: I79c00158b8eb658081a647c5dbdecde481fddb41
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134204
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
This reverts commit 37f4a44a27.
Reason for revert: Relanding after infra issues cleared
Original change's description:
> Revert "[ VM / Service ] Added `getClientName`, `setClientName` and `requireResumeApproval` RPCs"
>
> This reverts commit 48808f7dce.
>
> Reason for revert: Unable to approve failures.
>
> Original change's description:
> > [ VM / Service ] Added `getClientName`, `setClientName` and `requireResumeApproval` RPCs
> >
> > Add support for naming VM service clients which allows for resume
> > permissions to be set for all clients of the same name. If a client
> > name requires resume approval, an isolate won't be resumed until all
> > clients which require resume approval have called the `resume` RPC.
> >
> > Resume approvals can be set for the following pause events:
> > - PauseOnStart
> > - PausePostRequest (issued after `reloadSources(pause: true)`)
> > - PauseOnExit
> >
> > Change-Id: I7dde3d8aaeccfcf47fa84f1f92159846f1560e16
> > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/133621
> > Commit-Queue: Ben Konyi <bkonyi@google.com>
> > Reviewed-by: Siva Annamalai <asiva@google.com>
> > Reviewed-by: Gary Roumanis <grouma@google.com>
>
> TBR=jacobr@google.com,bkonyi@google.com,rmacnak@google.com,asiva@google.com,grouma@google.com
>
> Change-Id: I8e60416ad8cbec9ad93f4e34e9bf9af5a516c6dc
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134465
> Reviewed-by: Ben Konyi <bkonyi@google.com>
> Commit-Queue: Ben Konyi <bkonyi@google.com>
TBR=jacobr@google.com,bkonyi@google.com,rmacnak@google.com,asiva@google.com,grouma@google.com
Change-Id: Ibd9d831774e5c4dd500da026f41b173589a9aefd
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134415
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
This reverts commit 48808f7dce.
Reason for revert: Unable to approve failures.
Original change's description:
> [ VM / Service ] Added `getClientName`, `setClientName` and `requireResumeApproval` RPCs
>
> Add support for naming VM service clients which allows for resume
> permissions to be set for all clients of the same name. If a client
> name requires resume approval, an isolate won't be resumed until all
> clients which require resume approval have called the `resume` RPC.
>
> Resume approvals can be set for the following pause events:
> - PauseOnStart
> - PausePostRequest (issued after `reloadSources(pause: true)`)
> - PauseOnExit
>
> Change-Id: I7dde3d8aaeccfcf47fa84f1f92159846f1560e16
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/133621
> Commit-Queue: Ben Konyi <bkonyi@google.com>
> Reviewed-by: Siva Annamalai <asiva@google.com>
> Reviewed-by: Gary Roumanis <grouma@google.com>
TBR=jacobr@google.com,bkonyi@google.com,rmacnak@google.com,asiva@google.com,grouma@google.com
Change-Id: I8e60416ad8cbec9ad93f4e34e9bf9af5a516c6dc
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134465
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
Add support for naming VM service clients which allows for resume
permissions to be set for all clients of the same name. If a client
name requires resume approval, an isolate won't be resumed until all
clients which require resume approval have called the `resume` RPC.
Resume approvals can be set for the following pause events:
- PauseOnStart
- PausePostRequest (issued after `reloadSources(pause: true)`)
- PauseOnExit
Change-Id: I7dde3d8aaeccfcf47fa84f1f92159846f1560e16
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/133621
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Gary Roumanis <grouma@google.com>
This CL updates the parsing of "break" statements in the debug console
in observatory, as well as handling that the same script can be a part
of several libraries.
Before one could get stuff like this:
$ break package:front_end/src/fasta/scope.dart:389
Function 'package:front_end/src/fasta/scope.dart:389' not found
$ break scope.dart:389
Script 'scope.dart' is ambiguous
The first one is fixes by this CL: We now allow package uris and thus
no longer think it's a function. In this case it wouldn't have mattered
though, it would just say it was ambiguous, as the last case.
This is caused by the same script being found twice. By using a set
instead of a list, that's fixed too.
Change-Id: I3931c8f2abc0a3a5a77cff516da8767037196bf2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/133593
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
In the VM, a single script can belong to several libraries because of
mixins.
Previously, when setting a breakpoint, it found the function to set the
breakpoint in by taking the "scripts library" (script.FindLibrary) and
then tried to find a function in that library that matched.
Sometimes it found the "wrong" library and the breakpoint thus wasn't
set.
This CL changes that so it goes though all libraries, finds all maching
libraries and tries all of them.
This solves the issue at hand, but might not solve all corner-cases.
This added test demonstrates the resolved case where before it would
just say that it couldn't add the breakpoint on line 13.
Change-Id: Ie44b0dfb4ea3e8de767d1867ec432b2aef429b76
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/133592
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
This fixes debug assertions in AOT.
Change-Id: Ib688164498ad98d2b7bb4ce574cf6859922df3a4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/133999
Reviewed-by: Alexander Aprelev <aam@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
This reverts commit 9eb531bde4.
Reason for revert: Bots are red. Some tests are failing.
https://ci.chromium.org/p/dart/builders/ci.sandbox/vm-kernel-precomp-obfuscate-linux-release-x64/6039https://ci.chromium.org/p/dart/builders/ci.sandbox/vm-kernel-precomp-android-release-arm_x64/957
Original change's description:
> [vm] Add support for real unboxed floating point fields in AOT
>
> Non-nullable floating point fields (double, Float32x4, Float64x2)
> are fully unboxed in their classes.
>
> A bitmap for each class was added to the shared class table in order to keep
> track of the pointers of the classes. Since all classes in Flutter Gallery
> have less than 64 fields, the bitmap is represented by a 64 bit integer and
> fields whose offset is more than 64 words are not unboxed.
>
> The instance sizes and field offsets might change between target and host
> in cross-compilation, since the number of words used to store unboxed fields
> may differ.
>
> dart-aot Xeon
>
> SplayLatency -4.62%
> SplayHarderLatency -4.17%
> NavierStokes -2.20%
> Tracer 8.72%
> ParticleSystemPaint 2.90%
> NBodySIMD 8.35%
> NBody 25.59%
>
> With hack TFA to make doubles in Rect/Offset/Size classes in flutter non-nullable:
>
> flutter arm-v8:
>
> gallery total size: -1%
>
> matrix_utils_transform_rect_perspective -16.70% (less is better)
> matrix_utils_transform_rect_affine -31.82% (less is better)
> matrix_utils_transform_point_perspective -24.90% (less is better)
> matrix_utils_transform_point_affine) -27.26% (less is better)
> rrect_contains_bench -4.719% (less is better)
>
> Change-Id: I9ae09c9c3167d99f9efd071a92937aa51093fd1d
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131824
> Commit-Queue: Victor Agnez Lima <victoragnez@google.com>
> Reviewed-by: Martin Kustermann <kustermann@google.com>
> Reviewed-by: Ryan Macnak <rmacnak@google.com>
> Reviewed-by: Samir Jindel <sjindel@google.com>
TBR=kustermann@google.com,rmacnak@google.com,sjindel@google.com,victoragnez@google.com
Change-Id: Ic73858f6adb7f55c4129d4f46ff4731b378cb634
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134020
Reviewed-by: Zichang Guo <zichangguo@google.com>
Commit-Queue: Zichang Guo <zichangguo@google.com>
Non-nullable floating point fields (double, Float32x4, Float64x2)
are fully unboxed in their classes.
A bitmap for each class was added to the shared class table in order to keep
track of the pointers of the classes. Since all classes in Flutter Gallery
have less than 64 fields, the bitmap is represented by a 64 bit integer and
fields whose offset is more than 64 words are not unboxed.
The instance sizes and field offsets might change between target and host
in cross-compilation, since the number of words used to store unboxed fields
may differ.
dart-aot Xeon
SplayLatency -4.62%
SplayHarderLatency -4.17%
NavierStokes -2.20%
Tracer 8.72%
ParticleSystemPaint 2.90%
NBodySIMD 8.35%
NBody 25.59%
With hack TFA to make doubles in Rect/Offset/Size classes in flutter non-nullable:
flutter arm-v8:
gallery total size: -1%
matrix_utils_transform_rect_perspective -16.70% (less is better)
matrix_utils_transform_rect_affine -31.82% (less is better)
matrix_utils_transform_point_perspective -24.90% (less is better)
matrix_utils_transform_point_affine) -27.26% (less is better)
rrect_contains_bench -4.719% (less is better)
Change-Id: I9ae09c9c3167d99f9efd071a92937aa51093fd1d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131824
Commit-Queue: Victor Agnez Lima <victoragnez@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Samir Jindel <sjindel@google.com>
Work towards https://github.com/flutter/flutter/issues/46724
Background:
on the latest versions of iOS today, we have to use mdns to discover the observatory port and authentication code. For a variety of reasons this can fail, leaving us with no way to connect.
An alternative approach is to specify the observatory port and disable the authentication code. If binding to this port fails, however, we would still like to attempt connecting with mdns.
Overview:
This adds a new flag to the dart SDK, --enable-service-port-fallback. This amends the behavior of the vmservice with a specified port. After failing to bind 3 times to a non-zero port, update the port selection to 0.
Results:
Tested locally two dart VMs with the same specified port:
```
jonahwilliams@jonahwilliams0:~/Documents/engine/src/out/host_debug_unopt$ ./dart --enable-service-port-fallback --observe=8080 example.dart
Observatory server failed to start after 1 tries
Falling back to automatic port selection
vm-service: isolate(2785434094928835) 'main' has no debugger attached and is paused at exit. Connect to Observatory to debug.
Observatory listening on http://127.0.0.1:45663/62A5IHjmv9E=/
```
Change-Id: I582ab402a457330928e5b490f9718fcd52b56720
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/133434
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Jonah Williams <jonahwilliams@google.com>
Wait for the concurrent sweeper to visit processing large pages before visiting the card tables during a scavenge.
Bug: https://github.com/flutter/flutter/issues/48360
Bug: b/147582727
Change-Id: Iaec22f05e22d9ded75017aa1d8463c1be64858aa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131703
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
This reverts commit 6ff7e9ebad.
Reason for revert: <INSERT REASONING HERE>
Original change's description:
> [vmservice] allow fallback on port bind failure
>
> Work towards https://github.com/flutter/flutter/issues/46724
>
> Background:
>
> on the latest versions of iOS today, we have to use mdns to discover the observatory port and authentication code. For a variety of reasons this can fail, leaving us with no way to connect.
>
> An alternative approach is to specify the observatory port and disable the authentication code. If binding to this port fails, however, we would still like to attempt connecting with mdns.
>
> Overview:
>
> This adds a new flag to the dart SDK, --enable-service-port-fallback. This amends the behavior of the vmservice with a specified port. After failing to bind once to a non-zero port, update the port selection to 0.
>
> Results:
>
> Tested locally two dart VMs with the same specified port:
>
> ```
> jonahwilliams@jonahwilliams0:~/Documents/engine/src/out/host_debug_unopt$ ./dart --enable-service-port-fallback --observe=8080 example.dart
> Observatory server failed to start after 1 tries
> Falling back to automatic port selection
> vm-service: isolate(2785434094928835) 'main' has no debugger attached and is paused at exit. Connect to Observatory to debug.
> Observatory listening on http://127.0.0.1:45663/62A5IHjmv9E=/
> ```
>
> Change-Id: I371583edcb603325428f1cb760992e39b9f3b6dc
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/130441
> Commit-Queue: Jonah Williams <jonahwilliams@google.com>
> Reviewed-by: Ben Konyi <bkonyi@google.com>
TBR=bkonyi@google.com,jonahwilliams@google.com
Change-Id: I337b2d549e33ef9c616c276a48ce894a14b1c317
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/133327
Reviewed-by: Jonah Williams <jonahwilliams@google.com>
Commit-Queue: Jonah Williams <jonahwilliams@google.com>
Work towards https://github.com/flutter/flutter/issues/46724
Background:
on the latest versions of iOS today, we have to use mdns to discover the observatory port and authentication code. For a variety of reasons this can fail, leaving us with no way to connect.
An alternative approach is to specify the observatory port and disable the authentication code. If binding to this port fails, however, we would still like to attempt connecting with mdns.
Overview:
This adds a new flag to the dart SDK, --enable-service-port-fallback. This amends the behavior of the vmservice with a specified port. After failing to bind once to a non-zero port, update the port selection to 0.
Results:
Tested locally two dart VMs with the same specified port:
```
jonahwilliams@jonahwilliams0:~/Documents/engine/src/out/host_debug_unopt$ ./dart --enable-service-port-fallback --observe=8080 example.dart
Observatory server failed to start after 1 tries
Falling back to automatic port selection
vm-service: isolate(2785434094928835) 'main' has no debugger attached and is paused at exit. Connect to Observatory to debug.
Observatory listening on http://127.0.0.1:45663/62A5IHjmv9E=/
```
Change-Id: I371583edcb603325428f1cb760992e39b9f3b6dc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/130441
Commit-Queue: Jonah Williams <jonahwilliams@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
For `foo() async* {}` frames we find the "caller" by finding out
what closure is registered as listener on the _AsyncStreamController.
There can be two cases:
a) The caller does a regular `foo().listen((_) {})`:
The stack trace will have the closure as the caller and unwinding stops.
b) The caller uses 'await for (... foo())':
In this case the listener will be a StreamIterator.
This CL changes our unwinding code to get the awaiter of `await it.moveNext()`.
Bug: https://github.com/dart-lang/sdk/issues/39525
Change-Id: I13f76025a15682aaf55fd968088fc2059982d842
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/132841
Commit-Queue: Clement Skau <cskau@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Tests involving breakpoints, stepping, evaluation or coverage are expected to fail.
Tests involving introspection, heap analysis, extensions, timeline events or profiling are expected to pass.
- Fix crash when `debugger` is called.
- Fix crash when metrics are queried.
- Replace unnecessary use of `eval` with `invoke`, allowing more tests to run on AOT, AppJIT and simulators.
Bug: https://github.com/dart-lang/sdk/issues/40274
Bug: https://github.com/dart-lang/sdk/issues/40275
Change-Id: I3023af7cbfda745238c487d9a3a3a99e56a30244
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/132942
Reviewed-by: Ben Konyi <bkonyi@google.com>
Fixes an issue where stack['asyncCausalFrames'] would be populated in
if --lazy-async-stacks was set.
The field should be filled iff the stack contains an async function -
regardless of whether it's sync-async.
Bug: https://github.com/dart-lang/sdk/issues/39525
Change-Id: Ia68f113402962c07a1e9a38ea9320b44140241e4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/132820
Commit-Queue: Clement Skau <cskau@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
- Clean up loading flow.
- Replace manual iterators with generator functions.
- Produce clearer messages when running out of memory.
- Make various implementation functions and constants private.
Change-Id: I9e016b37552e3110baf00f3052b131dc0d79b748
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/132027
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
using Instruments to track these events.
Signed-off-by: yuanhuihui <gityuan@gmail.com>
Bug: https://github.com/dart-lang/sdk/issues/40076
Change-Id: I590081c516923f82a2a3dbf4b109afe75b8f5fc5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131360
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
This reverts commit 85e396a1de as it broke internal app running on android arm in release mode.
Change-Id: Iaff0cf3c1ef859e35b4eaeb3ac8243ce3c6737b8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/132168
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
Don't flatten snapshot chunks into a linear byte array to avoid a 2GB limit in JS. The lifts the largest snapshot we can handle to either 2^32 objects or the memory limit in JS.
Change-Id: I1a3ec03cf83cb03b4cf67245b12560a083a6e5b6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131943
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Running all existing tests with/without lazy async stacks ensures that
the existing functionality for --lazy-async-stacks does not regress.
There are still a few smaller things to be done in the debugger for lazy
async stacks.
This CL also ensures:
* The inner closure, i.e. AsyncClosure/AsyncGenClosure, is not
inlined if FLAG_lazy_async_stacks is on.
* Fixes a crash in dartkb mode, when the function of the Bytecode
object is null.
* Does a simple integration of the lazy async stacks in debugger.cc -
to ensure a stack is returned via vm-service.
Issue https://github.com/dart-lang/sdk/issues/37668
Change-Id: Ibc1e887a457e2c456ae65d9ed5fa92434f122a32
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131825
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Namely, we can get "Connection reset by peer" OSErrors when calling
executeWithRandomDelay, and these are not covered by the current list
of ignored exception classes in this function.
This closes https://github.com/dart-lang/sdk/issues/39568.
Change-Id: I033352177bfd38de5f8ace452ef97d2311076d73
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/126731
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Teagan Strickland <sstrickl@google.com>
In some workloads, the heap is mostly large pages.
Move large executable pages from the large list to the executable list. They do not require special treatment because they are large during sweeping because we never truncate an Instructions object. They still require being swept immediately because they are executable so that code protections can be flipped before resuming Dart execution.
Fix off-by-one errors in SnapshotGraph.objects and SnapshotClass.instances discovered as a result of the large page list changing from prepending to appending.
Bug: https://github.com/flutter/flutter/issues/48360
Change-Id: If6d9137fd36c9b18205493166d586b9a7cee4b1c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/130823
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
The test has invalid expectation that if the isolate has property 'paused' set to 'true', it means the isolate is paused at exit. In reality the 'paused' property can be set to 'true' if the isolate is not runnable yet.
Fixes dartbug.com/24174
Change-Id: I3a2c5519f0ae448fbcacff46c8aa8f64406ef796
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/130980
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
Display progress when loading a snapshot from a file.
Change-Id: I6802998308c0b6c552ffea76439fe18edd34c99c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/130460
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
This is to support sharing of Field objects between isolate group's isolates.
Each isolate will have it's own field table with static instances/values.
field_table is stored on isolate, copied over to thread for easier access.
This also removes the write barrier from static field assignments; the field table is a GC root.
Bug: https://github.com/dart-lang/sdk/issues/37835
Bug: https://github.com/dart-lang/sdk/issues/36097
Change-Id: I232a86f059ac4cacc3e9f54bcc31d1d0524f9496
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127582
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
It isn't possible to do this with evaluate since we are unable to access
classes from private libraries exposed through dart:io like dart:_http.
Change-Id: I3d4168d919dbcf5008da60b14165fd9b89f22cad
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/129322
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
sync event is not included in the systrace, such as Timeline.startSync.
more detail, see https://github.com/dart-lang/sdk/issues/39727
Signed-off-by: yuanhuihui <gityuan@gmail.com>
Bug: issues/39727
Change-Id: I21de32d517c9cbc7c00a12d69bdcb77df572f8db
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127921
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
index to fix VMs coverage issue
This CL fixes the VM not always reporting coverage for mixin usages
properly.
* When asking the VM for coverage you can do it in one of two ways
* Ask the VM for coverage for everything; or
* Ask the VM for coverage for a specific script
* Asking the VM for coverage for everything works perfectly fine.
The VM goes through everything and reports coverage correctly.
* Asking the VM for coverage for a specific script (which is, at least
now, what the flutter tools does) doesn't work in the simple mixin
case described at http://dartbug.com/39779: The VM goes through the
libraries, asking for the list of scripts they "know about",
and checks for matches against what you asked for.
In this case, when asking for 'master.dart', the library for
'lib.dart' says no when it shouldn't --- because of the way the mixin
transformation works the content is actually in lib.dart.
This CL updates the content of the field 'sourceReferences' on Library
to fix the issue.
Fixes#39779
Change-Id: I0c38a323c81d1784ade704837b67ece549fc95d2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128585
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Include major memory users known to the VM: isolate heaps, profiling buffers, timeline buffers.
Change-Id: I2580ad74b5d4d07c5c75fde28bb7a5d71fddb09b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127382
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Mechanically, this renames shallowSize to internalSize and redefines shallowSize as internalSize + externalSize.
Change-Id: I734f5714ad6dff341627e3d6e51e3bdcf26c63ad
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125993
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
When creating a KernelProgramInfo, we create several logical views into the kernel buffer. These are fresh ExternalTypedDatas, rather than proper TypedDataViews, so they do not automically keep the original ExternalTypedData alive. Create an explicit reference to the orginal ExternalTypedData in the KernelProgramInfo. When creating snapshots, this reference is ignored/null'd and the views are turned into copies, effectively dropping the parts of the original buffer that do not have views.
Fixes a leak with reload and a use-after-free with eval.
Bug: https://github.com/dart-lang/sdk/issues/33973
Bug: https://github.com/dart-lang/sdk/issues/39610
Change-Id: I09d3830133314ccbaa0341d904127c2b6925c4ec
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/126825
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
When CPU profiling is disabled, the getCpuSamples RPC would return with
a ServerRpcException stating that the profiler was disabled. This wasn't
being caught when the RPC was invoked, but was being caught in
`ObservatoryApplication` and swallowed. This resulted in the timeline
page being stuck at the timeline loading dialog.
Also includes fixes from "[observatory] Properly wait for Catapult's iframe to load. Give
message while fetching timeline.", commit 3b99524167, which was reverted.
Change-Id: I2fe23d4dba5e20f717e111c519563866bb1a221c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/126402
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
This reverts commit b3cf5ef327.
Reason for revert: Breaking timeline view for users in Google3
b/141889413
b/145128403
Original change's description:
> [observatory] Properly wait for Catapult's iframe to load. Give message while fetching timeline.
>
> Change-Id: I342c9315fc31021fb1387bc0e409645cd7a99d6a
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125468
> Reviewed-by: Ben Konyi <bkonyi@google.com>
> Commit-Queue: Ryan Macnak <rmacnak@google.com>
TBR=bkonyi@google.com,rmacnak@google.com,asiva@google.com
# Not skipping CQ checks because original CL landed > 1 day ago.
Change-Id: I38b92a5a50955983369f4de7afb577d1a959e724
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/126360
Reviewed-by: Ben Konyi <bkonyi@google.com>
Setting the `enableTimelineLogging` property of `HttpClient` to true results in
timeline events being created for HTTP connections and HTTP requests.
Timeline events contain general connection information, including:
- Request type
- Status code
- Request / response headers
- Cookies
- Non-sensitive proxy information
- Relevent error messages for failed connections
Change-Id: Ibe16a312ab5398c9ae886ea07bea5ca70b63e440
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/123540
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Removes support for accumulators, which now repeat the current live values.
Decreases performance difference between release and product modes.
Fixes inaccuracy when counters are queried before the first full GC.
Golem geomean x64 4.687%
Golem geomean arm64 5.770%
Bug: https://github.com/dart-lang/sdk/issues/37678
Change-Id: I12b26a9834b0f0f911ddcc6e8e5ff4573272607d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116885
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>