Commit Graph

388 Commits

Author SHA1 Message Date
Martin Kustermann 35b17f3730 [VM] Consistently use ValidationPolicy in frame iteration APIs
Previously there were places in the code where an API accepted a
`bool validate_frames` and call sites passed an enum value (which
implicitly got converted to a bool).

By changing the APIs to require an enum, the compiler will tell us if a
caller doesn't pass one.

Change-Id: I29fcd0b018e6cdd7e00b5bb03e83b9636d1345d4
Reviewed-on: https://dart-review.googlesource.com/57823
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
2018-06-04 14:46:26 +00:00
Ben Konyi e35ed9c749 [ VM / Build ] Added '--no-include-kernel-service' to build.py. By default, the kernel service is now included in all build modes, including product mode. Providing '--no-include-kernel-service' will build the specified configuration without the kernel service.
Change-Id: I682cd7c2895a9bcb215948615f2bdc627abe8d08
Reviewed-on: https://dart-review.googlesource.com/56286
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
2018-05-23 20:35:53 +00:00
asiva 02e47a9731 [VM] Fix for issue 32188 (cannot use pub with --preview-dart-2)
- Fix for 'unable to read .packages file' error when generating
  kernel file (script snapshot).
- Make sync-async an isolate specific flag and turn it off for
  the kernel isolate as it runs in Dart 1 mode
- Include 'reify-generic-functions' and 'sync-async' flags to the
  list of flags to check an app JIT snapshot against.

Change-Id: I2b16270f65705213660487f9c15fe0348fc84c8b
Reviewed-on: https://dart-review.googlesource.com/55589
Commit-Queue: Siva Annamalai <asiva@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
2018-05-18 18:12:08 +00:00
Régis Crelier 41fcbd097c [VM runtime] Initial version of Kernel Bytecode interpreter in VM runtime.
Not fully working yet, only x64, no gc, no frame walking, etc...

Change-Id: I4d8357f6d46371bf21c3d54266cfe26163e3c8dc
Reviewed-on: https://dart-review.googlesource.com/50021
Commit-Queue: Régis Crelier <regis@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2018-05-09 20:29:27 +00:00
Ryan Macnak 607f4f5769 [vm] Get more helpful errors from Dart_SetVMFlags and Dart_MakeIsolateRunnable.
Bug: https://github.com/flutter/flutter/issues/12939
Change-Id: I76ddf2a6d3bb3775637d2eef87c7875c650de0a4
Reviewed-on: https://dart-review.googlesource.com/29680
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2018-05-01 20:54:38 +00:00
Erik Corry c8ad75d44a [VM] Make classes movable in sliding compactor
Store class sizes off heap so we can determine the size
of their instances even while the classes are moving.

R=rmacnak@google.com

Change-Id: I7b935114f76eb8b6aaa57d65e5b7cc0070afa75f
Bug: https://github.com/dart-lang/sdk/issues/30978
Reviewed-on: https://dart-review.googlesource.com/52104
Commit-Queue: Erik Corry <erikcorry@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2018-04-26 09:38:25 +00:00
Ryan Macnak d9c3190e44 [vm] Remove some bin -> vm includes.
Change-Id: Id304de9618a299a201b946a901a54352772f56fb
Reviewed-on: https://dart-review.googlesource.com/48704
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2018-03-28 23:16:09 +00:00
Ryan Macnak 3f40488ec4 [vm, isolate] Refactor isolate message snapshotting to centralize construction of the Message.
Remove unused special case in ApiMessageWriter for lists of int.

This is in preparation for ensuring we always free any external data that ends up in an isolate message.

Bug: https://github.com/dart-lang/sdk/issues/31959
Change-Id: I999656fc11d2aee9aebe70852be5bb075f234b4d
Reviewed-on: https://dart-review.googlesource.com/41020
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2018-02-14 00:28:01 +00:00
Martin Kustermann cf8a6063f8 [VM] Improve AssertAssignable/InstanceOf by having a fast case for non-generic, instantiated types
When the type to test against is instantiated and has no type arguments
there is a high probability that we receive instances of that class or
subclasses at runtime.

This CL therefore extends the fast-path of AssertAssignable/InstanceOf
by checking whether the instance class id is within the cid ranges that
directly/indirectly implement/extend the type to test against.

Currently we have an almost depth-first preorder numbering of class ids
in AOT, but there are exceptions.  So each class can have a number of
cid-ranges as subclasses / classes which implement it's interface.

This seems to improve performance of dart-aot-v2
  * flutter stock build by 15+%
  * DeltaBlueClosures by 10+%

and reduces code size on
  * flutter gallery by -3%

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

Change-Id: I07dd91589cc3fcd8c5952bdba339e2e2a459e08e
Reviewed-on: https://dart-review.googlesource.com/35620
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2018-01-25 07:13:42 +00:00
Ryan Macnak 880b5b4af5 Idle notification for isolates running on the thread pool.
If a thread pool isolate has not processed a message in FLAG_idle_timeout_micros, run idle tasks.

Change-Id: If506d7805eb1213c3d1f9383d835226822012fff
Reviewed-on: https://dart-review.googlesource.com/26004
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
2018-01-17 22:01:28 +00:00
Siva Chandra 8d7bc506e0 Add a new boolean field "load_vmservice_library" to Dart_IsolateFlags.
Attempt 2.

This reverts commit 95d9ca4776.

Change-Id: I520a3d0f047f9435b4f3b7b728a5c6ceaf2beeb2
Reviewed-on: https://dart-review.googlesource.com/34222
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Siva Chandra <sivachandra@google.com>
2018-01-11 22:19:49 +00:00
Erik Corry 95d9ca4776 Revert "Add a new boolean field "load_vmservice_library" to Dart_IsolateFlags."
This reverts commit d858aea231.

Reason for revert: This causes assertion failures on the Windows debug build.

Original change's description:
> Add a new boolean field "load_vmservice_library" to Dart_IsolateFlags.
> 
> If this field is set, then the vmservice library will be loaded into the
> isolate by the kernel loader.
> 
> Change-Id: I194bc186ce5b67f1009c7d7ca996a8b687d5f912
> Reviewed-on: https://dart-review.googlesource.com/32500
> Commit-Queue: Siva Chandra <sivachandra@google.com>
> Reviewed-by: Siva Annamalai <asiva@google.com>

TBR=sivachandra@google.com,asiva@google.com

Change-Id: I6ea8b543940d6e08d02a81e67f67248e9164b1e9
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/33861
Reviewed-by: Erik Corry <erikcorry@google.com>
Commit-Queue: Erik Corry <erikcorry@google.com>
2018-01-11 09:33:38 +00:00
Siva Chandra d858aea231 Add a new boolean field "load_vmservice_library" to Dart_IsolateFlags.
If this field is set, then the vmservice library will be loaded into the
isolate by the kernel loader.

Change-Id: I194bc186ce5b67f1009c7d7ca996a8b687d5f912
Reviewed-on: https://dart-review.googlesource.com/32500
Commit-Queue: Siva Chandra <sivachandra@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2018-01-11 05:42:17 +00:00
Ryan Macnak 8fba2ea2b6 Use OOB messages to schedule compaction for Dart_NotifyLowMemory.
This ensures any finalizers that run during compaction happen on a thread the embedder knows about.

Bug: https://github.com/dart-lang/sdk/issues/31662
Change-Id: If1ca39fe72937ad2bc4607f7cacc4dc82e49be01
Reviewed-on: https://dart-review.googlesource.com/30040
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2017-12-19 22:38:34 +00:00
Ryan Macnak 5e07efa547 [vm, gc] Add Dart_NotifyLowMemory.
Move updating class table allocation stats before/after GC to inside the GC's safepoint.

Bug: https://github.com/dart-lang/sdk/issues/30978
Change-Id: Ia15665397ae9f455c5e7e4526d3575932246bbcc
Reviewed-on: https://dart-review.googlesource.com/22805
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2017-12-06 22:45:31 +00:00
Ryan Macnak 9174a627f5 [vm, gc] Ensure BackgroundCompiler can't be deleted during a safepoint.
Previously, the background compiler was deleted by the thread pool, which could have raced ahead of the mutator clearing its reference. Now it is deleted by the mutator.

Change-Id: Id353a96022f699131ee60fe31156cd0404dfd285
Reviewed-on: https://dart-review.googlesource.com/24342
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2017-11-30 22:59:51 +00:00
Ryan Macnak f77cf1c60e [vm] Verify canonical objects before taking a snapshot or shutting down.
Don't verify recursive types.

Bug: https://github.com/dart-lang/sdk/issues/31376
Bug: https://github.com/dart-lang/sdk/issues/27003
Change-Id: I783bcc45d55c78141dccb1b479c1d15234a9b363
Reviewed-on: https://dart-review.googlesource.com/21221
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
2017-11-20 18:54:56 +00:00
Régis Crelier f91f67a5be [VM] Emit type checks for incoming function arguments in strong mode.
Change-Id: Icd64913f0fc6ba54a0b8517bf05ae4babfae3bdc
Reviewed-on: https://dart-review.googlesource.com/19287
Reviewed-by: Siva Annamalai <asiva@google.com>
2017-11-18 00:31:35 +00:00
Régis Crelier f568029b5f [VM] Make flag --strong isolate specific.
Change-Id: I3416e65eeec8b92af7f35dce20188b3934674cb7
Reviewed-on: https://dart-review.googlesource.com/20221
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Régis Crelier <regis@google.com>
2017-11-10 20:47:10 +00:00
Ryan Macnak d965998d1c [vm] Begin a sliding compactor.
Improves the space overhead of compaction from O(size of live objects) to O(number of live objects).

Future work includes: 
 - a smaller, faster representation the forwarding table via a bitmap of used allocation units
 - sorting class sizes off-heap to allow sliding classes
 - running forwarding in parallel

Removes unnecessary sweep from evacuating compactor.

Change-Id: If0991bfb75573201c6e8feed142ca0cc69fccab4
Bug: https://github.com/dart-lang/sdk/issues/30978
Reviewed-on: https://dart-review.googlesource.com/15988
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Erik Corry <erikcorry@google.com>
2017-10-25 21:57:08 +00:00
Samir Jindel 6b64aa8943 [kernel] Always disable reified generic functions in the Kernel FE.
Currently, we have some tests that run with reified generic functions ON and
some with it OFF. However, this causes inconsistencies when running the Kernel
FE from snapshot in the VM, since the VM requires that the flag be consistent
with the snapshot. Our solution is to turn the reified generic functions flag
into a per-isolate flag, which is always disabled in the Kernel FE's isolate.

Bug:
Change-Id: Ia91e9f0ff5fc059edf4bdbd79ef14abb288b4a49
Reviewed-on: https://dart-review.googlesource.com/16020
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2017-10-24 15:21:28 +00:00
Ryan Macnak 6d3549ed56 Reapply "[vm] Add a simple compactor."
This is a subset of the previous attempt; the other part was fixed in 2994f60298.

Bug: https://github.com/dart-lang/sdk/issues/30978
Change-Id: Ica22eb0d81e75378f4b528f8ca77504ef3e09c84
Reviewed-on: https://dart-review.googlesource.com/15769
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2017-10-23 18:51:47 +00:00
Ryan Macnak 80e3fed6df Revert "Reapply "[vm] Add a simple compactor.""
This reverts commit 6451ce078f.

Reason for revert: Crashes on some reload bots

Original change's description:
> Reapply "[vm] Add a simple compactor."
> 
>  - Update capacity when freeing pages to prevent confusing the growth policy.
>  - Test with fragmentation_test instead of mirrors_reader_test to fit within time limits on the reload and opt-counter-threshold bots.
> 
> Bug: https://github.com/dart-lang/sdk/issues/30978
> Change-Id: I50488230bf5a0ed3b663ce555ff6ed62f2e5acca
> Reviewed-on: https://dart-review.googlesource.com/15011
> Reviewed-by: Erik Corry <erikcorry@google.com>
> Commit-Queue: Ryan Macnak <rmacnak@google.com>

TBR=rmacnak@google.com,asiva@google.com,erikcorry@google.com

Change-Id: I93e57d4b0b71ce87f7ca04cd35a87d6205864bba
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: https://github.com/dart-lang/sdk/issues/30978
Reviewed-on: https://dart-review.googlesource.com/15300
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2017-10-19 19:51:05 +00:00
Ryan Macnak 6451ce078f Reapply "[vm] Add a simple compactor."
- Update capacity when freeing pages to prevent confusing the growth policy.
 - Test with fragmentation_test instead of mirrors_reader_test to fit within time limits on the reload and opt-counter-threshold bots.

Bug: https://github.com/dart-lang/sdk/issues/30978
Change-Id: I50488230bf5a0ed3b663ce555ff6ed62f2e5acca
Reviewed-on: https://dart-review.googlesource.com/15011
Reviewed-by: Erik Corry <erikcorry@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2017-10-19 18:08:58 +00:00
Ryan Macnak e0c09211fc Revert "[vm] Add a simple compactor."
This reverts commit 5bdffcd32e.

Reason for revert: Failures on DBC, timeouts on hot reload and opt counter stress bots.

Original change's description:
> [vm] Add a simple compactor.
> 
> The compactor copies all live objects in old space to fresh pages, places forwarding pointers in the old objects, forwards all the pointers, then frees the old pages. This has a high space overhead. It is not meant for use in production, but meant to test that the VM is properly set up to handle old-space objects moving.
> 
> Large page objects and instruction objects are not moved.
> 
> Bug: https://github.com/dart-lang/sdk/issues/30978
> Change-Id: Ia42683fd5e27a33702aa5e83bece803a8b005a4b
> Reviewed-on: https://dart-review.googlesource.com/13624
> Commit-Queue: Ryan Macnak <rmacnak@google.com>
> Reviewed-by: Zach Anderson <zra@google.com>
> Reviewed-by: Erik Corry <erikcorry@google.com>

TBR=rmacnak@google.com,zra@google.com,asiva@google.com,erikcorry@google.com

Change-Id: I4fda673561532b604d97b9b02189c030844d969d
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: https://github.com/dart-lang/sdk/issues/30978
Reviewed-on: https://dart-review.googlesource.com/14680
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2017-10-17 21:57:19 +00:00
Ryan Macnak 5bdffcd32e [vm] Add a simple compactor.
The compactor copies all live objects in old space to fresh pages, places forwarding pointers in the old objects, forwards all the pointers, then frees the old pages. This has a high space overhead. It is not meant for use in production, but meant to test that the VM is properly set up to handle old-space objects moving.

Large page objects and instruction objects are not moved.

Bug: https://github.com/dart-lang/sdk/issues/30978
Change-Id: Ia42683fd5e27a33702aa5e83bece803a8b005a4b
Reviewed-on: https://dart-review.googlesource.com/13624
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
Reviewed-by: Erik Corry <erikcorry@google.com>
2017-10-17 20:44:02 +00:00
Carlo Bernaschina 0e32851cfd Add Timeline Dashboard hidden page in Observatory
- Refactoring of the TimelinePage in order to remove the
  dependencies from the Service objects.
- Implemented TimelineRepository to abstract the communication layer
- Structured new TimelineDashboardPage with simplified UI and event
  filtering

The VM returns lists of events which are forwarded to Catapult.
Some events are white-listed for the common user.
Due to limitations in the way the events are generated the only way to
attach the white-list flag to the events is by adding an extra argument.
By setting the hash of timeline.html to #basic we inform JavaScript that
we require the activation of the filter which forwards just the events
white-listed to Captapult, while preserving all the others during
dumping operations.

See https://docs.google.com/document/d/1sDKI3ROYM1ORaKhelt063ayfveF_6WC8aq9MiqHjYBs/edit#

Change-Id: I38435d8d32f37305ce3c366daf55f82e8287959d
Reviewed-on: https://dart-review.googlesource.com/3346
Commit-Queue: Carlo Bernaschina <cbernaschina@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
2017-09-07 20:38:19 +00:00
Carlo Bernaschina cf4cc1973a Refactor Isolate name format, storage and log
At the moment isolated has a name field which is on the main_port the
only exception is the vm-service isolate.
The name is used just for logging.

The service protocol though uses an extra field called debugger_name,
that at this moment is redundant and is optimized away during
compilation.

BUG=
R=rmacnak@google.com, zra@google.com

This CL:
- Removes the debugger_name in favor of a modifiable name
- Adds to all the log where the name was logged the main_port (that is
  the only real identifier)
- Changes the default format of the isolate name from:
    <script_uri>$<main>
  to:
    <script_uri>:<main>()
Review-Url: https://codereview.chromium.org/3004563003 .
2017-08-25 18:07:03 -07:00
Martin Kustermann 76a00500ad [VM] Make us compile with debug-optimization-level=0 again
After [0] landed our debug builders managed to still compile, because
the default debug-optimization-level allows the compiler to inline. This
caused a "CanReload() const { return false; }" to be inlined and
constant folded, so the call to ReloadSources() was eliminated.

Compiling with debug-optimization-level=0 disables inlining and keeps
the call, which gives us a linker error when building the
dart_precompiled_runtime target.

[0] https://codereview.chromium.org/2997243002

R=vegorov@google.com

Review-Url: https://codereview.chromium.org/3003383002 .
2017-08-25 13:46:25 +02:00
Vyacheslav Egorov 7d5231796e [VM, Precompiler] Support obfuscation of the symbolic information in precompiler
Obfuscation is controlled by obfuscate flag in Dart_IsolateFlags.

Obfuscation of identifiers is performed during script tokenization - when TokenStream is generated from the source. All kIDENT and kINTERPOL_VAR tokens are renamed consistently using a persistent obfuscation map stored in ObjectStore::obfuscation_map.

Some identifiers (pseudo-keywords, arithmetic operators, builtin recognized methods and entry-points) are not renamed to keep name based lookups from breaking. All other identifiers are renamed.

Constant instances of Symbol-s (both created via literal syntax #ident and using constant constructor const Symbol("ident")) are renamed consistently with corresponding identifiers.

Script urls and Library urls and names are also obfuscated.

Obfuscation map can be dumped as a JSON array at the end of precompilation using Dart_GetObfuscationMap API.

BUG=https://github.com/dart-lang/sdk/issues/30524
R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/3003583002 .
2017-08-25 09:48:23 +02:00
Siva Annamalai 8039138f39 Move all the isolate reload code under !defined(DART_PRECOMPILED_RUNTIME)
R=zra@google.com

Review-Url: https://codereview.chromium.org/2997243002 .
2017-08-24 09:25:55 -07:00
Ryan Macnak 14b5782544 Remove GC prologue and epilogue callbacks.
These should have been removed along with weak reference set support in 4992bc72a0 since they serve no other purpose.

Review-Url: https://codereview.chromium.org/3001343002 .
2017-08-22 11:19:54 -07:00
Siva Annamalai 73d30074b1 - Convert all isolate flags to a bit field.
- Add a new isolate specific flag to cause the isolate to run in kernel mode.

R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2995723002 .
2017-08-11 12:38:25 -07:00
Ryan Macnak 466385ceb6 [vm, gc] Require a safepoint for heap iteration.
Assert a safepoint operation can only be started from a thread in the VM state. Fix several unit tests missing a native-to-vm transition.

R=asiva@google.com, danunez@google.com

Review-Url: https://codereview.chromium.org/2995543004 .
2017-08-07 17:51:25 -07:00
Diogenes Nunez 38aba43111 Renames the isolate's mutator_thread_ to scheduled_mutator_thread_
The isolate's mutator_thread_ field actually represents the mutator
thread scheduled by the isolate. This was confused with the
mutator thread created by the thread_registry, which is a singleton.

R=asiva@google.com, rmacnak@google.com

Review-Url: https://codereview.chromium.org/2999583002 .
2017-08-07 15:54:49 -07:00
Alexander Markov 69817eea18 [vm] Revert changes related to triggering the 1st GC
This is the partial revert of the
8d6bc876f0

That CL caused noticeable slowdown of gen_snapshot on Mac and Windows.
Reverting this part of the CL fixes regression.

Closes https://github.com/dart-lang/sdk/issues/30317

R=zra@google.com

Review-Url: https://codereview.chromium.org/2998473002 .
2017-08-04 13:31:59 -07:00
Zachary Anderson 8d6bc876f0 Reland "Remove fields from Isolate in Product mode"
In my reordering of the fields in Isolate, I omitted the initialization
of a few fields in the constroctor. This CL will reland the change with
the initialization added back.

R=danunez@google.com, rmacnak@google.com

Review-Url: https://codereview.chromium.org/2983403002 .
2017-07-25 13:24:30 -07:00
Zachary Anderson 211604d7a0 Revert "Remove fields from Isolate in Product mode"
This reverts commit 13558442ab.

The above change caused a timeout in a vm test:

FAILED: none-vm-checked release_x64 vm/cc/SafepointTestDart
Expected: Pass
Actual: Timeout
CommandOutput[run_vm_unittest]:
diagnostics: Process list including children: [28397]
    Trying to capture stack trace for pid 28397
    PID 28397 - process
    TID 28397:
    #0  0x00007efedf216404 pthread_cond_wait@@GLIBC_2.3.2
    #1  0x0000000002b9a315 dart::Monitor::WaitMicros(long)
    #2  0x0000000002af3496 dart::MonitorLocker::WaitWithSafepointCheck(dart::Thread*, long)
    #3  0x0000000002a8724d dart::Heap::AllocateOld(long, dart::HeapPage::PageType)
    #4  0x0000000002b07de3 dart::Object::Allocate(long, long, dart::Heap::Space)
    #5  0x0000000002b26eab dart::UnresolvedClass::New(dart::Object const&, dart::String const&, dart::TokenPosition)
    #6  0x0000000002be6358 dart::Parser::ParseType(dart::ClassFinalizer::FinalizationKind, bool, bool, dart::LibraryPrefix*)
    #7  0x0000000002ba9cc4 dart::Parser::ParseNewOperator(dart::Token::Kind)
    #8  0x0000000002bac7dc dart::Parser::ParsePrimary()
    #9  0x0000000002be19c1 dart::Parser::ParsePostfixExpr()
    #10 0x0000000002bdf1c4 dart::Parser::ParseUnaryExpr()
    #11 0x0000000002bb618c dart::Parser::ParseBinaryExpr(int)
    #12 0x0000000002bb869f dart::Parser::ParseConditionalExpr()
    #13 0x0000000002bae224 dart::Parser::ParseExpr(bool, bool)
    #14 0x0000000002bbeb79 dart::Parser::ParseAwaitableExpr(bool, bool, dart::SequenceNode**)
    #15 0x0000000002bd5273 dart::Parser::ParseStatement()
    #16 0x0000000002bbcce0 dart::Parser::ParseStatementSequence()
    #17 0x0000000002ba64e8 dart::Parser::ParseFunc(dart::Function const&, bool)
    #18 0x0000000002ba3e31 dart::Parser::ParseFunction(dart::ParsedFunction*)
    #19 0x00000000029e0725 dart::DartCompilationPipeline::ParseFunction(dart::ParsedFunction*)
    #20 0x00000000029e4898 dart::CompileFunctionHelper(dart::CompilationPipeline*, dart::Function const&, bool, long)
    #21 0x00000000029e5716 dart::Compiler::CompileOptimizedFunction(dart::Thread*, dart::Function const&, long)
    #22 0x0000000002c8d3a4 dart::DRT_StackOverflow(dart::NativeArguments)
    #23 0x00007efedf6ad61b
    TID 28421:
    #0  0x00007efedf2167be pthread_cond_timedwait@@GLIBC_2.3.2
    #1  0x0000000002b9a2ff dart::Monitor::WaitMicros(long)
    #2  0x0000000002cc6f8f dart::ThreadInterrupter::ThreadMain(unsigned long)
    #3  0x0000000002b999d9 dart::ThreadStart(void*)
    #4  0x00007efedf212184 start_thread
    #5  0x00007efede51737d __clone
    TID 28430:
    #0  0x00007efedf216404 pthread_cond_wait@@GLIBC_2.3.2
    #1  0x0000000002b9a315 dart::Monitor::WaitMicros(long)
    #2  0x0000000002af3496 dart::MonitorLocker::WaitWithSafepointCheck(dart::Thread*, long)
    #3  0x0000000002a8789e dart::HeapIterationScope::HeapIterationScope(bool)
    #4  0x0000000002ad4966 dart::Isolate::IterateObjectPointers(dart::ObjectPointerVisitor*, bool)
    #5  0x00000000027ed02a dart::SafepointTestTask::Run()
    #6  0x0000000002cc7cbd dart::ThreadPool::Worker::Loop()
    #7  0x0000000002cc7b6a dart::ThreadPool::Worker::Main(unsigned long)
    #8  0x0000000002b999d9 dart::ThreadStart(void*)
    #9  0x00007efedf212184 start_thread
    #10 0x00007efede51737d __clone
    TID 28431:
    #0  0x00007efedf216404 pthread_cond_wait@@GLIBC_2.3.2
    #1  0x0000000002b9a315 dart::Monitor::WaitMicros(long)
    #2  0x0000000002ad66fa dart::Isolate::ScheduleThread(bool, bool)
    #3  0x0000000002cc53ea dart::Thread::EnterIsolateAsHelper(dart::Isolate*, dart::Thread::TaskKind, bool)
    #4  0x0000000002a86317 dart::SweeperTask::Run()
    #5  0x0000000002cc7cbd dart::ThreadPool::Worker::Loop()
    #6  0x0000000002cc7b6a dart::ThreadPool::Worker::Main(unsigned long)
    #7  0x0000000002b999d9 dart::ThreadStart(void*)
    #8  0x00007efedf212184 start_thread
    #9  0x00007efede51737d __clone
    TID 28444:
    #0  0x00007efedf216404 pthread_cond_wait@@GLIBC_2.3.2
    #1  0x0000000002b9a315 dart::Monitor::WaitMicros(long)
    #2  0x0000000002af3496 dart::MonitorLocker::WaitWithSafepointCheck(dart::Thread*, long)
    #3  0x0000000002a8724d dart::Heap::AllocateOld(long, dart::HeapPage::PageType)
    #4  0x0000000002b07de3 dart::Object::Allocate(long, long, dart::Heap::Space)
    #5  0x0000000002b26eab dart::UnresolvedClass::New(dart::Object const&, dart::String const&, dart::TokenPosition)
    #6  0x0000000002be6358 dart::Parser::ParseType(dart::ClassFinalizer::FinalizationKind, bool, bool, dart::LibraryPrefix*)
    #7  0x0000000002bb19bb dart::Parser::ParseTypeOrFunctionType(bool, dart::ClassFinalizer::FinalizationKind)
    #8  0x0000000002bb204c dart::Parser::ParseFormalParameter(bool, bool, dart::ParamList*)
    #9  0x0000000002bb43b3 dart::Parser::ParseFormalParameters(bool, bool, bool, dart::ParamList*)
    #10 0x0000000002ba368b dart::Parser::ParseFormalParameterList(bool, bool, bool, dart::ParamList*)
    #11 0x0000000002ba5a8f dart::Parser::ParseFunc(dart::Function const&, bool)
    #12 0x0000000002ba3e31 dart::Parser::ParseFunction(dart::ParsedFunction*)
    #13 0x00000000029e0725 dart::DartCompilationPipeline::ParseFunction(dart::ParsedFunction*)
    #14 0x00000000029e4898 dart::CompileFunctionHelper(dart::CompilationPipeline*, dart::Function const&, bool, long)
    #15 0x00000000029e5716 dart::Compiler::CompileOptimizedFunction(dart::Thread*, dart::Function const&, long)
    #16 0x00000000029e7036 dart::BackgroundCompiler::Run()
    #17 0x0000000002cc7cbd dart::ThreadPool::Worker::Loop()
    #18 0x0000000002cc7b6a dart::ThreadPool::Worker::Main(unsigned long)
    #19 0x0000000002b999d9 dart::ThreadStart(void*)
    #20 0x00007efedf212184 start_thread
    #21 0x00007efede51737d __clone
Review-Url: https://codereview.chromium.org/2988703002 .
2017-07-24 14:17:53 -07:00
Zachary Anderson 13558442ab Remove fields from Isolate in Product mode
R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2984883002 .
2017-07-24 13:22:44 -07:00
Zachary Anderson 62e3ceb460 Remove some pause-related fields in a PRODUCT build
R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2979243002 .
2017-07-19 09:15:50 -07:00
Zachary Anderson 952345ff84 Remove the debugger_ field from Isolate in a PRODUCT build.
This is the first in a series of CL in which I am removing fields from
classes that aren't used in PRODUCT mode. This CL removes the
debugger_ field from Isolate.

R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2981173002 .
2017-07-18 13:29:40 -07:00
Diogenes Nunez 699f84f941 Moves the top_ and end_ words of the Scavenger into mutator thread.
This is the first step to adding Thread Local Allocation Buffers to
the VM.

In this step, the mutator alone allocates to the new space, but keeps
track of the start and end of the space. This is akin to a single large
TLAB.

As a result, the generated code and the dbc simulator changed how they
allocate objects into the new space as well.

R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2980033002 .
2017-07-13 13:46:17 -07:00
Zachary Anderson 6cd8a79078 VM: Re-format to use at most one newline between functions
R=asiva@google.com

Review-Url: https://codereview.chromium.org/2974233002 .
2017-07-13 08:08:37 -07:00
Diogenes Nunez c0d4e02693 Revert "Moves the top_ and end_ words of the Scavenger into mutator thread."
This reverts commit 710544a907.

R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2974403002 .
2017-07-12 14:30:06 -07:00
Diogenes Nunez 710544a907 Moves the top_ and end_ words of the Scavenger into mutator thread.
This is the first step to adding Thread Local Allocation Buffers to
the VM.

In this step, the mutator alone allocates to the new space, but keeps
track of the start and end of the space. This is akin to a single large
TLAB.
BUG=
R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2951333002 .
2017-07-12 14:09:07 -07:00
Erik Corry 4b9bba55b4 Stoppp using trippple consonants
R=ahe@google.com
BUG=

Review-Url: https://codereview.chromium.org/2833073002 .
2017-04-21 17:50:13 +02:00
John McCutchan a4adbffb50 Remove legacy restart code
Also fixes #29092 by threading Error objects back to the message handler.

BUG=
R=asiva@google.com, rmacnak@google.com

Review-Url: https://codereview.chromium.org/2759533002 .
2017-03-20 08:47:39 -07:00
Dmitry Olshansky 170aa90158 Re-landing of "replace TrySync with Metadata".
Use that to sync variables to predefined stack
slots inside of exception handler, not before
each MayThrow() instruction.

In JIT mode we can avoid storing extra metadata
by using deopt info instead.

Introduce caching of metadata and
exception handler based on PC.

R=fschneider@google.com, vegorov@google.com

Review-Url: https://codereview.chromium.org/2734323003 .
2017-03-13 13:27:00 +01:00
Dmitry Olshansky a1f784e643 Revert "Replacing TrySync with Metadata"
This reverts commit cf08eebc71.

TBR=vegorov@google.com

Review-Url: https://codereview.chromium.org/2739663002 .
2017-03-07 16:17:59 +01:00
Dmitry Olshansky cf08eebc71 Replacing TrySync with Metadata
Use that to sync variables to predefined stack
slots inside of exception handler, not before
each MayThrow() instruction.

In JIT mode we can avoid storing extra metadata
by using deopt info instead.

Introduce caching of metadata and
exception handler based on PC.

R=fschneider@google.com

Review-Url: https://codereview.chromium.org/2640853002 .
2017-03-07 11:33:07 +01:00