Commit Graph

678 Commits

Author SHA1 Message Date
Aske Simon Christensen 2b09c1efc0 Revert "Error on missing method implementation in non-abstract class"
This reverts commit 7cc55d0372.

Reason for revert: More test fixes needed.

Change-Id: Ib36159184ffbd14ce3f7cca184ce2b8cdfec237c
Reviewed-on: https://dart-review.googlesource.com/51680
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Commit-Queue: Aske Simon Christensen <askesc@google.com>
2018-04-18 17:27:22 +00:00
Aske Simon Christensen 7cc55d0372 Error on missing method implementation in non-abstract class
Closes https://github.com/dart-lang/sdk/issues/32013

Change-Id: I8f49d2640ef92a3d9d723969208cdb5f397e806d
Reviewed-on: https://dart-review.googlesource.com/43660
Commit-Queue: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
2018-04-18 14:39:09 +00:00
Lasse R.H. Nielsen 973a1a0219 Remove uses of upper-case constants in remaining SDK code.
This includes Fasta, tools and observatory, so the checked-in SDK must
have the lower-case constants.

Change-Id: I8380ad041ad058f7d02ae19caccfecd434d13d75
Reviewed-on: https://dart-review.googlesource.com/50201
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
2018-04-16 16:11:57 +00:00
Leaf Petersen 7a7e65660f Rename ServiceObject.update to updateFromServiceMap
Rename a method that clashes with the new update method being added to
Map.

Change-Id: I7717e055ddd2734ee3dfc9b0d20f69c415775b28
Reviewed-on: https://dart-review.googlesource.com/39240
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2018-02-06 18:40:48 +00:00
Devon Carew 83ea11b2bb Tweaks to the Observatory timeline landing page UI.
Change-Id: Ibe1fe674fc706057bc10d091c8bf0c20b31adaaf
Reviewed-on: https://dart-review.googlesource.com/38381
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2018-02-06 16:39:23 +00:00
Ryan Macnak 9cf7d6fa93 Partial static mode changes for vm-service and tests (part 4).
Bug: https://github.com/dart-lang/sdk/issues/31587
Bug: https://github.com/dart-lang/sdk/issues/31696
Change-Id: I2b37ad97da0520db08f43981fdbc48b094942a0e
Reviewed-on: https://dart-review.googlesource.com/34306
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2018-01-12 20:12:41 +00:00
Ryan Macnak a4f3b53fe8 Reapply "Partial static mode changes for vm-service and tests (part 3)."
Remove use of castTo, which is not yet available in the prebuilt SDK used to build Observatory.

Bug: https://github.com/dart-lang/sdk/issues/31587
Change-Id: Ia118710a2c4dca1851935d284e1a78a9c6517256
Reviewed-on: https://dart-review.googlesource.com/34022
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2018-01-11 01:31:17 +00:00
Jens Johansen 37c28f8661 Revert "Reapply "Partial static mode changes for vm-service and tests (part 3).""
This reverts commit c9f6e8695d.

Reason for revert: Change brakes Observatory:

```
$ out/ReleaseX64/dart --observe hello.dart
Observatory listening on http://127.0.0.1:8181/
Hello, world!
vm-service: isolate(348927110)  'hello.dart:main()' has no debugger attached and is paused at exit.  Connect to Observatory at http://127.0.0.1:8181/ to debug.
```

Going to the website I get
```
Unexpected exception:

NoSuchMethodError: method not found: 'castTo'
Receiver: ""
Arguments: [Instance of 'it']

StackTrace:

main.dart.js 2017:3     Object.f
main.dart.js 2203:30    Object.qn
main.dart.js 21316:11   b3.aQ
main.dart.js 20634:6    b3.c2
main.dart.js 20643:8    TZ.$1
main.dart.js 36992:29   UB.$0
main.dart.js 36982:9    Ux.nq
main.dart.js 36990:30   UC.$1
main.dart.js 36992:29   UB.$0
main.dart.js 36982:9    Ux.nq
===== asynchronous gap ===========================
main.dart.js 4840:12    Zh.e4
main.dart.js 3930:17    L.lK
main.dart.js 3932:28    L.ad
main.dart.js 20621:12   b3.dart.ba.lE
main.dart.js 20621:112  b3.dart.ba.lE
main.dart.js 20603:22   b3.cD
===== asynchronous gap ===========================
main.dart.js 4840:12    Zh.e4
main.dart.js 3930:17    L.lK
main.dart.js 3932:28    L.ad
main.dart.js 20621:12   ms.dart.ba.lE
main.dart.js 20621:112  ms.dart.ba.lE
main.dart.js 15829:10   Y4.bs
```

and Observatory is completely broken.

From https://github.com/dart-lang/sdk/issues/31397 it seems that Observatory uses an "old" sdk, i.e. we cannot use new stuff as castTo.

Original change's description:
> Reapply "Partial static mode changes for vm-service and tests (part 3)."
>
> Fix dynamic mode static warnings.
>
> Bug: https://github.com/dart-lang/sdk/issues/31587
> Change-Id: I966349f5409f911efacd11f08ffd469373bcd434
> Reviewed-on: https://dart-review.googlesource.com/33540
> Commit-Queue: Ryan Macnak <rmacnak@google.com>
> Reviewed-by: Siva Annamalai <asiva@google.com>

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

Change-Id: I775544cb5ab212cc836bc63181bdce31d19380b8
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: https://github.com/dart-lang/sdk/issues/31587
Reviewed-on: https://dart-review.googlesource.com/33800
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2018-01-10 12:21:53 +00:00
Ryan Macnak c9f6e8695d Reapply "Partial static mode changes for vm-service and tests (part 3)."
Fix dynamic mode static warnings.

Bug: https://github.com/dart-lang/sdk/issues/31587
Change-Id: I966349f5409f911efacd11f08ffd469373bcd434
Reviewed-on: https://dart-review.googlesource.com/33540
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2018-01-10 01:28:39 +00:00
Ryan Macnak e8d9d945f3 Revert "Partial static mode changes for vm-service and tests (part 3)."
This reverts commit 6ccd7b8ac2.

Reason for revert: analyzer failures

Original change's description:
> Partial static mode changes for vm-service and tests (part 3).
> 
> Bug: https://github.com/dart-lang/sdk/issues/31587
> Change-Id: I812fd4cd8e74875ce7ada9886035137af2fef73a
> Reviewed-on: https://dart-review.googlesource.com/33100
> Reviewed-by: Siva Annamalai <asiva@google.com>

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

Change-Id: Ic368fc23f58e02cafbaf6ae81dbcbffc3dcced13
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: https://github.com/dart-lang/sdk/issues/31587
Reviewed-on: https://dart-review.googlesource.com/33240
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2018-01-09 02:37:56 +00:00
Ryan Macnak 6ccd7b8ac2 Partial static mode changes for vm-service and tests (part 3).
Bug: https://github.com/dart-lang/sdk/issues/31587
Change-Id: I812fd4cd8e74875ce7ada9886035137af2fef73a
Reviewed-on: https://dart-review.googlesource.com/33100
Reviewed-by: Siva Annamalai <asiva@google.com>
2018-01-09 01:40:10 +00:00
Ryan Macnak 9f4ffb64ef Partial static mode changes for vm-service and tests (part 2).
Bug: https://github.com/dart-lang/sdk/issues/31587
Change-Id: Ie2605f5043b9f5d2f9156928e3cd39f74e726853
Reviewed-on: https://dart-review.googlesource.com/30681
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2017-12-20 00:45:28 +00:00
Martin Kustermann cf1de7d46c [VM] Replace hand-written assembly prologues with IR
As part of the prologue changes we get rid of the empty context as well.

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

Change-Id: I707e23c631bcfbbad6c91c4963d0c10f7a0be625
Reviewed-on: https://dart-review.googlesource.com/25320
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2017-12-13 16:04:34 +00:00
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
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 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 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
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
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
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 89e72c7bb5 Hide internal classes from Memory Profile
The Service Protocol exposes a new private RPC _getDefaultClassesAliases
which returns a Map from internal classes to a String.

This Map is used to group internal classes and to avoid navigation to
patch files.

R=asiva@google.com

Review-Url: https://codereview.chromium.org/3003903002 .
2017-08-28 18:18:51 -07:00
Ryan Macnak 48bc6e5d73 Add external sizes to the heap dominator tree.
Fixes #30381

R=cbernaschina@google.com

Review-Url: https://codereview.chromium.org/3008593002 .
2017-08-28 10:54:32 -07:00
Carlo Bernaschina 179b056e47 Restile Observatory memory dashboard
- Better look for the tab buttons
- Removed the term `Isolate`

R=asiva@google.com

Review-Url: https://codereview.chromium.org/3007513002 .
2017-08-24 09:35:25 -07:00
Carlo Bernaschina 463dec5135 Restyle Observatory Memory Dashboard buttons
- More polished button style
- Make Refresh and GC buttons styled as buttons

R=asiva@google.com

Review-Url: https://codereview.chromium.org/2996353002 .
2017-08-22 10:36:18 -07:00
Carlo Bernaschina a21eee5c00 Introduce heap snapshot into Memory Dashboard
In the Memory Dashboard, once an isolate is selected, it is now possible
to see the allocation profile or the heap snapshot.

R=asiva@google.com

Review-Url: https://codereview.chromium.org/3002843002 .
2017-08-18 18:04:40 -07:00
Carlo Bernaschina b87e991af2 Restore "Speedup Observatory elements first time rendering"
The CurlyBlockElement was using a hack to speedup rendering to allow
RetainingPathElement and InboundReferencesElement to pass the tests.

- Removed hack from CurlyBlockElement
- Converted RetainingPathElement and InboundReferencesElement to the
  waitFor APi.

Related https://github.com/dart-lang/sdk/commit/7568ed5f69e384e1832757a6c27d343616626afb

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

Review-Url: https://codereview.chromium.org/2995923002 .
2017-08-18 17:09:02 -07:00
Carlo Bernaschina 66c0fd885a Refactor of Observatory virtual-collection
The virtual-collection component uses a div container as a viewport on
a fixed sized spacer div that emulates the full size of the content.
In the spacer div there is a relative positioned div that scrolls
both horizontally and vertically. While the internal items are fully
computed horizontally, vertically we render just a subset of the items.
This buffer component scrolls both horizontally and vertically due
to its father child relationship with the spacer div. When the viewport
is going to show items that are not rendered in the buffer we move
the buffer accordingly (it is relative positioned with a variable top)
and update the content.

Managing the header of a table though is challenging:
1. we want the header to be fixed vertically
2. we want it to scroll horizontally accordingly to the the rest of the
   content
3. we want also to make this container took into consideration during
   the width computation, to allow it to trigger the horizontal
   scrollbar if it is wider that content.
4. we want the header to perceive the same available space as the
   other items in the collection.

We cannot obtain (1) at the same time of (2) (3) and (4) via pure
CSS. The header must be child of just another element.
- If we make it children of collection itself we obtain just (1) while
  we need to emulate the others via code.
- If we make it children of the viewport we obtain (2) (3) and (4),
  but we need to emulate (1) via code.

The first implementation followed the second option. The side effect
though is that smooth scroll (touch or touchpad based) does not fire
the onScroll events required to keep the header on top fast enough to
avoid flickering.

Due to the fact that scroll is the main use case for this element the
new implementation uses the first approach. Vertical flickering is
a problem no more. We obtain (2) by changing the horizontal offset
of the container, possible flickering, but way less common.
We obtain (3) by adding an extra div in the viewport which has the
same minimum size of the header. We obtain (4) by updating the
width of the last header child during the resize operations.

R=asiva@google.com

Review-Url: https://codereview.chromium.org/2998103002 .
2017-08-18 14:33:30 -07:00
Carlo Bernaschina 5f6e3dc5bb Remove dynamic parameters from Observatory helpers
R=bkonyi@google.com

Review-Url: https://codereview.chromium.org/3002763002 .
2017-08-16 17:25:13 -07:00
Carlo Bernaschina 0cbbeeb288 Restore "Add current rss and embedder name to Observatory"
Made benchmark_test.cc independent from Service by using the
implementation of MaxRSS from bin::Process

Related https://github.com/dart-lang/sdk/commit/ce736d3ef009bf334a92d5b7d354fc0b04805b4f

R=bkonyi@google.com
TBR=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2994223002 .
2017-08-14 17:02:30 -07:00
Carlo Bernaschina 8f3fab2f16 Revert "Speedup Observatory elements first time rendering"
This reverts commit 7568ed5f69.

Some observatory_ui tests are broken

TBR=asiva@google.com

Review-Url: https://codereview.chromium.org/2994233002 .
2017-08-14 16:55:31 -07:00
Carlo Bernaschina 7568ed5f69 Speedup Observatory elements first time rendering
R=asiva@google.com, bkonyi@google.com

Review-Url: https://codereview.chromium.org/2995883002 .
2017-08-14 16:04:29 -07:00
Carlo Bernaschina 2f5a59e658 Revert "Add current rss and embedder name to Observatory"
This reverts commit ce736d3ef0.

TBR=zra@google.com

Review-Url: https://codereview.chromium.org/2999933002 .
2017-08-14 15:45:13 -07:00
Carlo Bernaschina ce736d3ef0 Add current rss and embedder name to Observatory
Moved the responsibility to provide MaxRSS and CurrentRSS from the VM to
the embedder.

The embedder can opt-it by setting a Dart_GetEmbedderInformation
callback using the public Dart_SetEmbedderInformationCallback API.

The implementation of the Dart_GetEmbedderInformation should mandatory
fill the version field and the ones it is able to fill.
The name field must reference a constant C style string, it will not be
freed by the VM code.

R=zra@google.com

Review-Url: https://codereview.chromium.org/2996803002 .
2017-08-14 15:22:46 -07:00
Carlo Bernaschina 470749c38c Remove race condition in Observatory memory page
During the computation of the hover labels in the memory dashboard graph
the format functions were reading shared state that can be out of sync
if an update is ongoing.

To fix the error is enough to use the local copies instead.
To prevent this error in the future the format functions now are marked
as static and the analyzer will signal if they are accessing shared state.

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

Review-Url: https://codereview.chromium.org/3002603002 .
2017-08-14 14:39:09 -07:00
Carlo Bernaschina aae9988880 Check service availability on editor repository
The editor repository in Observatory was assuming is some situations the
presence of an openSourceLocation service even if it was not registered.

R=asiva@google.com

Review-Url: https://codereview.chromium.org/3002473002 .
2017-08-14 14:37:46 -07:00
Carlo Bernaschina b7767a92f2 Fix virtual-collection header flickering
On Firefox and probably other browsers the header of the
virtual-collection elements must be updated in the scroll event listener
to avoid the flickering of the screen.

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

Review-Url: https://codereview.chromium.org/2997823002 .
2017-08-14 14:34:29 -07:00
Carlo Bernaschina fb565cfba4 Clear analyzer warning on Observatory
- https://github.com/dart-lang/sdk/commit/f8e47a9e26c9ee44f431ed20d4507d98acbc257d
  Introduced some analyzer warnings into Observatory.

- Added missing forward of the forceFetch parameter

- Removed two abstraction breaks

R=rmacnak@google.com

- Applying TODO
  https://github.com/dart-lang/sdk/blob/ccadb4687c8af4b02a046669b9d50dd52edd1112/runtime/observatory/lib/src/cpu_profile/cpu_profile.dart#L750
Review-Url: https://codereview.chromium.org/2999763002 .
2017-08-11 12:36:32 -07:00
Ryan Macnak f8e47a9e26 Reapply "[vm] Don't enable the profiler by default. Enable the profiler at startup with --observe, or later through Observatory."
Ensure we still start NativeSymbolResolver even if the profiler is off, since it is also used name weak handler finalizer functions and to produce stack traces for crashes.

R=bkonyi@google.com

Review-Url: https://codereview.chromium.org/2992893002 .
2017-08-09 11:20:58 -07:00