Commit Graph

713 Commits

Author SHA1 Message Date
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
Jacob Richman 4360e99d18 Revert "Fix observatory tests broken by running dartfmt."
This reverts commit b1f7e6d94673b098c93c187fe3efc45c15f27edc.

BUG=

Committed: https://github.com/dart-lang/sdk/commit/62be0eacfbb36bdc92a05c7c35bb4506621b6a3a
Review-Url: https://codereview.chromium.org/2767533002 .
2017-03-21 10:07:26 -07:00
Jacob Richman 62be0eacfb Revert "Fix observatory tests broken by running dartfmt."
This reverts commit b1f7e6d94673b098c93c187fe3efc45c15f27edc.

BUG=

Review-Url: https://codereview.chromium.org/2767533002 .
2017-03-20 22:19:22 -07:00
Jacob Richman 88f8aacd5f Re-apply rolled back CL to apply dartfmt to runtime.
Fix observatory tests broken by running dartfmt due to line and column changes.
Temporarily reverted formatting for evaluate_activation_test.dart as dartfmt doesn't yet handle multitests.

BUG=
R=johnmccutchan@google.com

Review-Url: https://codereview.chromium.org/2759973004 .
2017-03-20 21:44:59 -07:00
Ryan Macnak ea4744a06f Revert "Run dartfmt on all files under runtime."
This reverts commit 15f393f189.

The change caused many service test failures due to changed line numbers.

TBR=jacobr@google.com

Review-Url: https://codereview.chromium.org/2762583003 .
2017-03-20 13:42:55 -07:00
Jacob Richman 15f393f189 Run dartfmt on all files under runtime.
I've omitted files where the formatter output is significantly uglier
than the original code and I'll send those files in a separate CL
with options for how to make the code look reasonable while still
taking advantage of the formatter.

BUG=
R=johnmccutchan@google.com

Review-Url: https://codereview.chromium.org/2751423005 .
2017-03-20 13:13:50 -07: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
Ryan Macnak 8d6aca7085 Add Observatory support for UnlinkedCall, SingleTargetCache and SubtypeTestCache.
Apply dartfmt to the touched files.

R=johnmccutchan@google.com

Review-Url: https://codereview.chromium.org/2742333007 .
2017-03-16 12:34:31 -07:00
John McCutchan 4d7acb34d9 Only propagate reload errors when there are Dart frames on the stack.
- [x] Check for Dart frames on the stack before propagating an exception.
- [x] Never propagate an uncaught exception that occurs during reload to the program.
- [x] Add a unit test to verify that bad imports during a reload do not crash the VM

Fixes #29085

BUG=
R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2748353004 .
2017-03-16 10:50:59 -07:00
Jens Johansen 1ba39faa3f Make observatory 'pub serve' work again in Dartium
pub serve in runtime/observatory with Dartium seems to have been broken
since c8e275537d.

When I try to make observatory connect I just get a blank page.
If I open Dartiums console I get a *long* stacktrace saying
"Caught exception: String Expected".

BUG=
R=kmillikin@google.com

Review-Url: https://codereview.chromium.org/2729773004 .
2017-03-07 08:21:31 +01:00
Ben Konyi f31c653b54 Added comments explaining why some code is not used / returns empty results as a result of issue #28885
BUG=
R=zra@google.com

Review-Url: https://codereview.chromium.org/2733613002 .
2017-03-03 12:23:40 -08:00
Ben Konyi 6e02846b6d Temporarily disabling JSON generation for Zone statistics to resolve flakiness in tests until a better implementation is written. Issue #28885 (https://github.com/dart-lang/sdk/issues/28885).
BUG=
R=zra@google.com

Review-Url: https://codereview.chromium.org/2728743003 .
2017-03-03 10:43:11 -08:00
John McCutchan 8a33d63811 Fix checked mode failure of causal_async_star_stack_contents test
BUG=

Review-Url: https://codereview.chromium.org/2719503002 .
2017-02-24 07:30:40 -08:00
John McCutchan 6a312d429b Fix causal_async_star_stack_contents_test with optimization-counter-threshold=5
There was an off by one error when generating the causal async stack trace
in the debugger. We were always adding one more frame pass the sentinel frame.
This frame is always _Closure.call which is filtered out by the debugger
already. However when --optimization-counter-threshold=5, _Closure.call was
inlined and we ended up appending the inliner to the stack trace. The
inliner is not filtered out by the debugger so we got an extra frame in
the stack trace.

Fixes #28861

BUG=
R=fschneider@google.com

Review-Url: https://codereview.chromium.org/2707413002 .
2017-02-24 06:58:39 -08:00
John McCutchan 19abef97f1 Reland improvements to causal async stack traces
Original CL: https://codereview.chromium.org/2690683002

Improvements to causal async stack traces

UX improvements:

- [x] Stop printing the suffix <%s_async_body> and <%s_async_gen_body> for the generated closures.

Fixes #28743

- [x] Don't include the duplicate frame below the asynchronous suspension marker.

Fixes #28742

Bug fixes:

- [x] Fix service protocol enum naming so that it is consistent with other enums.

Fixes #28726

Misc:

- [x] Stop using package:stack_trace now that the VM does it for us.

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

Review-Url: https://codereview.chromium.org/2691213003 .
2017-02-14 05:00:04 -08:00
John McCutchan e84d8a1f11 Revert "Improvements to causal async stack traces"
This reverts commit 8538d81473.

BUG=

Review-Url: https://codereview.chromium.org/2694213002 .
2017-02-14 02:29:40 -08:00
John McCutchan 8538d81473 Improvements to causal async stack traces
UX improvements:

- [x] Stop printing the suffix <%s_async_body> and <%s_async_gen_body> for the generated closures.

Fixes #28743

- [x] Don't include the duplicate frame below the asynchronous suspension marker.

Fixes #28742

Bug fixes:

- [x] Fix service protocol enum naming so that it is consistent with other enums.

Fixes #28726

Misc:

- [x] Stop using package:stack_trace now that the VM does it for us.

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

Review-Url: https://codereview.chromium.org/2690683002 .
2017-02-14 00:56:55 -08:00
John McCutchan a0ee5b24db Track async causal stack traces
This CL improves the stack traces that accompany exceptions. Whenever an
async function is entered, we remember how we got there. This is similar
in spirit to package:stack_trace but the implementation is more efficient
and memory usage can be more easily reasoned about.

Tracking causal stack traces:

- [x] Upon entry to an async function, capture the synchronous stack trace prefix and store it into the closure.
- [x] Upon entry to an async* function, capture the synchronous stack trace prefix and store it into the closure.
- [x] Before returning from an async function, clear the Thread's asynchronous stack trace.
- [x] After resuming an async function, load the sychronous stack trace prefix into the Thread.
- [x] Filter stack traces to remove async machinery.

Service protocol changes:

- [x] Send causal async stack trace.

Observatory changes:

- [x] Display causal async stack trace below async functions.

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

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

Comparisons: https://docs.google.com/a/google.com/document/d/10r6jEqr8OCiDZ4y9SYU_uOimcHiOGAZMly2ghTErALI/edit?usp=sharing
Review-Url: https://codereview.chromium.org/2646443005 .
2017-02-09 15:39:44 -08:00
Ben Konyi c8e275537d Surfaced native heap memory allocation information to the Observatory
BUG=
R=johnmccutchan@google.com

Review-Url: https://codereview.chromium.org/2667743004 .
2017-01-31 16:09:49 -08:00
Ben Konyi b00df4d4ac Modified service to include current native zone memory consumption information in the VM object. Added a field to display this new information on the main page of the Observatory.
BUG=
R=johnmccutchan@google.com

Review-Url: https://codereview.chromium.org/2657283004 .
2017-01-31 13:26:01 -08:00
Todd Turnidge bcb7cfa79e Better reporting of ambiguous and "not found" commands in Obs debugger.
Add a missing space in another random file.

BUG=
R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2552783003 .
2017-01-31 11:31:31 -08:00
Ben Konyi de72bf4991 Moved isolate high watermark calculations into the Observatory client.
BUG=
R=johnmccutchan@google.com

Review-Url: https://codereview.chromium.org/2656723002 .
2017-01-25 15:03:42 -08:00
Kevin Moore 7c6b933e35 Improve display of long isolate names on summary page
Helps with https://github.com/dart-lang/sdk/issues/28413

R=johnmccutchan@google.com, turnidge@google.com

Review-Url: https://codereview.chromium.org/2630423003 .
2017-01-17 13:34:38 -08:00
Ben Konyi 4024151adb Added isolate + thread high watermark tracking to Observatory
This is a fixed version of c84f30741c90d040254767ff769a40d2cba3fb1a that
resolves issues with comparing uint and intptr_t.

Original Commit Message:
Added tracking of memory usage inside of threads. In addition, the max memory usage is kept track of using a high watermark for both the threads and the isolates. Isolate high watermark information is updated when a thread exits the isolate. The isolate high watermark consists of the sum of all thread high watermarks (including the high watermark of the exiting thread). High watermark information for both threads and isolates is now visible in the isolate view in the Observatory.

BUG=
R=johnmccutchan@google.com

Review-Url: https://codereview.chromium.org/2610253002 .
2017-01-05 14:24:53 -08:00
Kevin Millikin e2ee86b3f7 Fix dart:typed_data runtimeType getters.
The proper way to override runtimeType in the VM is not to provide an
overriding getter in Dart code but to rely on Class::UserVisibleName.
This works both with optimizations and also with external typed data.

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

BUG=
R=fschneider@google.com

Review-Url: https://codereview.chromium.org/2610513004 .
2017-01-05 11:28:22 +01:00
Ben Konyi ffda801791 Revert "Added isolate + thread high watermark tracking to Observatory"
This reverts commit c84f30741c90d040254767ff769a40d2cba3fb1a.

TBR=johnmccutchan@google.com

BUG=

Review-Url: https://codereview.chromium.org/2617513004 .
2017-01-04 15:21:35 -08:00