Commit Graph

1605 Commits

Author SHA1 Message Date
John McCutchan f0f0d4abd7 Fix Windows paths in complex_reload_test
BUG=

Review URL: https://codereview.chromium.org/2519553002 .
2016-11-18 13:26:18 -08:00
John McCutchan 8a7f7715f1 Add a complex reload test that rebases the root script path three times.
BUG=
R=turnidge@google.com

Review URL: https://codereview.chromium.org/2518643002 .
2016-11-18 12:24:01 -08:00
Kevin Moore 4d75bf77a5 Fix a couple of links in runtime/observatory
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/2513703002 .
2016-11-17 12:31:00 -08:00
Ryan Macnak 6183316355 Don't crash attempting to JSON print an uninitialized Map.
R=fschneider@google.com

Review URL: https://codereview.chromium.org/2503423003 .
2016-11-16 11:14:43 -08:00
Ryan Macnak d4b5793307 Enable service tests for app snapshots.
Issue #27806

R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/2496993002 .
2016-11-15 16:12:59 -08:00
Kevin Moore 4e17c8b1f8 Observatory: remove unused imports
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/2505673002 .
2016-11-15 15:11:43 -08:00
Ryan Macnak f5b1f158c0 Exclude all references into the VM isolate in heap snapshots.
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/2501343004 .
2016-11-15 11:03:25 -08:00
Ryan Macnak aa47407ab8 Observatory: Add view of dominator tree with siblings merged by class.
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/2480293003 .
2016-11-15 09:43:48 -08:00
Jens Johansen e9c78330f2 Test showing crash when stepping through new Map creation.
Stepping through the following small program:

main() {
  var map = {};
}

will crash the vm if it is compiled in debug mode because
the debugging tries to call .Length() on an uninitialized Map.

Crash:

runtime/vm/object.h: 6545: error: expected: (value & kSmiTagMask) == kSmiTag
Dumping native stack trace for thread d12f
  [0x0000000000a66c36] dart::Profiler::DumpStackTrace(bool)
  [0x0000000000a66c36] dart::Profiler::DumpStackTrace(bool)
  [0x0000000000765548] dart::DynamicAssertionHelper::Fail(char const*, ...)
  [0x000000000074b78b] dart::Smi::ValueFromRaw(unsigned long)
  [0x000000000074b6ad] dart::Smi::Value(dart::RawSmi const*)
  [0x00000000009b92cc] dart::LinkedHashMap::Length() const
  [0x00000000009e2351] dart::LinkedHashMap::PrintJSONImpl(dart::JSONStream*, bool) const

[...]

Filed as bug https://github.com/dart-lang/sdk/issues/27790.

R=turnidge@google.com

Review URL: https://codereview.chromium.org/2486213002 .
2016-11-15 12:49:44 +01:00
Sigmund Cherem 2c17d62617 Update .status files to make bots green again
Review URL: https://codereview.chromium.org/2497863003 .
2016-11-14 08:48:52 -08:00
Siva Annamalai b2f3bb6711 Add following tests :
- enable the service protocol web server when it is already enabled
 - disable the service protocol web server when it is already disabled
 - disable the service protocol web server when it is enabled
 - validate field in the ServiceProviderInfo object
 - try connecting to the web server without the auth token when use of
   an auth token is enabled
 - try connecting to the web server with  the auth token when use of
   an auth token is enabled
 - try connecting to the web server without the auth token when use of
   an auth token is not enabled

BUG=
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/2500543002 .
2016-11-11 12:42:25 -08:00
Zachary Anderson 90d3962ca3 Don't depend on dart_bootstrap if there is a usable prebuilt sdk
Also replace invoke_dart() with compiled_action(), and some other
cleanups.

fixes #27781

R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/2493833002 .
2016-11-10 11:16:24 -08:00
Florian Schneider d53f26e395 Remove references to non-existing tests from status files.
BUG=
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/2481223003 .
2016-11-08 09:21:21 -08:00
Ryan Macnak 987165f022 Reload native extensions when starting from a snapshot.
Fixes #21180
Fixes #27574

R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/2475523002 .
2016-11-07 16:17:47 -08:00
John McCutchan 14297ee480 Add an environment variable toggle to control new service protocol auth token
BUG=
R=asiva@google.com

Review URL: https://codereview.chromium.org/2486443002 .
2016-11-07 14:45:52 -08:00
Kevin Moore 35c09238d6 smaller observatory pngs
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/2473293003 .
2016-11-07 07:08:53 -08:00
Ryan Macnak 3658a16e47 DBC: When calling DRT_OptimizeInvokedFunction, patch the stack to have a stub instead of the to-be-optimized function as the caller.
Fixes #27746

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

Review URL: https://codereview.chromium.org/2473213002 .
2016-11-04 09:51:02 -07:00
Florian Schneider de6b131857 Temporarily skip flaky tests for DBC
BUG=#27746

Review URL: https://codereview.chromium.org/2477753002 .
2016-11-03 15:08:42 +01:00
Zachary Anderson f7799da7c5 GN: Fall back on dart_bootstrap where appropriate.
Review URL: https://codereview.chromium.org/2464153003 .
2016-11-01 12:59:36 -07:00
Terry Lucas 8b3e68ac8a Skip test that fails in Dartium
TBR=johnmccutchan@google.com,rmacnak@google.com

Review URL: https://codereview.chromium.org/2462403002 .
2016-11-01 06:03:28 -07:00
John McCutchan 599ed1389d More analyzer bot fixes
BUG=

Review URL: https://codereview.chromium.org/2466033003 .
2016-10-31 13:36:23 -07:00
John McCutchan 63e4f69e5e Provide an API to dart:developer to control the web server hosting the Service Protocol
- [x] Add `ServiceProtocolnfo` class to dart:developer.
- [x] Add `Service` class to dart:developer.
- [x] Add `Service.getInfo` static method to dart:developer.
- [x] Add `Service.controlWebServer` static method to dart:developer.

API:

```dart

/// Information about the service protocol.
class ServiceProtocolInfo {
  /// The major version of the protocol.
  final int majorVersion;
  /// The minor version of the protocol.
  final int minorVersion;
  /// The Uri to access the service. If the web server is not running, this
  /// will be null.
  final Uri serverUri;
}

/// Access information about the service protocol and control the web server.
class Service {
  /// Get information about the service protocol.
  static Future<ServiceProtocolInfo> getInfo();

  /// Control the web server that the service protocol is accessed through.
  static Future<ServiceProtocolInfo> controlWebServer({bool enable: false});
}
```

... and add a randomly generated authentication token path prefix that must be passed in to access the service protocol.

Old base url:

Observatory listening on http://127.0.0.1:54804/

New base url:

Observatory listening on http://127.0.0.1:54804/<token>/

For example:

Observatory listening on http://127.0.0.1:54804/PTwjm8Ii8qg=/

Many tools will need to be updated.

Fixes #23320

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

Review URL: https://codereview.chromium.org/2438613002 .
2016-10-31 12:32:23 -07:00
Zachary Anderson c1313a5ec7 Format GN files and add a presubmit check that GN is properly formatted
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/2451613005 .
2016-10-26 08:50:54 -07:00
John McCutchan 8061bd5a8a Add local variable declaration token position to service protocol
- [x] Add three public fields to the "BoundVariable" service type: declarationTokenPos, visibleStartTokenPos, and visibleEndTokenPos. (naming suggestions welcome!)
- [x] Extend LocalVarDescriptors to hold the declaration token position (it already had the scope visibility boundaries).
- [x] Extend ContextScope to hold the declaration token position.
- [x] Add a unit test which verifies this works for local variables, function parameters, and closure captured variables.

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

BUG=
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/2419013004 .
2016-10-17 11:18:24 -07:00
John McCutchan a43d37be81 Fix reload_sources_test flake
BUG=

Review URL: https://codereview.chromium.org/2415183005 .
2016-10-14 15:33:55 -07:00
John McCutchan d483b0d2af Mark reload_sources_test as slow
BUG=

Review URL: https://codereview.chromium.org/2416013002 .
2016-10-13 11:02:36 -07:00
John McCutchan 2d0a08baf9 Make reloadSources service RPC public
- [x] Make `reloadSources` RPC public.
- [x] Add an optional 'pause' parameter to `reloadSources`. When set to true, the isolate will enter the debug pause loop immediately after reloading sources and before resuming execution. This makes it possible for debugger clients to set breakpoints before resuming.
- [x] Add reload_sources_test which tests pausing after reload.
- [x] Fix a bug in `GetVarDescriptors` where a null code object could be used.

R=turnidge@google.com

Review URL: https://codereview.chromium.org/2411153002 .
2016-10-13 07:45:56 -07:00
William Hesse 25e3b30560 Update status for failing tests
BUG=https://github.com/dart-lang/sdk/issues/27557
R=floitsch@google.com

Review URL: https://codereview.chromium.org/2405843002 .
2016-10-10 16:26:55 +02:00
John McCutchan 8b37da82ef Support paths which are encoded with base64 in http put devfs server code
- [x] Add a new header 'dev_fs_path_b64' which is used over 'dev_fs_path' when present.
- [x] 'dev_fs_path_b64' expects the path encoded as UTF8 and then BASE64.
- [x] Add unit test case.

BUG=
R=turnidge@google.com

Review URL: https://codereview.chromium.org/2386123005 .
2016-10-04 15:31:09 -07:00
Matthias Hausner 1a802d3517 Fix random test failures for issue_27238_test
BUG=27238
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/2378923006 .
2016-09-30 11:14:03 -07:00
John McCutchan b281cb4f2d Enable compression of observatory_assets.tar in standalone GN build
BUG=
R=zra@google.com

Review URL: https://codereview.chromium.org/2375263003 .
2016-09-29 14:26:23 -07:00
John McCutchan 1b5533fe8f Use a larger sleep time in get_allocation_profile_rpc_test so that the test doesn't flake on Windows
Fixes #27444

BUG=
R=kustermann@google.com

Review URL: https://codereview.chromium.org/2378813002 .
2016-09-28 12:45:02 -07:00
Siva Annamalai e8a9a06528 Fix status file for debugger_location_test.
BUG=

Review URL: https://codereview.chromium.org/2371283002 .
2016-09-27 15:51:58 -07:00
John McCutchan 2ed4f4725a Status file tweak
BUG=

Review URL: https://codereview.chromium.org/2377743002 .
2016-09-27 13:02:39 -07:00
John McCutchan 52f9fac257 Split debugger_location_test into two separate tests
Fixes #27434

R=asiva@google.com

Review URL: https://codereview.chromium.org/2376433003 .
2016-09-27 10:59:46 -07:00
William Hesse 0f0bd64ca4 Commit observatory's pubspec.lock to the repo
It is no longer generated, since we have checked in .packages rather
than generating it.  Pub build requires it to be there.

BUG=
R=johnniwinther@google.com

Review URL: https://codereview.chromium.org/2371933004 .
2016-09-27 14:04:47 +02:00
Siva Annamalai ce596133ad Skip service/debugger_location_test see Issue 27434.
BUG=

Review URL: https://codereview.chromium.org/2370193002 .
2016-09-26 21:15:45 -07:00
William Hesse 934b3718c8 Remove observatory GYP dependence on removed timestamp.
BUG=https://github.com/dart-lang/sdk/issues/27412

TBR=cutch

Review URL: https://codereview.chromium.org/2372643002 .
2016-09-26 18:49:03 +02:00
William Hesse 7dbda3eaee Remove pub get from GYP observatory build.
BUG=https://github.com/dart-lang/sdk/issues/27412
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/2370773002 .
2016-09-26 15:50:43 +02:00
John McCutchan 48c6f19600 Respect setLibraryDebuggable
- [x] Mark all libraries debuggable by default
- [x] Mark all dart:_* libraries as not debuggable by default
- [x] Respect setLibraryDebuggable
- [x] Add set library debuggable test case
- [x] Do not allow dart:_* libraries to be marked debuggable

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

BUG=
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/2361183002 .
2016-09-23 10:45:51 -07:00
Zachary Anderson 7e1b7e54d7 Starting work on full GN build
This change:
- Sucks in gn binaries
- Sucks in a version of llvm that the GN build likes
- Adds tools/gn.py to invoke gn
- Adds a root BUILD.gn and .gn file
- Removes chrome boilerplate we don't need
- etc.

This lets us do a standalone build of the 'runtime'
target for x64, ia32, arm, arm64, mips, and the
simulators on Linux, and arm and arm64 on Android.

It does not include tcmalloc, and hasn't been tested
on Mac or Windows. That work and more cleanup of
chrome boilerplate will come in follow-up CLs.

R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/2350583002 .
2016-09-23 07:47:36 -07:00
Matthias Hausner 74e779d4fe Fix stepping over await statements
When async-stepping over an await statement that follows a previous
async-step command, ensure that the synthetic breakpoint at the
beginning of the async closure is not accidentally deleted.

Removing a test that depends on minute details of the internal
implementation of async-step commands.

Adding new test that checks for multiple consecutive async-step
commands.

Note that debugger.cc seems to contain a memory leak. Breakpoint
objects are not deleted (deallocated) when RemoveBreakpoint()
is called. Will address this in a separate CL.

BUG=#27238
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/2366463002 .
2016-09-22 14:06:24 -07:00
William Hesse 8dc3811050 Check in runtime/observatory/.packages
We won't remove it from the .gitignore file until we remove the
build steps that overwrite it.

BUG=https://github.com/dart-lang/sdk/issues/27412

R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/2359213002 .
2016-09-22 18:38:20 +02:00
William Hesse 92cd3e10f5 Fix test.py and tests to use an explicit --packages flag.
BUG=https://github.com/dart-lang/sdk/issues/27412
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/2361813003 .
2016-09-22 17:51:09 +02:00
Matthias Hausner 0dd760092d Add debugger safe point on assignment to global variables
Just like we do for local variables, add a debug step check (and
thus a breakpoint location) to global variable assignment if
the right side of the assignment has no possible breakpoint locations.

BUG=#27287
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/2354773002 .
2016-09-20 14:05:45 -07:00
Ryan Macnak 8610536da7 Misc Observatory tweaks.
- Fix profiler mode descriptions.
 - Add count for ports and class hierarchy.
 - Group 'heap snapshot' and 'heap map' together.

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

Review URL: https://codereview.chromium.org/2359553002 .
2016-09-20 12:44:36 -07:00
William Hesse 80572c4038 Update status for browser tests
BUG=
R=eernst@google.com

Review URL: https://codereview.chromium.org/2358583002 .
2016-09-20 16:36:01 +02:00
John McCutchan d78cbce63d Fix Observatory recompiles on fresh build
- [x] GYPI: Remove buggy dependency on the sdk's packages.stamp which shouldn't have been a dependency in the first place.
- [x] GN: Switch output names to match new non-polymer based build

BUG=

Review URL: https://codereview.chromium.org/2351933002 .
2016-09-19 16:41:42 -07:00
John McCutchan 699e328105 Fix VM connect element test
BUG=

Review URL: https://codereview.chromium.org/2348313002 .
2016-09-19 07:33:44 -07:00
William Hesse 9f3b5d8680 Update observatory_tool.py to remove package-root
BUG=
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/2346483007 .
2016-09-19 10:11:31 +02:00