Commit graph

120 commits

Author SHA1 Message Date
Ben Konyi be58178acf [ VM ] Skip breakpoint_on_simple_conditions_test on AOT configurations
TEST=N/A

Change-Id: I326d4373d19549c88cb4e257a9d2638d062c7593
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213562
Reviewed-by: Ben Konyi <bkonyi@google.com>
2021-09-16 17:00:27 +00:00
Ben Konyi c51f885613 [ Debugger ] Allow for setting breakpoints on conditional statements
with simple boolean conditions

Fixes https://github.com/flutter/devtools/issues/3289

TEST=runtime/observatory/tests/service/breakpoint_on_simple_conditions_test.dart

Change-Id: I5ed0b78b4e462615d0d0c7dff1581b38dcf00aee
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213421
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2021-09-16 16:12:17 +00:00
Jens Johansen 48d8225b17 [VM] [CFE]: Expression compilation inside extension method
This CL handles expression compilation inside extension methods better.
It is now possible to evaluate "this" and other methods defined in the
extension.

https://github.com/dart-lang/sdk/issues/46757

TEST=service tests added.

Change-Id: I3c71eb23117e26b01961f32103f4046f0b537976
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/212286
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Anna Gringauze <annagrin@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2021-09-10 12:02:57 +00:00
Daco Harkes 2816eba69e [gardening] Skip complex_reload_test
Bug: https://github.com/dart-lang/sdk/issues/47130

TEST=disables failing/flaky test

Change-Id: Idf91a4a654ecd52dbeec3271750c61f18aafeab5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/212589
Auto-Submit: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2021-09-07 20:05:14 +00:00
Martin Kustermann 9615af4635 [vm] Cleanup some workaround due to native extensions (which got removed)
Now that support for native extensions (aka dart-ext:*) has been
removed, the kernel loader is guaranteed not to call out to embedder
anymore (it did so before for loading shared libraries).

This allos us to clean up some code as well as extend the scope of our
NoActiveIsolateScope.

TEST=ci

Change-Id: I5c8c9ee47298fdd316583ba3aed74772c1c7783f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/212296
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2021-09-03 10:55:37 +00:00
Ben Konyi e96a0c6bea [ Observatory ] Ignore unsafe_html lint in Observatory source
TEST=N/A

Change-Id: I62107603c15517b48f5b6965b3ad5af559517849
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/212140
Reviewed-by: Gary Roumanis <grouma@google.com>
2021-09-01 20:47:33 +00:00
Ryan Macnak baa1ebb377 [vm, compiler] Fix incorrect register save in breakpoint stub.
Bug introduced in 1e24fe7d69.

Symbolize stub frames.

TEST=ci
Bug: https://github.com/dart-lang/sdk/issues/47039
Change-Id: Ida3535a01923085cd48a2801ed9b868bfef7418b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/212026
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2021-08-31 23:56:36 +00:00
Liam Appelbe 011068f824 [ VM / Service ] Add reportLines flag to getSourceReport RPC
Every known user of the coverage report just wants the line numbers. At
the moment they have to do a second RPC to get the Script object, so
they can translate the token positions into line numbers.

Slower test times with coverage are usually caused by the extra time it
takes to run the RPCs. So reporting the line number directly will halve
the time it takes to get coverage, for most users.

Bug: https://github.com/flutter/flutter/issues/86722
Change-Id: I7b8d436669713ebc7b7096790a02593b9cb94dda
TEST=CI
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/211081
Commit-Queue: Liam Appelbe <liama@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2021-08-26 18:42:58 +00:00
Clement Skau 574061d3b8 [vm] Skip get_vm_timeline_rpc_test
TEST=This CL skips a test that times out and OOM.

Cq-Include-Trybots: luci.dart.try:app-kernel-linux-debug-x64-try
Change-Id: I99bd5e00e1dae672a252e932cd5501b2ac933019
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/211401
Reviewed-by: William Hesse <whesse@google.com>
2021-08-26 15:34:17 +00:00
Ben Konyi c7fe9ada2f Reland "[ package:dds ] Add support for caching CPU samples based on UserTag"
This reverts commit ada4278fd5.

TEST=pkg/dds/test/get_cached_cpu_samples_test.dart

Change-Id: I771410c8647fc1eb721c5aeb325c7a595430435c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/209120
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2021-08-25 00:04:04 +00:00
Ben Konyi 87015522a3 Skip regress_46419_test on AOT configurations
The debugger isn't supported in AOT runtimes

TEST=N/A

Change-Id: Ib28f9397506581c824ec5e95ef387da756bb7929
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/211043
Reviewed-by: Siva Annamalai <asiva@google.com>
2021-08-24 16:45:58 +00:00
Ben Konyi cd1f4c4560 [ Debugger ] Fix issue where breakpoint could be resolved within an
unrelated synthetic function

Fixes https://github.com/dart-lang/sdk/issues/46419

TEST=regress_46419_test.dart + service test suites

Change-Id: Ibd9e1c533afe5503b05c3efe466e5f8fd4c77f06
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/210946
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2021-08-24 16:02:17 +00:00
Martin Kustermann 709f87e7f3 [gardening] Attempt to fix flakily timing out service{,_2}/get_vm_timeline_rpc_test
We launch the subprocess with --complete-timeline which will collect and
buffer all timeline events in-memory. This works ok if we don't have too
many events and if we have enough memory.

On ia32 in particular the JIT's kernel-service runs from kernel file
(not from an app-jit trained snapshot). That means it's slow and
possibly produces many more timeline events since kernel-service isolate
has to JIT all of the CFE in order to compile the test script.

On ia32 we only have 2 or 3 GB of memory available. So this could lead
to OOMs to due the timeline buffer getting too large.

(See issue below for more information)

This is an attempt to fix that by first compiling the testee to kernel,
so the subprocess can be run immediately from kernel instead of first
needing to compile via CFE.

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

TEST=Tries to make flakily timing out less flaky.

Change-Id: I46a674ce7a8c44a716a543c73703d40f690f396e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/210723
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Tess Strickland <sstrickl@google.com>
2021-08-20 15:56:24 +00:00
Ryan Macnak d9048340ba [vm, service] Include each isolate a separate synthetic object in heap snapshots.
Fix labels for sentinel, transition_sentinel, ImmutableArray, LinkedHashMap and LinkedHashSet.

Display unlimited children when look at successors, as the worst case is the size of the field table. For predecessors and dominators, the worst case is the whole heap.

TEST=ci
Change-Id: I6fcfdfb0833d58c9ac4f586b823244d817aeba27
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/209841
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2021-08-17 16:49:32 +00:00
Ben Konyi bfff8613b7 [ VM / Service ] Add function signature, type parameter information to the service protocol
Allows for function objects to be displayed in an understandable fashion
in developer tooling (e.g., a DevTools program structure inspector).

Also adds 'implicit' property to @Function which specifies whether or not a function was defined implicitly (e.g., getter/setter).

TEST=service/get_object_rpc_test.dart

Change-Id: I2da1aa15c58635046b905e205bfd29d654bbde2f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/203200
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2021-07-23 01:20:25 +00:00
Ben Konyi 4c9e322dd4 [ VM / Service ] Allow for CpuSamples to be streamed when samples are about to be overwritten.
TEST=pkg/vm_service/test/cpu_samples_stream_test.dart

Change-Id: I1fcb49b6a79cde725a1f0622d1327b9a86165ae9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/206920
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2021-07-16 20:50:58 +00:00
Martin Kustermann 627292bcc0 [vm] Remove --experimental-enable-isolate-groups-jit, only guard via --enable-isolate-groups
The JIT support has progressed and is no longer unstable. We'll
therefore remove the experimental flag and rely on the same
--enable-isolate-groups flag as in AOT mode.

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

TEST=Existing test suite.

Change-Id: Iff0dd5b64d9b6ab91ad9ffc0ae445efc802d3908
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/207122
Auto-Submit: Martin Kustermann <kustermann@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
Commit-Queue: Slava Egorov <vegorov@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2021-07-16 09:13:28 +00:00
Ben Konyi 3a4b3514bc [ VM / Service ] Add UserTag support to C-API and send UserTagChanged
events on Developer stream.

Also removes intrinsic implementations for UserTag_makeCurrent to allow
for service events to be sent on UserTag change.

TEST=DartAPI_UserTags,pkg/vm_service/test/user_tag_changed_test.dart

Change-Id: I5dc9ee77c0048590d3c6e33a652eee5bc3bf522a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204440
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2021-06-23 00:58:47 +00:00
Ben Konyi 2552ed0114 [ VM / Service ] Export list of show/hide names through LibraryDependency object
Fixes https://github.com/dart-lang/sdk/issues/46221

TEST=pkg/vm_service/test/library_dependency_test.dart

Change-Id: I5b0f63c0cc76ba3b2e507644fc1bfc33a961f656
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/203447
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2021-06-15 17:46:23 +00:00
Martin Kustermann bf77ce52db [vm] Take advantage of FunctionInvocation.kind to detect non-dynamic closure calls
The Incremental Kernel Compiler (IKG) will produce kernel files without
metadata.

Right now the VM will make all closure calls dynamic calls if the
call-site attribute metadata is not present. This causes closure code
to run significantly slower due to dyn:call forwarders and the type
checks it will perform.

This change takes - in addition to the metadata - the new
FunctionInvocation.kind into account - which also tells us whether a
function invocation is based on a real function type.

Fixes https://github.com/dart-lang/sdk/issues/46320
Fixes https://github.com/dart-lang/sdk/issues/45421

TEST=vm/cc/StreamingFlowGraphBuilder_TypedClosureCall

Change-Id: Ie1136c3727fc8b5e3e3b9822a1db9479fa9da689
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/203302
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
2021-06-14 13:42:23 +00:00
Jens Johansen 13a17e3d56 [test] Skips get_...ion_on_internal_test in app_jitk
Skip get_instances_as_array_rpc_expression_evaluation_on_internal_test.
No incremental compiler available in app_jitk.

Follow-up to https://dart-review.googlesource.com/c/sdk/+/202766
and https://dart-review.googlesource.com/c/sdk/+/202969.

Hopefully this is the last one :)

TEST=service{,_2}/

Change-Id: Ia74c9a2d7a3d4e7e4dfcd8bd813f02f75e9d4d1c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/203221
Reviewed-by: Jens Johansen <jensj@google.com>
2021-06-10 09:07:04 +00:00
Jens Johansen 5ab8b393e0 [test] Skips get_...ion_on_internal_test in dartkp
Skip get_instances_as_array_rpc_expression_evaluation_on_internal_test.
Debugger is disabled in AOT.

Follow-up to https://dart-review.googlesource.com/c/sdk/+/202766.

TEST=service{,_2}/

Change-Id: I2a77d9c1b9b4b45888377501b8aeb712093bebf5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202969
Reviewed-by: Jens Johansen <jensj@google.com>
2021-06-10 07:55:48 +00:00
Jens Johansen 834a98dd07 [VM/service] Return after error to avoid invalid json
Trying to evaluate an expression on some internal VM stuff one should
get an error, but instead gets a FormatException because the VM sends
invalid json.
This CL fixes that by returning after the error.
A test that previously got the exception is also added.

TEST=Test added.

Change-Id: Idc9332b6ee1eb3e6fc37145b28967056e5df6882
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202766
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2021-06-10 07:03:49 +00:00
Ben Konyi fa5da6a944 [ VM / Service ] Move sourceLocation property to reference objects for Class, Function, and Field.
Token position and script reference information are cheap to provide and
make it possible to tie objects to scripts without requiring additional
requests for full objects.

TEST=Existing

Change-Id: I917714149a72a53081fee5626ccad858e86f5313
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201864
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2021-06-02 22:18:32 +00:00
Alexander Thomas 7baeabe0e4 [testing] Rely on language versions in the analyzer tests
https://github.com/dart-lang/co19/issues/1090

TEST=Standard tryjobs, all changes are in test code only.

Change-Id: Ie73174447ab165827335652cf035f85b7510ab55
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201564
Commit-Queue: Alexander Thomas <athom@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2021-06-02 07:47:46 +00:00
Alexander Markov 88021fd67a [vm] Enable new kernel AST invocation nodes for the VM, take 2
This change was already reviewed at
https://dart-review.googlesource.com/c/sdk/+/197586.

Bugfix is in the separate change:
https://dart-review.googlesource.com/c/sdk/+/199365.

TEST=ci

Issue: https://github.com/dart-lang/sdk/issues/45340
Change-Id: I4311909e4893af53e88895512f03d3ef84c6bc5f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/199366
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2021-05-20 18:53:45 +00:00
Clement Skau 6523c58119 [vm/debugger] Adds pragma support for func. decl.
This fixes issue #45710 by adding support for pragma
annotations on local functions which are lazily created
via the flow graph builder (as opposed to the kernel loader).

TEST=Added regression test to notify_debugger_on_exception_test.dart

Bug: https://github.com/dart-lang/sdk/issues/45710, https://github.com/dart-lang/sdk/issues/45987
Change-Id: I13f2f8d2b7d05ea1cb423c142537789e99a919d3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/199420
Commit-Queue: Clement Skau <cskau@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2021-05-18 06:12:03 +00:00
Martin Kustermann 31364331e9 Revert "[vm] Enable new kernel AST invocation nodes for the VM"
This reverts commit 53e3c079b7.

Reason for revert: This change has seemingly caused errors of the form
```
stderr >> Unhandled exception:
stderr >> Invalid argument(s): Missing canonical name for Reference to <XXX>
stderr >> #0      BinaryPrinter.writeNullAllowedReference (package:kernel/binary/ast_to_binary.dart:894:9)
stderr >> #1      BinaryPrinter.visitTypedefType (package:kernel/binary/ast_to_binary.dart:2410:5)
stderr >> #2      TypedefType.accept (package:kernel/ast.dart:11115:42)
stderr >> #3      BinaryPrinter.writeNode (package:kernel/binary/ast_to_binary.dart:403:10)
stderr >> #4      BinaryPrinter.writeOptionalNode (package:kernel/binary/ast_to_binary.dart:496:7)
```

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

Original change's description:
> [vm] Enable new kernel AST invocation nodes for the VM
>
> TEST=ci
>
> Issue: https://github.com/dart-lang/sdk/issues/45340
> Change-Id: Ibb307d8df8ff4ae8f2efad177880634ec9e27905
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/197586
> Commit-Queue: Alexander Markov <alexmarkov@google.com>
> Reviewed-by: Johnni Winther <johnniwinther@google.com>
> Reviewed-by: Aske Simon Christensen <askesc@google.com>

TBR=vegorov@google.com,alexmarkov@google.com,johnniwinther@google.com,askesc@google.com

Change-Id: I05d010378cfcc5ba40f2be58b01b3ed27a8fc31e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Issue: https://github.com/dart-lang/sdk/issues/45340
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/199000
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2021-05-10 12:32:38 +00:00
Clement Skau 7cc165bce5 [test] Skips notify_debugger_.._yielding_test in dartkp
Debugger is disabled in AOT.

TEST=service{,_2}/

Bug: https://github.com/dart-lang/sdk/issues/45944
Change-Id: I171b304a718535dece348ef190a5b1400603f086
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/198761
Auto-Submit: Clement Skau <cskau@google.com>
Commit-Queue: Clement Skau <cskau@google.com>
Reviewed-by: Tess Strickland <sstrickl@google.com>
2021-05-10 09:10:29 +00:00
Alexander Markov 53e3c079b7 [vm] Enable new kernel AST invocation nodes for the VM
TEST=ci

Issue: https://github.com/dart-lang/sdk/issues/45340
Change-Id: Ibb307d8df8ff4ae8f2efad177880634ec9e27905
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/197586
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
2021-05-09 21:00:28 +00:00
Robert Nystrom 7363505cfb Remove support for ancient multitest marker syntax.
TEST=fixing tests

Change-Id: I0857ff9275b4b915e0b79824c7e16f4d07c8a239
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/198445
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
2021-05-06 22:36:04 +00:00
Clement Skau 69ebb404e7 [vm/debugger] Fix notify-debugger-.. for yielding.
For yielding functions (async, sync*, async*) we need to look for
annotations on the outer function instead of the synthetic inner
function associated with the handler frame.

Fixes https://github.com/dart-lang/sdk/issues/45673

TEST=runtime/observatory{,_2}/tests/service{,_2}/notify_debugger_on_exception_yielding_test.dart

Bug: https://github.com/dart-lang/sdk/issues/45673
Change-Id: I8b1718b3614852f6f8db98811177b21fe587fea1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/198408
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Clement Skau <cskau@google.com>
2021-05-06 17:59:33 +00:00
Alexander Markov 869b007e9f [vm/service] Fix service/bad_reload_test
The test was incorrectly assuming the format of response for the
failed hot-reload and that expression evaluation can be performed
on top of the failed hot reload.

Fixes https://github.com/dart-lang/sdk/issues/44976
Fixes https://github.com/dart-lang/sdk/issues/43514

TEST=service/bad_reload_test
Change-Id: Iac9109371e2bc0b89e7c26ab008e0a174ecb754a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196984
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2021-04-26 23:31:27 +00:00
Ryan Macnak 494e5b0380 [build] Remove expensive use of make_version.py for unused OBS_VER.
TEST=ci
Bug: https://github.com/flutter/flutter/issues/81074
Change-Id: I6e06e21d358fd4aafd37960803269796d2e62753
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196983
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2021-04-26 22:51:08 +00:00
Ben Konyi 493560a419 [ VM ] Disable sdk_break_with_mixin_test on AOT bots
Fixes https://github.com/dart-lang/sdk/issues/45781

TEST=N/A

Change-Id: I3a624078183eaa2bc283bd9f2363b65dfdf781d2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196341
Reviewed-by: Ben Konyi <bkonyi@google.com>
2021-04-21 16:59:04 +00:00
Vyacheslav Egorov f88ce677e1 [vm/debugger] Avoid treating a try/finally as a catch
There is a synthetic try/catch within a try/finally block.

When trying to assess whether an exception is caught, the debugger
should skip such generated try/catch blocks. Otherwise, it considers
that try/finally actually handles the exception, which is wrong.

Fixes https://github.com/dart-lang/sdk/issues/45684

TEST=runtime/observatory{,_2}/tests/service{,_2}/regress_45684_test.dart

Change-Id: I60e8837204cf97ee1ab02ffd03364e7f69857004
Fixed: 45684
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196124
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2021-04-20 23:14:38 +00:00
Ben Konyi 302e42da44 [ VM / Service ] Allow for resolving breakpoints in multiple Script
objects

It's possible for scripts to appear in multiple components provided by
the front end in certain situations (e.g., mixin applications in
different libraries). Previously when trying to set a breakpoint, if
multiple scripts were found matching the target URI the debugger would
give up and not set the breakpoint.

This change allows for multiple Scripts to be associated with a
BreakpointLocation.

Fixes https://github.com/flutter/flutter/issues/66832

TEST=runtime/observatory_2/tests/service_2/sdk_break_with_mixin_test.dart

Change-Id: I935721f4753675a9a2051a71cc1720e590f8d4f6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/195664
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2021-04-20 22:34:38 +00:00
Alexander Thomas b5c63ce757 [infra] Migrate scripts to python3
* Migrate to python3; drop python support.
* Update Windows toolchain support.
* Remove some unused methods.
* Python 2.7 is still needed on Windows.
* Update gsutil to a version that supports python3.

Fixes: https://github.com/dart-lang/sdk/issues/28793

TEST=Manually tested common user journeys.

Change-Id: I663a22b237a548bb82dc2e601e399e3bc3649211
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/192182
Reviewed-by: William Hesse <whesse@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2021-04-15 10:10:20 +00:00
Ryan Macnak e67dd9c2c5 Reapply "[vm, service] Gather used and capacity from various mallocs."
Avoid weak linking on iOS.

TEST=ci
Change-Id: Iafcb5bfdea0520d50363486e67031e1d5302d32b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/161461
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2021-04-14 21:50:31 +00:00
Ryan Macnak f54bb55244 Reland "[vm, service, observatory] Add ability to retrieve the set of all instances of a class, implementation hierarchy or interface hierarchy as an array."
Filter Class::direct_subclasses/implementors_ to remove tree-shaken classes.

TEST=ci, manual UI interaction
Bug: https://github.com/dart-lang/sdk/issues/45564
Change-Id: Ia2a46e9701745ce88dffa95a86b7756f3ab0921d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194110
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2021-04-14 19:40:20 +00:00
Martin Kustermann 3f7614f56f [gardening] Skip service tests that require expression evaluation in AppJIT
In AppJIT mode we run from a snapshot and won't have an incremental
compiler available. That also means expression evaluation is not
supported.

The specific test that was failing was

  service_2/evaluate_activation_in_method_class_test/service

though this CL skips all evaluation tests.

The CL also align the service and service_2 status files more.

TEST=Only updates status file to skips tests.

Change-Id: I8dbb3aeeb686370d898c59da3729f5e0c52df411
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194685
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2021-04-09 09:58:43 +00:00
Ryan Macnak fb181e87b9 [vm, service] Fill in more field names in retaining paths.
TEST=manual, runtime/observatory/tests/ui/inspector.dart
Bug: https://github.com/flutter/flutter/issues/79605#issuecomment-814342601
Change-Id: I1532dff15620835805cd2a8e9ddab693864f6eb4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194112
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2021-04-07 23:05:58 +00:00
Ben Konyi d18d3d837f [ dart:developer ] Add serverWebSocketUri to ServiceProtocolInfo
Adds a convenience getter to ServiceProtocolInfo which transforms the VM
Service HTTP URI into a valid web socket URI that can be used to connect
to the VM service.

Fixes https://github.com/dart-lang/sdk/issues/42968.

TEST=runtime/observatory/tests/service/developer_server_control_test.dart

Change-Id: Ib15de1f1a9b26ac5cf45f55a53014761a6fa7900
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194209
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
2021-04-07 20:02:17 +00:00
Ben Konyi 2a2d83e9e9 [ VM / Service ] Add support for enabling/disabling breakpoints
This change adds a `setBreakpointState` RPC which allows for breakpoints
to be enabled or disabled without needing to remove and recreate
breakpoints.

Fixes https://github.com/dart-lang/sdk/issues/45336.

TEST=set_breakpoint_state_test.dart

Change-Id: I1a04e6028d4e4560fdb8d3d26420c9a05da06b4b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193896
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2021-04-06 22:16:06 +00:00
Alexander Aprelev abdca81fa0 Revert "[vm, service, observatory] Add ability to retrieve the set of all instances of a class, implementation hierarchy or interface hierarchy as an array."
This reverts commit 170bda2b74 as it breaks ffi test.

See https://github.com/dart-lang/sdk/issues/45564

TEST=rollback

Change-Id: Ie27cfa7c3bc093c1e8d46722942d1f2e5e3cb77e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193882
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2021-04-02 16:46:11 +00:00
Ryan Macnak 170bda2b74 [vm, service, observatory] Add ability to retrieve the set of all instances of a class, implementation hierarchy or interface hierarchy as an array.
Allows developers to perform arbitrary filtering or analysis of instances, such as finding the largest strings, degreeses of duplication, histograms of various properties, etc.

TEST=ci
Bug: https://github.com/dart-lang/sdk/issues/44479
Change-Id: I0b4005b5778038945e5f1b2d7858806c8e0dbbff
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/176381
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2021-04-01 20:53:22 +00:00
Ben Konyi 0ab30e584b [ Service ] Mark pause_on_exception_from_slow_path_test as Slow
TEST=N/A

Change-Id: I570d977a84e60c478e08e933abf184a227231d05
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193441
Reviewed-by: Siva Annamalai <asiva@google.com>
2021-03-29 16:45:06 +00:00
Ben Konyi 3b76190e02 [ Service ] Skip sigquit_starts_service_test on AppJIT configurations
TEST=N/A

Change-Id: If118d8254b1f918306723e7677680fffefe836e4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193060
Reviewed-by: Ben Konyi <bkonyi@google.com>
2021-03-25 17:02:31 +00:00
Ben Konyi 45c4f589a1 [ Service ] Skip sigquit_starts_service_test on precompiled and simarm
configurations

TEST=N/A

Change-Id: I286abb3e76aab0019fe838b65097b2d07651b52b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/192950
Reviewed-by: Ben Konyi <bkonyi@google.com>
2021-03-25 01:20:52 +00:00
Ben Konyi 4faadf1bdd [ VM / Service ] Fixed Observatory URI not being printed when service is
started via SIGQUIT

Fixes https://github.com/dart-lang/sdk/issues/45283

TEST=service/sigquit_starts_service_test.dart

Change-Id: I4e7b818d60b18e0a3bc2ce4cea670accf4bbd115
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/192604
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2021-03-24 23:59:23 +00:00