John McCutchan
1ff7144c31
Switch to a VM wide timeline recorder
...
- Initialize and shutdown timeline recorder with VM.
- Allocate global blocks for timeline events without an isolate.
- Stop storing the Stream pointer inside a TimelineEvent.
- Store category name in TimelineEvent.
- Store isolate pointer in TimelineEvent.
- TimelineEventRecorder::WriteTo is full VM dump.
- Allow JSONStream to be used without an isolate.
- When a ThreadRegistry is deleted, Finish all open timeline blocks.
- PrintJSON takes a filter.
R=rmacnak@google.com
Review URL: https://codereview.chromium.org//1294023009 .
2015-08-18 15:18:02 -07:00
Zachary Anderson
d4d89d6f12
Reverts VM thread cleanup
...
BUG=
Review URL: https://codereview.chromium.org//1275853008 .
2015-08-07 19:10:31 -07:00
Zachary Anderson
55bfb3d54b
Clean VM thread shutdown:
...
Second attempt at: https://codereview.chromium.org/1177153005/
This time with fixed error propagation in the embedder.
R=turnidge@google.com
Review URL: https://codereview.chromium.org//1279733003 .
2015-08-07 18:42:00 -07:00
Ivan Posva
b07a9ddbca
- Implement .packages specification.
...
Limitation: Currently only works for file: based .package files. If a script is loaded from http: then the VM currently assumes a co-located packages/ directory.
R=asiva@google.com
Review URL: https://codereview.chromium.org//1232593003 .
2015-07-29 11:30:33 -07:00
John McCutchan
075ac55eb3
Introduce dart_tools_api.h
...
- Move contents of dart_debugger_api.h into dart_tools_api.h
- Make dart_debugger_api.h forward to dart_tools_api.h
- Move some (service, timeline) bits of dart_api.h into dart_tools_api.h.
R=asiva@google.com
Review URL: https://codereview.chromium.org//1185983005 .
2015-06-17 09:45:35 -07:00
John McCutchan
c7187924a9
Initial Timeline Events
...
- Each isolate has its own TimelineEventBuffer
- Each isolate has TimelineEventStreams for API, Compiler, Embedder, Isolate, and GC
- Compiler, Isolate, Embedder, and GC are being inserted into the stream
- Basic unit tests
- Dart API for injecting timeline events
- Arbitrary number of native and Dart arguments can be attached to each event
- JSON printing
- Output can be loaded by about://tracing
- Add --timeline-trace-dir flag
Short term follow up CLS:
- Service protocol requests to enable / disable tracing and retrieve a trace
- UI for Observatory
- Dart code EventStreams and Events
R=asiva@google.com
Review URL: https://codereview.chromium.org//1170503004 .
2015-06-16 10:10:14 -07:00
John McCutchan
51d8bae199
Revert "Hide Isolate pointer from embedder"
...
This reverts commit 014e694ba7 .
Revert "Fix fall out from hide isolate pointer change"
This reverts commit 966aafbc81 .
Revert "Fix build"
This reverts commit d7b03ba7b0 .
BUG=
Review URL: https://codereview.chromium.org//1140263005
2015-05-19 11:41:42 -07:00
John McCutchan
014e694ba7
Hide Isolate pointer from embedder
...
BUG=
R=iposva@google.com
Review URL: https://codereview.chromium.org//1130753006
2015-05-18 14:06:10 -07:00
asiva@google.com
35cbf31ca1
Instead of aborting in Builtin::LoadAndCheckLibrary let the caller handle the error condition accordingly.
...
R=rmacnak@google.com
Review URL: https://codereview.chromium.org//1126233009
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45804 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-14 23:27:58 +00:00
iposva@google.com
d0763f97f3
- Add --trace-loading to trace resolution and loading.
...
- Remove unused --print-script option.
R=asiva@google.com
Review URL: https://codereview.chromium.org//1138083003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45720 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-11 22:58:32 +00:00
iposva@google.com
f469f59b60
Reland r45669:
...
- Refactor builtin.dart before any further work in this file.
Change to original submission is to not doubly sanitize the
Windows path when setting the working directory.
R=asiva@google.com
Review URL: https://codereview.chromium.org//1127343004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45703 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-11 18:23:20 +00:00
iposva@google.com
16a29667dd
- Revert r45669 to address Windows issues.
...
R=vegorov@google.com
Review URL: https://codereview.chromium.org//1130003004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45672 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-09 00:59:00 +00:00
iposva@google.com
7f5cdff385
- Refactor builtin.dart before any further work in this file.
...
R=asiva@google.com
Review URL: https://codereview.chromium.org//1137853002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45669 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-08 23:58:01 +00:00
johnmccutchan@google.com
fb58815c44
Remove 'dart:io' import in builtin.dart
...
BUG=
R=iposva@google.com
Review URL: https://codereview.chromium.org//983713002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44274 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-06 00:17:33 +00:00
johnmccutchan@google.com
827338a560
Enable loading via service isolate
...
BUG=
Review URL: https://codereview.chromium.org//980043002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44251 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-05 01:37:05 +00:00
johnmccutchan@google.com
172baa03ff
Service isolate rework take 2
...
Review URL: https://codereview.chromium.org//889443002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43306 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-29 18:31:27 +00:00
iposva@google.com
ad008bf8ba
- Move timer implementation closer to the rest of message handling.
...
R=zra@google.com
Review URL: https://codereview.chromium.org//878323002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43225 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-28 00:39:35 +00:00
johnmccutchan@google.com
db271b0477
Revert r43217, r43215, r43208, r43207, and r43202.
...
Reverting because of some isolate spawn issues (on Windows, and pub bots).
Review URL: https://codereview.chromium.org//867113003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43219 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-27 22:56:18 +00:00
johnmccutchan@google.com
66aa470fc6
* Create vm-service isolate at Dart_Initialize time.
...
* Remove Service create callback.
* Simplify creation of service isolate.
* Creation is done on thread pool.
* Use vm-service isolate for loading in standalone embedder.
* Remove import of dart:io from builtin library.
performance changes:
no service isolate:
$ ./tools/test.py -m release
Test configuration: none_vm_release_ia32
[01:27 | 100% | +12363 | - 0]
$ ./tools/test.py -m release
Test configuration: none_vm_release_ia32
[01:27 | 100% | +12363 | - 0]
always start service isolate (as a thread pool task):
$ ./tools/test.py -m release
Test configuration: none_vm_release_ia32
[01:45 | 100% | +12363 | - 0]
$ ./tools/test.py -m release
Test configuration: none_vm_release_ia32
[01:44 | 100% | +12363 | - 0]
service does I/O (calls to Dart_LoadScript block until service is running):
$ ./tools/test.py -m release
Test configuration: none_vm_release_ia32
[01:55 | 100% | +12363 | - 0]
$ ./tools/test.py -m release
Test configuration: none_vm_release_ia32
[01:55 | 100% | +12363 | - 0]
R=asiva@google.com
Review URL: https://codereview.chromium.org//584023004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43202 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-27 19:45:48 +00:00
regis@google.com
0220e41d72
New bigint implementation in the vm.
...
R=srdjan@google.com
Review URL: https://codereview.chromium.org//509153003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40061 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-09 21:47:44 +00:00
ajohnsen@google.com
ed3981ec78
Reduce the number of Uris parsed in builtin.
...
BUG=
R=iposva@google.com
Review URL: https://codereview.chromium.org//543713002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39896 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-05 05:33:17 +00:00
ajohnsen@google.com
b01818d7be
Don't use async loading in gen_snapshot.
...
This fixes the dartium builds.
BUG=
Review URL: https://codereview.chromium.org//543623003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39855 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-04 09:42:22 +00:00
ajohnsen@google.com
8c633a390e
Cleanup resource loading of the VM.
...
There is not only one path for loading resources, and it's async.
BUG=
Review URL: https://codereview.chromium.org//529203004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39847 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-04 06:42:01 +00:00
rmacnak@google.com
e803f27641
Make Dart_LoadLibrary and Dart_LoadSource take line and column offsets like Dart_LoadScript.
...
BUG=http://dartbug.com/13460
R=hausner@google.com
Review URL: https://codereview.chromium.org//429013002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38801 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-31 21:25:23 +00:00
hausner@google.com
4258c115b4
Handle load errors in deferred code
...
IO errors on the URL of a deferred library are forwarded to the Future
that handles the deferred load. Syntax errors and finalization errors
are lethal, killing the isolate.
Review URL: https://codereview.chromium.org//419103003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38800 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-31 21:09:33 +00:00
asiva@google.com
bba79810d5
Fix for the load error that is happening with dart_no_snapshot.
...
R=hausner@google.com
Review URL: https://codereview.chromium.org//411793003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38519 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-23 20:31:23 +00:00
asiva@google.com
97b903c665
Fix for issue 19817
...
- do not try to finalize classes on every Dart API call which could
potentially result in calls to dart code
- Invoke Dart_FinalizeLoading after all loads are done to ensure that
classes are finalized
R=hausner@google.com
Review URL: https://codereview.chromium.org//411633002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38471 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-22 20:08:15 +00:00
asiva@google.com
a8195aeb5c
Change the Dart API call Dart_FInalizeLoading to accept an additional argument
...
which makes completion of deferred library futures optional.
R=hausner@google.com
Review URL: https://codereview.chromium.org//407143004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38463 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-22 16:56:14 +00:00
hausner@google.com
6cc8cbc53b
Adding embedder API function Dart_FinalizeLoading
...
Embedder must call Dart_FinalizeLoading when all outstanding
load requests are satisfied, to complete the deferred loading
futures.
R=asiva@google.com
Review URL: https://codereview.chromium.org//341543004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37423 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-17 21:05:30 +00:00
hausner@google.com
4eac05607f
Lazy loading of deferred libraries
...
Defer reading of source code of deferred libraries until the
Dart code executes the loadLibrary() call.
R=iposva@google.com
Review URL: https://codereview.chromium.org//328923002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37334 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-13 22:43:31 +00:00
hausner@google.com
c6101ca4b5
First step towards asynchronous loading of sources. With this change, sources are read asynchronously in dart code (builtin.dart) and when the i/o future completes, a callback in the VM loads and compiles the script or library code.
...
In a next step, the i/o will be moved to the service isolate so that not all isolates have to import dart:io.
Fallout from this change:
1) Loading has become a tad slower. Will have to investigate why.
2) Errors that happen during loading (file not found, compilation error in an imported library) are no longer reported at the offending import clause. This can be fixed later if necessary by passing the import clause source location to the library tag handler.
Review URL: https://codereview.chromium.org//290713004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36575 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-23 17:43:14 +00:00
hausner@google.com
12c56b29c7
Eliminate unused url mapping parameter in dartutils
...
Change the LibraryTagHandler used in unit tests to match
the real tag handler better, eliminating special treatment
of url canonicalization. This required changing the library
url of tests so tests don’t get loaded using dart scheme urls,
since builtin.dart doesn’t handle dart: urls.
R=iposva@google.com
Review URL: https://codereview.chromium.org//270503007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35987 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-09 18:25:41 +00:00
iposva@google.com
7256650645
- Change when the library being loaded is registered. Now
...
we register it before calling the tag handler so that the
VM can keep track of which libraries have outstanding
requests.
R=hausner@google.com
Review URL: https://codereview.chromium.org//267353005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35870 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-07 21:46:05 +00:00
iposva@google.com
fd8565b071
- Add a minimal implementation of Capability.
...
- Make RawReceivePort and SendPort VM internal objects.
- Rationalize the creation of ports and their handling within the VM.
R=asiva@google.com
Review URL: https://codereview.chromium.org//243973002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35325 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-23 19:44:03 +00:00
ajohnsen@google.com
23aea27441
Prefix io part uri's with 'dart:io/'.
...
BUG=https://code.google.com/p/dart/issues/detail?id=17083
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//203073004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33799 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-18 11:29:06 +00:00
asiva@google.com
e380b175f8
Pass in the isolate parameter to the weak persistent callback handler so that
...
there is no need to access the current isolate in the callback and delete
path (this code is run while a GC is in progress).
See https://codereview.chromium.org/185643003/ for corresponding changes
in dartium
R=iposva@google.com
Review URL: https://codereview.chromium.org//186003002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33282 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-04 18:11:19 +00:00
whesse@google.com
1ab4461654
Refactor native extension shared library lookup.
...
BUG=
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//186473003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33275 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-04 14:39:12 +00:00
whesse@google.com
32b2fd3cf1
Change handling of dart-ext: URIs for native extensions.
...
With this change, a dart-ext: URI is now an opaque URI consisting of
the scheme dart-ext: followed by an actual URI, either relative, or
with a scheme like file:, http:, or package:. Existing users are mostly
or all using relative URIs, so this change should not affect them.
This is a step toward allowing native extensions in packages to be served
over http, and also cleans up the code, and would help a future change
that replaces "dart-ext:" with metadata or an annotation.
BUG=
R=iposva@google.com
Review URL: https://codereview.chromium.org//180783008
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33216 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-03 14:51:44 +00:00
ajohnsen@google.com
140fddd06e
Make event-handlers edge-triggered and move socket-state to Dart.
...
This eliminates to pause/resume calls made in the previous one-shot based model.
BUG=
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//169383003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32780 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-19 09:44:26 +00:00
lrn@google.com
3b3e87cabc
Revert "Rename internal library dart:_collection-dev to dart:_internal."
...
Dartium needs updating too.
Committed: https://code.google.com/p/dart/source/detail?r=31827
R=floitsch@google.com
Review URL: https://codereview.chromium.org//133273011
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31877 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-16 12:06:38 +00:00
iposva@google.com
781f737c6a
First round of http://dartbug.com/15922 :
...
- Address warnings about 64-bit to 32-bit conversions.
- Remove heap profiler.
R=asiva@google.com
Review URL: https://codereview.chromium.org//139043003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31867 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-16 05:05:35 +00:00
lrn@google.com
ead87f47e9
Revert "Rename internal library dart:_collection-dev to dart:_internal."
...
Dartium needs updating too.
Review URL: https://codereview.chromium.org//133273011
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31827 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-15 12:27:44 +00:00
lrn@google.com
0098710559
Rename internal library dart:_collection-dev to dart:_internal.
...
BUG= http://dartbug.com/14140
R=floitsch@google.com
Review URL: https://codereview.chromium.org//133893007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31823 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-15 09:24:46 +00:00
johnmccutchan@google.com
c76b6eb1c2
Split service into VM and embedder specific bits.
...
Move most service sources into the VM.
R=asiva@google.com
Review URL: https://codereview.chromium.org//125103004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31809 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-14 22:34:43 +00:00
srdjan@google.com
f2950ec3fd
Better error reporting when passing a non-UTF8 file as script:
...
./xcodebuild/DebugIA32/dart xcodebuild/DebugIA32/dart
Before: Dart_NewStringFromUTF8 expects argument 'str' to be valid UTF-8.
Now: ./xcodebuild/DebugIA32/dart is not a valid UTF-8 script
R=asiva@google.com
Review URL: https://codereview.chromium.org//118123006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31426 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-02 19:14:20 +00:00
floitsch@google.com
4b316431fa
Implement scheduleImmediate for the VM.
...
BUG= http://dartbug.com/9001
R=iposva@google.com
Review URL: https://codereview.chromium.org//79243002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30797 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-02 16:27:07 +00:00
sgjesse@google.com
b99d27ec86
Simplify some argument checking for socket calls
...
Ensure valid range in the C++ code. Leave any argument checking with
"user-friendly" error messaged to the Dart code.
R=ajohnsen@google.com
BUG=
Review URL: https://codereview.chromium.org//91043003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30713 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-27 12:12:08 +00:00
sgjesse@google.com
c97dc6f9fb
Propagate errors from DartUtils helper functions
...
Instead of asserting in debug mode just propagate any errors.
R=ajohnsen@google.com
BUG=
Review URL: https://codereview.chromium.org//91293002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30709 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-27 11:46:20 +00:00
iposva@google.com
14696031b3
- Do not use size_t.
...
Review URL: https://codereview.chromium.org//59083012
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29952 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-06 01:08:22 +00:00
iposva@google.com
070d3dedf7
- Add a per-isolate pseudo random number generator to the
...
VM internals. This PRNG is not used to generate random
numbers in Dart code.
- Use the PRNG to generate JIT cookies for large constants
if needed during assembly.
- Add the possibility to set an external entropy source
for the PRNG through the C API.
R=asiva@google.com
Review URL: https://codereview.chromium.org//59773007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29950 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-06 00:59:46 +00:00