Fix order in Dart_CreateIsolate and some tests.
Change-Id: Iceb748be3f7aa6b68ce7abb7f65a3c54ad63c1d8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100795
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
- Introduce a slimmed down version of thread.h, which just depends on the
Zone and StackResource.
- Introduce a layering check that would prevent the coupling in the future.
This is the first step towards decoupling compiler from runtime.
There are multiple reasons to introduce the decoupling but the main
reason currently is to introduce a controlled surface through which
compiler reaches into runtime to catch any places where runtime word size
might influence the compiler and then enable building compiler that
targets 32-bit runtime but is embedded into a 64-bit runtime.
Issue https://github.com/dart-lang/sdk/issues/31709
Change-Id: Id63ebbaddca55dd097298e51c90d957a73fa476e
Reviewed-on: https://dart-review.googlesource.com/c/87182
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Remove some dead includes.
Change-Id: I31f3e739e5ee46dcbba5d6a2f091491b46402943
Reviewed-on: https://dart-review.googlesource.com/60146
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
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 .
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/2609253002 .
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=asiva@google.com
Review-Url: https://codereview.chromium.org/2608463002 .
This unburdens users of StackZone from needing to include handles_impl.h. A new use of StackZone was recently added to heap.cc without a include of handles_impl.h, and this caused link-time errors on some versions of gcc.
R=asiva@google.com
Review URL: https://codereview.chromium.org/2362573002 .
Adds Dart_DefaultCanonicalizeUrl() to the dart embedding api.
Motivation:
As we try to get source reloading working for the standalone embedder, things get simpler if an isolate doesn't run Dart code while it is loading Dart code. We intend to solve this by moving the embedder tag handler calls to the service isolate. But making a blocking rpc into the service isolate whenever a url needs to be canonicalized during parsing seems like it would slow things down and make things complicated. By moving canonicalization into C++, we avoid this.
R=ahe@google.com, fschneider@google.com, johnmccutchan@google.com
Review URL: https://codereview.chromium.org/2011543002 .
- Add PRODUCT define and build mode to gyp configurations.
- Add product mode to test harness.
- Start to unify list of flags.
- Allow flags to be constant for particular build configurations.
R=fschneider@google.com
Review URL: https://codereview.chromium.org/1663863002 .
- This CL only adds support for synchronous blocks of time. A follow up CL will add asynchronous blocks of time.
- Reports true thread id to tracing system. This is an improvement over Mojo's tracing helper.
- Dart events are included in individual isolate traces and global traces obtained via the embedders API.
- Dart events are included in the write to disk path (--timeline_dir).
R=rmacnak@google.com
Review URL: https://codereview.chromium.org//1377663002 .
I was able to convert 49 SNPrint(NULL, 0, ...) patterns to use the
macro. I had to use a #define for the format string 5 times due to
uses that didn't fit the macro.
2 occurences of SNPrint(NULL, 0, ...) had >=2 possibilities for the
format string based on runtime values, and I didn't try to convert
them.
Fixed ~10 format strings.
BUG=
R=iposva@google.com
Review URL: https://codereview.chromium.org//1331623002 .
- Add TimelineEventBlockIterator - iterate over TimelineEventBlocks.
- Add TimelineAnalysisThread - All events for a specific thread.
- Add TimelineAnalysis - Utility for analyzing timeline events.
- Add unit test for TimelineAnalysis thread discovery and block sorting.
R=rmacnak@google.com
Review URL: https://codereview.chromium.org//1284263002 .
This is needed to enable parallel marking/sweeping (and in the future, compilation) tasks to have their own zone allocations and to safely call code that relies on various scoped constructs (stack resources).
The next step is to migrate the scopes like NoSafepointScope, NoHandleScope, etc. from isolate- to thread-based interfaces.
NOTE: This is a copy of issue 1204303003.
BUG=
Review URL: https://codereview.chromium.org//1226403003 .
where possible without having to invoke Isolate::Current()
- Modified lookupWrapper to accept DartDOMData as a parameter so that the return to Dart functions
won't invoke Isolate::Current()
Some Dromaeo numbers before this change:
CONSOLE MESSAGE: RESULT: Dromaeo-drt dartium-dart dom-attr getAttribute runs-per-second 1162.2
CONSOLE MESSAGE: RESULT: Dromaeo-drt dartium-dart dom-attr element_property_access runs-per-second 1255.6
after this change:
CONSOLE MESSAGE: RESULT: Dromaeo-drt dartium-dart dom-attr getAttribute runs-per-second 1237.6
CONSOLE MESSAGE: RESULT: Dromaeo-drt dartium-dart dom-attr element_property_access runs-per-second 1385.4
R=rmacnak@google.com, vsm@google.com
Review URL: https://codereview.chromium.org//24376005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27789 260f80e4-7a28-3924-810f-c04153c831b5
Instead of passing a size in bytes to the allocation function, we now
have a templatized Alloc function:
zone->Alloc<Type>(len)
This is better for security, as we can check for integer overflow in
the size computation before performing the allocation. Before, we
often failed to check this.
Review URL: https://chromiumcodereview.appspot.com//10836061
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10254 260f80e4-7a28-3924-810f-c04153c831b5
The purpose of this change is twofold:
1. Source in the bin directory can now use the same assertions as
source in the vm directory. The ASSERT macro used by the code
in runtime/bin was just defined to use assert from the standard
C library.
2. Moving other implementation parts from runtime/vm to
runtime/platform (e.g. classes Monitor and Mutex) for sharing
between runtime/bin and runtime/vm will be easier as these
implementations rely on these assertion macros.
Created two gypi files for the platform directory. One for the
headers and one for the source. The source one is only included
when building the VM library and will be present in libdart.a
when the dart executable is linked.
All the code for asserts is still in the dart namespace.
Also re-arranged the order of includes to be alphabetically in
the files touched.
R=ager@google.com, iposva@google.com
BUG=
TEST=
Review URL: http://codereview.chromium.org//9189003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3335 260f80e4-7a28-3924-810f-c04153c831b5