Commit graph

953 commits

Author SHA1 Message Date
Ryan Macnak 104336699d Make the compactor invokable from Observatory's heap map page.
Add GCReason to timeline events.

Bug: https://github.com/dart-lang/sdk/issues/30978
Change-Id: Ie4514ca3fb0fa6197a895e54618dfcba1dfe3a8d
Reviewed-on: https://dart-review.googlesource.com/25120
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2017-11-30 22:55:56 +00:00
Jens Johansen b65d63e8b8 [kernel] Add position to catch
Bug:
Change-Id: Ie4a931ab55e923a3ed2bbf247535bc151c766272
Reviewed-on: https://dart-review.googlesource.com/23671
Reviewed-by: Peter von der Ahé <ahe@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2017-11-30 09:50:01 +00:00
Morten Krogh-Jespersen 39907272f6 Remove comments from status files.
This will allow for having automatic tools to alphabetize sections and entries.

Bug:
Change-Id: Ia7b7a100ca33197c4f3b1c50c11f24873dfbc09b
Reviewed-on: https://dart-review.googlesource.com/23675
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2017-11-28 07:56:20 +00:00
Ryan Macnak e4d01aa323 [vm, gc] Remove the evacuating compactor.
This was a temporary measure to verify the VM could handle moving old-space objects before we had the sliding compactor.

Bug: https://github.com/dart-lang/sdk/issues/30978
Change-Id: I4ffec413918481c0af4828d126930455f620935d
Reviewed-on: https://dart-review.googlesource.com/22663
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Erik Corry <erikcorry@google.com>
2017-11-22 18:12:02 +00:00
Lasse R.H. Nielsen 84c8f27e51 Revert constant-name changes to observatory code.
Change-Id: I7622658c61d1f3c7ebd2d3fbed7c57ef252d97bb
Reviewed-on: https://dart-review.googlesource.com/21620
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
2017-11-17 12:49:53 +00:00
Lasse R.H. Nielsen 0b58c4bd10 Change some constant declarations to lowerCase.
Retain the old values.

Reapply of https://dart-review.googlesource.com/c/sdk/+/20680 with fixes
for VM method fingerprints.

Change-Id: Ie14e7ccc3194d5561983348e6b6752728913ff4d
Reviewed-on: https://dart-review.googlesource.com/20664
Reviewed-by: Erik Ernst <eernst@google.com>
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
2017-11-14 12:59:14 +00:00
Lasse R.H. Nielsen e61fc07b58 Revert "Change some constant declarations to lowerCase."
This reverts commit c048cfb178.

Reason for revert: VM code fingerprints needs update.

Original change's description:
> Change some constant declarations to lowerCase.
> 
> Retain the old values.
> 
> Change-Id: I03bd326f379fe5f96d8f6081a7133de956d745c0
> Reviewed-on: https://dart-review.googlesource.com/11520
> Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
> Reviewed-by: Florian Loitsch <floitsch@google.com>

TBR=lrn@google.com,floitsch@google.com

Change-Id: I095e8198304ca4e59b39d30b0fdf0af4945e5231
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/20680
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
2017-11-14 11:23:08 +00:00
Lasse R.H. Nielsen c048cfb178 Change some constant declarations to lowerCase.
Retain the old values.

Change-Id: I03bd326f379fe5f96d8f6081a7133de956d745c0
Reviewed-on: https://dart-review.googlesource.com/11520
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Florian Loitsch <floitsch@google.com>
2017-11-14 11:13:04 +00:00
Ryan Macnak 074b43c863 [vm] Don't let the optimizer mislead coverage data.
Coverage uses the value of an execution counter to detect executed functions. However non-positive execution counter does not necessary mean that a function was never executed because we sometimes reset the counter.

Introduce additional bit on a function that is set whenever we reset positive execution counter and use this bit when generating coverage data.

Bug: https://github.com/dart-lang/sdk/issues/31326
Change-Id: I5357109603defad7e7c9415c433203f16bcf88f4
Reviewed-on: https://dart-review.googlesource.com/19760
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2017-11-10 22:35:48 +00:00
Jens Johansen da75676729 Crash VM service test
For more information see dartbug.com/31331

Bug:
Change-Id: Ic0dee3fa04403dc7305eaf01ae3c932b334269e8
Reviewed-on: https://dart-review.googlesource.com/19600
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2017-11-10 07:59:14 +00:00
Régis Crelier f734e7ee38 [VM] Treat 'deferred' as a built-in identifier (fixes #31267 and #25732).
Reject built-in identifiers as prefix names (fixes #25733).
Update co19 status file.

Change-Id: I7fe5014d128bfdad442866e78196fb8dd2764dda
Reviewed-on: https://dart-review.googlesource.com/19860
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Régis Crelier <regis@google.com>
2017-11-09 23:29:52 +00:00
Siva Annamalai 16ffa00ba2 Fix status file to reflect passing tests.
Change-Id: Id6a4a953071b3f68aee1c8b3d11e029c02c0f032
Reviewed-on: https://dart-review.googlesource.com/19780
Reviewed-by: Siva Annamalai <asiva@google.com>
2017-11-09 20:45:29 +00:00
Jens Johansen 66bf1a5fbd [kernel, VM] ReportError on unsupported tag instead of crashing
Closes #31296.

Bug:
Change-Id: I1bcdd60d25fde7d99e71ce0e42efcd78916a3409
Reviewed-on: https://dart-review.googlesource.com/19186
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2017-11-09 13:25:07 +00:00
Ryan Macnak f3c32edc1d [vm, reload] Don't report typedefs as unused.
Bug: https://github.com/flutter/flutter/issues/12868
Change-Id: Ibf0a97f918763abc0e0667be6d2ee2bda9e073fa
Reviewed-on: https://dart-review.googlesource.com/18514
Reviewed-by: Alexander Aprelev <aam@google.com>
2017-11-03 20:55:56 +00:00
Ryan Macnak 702430718b [vm, reload] Don't report changes to synthetic classes introduced during mixin application.
In particular,

class S {}
class M {}
class MA extends S with M {}

=>

class S {}
class M { newFunction() => 42; }
class MA extends S with M {}

Should not report class S&M nor S&M.newFunction.

Bug: https://github.com/dart-lang/sdk/issues/31265
Change-Id: Iaca4facd68315e1f2921cd2af666608f3e1aa695
Reviewed-on: https://dart-review.googlesource.com/18149
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2017-11-02 22:49:00 +00:00
Zachary Anderson a99cdabd00 Reland: [GN] Adds dart_host_sdk_toolchain argument
Setting this build argument to something other than host_toolchain will
cause the build target create_host_sdk to be exposed. That target will
build the Dart SDK with the toolchain specified by
dart_host_sdk_toolchain.

Relanding to fix bad toolchain conditions in dart_os_config and
dart_arch_config.

TO-549

Change-Id: I276f47d9071233acb98f6029a4666da0cee33d7d
Reviewed-on: https://dart-review.googlesource.com/18361
Commit-Queue: Zach Anderson <zra@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
2017-11-02 19:02:18 +00:00
Zach Anderson 8f5d55623e Revert "[GN] Adds dart_host_sdk_toolchain argument"
This reverts commit 8fc90bd3bc.

Broken precomp bots due to wrong toolchain condition in dart_arch_config and dart_os_config.

Change-Id: Ic5c75f9ca3a0d4f316678354da44d1fcca10499d
Reviewed-on: https://dart-review.googlesource.com/18360
Reviewed-by: Zach Anderson <zra@google.com>
2017-11-02 18:03:27 +00:00
Zachary Anderson 8fc90bd3bc [GN] Adds dart_host_sdk_toolchain argument
Setting this build argument to something other than host_toolchain will
cause the build target create_host_sdk to be exposed. That target will
build the Dart SDK with the toolchain specified by
dart_host_sdk_toolchain.

TO-549

Change-Id: Ida92521724cf7af34b34fb8c6d3514a226c48dd4
Reviewed-on: https://dart-review.googlesource.com/18145
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
2017-11-02 17:27:19 +00:00
Zachary Anderson 02eebb0c69 [GN] Remove the dart_host_toolchain arg
This flag can be removed after: https://github.com/flutter/engine/pull/4308
lands.

Change-Id: I4730aaece1e43cf71ea569bda78c2cd546a66358
Reviewed-on: https://dart-review.googlesource.com/18060
Reviewed-by: Alexander Aprelev <aam@google.com>
2017-11-01 21:13:28 +00:00
Jens Johansen c8e51ef922 [kernel] Add offset to this[i] and super[i]
Bug:
Change-Id: Ic65b69c4977be834c7b69638d6c030727c7210e5
Reviewed-on: https://dart-review.googlesource.com/17441
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2017-11-01 09:57:00 +00:00
Sigmund Cherem 5de1535e29 Status file updates: update tests status in co19 and observatory for recent
change in deferred loading

Bug:
Change-Id: Iacedd855beb4e179838913bf9e4b54adb85eca87
Reviewed-on: https://dart-review.googlesource.com/16904
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2017-10-27 00:24:58 +00:00
Ryan Macnak 3d409223a3 [vm] Report a coverage tick for the function as a whole.
This ensures leaf functions have some coverage data.

Bug: https://github.com/dart-lang/sdk/issues/31215
Change-Id: I6efc2e1c002e26cd0483dce5a8a1c2b6d8958d13
Reviewed-on: https://dart-review.googlesource.com/16684
Reviewed-by: Zach Anderson <zra@google.com>
2017-10-26 16:50:30 +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
Ryan Macnak 2aac007bed [vm] Mark the synthetic use of completer.completeError in async functions.
Bug: https://github.com/dart-lang/sdk/issues/31222
Change-Id: I4b143ff88b59602f503c7a4d15690a468c577b48
Reviewed-on: https://dart-review.googlesource.com/16605
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
2017-10-25 21:02:16 +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
Ryan Macnak 140dfd6d89 [vm] Consider a reload with no changed files as a reload for _getUnusedChangesInLastReload.
Add missing messages for various vm-service error codes.

Bug: https://github.com/flutter/flutter/issues/12300
Change-Id: I1f3607f94c5ab2fb770813f0502c3b1c9c40fdf4
Reviewed-on: https://dart-review.googlesource.com/11642
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2017-10-09 16:31:05 +00:00
Jens Johansen 2e4ffe6808 Service test for breaking in mixed in function
This CL adds a test that tests if we can put a breakpoint in a mixin and
actually break on it even if the function has already been compiled.

Change-Id: I3cd180b48f9e01c98eebc778995a62974be288a4
Reviewed-on: https://dart-review.googlesource.com/10280
Reviewed-by: Siva Chandra <sivachandra@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2017-10-04 06:18:32 +00:00
Ryan Macnak 5efa08b663 Reapply "[reload] Add facility to check for program elements changed in the last reload but not executed."
- Weaken assert for identity reloads to account for lazy finalization.
 - Store actual field end positions instead of computing from a terminating semicolon.
 - Consider unfinalized classes to be unchanged if they have same sequence of tokens.

Change-Id: I3fcd7fed924bfac47dc382702ce63207bb8aa031
Reviewed-on: https://dart-review.googlesource.com/8164
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2017-09-27 02:50:35 +00:00
Ryan Macnak 0bb41de8ff Fix leak when timeline event names or arguments are OneByteStrings not expressible in ASCII.
Change-Id: Ieca5e748c12364f11231f78f4e87e374079765d4
Reviewed-on: https://dart-review.googlesource.com/8702
Reviewed-by: Erik Corry <erikcorry@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2017-09-27 02:45:15 +00:00
Ryan Macnak 9dd3730ea2 Revert "[reload] Add facility to check for program elements changed in the last reload but not executed."
This reverts commit 4a0d5cbf3f.

Change-Id: Ic90f78443b5c1878ac6f17a1a1439f8e4515db42
Reviewed-on: https://dart-review.googlesource.com/7681
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2017-09-21 22:56:39 +00:00
Ryan Macnak 4a0d5cbf3f [reload] Add facility to check for program elements changed in the last reload but not executed.
Change-Id: Ifdc73166be68c5d2915e8b9d71db0a09d06835a0
Reviewed-on: https://dart-review.googlesource.com/5330
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2017-09-21 20:28:06 +00:00
Ryan Macnak 3d21a46b72 Limit preserialized JSON for timeline events from Dart code to the arguments.
Avoids string copies in C++ and map copies in Dart.

Also remove some vestiages of removed feature that allowed an embedder to add pre-encoded events to the timeline.

Change-Id: I962a67093ba461c991d9169b0391c44af1d489db
Bug: https://github.com/dart-lang/sdk/issues/30787
Reviewed-on: https://dart-review.googlesource.com/6762
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
2017-09-19 23:29:55 +00:00
Carlo Bernaschina 8caa652ea7 Disable links in Cpu Profile (Table)
Closes https://github.com/dart-lang/sdk/issues/27191

Change-Id: I06bc74895d26336976ff12666bbd88122b78b625
Reviewed-on: https://dart-review.googlesource.com/6168
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2017-09-15 21:54:40 +00:00
Carlo Bernaschina 62045a4590 Add Logical Frame View to Timeline Dashboard
This version of the Timeline allows the developer to see a logical
view over the operations involved in each frame.
Events are grouped by frame and shifted accordingly to avoid to have
overlapped frame.

See runtime/observatory/web/timeline.js for the undestrand the steps
involded in the process.

Change-Id: I3980a3278a32fe69ed70db07cfa7189dc0c9a643
Reviewed-on: https://dart-review.googlesource.com/5603
Commit-Queue: Carlo Bernaschina <cbernaschina@google.com>
Reviewed-by: Todd Turnidge <turnidge@google.com>
2017-09-14 23:53:57 +00:00
Ryan Macnak 8f7f747d9f [observatory] Add percentages and an explanation to the heap ownership table.
Change-Id: If2c48d20b0ed4c2166ca25f5e384fc2701a73308
Reviewed-on: https://dart-review.googlesource.com/5893
Reviewed-by: Todd Turnidge <turnidge@google.com>
2017-09-14 23:47:34 +00:00
Carlo Bernaschina baffc87a7e Update memory dashboard
- Fix crash related to missing nodes in Heap Snapshot
- Disabled update on GC. With the new idle GC the page was updating too
  often.

Change-Id: I8a3aaf9540ff224a5e8119303c8e8ef79e8a73f1
Reviewed-on: https://dart-review.googlesource.com/5327
Commit-Queue: Carlo Bernaschina <cbernaschina@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2017-09-14 02:43:20 +00:00
Beeravolu Siva Chandra Reddy 004a515217 Populate library imports and exports when loading library from kernel.
Change-Id: If6cc94aa186948caa8798212d6161da650ff2d8e
Reviewed-on: https://dart-review.googlesource.com/4381
Reviewed-by: Jens Johansen <jensj@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2017-09-12 10:44:49 +00:00
Carlo Bernaschina bf358a7c27 Add searchBar to VirtualCollections in Observatory
With CTRL+F (or CMD+F on Mac) virtual-collection elements properly
configured with a search helper will show a search bar which allows to
navigate between the results of the current query.

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

Change-Id: Ia18207b1cb451a39f314a3477a38a2337ca73f8b
Reviewed-on: https://dart-review.googlesource.com/3860
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2017-09-07 20:54:44 +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 9f545cd315 Do not combine by default in allocations profile
Change-Id: Idaf9de685f7c0473d4e0a597959e6bca0df6077b
Reviewed-on: https://dart-review.googlesource.com/3823
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2017-09-07 01:06:44 +00:00
Carlo Bernaschina 36226f722e Restore default tcp port in Observatory
Change-Id: I94174685918c584c8b9f4b0448e5c46bcbfdaa9f
Reviewed-on: https://dart-review.googlesource.com/3360
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2017-09-05 22:14:27 +00:00
Samir Jindel f0941f7c7d Improve the performance of closure-converted code.
Summary:

Previously, we would create a wrapper function in the flowgraph around converted
closures, which would forward all the closure's arguments and unpack the context
argument before calling the real closure function.

Now, we perform the unpacking at the top of the real function to avoid having
any wrapper function.

Previously, captured parameters would still be appear live to the GC even if
they're updated, because after they are copied into the context, all updates to
them are done there.

Now, as in regular closures, we zero-out the parameter variable after copying
it's value into the context, avoiding potential memory leaks.

Test Plan:

Ran the closure conversion test suite.
Ran benchmarks on Golem -- all statistically significant regressions are gone.

BUG=
R=dmitryas@google.com, regis@google.com

Review-Url: https://codereview.chromium.org/3008923002 .
2017-09-01 14:59:40 +02:00
Carlo Bernaschina 4ea98fba56 Allow port and host override in Observatory
R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/3009013002 .
2017-08-31 17:37:40 -07:00
Carlo Bernaschina 5534568ff1 Make service protocol respect isolate lifecycle
Status:
- Currently the getIsolate API tries to guess the status of the isolate
  when it is in between the IsolateRunnable and PauseStart, by reporting
  it as already in the PauseStart status.
  This can potentially make flaky all the tests that uses PauseStart to
  synchronize with the actual status of the Isolate.
- In the previous situation the timestamp of the event is guessed too,
  potentially reporting a wrong value.
- Even with the previous fix the is still a race condition that can lead
  to a getIsolate responde with a PauseStart status to be sent before
  the actual PauseStart event.

Changes:
- Fallback to None pause event if the isolate is in between
  IsolateRunnable and PauseStart, avoiding double posting.
- Send the PauseStart event before the actual status change, partially
  avoiding the race conditions.
- Set the pause timestamp before the actual status change, fully
  avoiding the race condition.

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

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

Review-Url: https://codereview.chromium.org/3006883002 .
2017-08-30 17:09:36 -07:00
Ryan Macnak b7a0458196 [observatory] Add an "ownership" analysis for the heap snapshot.
An object A is said to be owned by object B if all direct references to A come from B. In particular, an object that holds unshared lists and maps will own the heap size of those lists and maps, as well as any unshared elements. We hope a table of owned sizes will be more useful than a table of shallow sizes, since the latter typically says the heap is mostly lists.

R=cbernaschina@google.com

Review-Url: https://codereview.chromium.org/3009743003 .
2017-08-30 09:50:57 -07:00
Carlo Bernaschina ad280c8c6c Mark issue_30555_test as flaky
TBR=rmacnak@google.com

Review-Url: https://codereview.chromium.org/3011583002 .
2017-08-29 17:50:21 -07:00