Commit graph

15880 commits

Author SHA1 Message Date
Ben Konyi e6887536aa [ VM ] Ignore contexts which have been optimized out during stack overflow checks
Fixes https://github.com/dart-lang/sdk/issues/38182

Change-Id: I2b042b9a320e16fc88bee6ea2c0c93598e574c00
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115880
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Aart Bik <ajcbik@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2019-09-12 01:20:05 +00:00
Alexander Aprelev dabfda5770 Revert "[vm/compiler] Check def/use relation for PushArguments in environment."
This reverts commit 88e94994b1 as it breaks flutter:

```
[ +192 ms] executing: $FH/engine/src/out/ios_profile_arm/clang_x64/gen_snapshot --causal_async_stacks
--deterministic --snapshot_kind=app-aot-elf --elf=build/aot/app.so --strip --no-sim-use-hardfp
--no-use-integer-division build/aot/app.dill
[+12798 ms] ===== CRASH =====
[   +1 ms] si_signo=Segmentation fault: 11(11), si_code=1, si_addr=0x28
[        ] version=2.6.0-dev.0.0.flutter-88e94994b1 (Wed Sep 11 12:00:07 2019 +0000) on "macos_simarm"
[        ] thread=775, isolate=isolate(0x7fe116011200)
[        ]   pc 0x000000010afd1970 fp 0x00007ffee4e6cc30

dart::AotCallSpecializer::TryExpandCallThroughGetter(dart::Class const&, dart::InstanceCallInstr*)
[        ]   pc 0x000000010afd0ee0 fp 0x00007ffee4e6ccf0
dart::AotCallSpecializer::VisitInstanceCall(dart::InstanceCallInstr*)
[        ]   pc 0x000000010b047199 fp 0x00007ffee4e6cd30 dart::FlowGraphVisitor::VisitBlocks()
[        ]   pc 0x000000010b0f9e32 fp 0x00007ffee4e6cd50
dart::CompilerPass_ApplyICData::DoBody(dart::CompilerPassState*) const
[        ]   pc 0x000000010b0f8d84 fp 0x00007ffee4e6cde0 dart::CompilerPass::Run(dart::CompilerPassState*) const
[        ]   pc 0x000000010b0f8fc1 fp 0x00007ffee4e6ce00
dart::CompilerPass::RunInliningPipeline(dart::CompilerPass::PipelineMode, dart::CompilerPassState*)
[        ]   pc 0x000000010b0a3280 fp 0x00007ffee4e6d2f0 dart::CallSiteInliner::TryInlining(dart::Function const&,
dart::Array const&, dart::InlinedCallData*, bool)
[        ]   pc 0x000000010b0af278 fp 0x00007ffee4e6d3d0 dart::CallSiteInliner::InlineStaticCalls()
[        ]   pc 0x000000010b0aa115 fp 0x00007ffee4e6d4e0 dart::CallSiteInliner::InlineCalls()
[        ]   pc 0x000000010b0a9d01 fp 0x00007ffee4e6d5d0 dart::FlowGraphInliner::Inline()
[        ]   pc 0x000000010b0f9fdf fp 0x00007ffee4e6d640
dart::CompilerPass_Inlining::DoBody(dart::CompilerPassState*) const
[        ]   pc 0x000000010b0f8d84 fp 0x00007ffee4e6d6d0 dart::CompilerPass::Run(dart::CompilerPassState*) const
[        ]   pc 0x000000010b0f9271 fp 0x00007ffee4e6d700
dart::CompilerPass::RunPipeline(dart::CompilerPass::PipelineMode, dart::CompilerPassState*)
[        ]   pc 0x000000010afde14e fp 0x00007ffee4e6dd00
dart::PrecompileParsedFunctionHelper::Compile(dart::CompilationPipeline*)
[        ]   pc 0x000000010afdf725 fp 0x00007ffee4e6ded0 dart::PrecompileFunctionHelper(dart::Precompiler*,
dart::CompilationPipeline*, dart::Function const&, bool)
[        ]   pc 0x000000010afdb95c fp 0x00007ffee4e6df80 dart::Precompiler::CompileFunction(dart::Precompiler*,
dart::Thread*, dart::Zone*, dart::Function const&)
[        ]   pc 0x000000010afda83d fp 0x00007ffee4e6dfe0 dart::Precompiler::ProcessFunction(dart::Function const&)
[        ]   pc 0x000000010afd7294 fp 0x00007ffee4e6e010 dart::Precompiler::Iterate()
[        ]   pc 0x000000010afd5274 fp 0x00007ffee4e6e1c0 dart::Precompiler::DoCompileAll()
[        ]   pc 0x000000010afd4ddc fp 0x00007ffee4e6e570 dart::Precompiler::CompileAll()
[        ]   pc 0x000000010b200102 fp 0x00007ffee4e6e630 Dart_Precompile
[        ]   pc 0x000000010ad939cc fp 0x00007ffee4e6e7d0 dart::bin::main(int, char**)
[        ]   pc 0x00007fff5ae163d5 fp 0x00007ffee4e6e7e0 start
[        ] -- End of DumpStackTrace
[   +1 ms] Dart snapshot generator failed with exit code -6
```
Change-Id: I609493026eeed1fbe68adc9aa52a5b872d08bca0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116888
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2019-09-12 01:03:36 +00:00
Régis Crelier 596a4ab14d [vm/bytecode] No need to set breakpoints in bytecode if interpreter is not used.
Breakpoints are still set in compiled bytecode.
When the interpreter is used, breakpoints are set in both interpreted and
compiled bytecode, as before.
This fixes service/breakpoint_async_break_test in app-jit mode.

Change-Id: Ia60f6f99497821b476b664fe8b86ee4aa15748a6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116840
Commit-Queue: Régis Crelier <regis@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2019-09-12 01:01:35 +00:00
Alexander Aprelev 0c481a196c Revert Reland '[vm/ffi] Implement FFI callbacks on AOT for ELF and Asm snapshots (excl. blobs).' as it breaks flutter profile execution on ios 32-bit platform.
Fixes https://github.com/flutter/flutter/issues/40114

Change-Id: If8d71e9c19c2e794d29f7ecbacb87457890a2fd5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116883
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2019-09-12 00:10:09 +00:00
Alexander Markov 586869c3f6 [vm/bytecode] Fix iteration of bytecode local variables
Previously, BytecodeLocalVariablesIterator::IsDone() returned true
when iterator was standing at the last entry.
As a result, if the last entry is a scope without variables, then it was
ignored and bytecode flow graph builder would not get a correct context
level for that scope.

The fix is for IsDone() to return true only after stepping past the last
entry.

Fixes service/async_generator_breakpoint_test/1 with bytecode.

Change-Id: I768eec9a0e43342cc0f155a6c35cb3de50f3d14a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116880
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2019-09-11 23:46:29 +00:00
Felicitas Hetzelt c8e389ff62 [vm/fuzzer] List versions for each git commit
Rationale:
Go through all git commits and list dartfuzz versions.
Change-Id: I2d6ac23fcff51631a40a97bb53289fd60e65000c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116747
Reviewed-by: Aart Bik <ajcbik@google.com>
Commit-Queue: Felicitas Hetzelt <felih@google.com>
2019-09-11 22:54:29 +00:00
Alexander Markov 315e9c13f5 [gardening] Avoid --deterministic in regress_merge_blocks_with_phis_test
regress_merge_blocks_with_phis_test test uses --deterministic and
low optimization counter threshold which considerably slows it down
and causes timeouts on vm-kernel-win-debug-x64 bot.
This test verifies compilation in OSR case, which doesn't involve
background compilation, so it doesn't need --deterministic.

Verified that the original problem (fixed in https://dart.googlesource.com/sdk/+/5999cd983801c6fc0c4c11f9263236470f569e9a)
still reproduces on this regression test after removing --deterministic.

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

Change-Id: I97ad08121e9864e7d52e4373c7d7fd8bc72e72c3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116745
Reviewed-by: Aart Bik <ajcbik@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2019-09-11 21:54:59 +00:00
Ryan Macnak fb2e6c6d0d [test] Remove non-kernel versions of service tests.
Change-Id: I3b849e5af72a021208836d98e251d771740c80dd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116553
Reviewed-by: Régis Crelier <regis@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2019-09-11 16:55:47 +00:00
Clement Skau a7e71c3351 [test] Fixes run_appended_aot_snapshot_test in precompiled mode.
Change-Id: I883f3f4cc82df6c591d7c0dec8c71645467c193d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116766
Commit-Queue: Clement Skau <cskau@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2019-09-11 16:46:38 +00:00
Teagan Strickland 88e94994b1 [vm/compiler] Check def/use relation for PushArguments in environment.
Fix an AOT call specialization that broke this relationship.

When printing environments in the FlowGraphPrinter, also print the
underlying value for any PushArguments.

Change-Id: I39803b7d995abac720702ea4b9d6a78fcbc45d4c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115981
Commit-Queue: Teagan Strickland <sstrickl@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2019-09-11 12:00:07 +00:00
Teagan Strickland 488a8ae69b [vm/compiler] Don't propagate non-constants as constants.
Change-Id: Icf56be9657c16596adfdd3083f1154c53933d10b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116524
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Teagan Strickland <sstrickl@google.com>
2019-09-11 11:19:57 +00:00
Clement Skau 46b58397f8 [Runtime] Adds appended blob runtime mode.
The Dart runtime will be able to load snapshot blobs appended at the end of
itself.
This is a step on the way to a self-contained native executable.

Tested:
  $ dart2aot hello_world.dart hello_world.aot
  $ <Some steps to hand-craft appended binary ..>
  $ dartaotruntime_plus_hello_world.bin
  Hello, world!

  python tools/test.py -n dartk-linux-debug-x64 vm/dart/run_appended_aot_snapshot_test

Change-Id: I79d5500c4e2668da31cf1d27145296d17470e04c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/112382
Commit-Queue: Clement Skau <cskau@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2019-09-11 10:56:57 +00:00
Ryan Macnak cbdbb464ca [vm] Repair fingerprinting of recognized methods.
Bug: https://github.com/dart-lang/sdk/issues/36376
Change-Id: I8102d5d10abc98e4410c16d0d08bf5015e459b46
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116481
Reviewed-by: Aart Bik <ajcbik@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2019-09-11 01:11:34 +00:00
Felicitas Hetzelt 1e9a065dad [vm/fuzzer] Restrict depth of ... operator
Rationale:
Causes bugs in compiler
Change-Id: I11039e0efa8ea97d576b7527554dc26499c492d8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116700
Commit-Queue: Felicitas Hetzelt <felih@google.com>
Reviewed-by: Aart Bik <ajcbik@google.com>
2019-09-11 01:08:54 +00:00
Felicitas Hetzelt a0fd607d10 [vm/fuzzer] add missing space
Change-Id: I39e4bf30a908a77dc96b2a1fb81f2251705de3be
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116543
Reviewed-by: Aart Bik <ajcbik@google.com>
Commit-Queue: Aart Bik <ajcbik@google.com>
2019-09-11 00:40:44 +00:00
Aart Bik 13ba681398 [vm/compiler] DIV/MOD magic for ARM64
Rationale:
Follow up on prior CL, now with the ARM64 version.
Unit tests were included in that previous CL.
(https://dart-review.googlesource.com/c/sdk/+/114901)

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

Change-Id: I6177b48743cd615914dbfbddab166a6c71ef71c7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115064
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Aart Bik <ajcbik@google.com>
2019-09-10 23:55:32 +00:00
Ryan Macnak 03b195164b Revert "[vm, snapshot] Use data image pages for kFull snapshots."
This reverts commit c8f3f132ad.

Revert "[vm] Fix CoreSnapshotSize and StandaloneSnapshotSize to account for the image page size."

This reverts commit 1d6ab52f38.

Bug: b/140791872
Change-Id: I34c42310e3ec4a09048967f34a0e1ddc6a67ea93
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116688
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2019-09-10 23:52:52 +00:00
Aart Bik 5303538a09 [vm/fuzzer] re-enable control flow collections
Rationale:
Let's stress test this feature again. Note
that this will increase the number of skipped
tests quite a bit since the CFE complains
about a lot of the generated constructs.
It is still TBD to find out if this is
in the grammar or in the FE.

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

Change-Id: Iec4bcb2aa9039f5b01293f82e3e156cc2e35414f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116663
Reviewed-by: Felicitas Hetzelt <felih@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Aart Bik <ajcbik@google.com>
2019-09-10 23:09:58 +00:00
Aart Bik 2305d9f3a6 [vm/compiler] Better be ready for OSR in field init
Rationale:
OSR was happening in a field initializer, but the kernel
binary flow graph builder assumed this never happened.
With regression test.

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

Change-Id: I91243b4422cac76ec7ee2460d466bd0e1cf608ee
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116558
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Aart Bik <ajcbik@google.com>
2019-09-10 22:17:22 +00:00
Régis Crelier 64360e9f1a [vm/bytecode] Do not expect _ClosureCall in interpreted async stack traces.
In interpreteted bytecode mode, _AsyncAwaitCompleterStart does not use
_ClosureCall to invoke the async_op function. Adjust expectations in debugger
when collecting async stack trace.
Refactor computation of try_index in interpreted mode.

Fixes service/pause_on_unhandled_async_exceptions_test in interpreted mode.

Change-Id: Id13c36e2616e55911f77eb4db2591861d337d24a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116556
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Régis Crelier <regis@google.com>
2019-09-10 21:52:38 +00:00
Felicitas Hetzelt ca7baa4013 [vm/fuzzer] Add virtual methods
Rationale:
Randomly overvwrite some methods of the parent in the child classes.
Change-Id: I64533c255915d3c1614ba41883ed6b5fd319c5c7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115009
Commit-Queue: Felicitas Hetzelt <felih@google.com>
Reviewed-by: Aart Bik <ajcbik@google.com>
2019-09-10 18:38:01 +00:00
Felicitas Hetzelt 2b966a9743 [vm/fuzzer] Fix reproduction output
Rationale:
Add space between fp and seed parameter. Check whether generate variable
is set in TestRunnerKBC.
Change-Id: I3f1b21b65e75286d2ca560d9fa8c05ed3e4e5f55
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116542
Reviewed-by: Aart Bik <ajcbik@google.com>
Commit-Queue: Felicitas Hetzelt <felih@google.com>
2019-09-10 18:30:51 +00:00
Ryan Macnak 7bbfd532de [vm, reload] Remove _getUnusedChangesInLastReload.
This function has been unused for a long time.

Also, computing fingerprints for bytecode function causes bytecode to be loaded, which can lead to an old enum class being initialized with enum values for the new enum class, causing a forwarding loop when migrating enum values.

Change-Id: Iad9b2bb11aaf161d66f7752cb99cc4b4fc9fb310
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116442
Reviewed-by: Régis Crelier <regis@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2019-09-10 17:36:24 +00:00
Martin Kustermann 300c3333d1 [gardening] Always tag class_id register on arm64 in subtype test cache stub
LoadClassById no longer tags class_id register as side-effect. This change
was missing for arm64 in ef9d699f.

Change-Id: I92278b01ec2211dc9be860c1a5386ecd4253fb0e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116526
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2019-09-10 15:34:46 +00:00
Martin Kustermann 6717bfe423 [vm/concurrency] Lock weak table to prepare for concurrent access.
Right now there is only one mutator working on a heap and it can
therefore access the heap's weak maps without locking. The GC is the
only other user of the weak maps and it accesses it within a safepoint
operation scope.

Once we move the heap to the isolate group there can be concurrent
accesses to the weak maps. As a preparation step this CL adds locking
around the non-GC API.

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

Change-Id: I84acce24612b12a7393154cab816f0eff9c7589a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116201
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2019-09-10 14:33:46 +00:00
Martin Kustermann 9357b48a8d [gardening] Use target::kWordSizeLog2 instead of kWordSizeLog2 on arm (fixes broken build)
Change-Id: I669387d5a8dbc13de0f94181065f871a46613589
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116523
Reviewed-by: Clement Skau <cskau@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2019-09-10 13:37:49 +00:00
Martin Kustermann ef9d699f07 [vm/concurrency] Move all information except for the class pointers out of [ClassTable] into [SharedClassTable]
This CL moves heap related information (namely instance sizes and
allocation stats) out of the [ClassTable] into a [SharedClassTable].
Both classes are always in sync (i.e. they have the same number of entries).

This CL also changes GC related code to start using the size information
from the new [SharedClassTable].

In a futher step we will move the heap as well as this shared class
table out of the [Isolate] and into [IsolateGroup].

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

Change-Id: Id54a89c9251ad3bbc13e60d32dc4f7bcc7f1d805
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116064
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2019-09-10 12:48:16 +00:00
Ben Konyi 62f78a7abb [nit] Fixes two typos: build flag and error string.
Change-Id: I0e0b7a8aeb113dc82177a8e1c9acd4c3e0b715ac
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115706
Commit-Queue: Clement Skau <cskau@google.com>
Reviewed-by: Clement Skau <cskau@google.com>
2019-09-10 11:31:46 +00:00
Dmitry Stefantsov ccb6ba948b [cfe] Gather constraints from both possibilities for FutureOr
Closes #37778.

Bug: http://dartbug.com/37778.
Change-Id: Ia8828c27ccc912831a0fea8a473c547184c99229
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115243
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
2019-09-10 09:50:30 +00:00
Régis Crelier 9fccb5120b [vm/bytecode] Fix clobbering of exception handler types in bytecode reader.
This fixes service/pause_on_unhandled_async_exceptions_test in compiled bytecode
mode, but not yet in interpreted bytecode mode.
Improve debugger verbosity.

Change-Id: I89e32179b0a3f043716d5117f958bf6a0de3ccac
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116483
Commit-Queue: Régis Crelier <regis@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2019-09-10 02:03:39 +00:00
Felicitas Hetzelt 424ef3646e [vm/fuzzer] Print steps to reproduce on divergence
Change-Id: I0bf112e42c3b1d2575fac89adab0462b0fe34ded
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116420
Reviewed-by: Aart Bik <ajcbik@google.com>
Commit-Queue: Felicitas Hetzelt <felih@google.com>
2019-09-10 00:35:54 +00:00
Alexander Markov 76bc894576 [vm/bytecode] Generate explicit DebugCheck for assignment to static field
Instead of always implying debugger stop at StoreStaticTOS bytecode,
bytecode generator now explicitly generates (or omits) DebugCheck bytecode.
This is needed to match behavior of AST flow graph builder of omitting
extra debugger stops when RHS expression is not trivial.

Fixes service/debugging_test with bytecode.

Change-Id: Id2e70998efb2a32a101fba4133ffa6a259ab1eb2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116443
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2019-09-09 23:24:09 +00:00
Alexander Aprelev 95db62d6a2 [vm/io] Return data right away if it's ready.
This fixes problem with directory watching on Windows where data might be accumulated before dart stream is setup.

Bug: https://github.com/dart-lang/sdk/issues/37909

Change-Id: I601842522e76e4a6a4e6a22d6b376a49af200e6f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115801
Reviewed-by: Zichang Guo <zichangguo@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2019-09-09 23:16:52 +00:00
Alexander Markov ef2a21ffd9 [vm/bytecode] Use local variable information when compiling from bytecode
This includes types and names of local variables.
Fixes vm/cc/IRTest_TypedDataAOT_FunctionalGetSet with bytecode.

Change-Id: I6130f19b4028f4930dbfcb282b90dd2ec4f963e1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116082
Reviewed-by: Régis Crelier <regis@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2019-09-09 19:23:16 +00:00
Alexander Markov c2e55a26bc [vm/bytecode] Cleanup support for old bytecode format versions before v10
Version 10 of bytecode format was introduced Jun 20 2019 in
da8cb470cc.

Change-Id: I9c895b101ad18b5fc62e8aa736b6811e73efba7a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116121
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2019-09-09 17:59:45 +00:00
Ryan Macnak 2e8d912848 [developer] Allow async end events to have independent arguments.
This matches the behavior in the Chrome and Fuchsia tracing macros.

Change-Id: I7e5759409af5262e6e2596384c67a2eb70d48cd2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/114545
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2019-09-09 17:00:47 +00:00
Ryan Macnak 09ce6d30e7 [vm, service] Remove _collectAllGarbage.
System.gc() considered harmful.

Change-Id: I227a092e7734176b55c269f4f611ef1d4293da99
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116044
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2019-09-09 16:56:27 +00:00
Alexander Markov 13a69b5631 [vm/bytecode] Replace ICData constant pool entries with DynamicCall
VM no longer relies on distinct ICData entries in constant pool, and
it no longer creates actual ICData objects.

This change introduces new DynamicCall constant pool entry which is
 * de-duplicated;
 * stores arguments descriptor inline instead of allocating a separate
   constant pool entry and referencing it by index;
 * reserves extra slot in constant pool (like other call constants), so
   we can eventually remove creation of extra UnlinkedCall objects.

Change-Id: I8d21954803ca5be5b6fc8335b700e8a9086245cf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116120
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2019-09-07 02:17:37 +00:00
Régis Crelier c0f49b05dd [vm/debugger] Pick the correct context async variable in bytecode frames.
Variable descriptors constructed from bytecode have all variables of
enclosing functions, even shadowed by the current function.
Pick the variable with the highest context level.

This fixes service/regress_28443_test.dart failure in bytecode mode.

Change-Id: Ifd0db566b5e74d29075ed17e91810ffe6953af77
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116140
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Régis Crelier <regis@google.com>
2019-09-07 01:08:19 +00:00
Ben Konyi 68dede011e [ VM / Service ] Add getCpuProfileSamples RPC which returns a minimally processed sample buffer.
Change-Id: Ic0a47d5eea692b235327622508d904f7396babe3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/112265
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2019-09-07 01:04:08 +00:00
Ryan Macnak 84db16381d [vm] Remove dead --load_deferred_eagerly and dependent code tracking for library prefixes.
Since Dart 2, library prefixes are always loaded eagerly on the VM.

Also remove reload check for deferred prefixes. This check was added to avoid behavior of library prefixes giving spurious "not loaded" errors after a reload, but now this error can never occur. Resolves a difference in reload between AST and bytecode modes, since bytecode mode isn't surfacing the deferred property.

Change-Id: Ide5fb6cac2efc90ca1b108a35bc09d342cbd60de
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116051
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
2019-09-06 23:37:33 +00:00
Ryan Macnak 1d6ab52f38 [vm] Fix CoreSnapshotSize and StandaloneSnapshotSize to account for the image page size.
Should have been part of c8f3f132ad.

Change-Id: I2a346f66490e6e97d846d4646ca7042be0b19cb2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116101
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2019-09-06 23:36:19 +00:00
Felicitas Hetzelt e1dc432102 [vm/fuzzer] Update rerun output and parser script
Change-Id: I893d54d04d6ac8ef7b8fa730b9d29a5e2783b27f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116052
Reviewed-by: Aart Bik <ajcbik@google.com>
Commit-Queue: Felicitas Hetzelt <felih@google.com>
2019-09-06 23:06:56 +00:00
Felicitas Hetzelt 254d0776d4 [vm/fuzzer] Fix bug where FFI caused dart crash
Rationals:
Default return values for FFI functions can not be negative.
Change-Id: I054522f473a601c239a262884ba9b779dc648772
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116049
Reviewed-by: Aart Bik <ajcbik@google.com>
Commit-Queue: Felicitas Hetzelt <felih@google.com>
2019-09-06 22:12:48 +00:00
Martin Kustermann f5c0e2e362 [vm/concurrency] Ensure instance size in class table is either 0 or the correct size
Until now it was possible to register classes with a default size (16 bytes on 64-bit)
and later on change the size for the cid.

This CL changes this to ensure the size information in the class table
for a given cid is either 0 or the final instance size (and adds an
ASSERT for it)

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

Change-Id: I94c61c6a1566c13dec7b9eb80c9ae0dadf0e6b6a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115861
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2019-09-06 22:06:30 +00:00
Alexander Markov 8ad0832bcb [vm/bytecode] Use static types of parameters when compiling from bytecode
Change-Id: Iefcad78db4bd05542ff5c05ebf298bfa6154810f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115773
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
Reviewed-by: Aart Bik <ajcbik@google.com>
2019-09-06 21:04:09 +00:00
Régis Crelier 6f4ceb887e [vm] Provide a couple more gdb helpers to print stack traces.
Use with caution.

Change-Id: Ic2a3055ede694406596596d57ba54909a6985cde
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116080
Commit-Queue: Régis Crelier <regis@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2019-09-06 19:25:31 +00:00
Felicitas Hetzelt e55a1e0f3a [vm/fuzzer] Add filter keywords to collect_data
Rationale:
If we see many duplicated errors, the filter keywords can be used to
remove these from the output.
Change-Id: I7cf5c035a92aad465aa4dbfec99a03b5a64ca69d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115820
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Aart Bik <ajcbik@google.com>
Commit-Queue: Felicitas Hetzelt <felih@google.com>
2019-09-06 18:41:30 +00:00
Felicitas Hetzelt c6a6add465 [vm/fuzzer] Count re-runs
Change-Id: Ia12c0eec966e93aec5210372dd294837cfc100ce
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115841
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Felicitas Hetzelt <felih@google.com>
2019-09-06 18:38:19 +00:00
Ryan Macnak c8f3f132ad [vm, snapshot] Use data image pages for kFull snapshots.
- Enables writing bytecode's PcDescriptors on when IA32 writes app snapshots.
 - Breaks word-size portability of kFull snapshots.

Change-Id: I896d104260593b146ad15e1845e391ae765e60e2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115341
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2019-09-06 18:24:19 +00:00