Commit Graph

678 Commits

Author SHA1 Message Date
Carlo Bernaschina 82e9557aa7 Avoid graph extending outside the drawing area.
In the memory-dashboard page of Observatory the graph is drawn in the
wrong way if the communication with the device is slow.

Related https://github.com/google/charted/issues/219

R=asiva@google.com

Review-Url: https://codereview.chromium.org/2993003002 .
2017-08-03 17:05:02 -07:00
Carlo Bernaschina c6a71098b6 Add memory-dashboard page to Observatory
A new hidden page in observatory that will be used from external IDEs.
This initial version focuses on the evolution of the memory usage in time
and per isolate allocation profile.

Related https://github.com/dart-lang/sdk/issues/30023
Related https://codereview.chromium.org/2990913002/

R=asiva@google.com

Review-Url: https://codereview.chromium.org/2989083002 .
2017-08-03 15:52:23 -07:00
Carlo Bernaschina c39e7d5f5f Fix Observatory virtual-collection layout issues
Virtual Collections especially in the allocation-profile page had some issues with layout and background coloring.

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

Review-Url: https://codereview.chromium.org/2991203002 .
2017-08-02 16:08:22 -07:00
Dmitry Stefantsov eddc456f29 Revert "[vm] Don't enable the profiler by default. Enable the profiler at startup with --observe, or later through Observatory."
This reverts commit cc08f2ddd8.

R=whesse@google.com

Review-Url: https://codereview.chromium.org/2990173002 .
2017-08-02 11:30:16 +02:00
Ryan Macnak cc08f2ddd8 [vm] Don't enable the profiler by default. Enable the profiler at startup with --observe, or later through Observatory.
Note there is no option to disable the profiler. The profiler on Mac, Linux, and Android is based on SIGPROF, and there is no way to wait for all the outstanding signals as required to be able to safely free the sample buffer.

Saves ~20MB on 64-bit VMs.

R=cbernaschina@google.com, zra@google.com

Review-Url: https://codereview.chromium.org/2989093002 .
2017-08-01 17:57:08 -07:00
Carlo Bernaschina acfd8a9f81 Fix Observatory double connection in clean browser
If the local storage of the browser is empty observatory connects two
times to the Service Protocol having as side effect the redirection to
the `/vm` page

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

R=bkonyi@google.com

Review-Url: https://codereview.chromium.org/2991183002 .
2017-08-01 14:36:21 -07:00
Ryan Macnak 87aaa8bdb3 [observatory] Default sort allocation profiles by size instead of name.
Remove extra asterisk from optimized code references.

R=cbernaschina@google.com

Review-Url: https://codereview.chromium.org/2976903002 .
2017-07-27 15:16:17 -07:00
Alexander Markov bda3c9c2b2 Simplify and fix implicit closure check, speed up Closure_equals, v2
This is the re-application of 44e8da3ecd
with fixes:
* Dartanalyzer error is fixed in the new test isolate/message4_test
* The new test is skipped in the status file in dart2j/non-d8 modes,
  issue #30247 is created.
* Minor tweak of Closure_equals: other.IsClosure() is tested earlier.

Original CL review:

https://codereview.chromium.org/2989493002/

Original CL description:

This CL introduces a new Function kind, kImplicitClosureFunction, in
order to simplify check for implicit closures and make it more
efficient.

This CL also fixes Function::IsImplicitStaticClosureFunction(RawFunction*)
to correctly handle implicit closures created from static native
functions.

Closes #30203.

As the result of a faster check for implicit closures and slight
refactoring of Closure_equals, micro-benchmark exercising Closure_equals
speeds up from 9618ms to 6700ms for implicit closures case and
insignificantly for other cases.

R=zra@google.com

Review-Url: https://codereview.chromium.org/2987703002 .
2017-07-24 09:43:52 -07:00
Alexander Markov 45dddb2807 Revert "Simplify and fix implicit closure check, speed up Closure_equals"
This reverts commit 44e8da3ecd.

R=zra@google.com

Review-Url: https://codereview.chromium.org/2984083002 .
2017-07-21 15:39:20 -07:00
Alexander Markov 44e8da3ecd Simplify and fix implicit closure check, speed up Closure_equals
This CL introduces a new Function kind, kImplicitClosureFunction, in
order to simplify check for implicit closures and make it more
efficient.

This CL also fixes Function::IsImplicitStaticClosureFunction(RawFunction*)
to correctly handle implicit closures created from static native
functions.

Closes #30203.

As the result of a faster check for implicit closures and slight
refactoring of Closure_equals, micro-benchmark exercising Closure_equals
speeds up from 9618ms to 6700ms for implicit closures case and
insignificantly for other cases.

R=zra@google.com

Review-Url: https://codereview.chromium.org/2989493002 .
2017-07-21 14:26:56 -07:00
Carlo Bernaschina 9e8e1d8ac4 Fix Observatory connection to non default VM
BUG=
R=asiva@google.com

Review-Url: https://codereview.chromium.org/2988503002 .
2017-07-20 18:06:57 -07:00
Carlo Bernaschina df8bf384eb Introduce external services registration
A new RPC is introduced `_registerService` which allow clients to
register new services that are accessible from all the other clients.

Each registered endpoint is identified by 3 strings:

 - `service`
   a non empty string which identifies the provided service
   (e.g. `HotReload`, `OpenFile`)
 - `alias`
   an alias for that particular endpoint used by clients to identify it
   (e.g. `Flutter`, `IntelliJ`)
 - `method` __generated__
   the RPC method that should be invoked from a client to request it

A new _stream_ `_Service` is introduce, and two related events:

 - `ServiceRegistered`
   which is triggered when a new client is registered.
   All the related information (`service`, `alias`, `method`) are sent.

 - `ServiceUnregistered`
   which is triggered when a client, which previously registered a
   service, disconnects.
   Just `service` and `method` are sent.

Related https://github.com/dart-lang/sdk/issues/30023

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

Review-Url: https://codereview.chromium.org/2980733003 .
2017-07-13 18:18:51 -07:00
Ryan Macnak ccadb4687c [observatory] Sort native allocation profiles by size.
R=bkonyi@google.com, zra@google.com

Review-Url: https://codereview.chromium.org/2977803002 .
2017-07-12 12:42:44 -07:00
Carlo Bernaschina 15970f2a7e Fixed synchronization problem in FF and Safari for virtual-tree test
Closes #30087

R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2968283002 .
2017-07-07 13:39:46 -07:00
Carlo Bernaschina 992c4aa8ad Restored vm-connect Observatory_UI tests
Closes #27714

R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2972133002 .
2017-07-07 13:34:33 -07:00
Carlo Bernaschina 6be07a30bc Avoid Stack Overflows during VirtualTree expansion
R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2968813002 .
2017-07-05 17:47:00 -07:00
Carlo Bernaschina fb36c9d5bd Better sorting and naming for TimelinePage Recorded Streams Profiles
Closes=https://github.com/dart-lang/sdk/issues/29275

R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2965833002 .
2017-06-30 16:37:23 -07:00
Carlo Bernaschina 3ad0577442 Change Timeline Page presets UI from Select to Buttons
Related=https://github.com/dart-lang/sdk/issues/29275

R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2967703003 .
2017-06-30 16:20:19 -07:00
Carlo Bernaschina a8450243eb Disable expansion of VirtualTree and VirtualCollection items
VirtualTree and VirtualCollection must have fixed size children.
Expandable Ref Elements are by default able to expand.
Added flag to disable the expansion when required.

R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2970443002 .
2017-06-29 16:24:47 -07:00
Ryan Macnak 399ade26aa [observatory] Add a 'GC' button to heap map.
R=cbernaschina@google.com

Review-Url: https://codereview.chromium.org/2953373002 .
2017-06-29 10:45:26 -07:00
Carlo Bernaschina 0d86f5f3c5 Added Editor stream and sendObjectToEditor RPC into Service Protocol
Related=https://github.com/dart-lang/sdk/issues/30023

R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2962593002 .
2017-06-29 10:08:12 -07:00
Erik Corry 029b1cb948 Spelling fixes e to i.
R=kevmoo@google.com
BUG=

Review-Url: https://codereview.chromium.org/2957593002 .
2017-06-24 13:41:39 +02:00
Ryan Macnak bcb4fcfa11 [vm-service] Encode ticks directly as integers, since they are expect to stay in JS integer range.
Fixes #29957

R=cbernaschina@google.com

Review-Url: https://codereview.chromium.org/2951803004 .
2017-06-22 09:50:36 -07:00
Carlo Bernaschina 504125071e Fixed interface documentation
BUG=
R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2941313002 .
2017-06-16 16:27:35 -07:00
Carlo Bernaschina e826fdcb6b Cleaned analysis result for observatory
BUG=
R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2940523003 .
2017-06-14 12:23:48 -07:00
Carlo Bernaschina f5bca80a48 Removed unnecessary string concatenations
BUG=
R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2942493002 .
2017-06-14 11:23:12 -07:00
Devon Carew 9ec724cd6b Address observatory analysis issues.
BUG=
R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2934973002 .
2017-06-13 15:58:01 -07:00
Ryan Macnak f02d34362e Revert "Address additional analysis issues in the observatory codebase."
This reverts commit 2ea426a509.

Platform.script doesn't necessarily point to source.

TBR=devoncarew@google.com

Review-Url: https://codereview.chromium.org/2935873002 .
2017-06-12 15:10:35 -07:00
Devon Carew 2ea426a509 Address additional analysis issues in the observatory codebase.
BUG=
R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2930993004 .
2017-06-12 13:11:59 -07:00
Devon Carew 60a8ed5d47 Fix some observatory analysis issues.
BUG=
R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2920603003 .
2017-06-08 23:59:26 -07:00
Ryan Macnak 2abda1fdd7 Observatory:
- Add M.Isolate.collectAllGarbage.
 - Add 'count' parameter to ObjectRepository.get.
 - Set hover text in heap map so it is usable when it doesn't fit on one page.

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

Review-Url: https://codereview.chromium.org/2914283002 .
2017-06-01 14:26:46 -07:00
Ryan Macnak 03a2c24edf vm-service: Add optional 'scope' parameter to 'evaluate' and 'evaluateInFrame'.
Closes #29535

R=asiva@google.com

Review-Url: https://codereview.chromium.org/2872503004 .
2017-05-18 18:02:49 -07:00
Ryan Macnak 1bf31322ad Omnibus Observatory UI fixes:
- Globally replace InstanceRepository with ObjectRepository. In general, instances may reference non-instances, so we should not assume we'll only get instances from the fields of instances.
 - Allow expanding context and closure refs like regular instance refs.
 - Fix display of a mirror reference's referent, which is never an instance or context.

R=aam@google.com, mfairhurst@google.com

Review-Url: https://codereview.chromium.org/2873013004 .
2017-05-09 17:00:34 -07:00
Ryan Macnak 51ce2ba5e8 Clarify presentation of the target in retaining paths.
Update styles etc to fix missing italics.

R=aam@google.com

Review-Url: https://codereview.chromium.org/2862383002 .
2017-05-09 13:37:33 -07:00
Erik Corry aa6353b6da Dart SDK Spelling b, c, and d.
R=kmillikin@google.com
BUG=

Review-Url: https://codereview.chromium.org/2850783002 .
2017-05-01 08:28:10 +02:00
Tomáš Szabo f27b6cc11f Fixed compacted allocation profile in Observatory (#29301)
Fixed situation when compacted heap space contain a wrong data.
2017-04-26 09:51:42 -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
Jacob Richman b67e83eea3 Format all remaining unformatted runtime files other than multitests.
BUG=
R=johnmccutchan@google.com

Review-Url: https://codereview.chromium.org/2829463003 .
2017-04-18 15:34:03 -07:00
John McCutchan 99c6a18a1b Attempt 2 -- Fix updating packages map on reload and add a regression test
- [x] Update the isolate's .packages path when requested.
- [x] Always refresh package map when loader is initialized.
- [x] Add regression test.

Review-Url: https://codereview.chromium.org/2810223003 .
2017-04-12 14:02:19 -07:00
Ryan Macnak 9ce48e63b2 Remove background finalization.
R=asiva@google.com

Review-Url: https://codereview.chromium.org/2809863002 .
2017-04-11 09:54:25 -07:00
John McCutchan 94df115e4b Revert "Fix updating packages map on reload and add a regression test"
This reverts commit 7a2d67f3ba.

BUG=

Review-Url: https://codereview.chromium.org/2808953003 .
2017-04-10 12:30:38 -07:00
John McCutchan 7a2d67f3ba Fix updating packages map on reload and add a regression test
- [x] Update the isolate's .packages path when requested.
- [x] Always refresh package map when loader is initialized.
- [x] Add regression test.

BUG=
R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2797923008 .
2017-04-10 08:59:10 -07:00
Zachary Anderson 78706025da [vm service] Collect garbage before getting native allocation samples
R=bkonyi@google.com

Review-Url: https://codereview.chromium.org/2795473003 .
2017-04-03 09:12:52 -07:00
John McCutchan 8526b8cf2d Display the awaiter call stack in Observatory
BUG=
R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2785553005 .
2017-03-30 10:01:39 -07:00
John McCutchan 66aca8a36e Fix many warnings/errors when building Observatory
BUG=
R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2783933002 .
2017-03-29 10:31:40 -07:00
John McCutchan d8555fb5a8 Include the awaiter stack trace in the service protocol
- [x] Include the (non-empty) awaiter stack trace in every `getStack` RPC.
- [x] Append the causal stack trace to the final frame of the awaiter stack trace.
- [x] Unit test for awaiter stack trace.

BUG=
R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2782703002 .
2017-03-29 06:56:50 -07:00
Ben Konyi 7c820f4363 Resubmission of native memory allocation info surfacing in Observatory. Fixed crashing tests and stack trace collection skip counts for different configurations.
Fixed missing method referenced when MallocHooks is unsupported.

BUG=
R=johnmccutchan@google.com

Review-Url: https://codereview.chromium.org/2771293003 .
2017-03-27 13:25:26 -07:00
Ben Konyi 9ea672efc0 Revert "Added page to Observatory to display native memory allocation information."
This reverts commit f30f312b48.

Revert "Fixed missing method referenced when MallocHooks is unsupported."

This reverts commit a0b9c5a178.

TBR=johnmccutchan@google.com

BUG=

Review-Url: https://codereview.chromium.org/2773073003 .
2017-03-24 09:47:29 -07:00
Ben Konyi f30f312b48 Added page to Observatory to display native memory allocation information.
BUG=
R=johnmccutchan@google.com

Review-Url: https://codereview.chromium.org/2748403002 .
2017-03-24 09:20:25 -07:00
Ben Konyi c0511ad2ef Reimplemented zone memory tracking to avoid race conditions that were causing crashes in the previous implementation and made some minor name changes.
BUG=
R=asiva@google.com, johnmccutchan@google.com

Review-Url: https://codereview.chromium.org/2762323002 .
2017-03-23 09:03:08 -07:00