Matthew Dempsky
adf48e4d4b
[vm] Fix header includes
...
In https://dart-review.googlesource.com/c/sdk/+/91104 , I meant to
delete #include <endian.h>, and accidentally removed #include
<errno.h> instead.
Change-Id: I52e55350d2817c3e6543a8bf806492f1b1dcf3db
Reviewed-on: https://dart-review.googlesource.com/c/91109
Auto-Submit: Matthew Dempsky <mdempsky@google.com >
Reviewed-by: Siva Annamalai <asiva@google.com >
Commit-Queue: Siva Annamalai <asiva@google.com >
2019-01-25 02:03:51 +00:00
Matthew Dempsky
ec6b212421
[vm] Remove unused endian-conversion code
...
These seem to have accidentally snuck in as part of
https://codereview.chromium.org/14299008
Change-Id: I861eba1655d6f175ddfabf2a39908168b890d911
Reviewed-on: https://dart-review.googlesource.com/c/91104
Reviewed-by: Siva Annamalai <asiva@google.com >
Commit-Queue: Siva Annamalai <asiva@google.com >
2019-01-24 23:32:33 +00:00
Ryan Macnak
94f93f788a
[vm] Remove Dart scanner.
...
Change-Id: I6435aef9574167dda71f7d15852e32e40d38e381
Reviewed-on: https://dart-review.googlesource.com/c/83224
Reviewed-by: Siva Annamalai <asiva@google.com >
Commit-Queue: Ryan Macnak <rmacnak@google.com >
2018-11-09 00:13:26 +00:00
Ben Konyi
07852532e3
[ VM ] Additional cleanup in Dart_Initialize and Dart_Cleanup
...
Change-Id: I6dc02b3d9de16cc176eb97613bc0c7f0bb9b16eb
Reviewed-on: https://dart-review.googlesource.com/77013
Commit-Queue: Ben Konyi <bkonyi@google.com >
Commit-Queue: Ryan Macnak <rmacnak@google.com >
Reviewed-by: Ryan Macnak <rmacnak@google.com >
Auto-Submit: Ben Konyi <bkonyi@google.com >
2018-09-28 23:18:59 +00:00
Ben Konyi
3c4c62d79a
Reland "[VM] Dart_Initialize no longer crashes after Dart_Cleanup"
...
This is a reland of 519ee905f9
Original change's description:
> [VM] Dart_Initialize no longer crashes after Dart_Cleanup
>
> Change-Id: I3cfdab9553aad045f024b6f9aec0b40b08234007
> Reviewed-on: https://dart-review.googlesource.com/75786
> Reviewed-by: Ryan Macnak <rmacnak@google.com >
> Commit-Queue: Ben Konyi <bkonyi@google.com >
Change-Id: Icdd901bf1ab0b675cc5f1497061a2b7b8a05d956
Reviewed-on: https://dart-review.googlesource.com/76561
Commit-Queue: Ben Konyi <bkonyi@google.com >
Reviewed-by: Ryan Macnak <rmacnak@google.com >
2018-09-26 17:54:45 +00:00
Ben Konyi
b6284b41e3
Revert "[VM] Dart_Initialize no longer crashes after Dart_Cleanup"
...
This reverts commit 519ee905f9 .
Reason for revert: Seeing multiple crashes on Windows
Original change's description:
> [VM] Dart_Initialize no longer crashes after Dart_Cleanup
>
> Change-Id: I3cfdab9553aad045f024b6f9aec0b40b08234007
> Reviewed-on: https://dart-review.googlesource.com/75786
> Reviewed-by: Ryan Macnak <rmacnak@google.com >
> Commit-Queue: Ben Konyi <bkonyi@google.com >
TBR=bkonyi@google.com ,rmacnak@google.com ,zra@google.com
Change-Id: I33ad79dbc3fcf44f93612ff63bd2d8431f6067c8
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/76342
Reviewed-by: Ben Konyi <bkonyi@google.com >
Commit-Queue: Ben Konyi <bkonyi@google.com >
2018-09-25 02:17:37 +00:00
Ben Konyi
519ee905f9
[VM] Dart_Initialize no longer crashes after Dart_Cleanup
...
Change-Id: I3cfdab9553aad045f024b6f9aec0b40b08234007
Reviewed-on: https://dart-review.googlesource.com/75786
Reviewed-by: Ryan Macnak <rmacnak@google.com >
Commit-Queue: Ben Konyi <bkonyi@google.com >
2018-09-25 01:20:24 +00:00
Vyacheslav Egorov
beaf05efa3
[vm] When generating JITDUMP also dump IR and attach it as source to code.
...
This allows to see IR intermixed with code in perf-annotate.
Change-Id: Ib7261df2cb789bfb6e3854a32d5300d0c27302ba
Reviewed-on: https://dart-review.googlesource.com/66575
Commit-Queue: Vyacheslav Egorov <vegorov@google.com >
Reviewed-by: Martin Kustermann <kustermann@google.com >
2018-07-30 12:35:45 +00:00
Alexander Markov
c3b5939965
[vm] Remove --limit-ints-to-64-bits option and old _Bigint class
...
Closes https://github.com/dart-lang/sdk/issues/33306
Change-Id: I7088d8b7143edbe24f5cefe4be037ad2006e0625
Reviewed-on: https://dart-review.googlesource.com/58101
Commit-Queue: Alexander Markov <alexmarkov@google.com >
Reviewed-by: Régis Crelier <regis@google.com >
Reviewed-by: Ryan Macnak <rmacnak@google.com >
2018-06-04 20:10:40 +00:00
Ryan Macnak
265ab831b6
[vm] Partial fixes for LTO.
...
Change-Id: Ic867777a7fc5df6631ce11030195d1323d7111ed
Reviewed-on: https://dart-review.googlesource.com/52983
Reviewed-by: Zach Anderson <zra@google.com >
2018-04-30 19:23:58 +00:00
Ryan Macnak
558a931409
[vm] Move some string utils from runtime/vm to runtime/platform.
...
Change-Id: I552086445a7e07792f9da85afa5edf23b6c450d5
Reviewed-on: https://dart-review.googlesource.com/44402
Reviewed-by: Siva Annamalai <asiva@google.com >
Commit-Queue: Ryan Macnak <rmacnak@google.com >
2018-03-01 02:07:46 +00:00
Alexander Markov
59cdc65dc7
[VM] Relax constraints for integer literals according to int64 spec
...
Handling of integer literals is corrected according to the informal spec
for the fixed-size integers:
https://github.com/dart-lang/sdk/blob/master/docs/language/informal/int64.md
This change allows unsigned 64-bit hexadecimal literals and MIN_INT64
to be used when running on the VM with --limit-ints-to-64-bits option.
Change-Id: Ied7a7688768bcf4ff40ab5b499dd71622d2c3948
Reviewed-on: https://dart-review.googlesource.com/19400
Reviewed-by: Siva Annamalai <asiva@google.com >
Commit-Queue: Alexander Markov <alexmarkov@google.com >
2017-11-09 16:58:38 +00:00
Jens Johansen
8b1deeb02b
Don't reuse va_list on Android
...
Before it was used twice (to write to stderr and to forward to logcat.)
The result: The logcat one (which is what you actually get when running
on Android) prints arbitrary data.
Now it only forwards to logcat and the output is as expected.
Bug:
Change-Id: I12eecab93f883164765711994ab7f014030bf3a0
Reviewed-on: https://dart-review.googlesource.com/4422
Reviewed-by: Vyacheslav Egorov <vegorov@google.com >
Commit-Queue: Jens Johansen <jensj@google.com >
2017-09-08 14:37:32 +00:00
Carlo Bernaschina
0cbbeeb288
Restore "Add current rss and embedder name to Observatory"
...
Made benchmark_test.cc independent from Service by using the
implementation of MaxRSS from bin::Process
Related https://github.com/dart-lang/sdk/commit/ce736d3ef009bf334a92d5b7d354fc0b04805b4f
R=bkonyi@google.com
TBR=rmacnak@google.com
Review-Url: https://codereview.chromium.org/2994223002 .
2017-08-14 17:02:30 -07:00
Carlo Bernaschina
2f5a59e658
Revert "Add current rss and embedder name to Observatory"
...
This reverts commit ce736d3ef0 .
TBR=zra@google.com
Review-Url: https://codereview.chromium.org/2999933002 .
2017-08-14 15:45:13 -07:00
Carlo Bernaschina
ce736d3ef0
Add current rss and embedder name to Observatory
...
Moved the responsibility to provide MaxRSS and CurrentRSS from the VM to
the embedder.
The embedder can opt-it by setting a Dart_GetEmbedderInformation
callback using the public Dart_SetEmbedderInformationCallback API.
The implementation of the Dart_GetEmbedderInformation should mandatory
fill the version field and the ones it is able to fill.
The name field must reference a constant C style string, it will not be
freed by the VM code.
R=zra@google.com
Review-Url: https://codereview.chromium.org/2996803002 .
2017-08-14 15:22:46 -07:00
Zachary Anderson
6cd8a79078
VM: Re-format to use at most one newline between functions
...
R=asiva@google.com
Review-Url: https://codereview.chromium.org/2974233002 .
2017-07-13 08:08:37 -07:00
Zachary Anderson
ac16656161
Remove MIPS support
...
R=asiva@google.com
Review-Url: https://codereview.chromium.org/2858623002 .
2017-06-22 08:49:22 -07:00
Martin Kustermann
ac8d2056a3
Fix asserts in StackFrameIterator which were effectively disabled
...
The assertions which tried to assert that we only use
StackFrameIterator to walk frames of the current thread was incorrect.
We already have cases where other threads will walk the stack of the
mutator thread, see below for an example where this can happen.
Thread::VisitObjectPointers was incorrectly passing Thread::Current() to
the StackFrameIterator instead of 'this'. (Code in thread_registry.cc will
loop over a number of threads and calls VisitObjectPointers on them)
Mutator thread:
0 pthread_cond_wait@@GLIBC_2.3.2
1 dart::Monitor::WaitMicros
2 dart::Monitor::Wait
3 dart::MonitorLocker::Wait
4 dart::ThreadBarrier::Sync
5 dart::GCMarker::MarkObjects
6 dart::PageSpace::MarkSweep
7 dart::Heap::CollectOldSpaceGarbage
8 dart::Heap::CollectNewSpaceGarbage
9 dart::Heap::CollectGarbage
10 dart::DN_HelperObject_<native>
11 dart::BootstrapNatives::<native>
<dart frames>
MarkTask thread:
1 dart::EntryFrame::VisitObjectPointers
2 dart::Thread::VisitObjectPointers <---- Walks mutator thread stack
3 dart::ThreadRegistry::VisitObjectPointers <---- Iterates over a number of threads
4 dart::Isolate::VisitStackPointers
5 dart::Isolate::VisitObjectPointers
6 dart::GCMarker::IterateRoots
7 dart::MarkTask::Run
8 dart::ThreadPool::Worker::Loop
9 dart::ThreadPool::Worker::Main
10 dart::ThreadStart
R=rmacnak@google.com
Review-Url: https://codereview.chromium.org/2845053003 .
2017-05-03 10:27:01 +02:00
Ryan Macnak
877284947b
Rename TARGET_OS_* to HOST_OS_*.
...
Like HOST_ARCH_*, HOST_OS_* describes the OS the VM is running on, which may be different from the OS the VM is generating code for during AOT compilation.
Currently we conflate the two when emitting AOT as assembly, and we get away with it because Flutter only uses assembly for targeting iOS and one can only target iOS from a Mac, but we expect to use assembly for Android as well so native tools can unwind Dart frames.
R=zra@google.com
Review-Url: https://codereview.chromium.org/2750843003 .
2017-03-15 13:11:05 -07:00
Ben Konyi
68a102cab2
Fixed tests not having MallocHooks initialized for tests in release mode.
...
Revert "Revert "Fixed issue in MallocHooks where a MallocHookScope was accidentally removed during a merge, causing a deadlock in the hooks. Also turned off stack trace collection in a test that was timing out as a result of the stack trace collection.""
This reverts commit 1a5b555aa9 .
BUG=
R=zra@google.com
Review-Url: https://codereview.chromium.org/2711353003 .
2017-02-24 13:56:06 -08:00
Ben Konyi
1a5b555aa9
Revert "Fixed issue in MallocHooks where a MallocHookScope was accidentally removed during a merge, causing a deadlock in the hooks. Also turned off stack trace collection in a test that was timing out as a result of the stack trace collection."
...
This reverts commit 44a9a4ede3 .
BUG=
Review-Url: https://codereview.chromium.org/2714083002 .
2017-02-23 19:21:00 -08:00
Ben Konyi
44a9a4ede3
Fixed issue in MallocHooks where a MallocHookScope was accidentally removed during a merge, causing a deadlock in the hooks. Also turned off stack trace collection in a test that was timing out as a result of the stack trace collection.
...
Updated MallocHooks to collect stack traces when memory is allocated.
BUG=
R=johnmccutchan@google.com
Review-Url: https://codereview.chromium.org/2718523003 .
2017-02-23 18:58:50 -08:00
Ben Konyi
d4f026c2e0
Revert "Updated MallocHooks to collect stack traces when memory is allocated."
...
This reverts commit a486a8a26b51dce728373183ab02aeda70e6f2d0.
R=johnmccutchan@google.com
TBR=johnmccutchan@google.com
BUG=
Review-Url: https://codereview.chromium.org/2713803003 .
2017-02-23 13:13:44 -08:00
Ben Konyi
47f0da9cd7
Updated MallocHooks to collect stack traces when memory is allocated.
...
BUG=
R=johnmccutchan@google.com , zra@google.com
Review-Url: https://codereview.chromium.org/2680213002 .
2017-02-23 12:42:18 -08:00
Zachary Anderson
a1bcf051d8
clang-format runtime/vm
...
R=johnmccutchan@google.com
Review URL: https://codereview.chromium.org/2481873005 .
2016-11-08 13:54:47 -08:00
Ryan Macnak
5c06127e2d
Remove unused external typed data factories.
...
R=johnmccutchan@google.com
Review URL: https://codereview.chromium.org/2276803002 .
2016-08-25 10:29:17 -07:00
Ryan Macnak
80e4763a21
Observatory: Report peak process memory usage.
...
BUG=
R=johnmccutchan@google.com
Review URL: https://codereview.chromium.org/2250793004 .
2016-08-17 13:38:52 -07:00
Ryan Macnak
85cdc0eac2
Don't assume we want the iOS ABI if running simarm on Mac and the EABI otherwise.
...
Allow controlling the target ABI by defining TARGET_ABI_IOS or TARGET_ABI_EABI. If neither is defined, default to the previous behavior.
Make Linux, Mac, Android and iOS agree on the value of PreferredCodeAlignment for all architectures.
BUG=http://dartbug.com/26464
R=zra@google.com
Review URL: https://codereview.chromium.org/1982613003 .
2016-05-17 15:03:54 -07:00
Ryan Macnak
061b601f68
strnlen is not always available.
...
R=asiva@google.com
Review URL: https://codereview.chromium.org/1989513002 .
2016-05-17 12:24:53 -07:00
John McCutchan
f6b570aa2a
Include thread CPU time in Timeline.
...
- [x] Refactor old OSThread interface for querying thread CPU time into OS::GetCurrentThreadCPUMicros.
- [x] Add data to TimelineEvent to track thread CPU time.
- [x] Include "tts" and "tdur" properties when converting the timeline to JSON
Fixes #26396
BUG=
R=rmacnak@google.com
Review URL: https://codereview.chromium.org/1960483002 .
2016-05-05 16:34:09 -07:00
Vyacheslav Egorov
ee0f608ce4
Dart Byte Code interpreter.
...
This version is Clang/GCC only and does not support Windows because it uses computed goto's.
Only unoptimized mode is supported.
Architecture is described in constants_dbc.h and stack_frame_dbc.h.
R=fschneider@google.com , zra@google.com
Review URL: https://codereview.chromium.org/1858283002 .
2016-04-18 23:02:01 +02:00
Siva Annamalai
f7d2b2e31e
- Fix for issue 25950 (add registration of a thread exit callback)
...
- Moved some of the file and entropy callbacks to class Dart from
class Isolate as they are not isolate specific.
R=johnmccutchan@google.com
Review URL: https://codereview.chromium.org/1807293002 .
2016-03-17 13:40:20 -07:00
John McCutchan
fda3a9bc2b
Remove more things
...
(stripped) dart_product before: 5307888
(stripped) dart_product after: 5275088
Reduction in size: 32800 bytes.
Removed entirely:
- debuginfo*
- elfgen*
- gdbjit*
- TraceBuffer
- vtune support
Removed in product:
- Compiler stats
- Code observers
R=asiva@google.com
Review URL: https://codereview.chromium.org/1711163002 .
2016-02-22 08:53:11 -08:00
John McCutchan
dd4ef29098
Refactor monotonic clock interface and use raw tick values in stopwatch
...
- Split interface to provide direct access to raw clock value and clock frequency.
- Update Stopwatch to use raw clock value and clock frequency instead of microseconds.
- Fix possible initialization race on OSX
R=rmacnak@google.com
Review URL: https://codereview.chromium.org/1563473002 .
2016-01-05 11:22:20 -08:00
Ryan Macnak
c99df050b1
Use a monotonic clock in the implementation of Stopwatch.
...
Rename OS::GetCurrentTraceMicros() to OS::GetCurrentMonotonicMicros().
BUG=http://dartbug.com/477
BUG=http://dartbug.com/12383
R=iposva@google.com
Review URL: https://codereview.chromium.org/1504523002 .
2015-12-08 10:12:05 -08:00
John McCutchan
3d0c4bf586
Make timeline use the same clock source as mojo's tracing infrastructure
...
- This ensures that we have consistent timestamps across processes.
- This is necessary to properly support mojo.
- Add new public API to query timeline clock.
R=rmacnak@google.com
Review URL: https://codereview.chromium.org//1367973004 .
2015-09-25 10:04:23 -07:00
Zachary Anderson
16393ee9c6
Uses SNPRINT macro where possible. Otherwise uses #define for format.
...
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 .
2015-09-11 00:18:14 -07:00
Daniel Andersson
c089a152ac
Migrate most uses of Isolate::current_zone to Thread::zone.
...
After https://codereview.chromium.org/1204303003/ is submitted, the last remaining uses can go.
BUG=
R=asiva@google.com
Review URL: https://codereview.chromium.org//1220193009 .
2015-07-08 09:59:32 -07:00
Ivan Posva
8f1506e817
- Determine whether the simulator is being used in globals.h
...
- Make sure to switch on HOST_ARCH_ and on USING_SIMULATOR
where appropriate.
- Avoid allocating in new generation when running in the VM isolate.
BUG=
R=srdjan@google.com
Review URL: https://codereview.chromium.org//1156053006
2015-05-29 14:35:29 -07:00
zra@google.com
ec1140b188
Adds support for building arm64 Android.
...
R=regis@google.com
Review URL: https://codereview.chromium.org//539573003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39844 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-03 23:31:51 +00:00
iposva@google.com
28c8553cb6
- Fix a lot of warnings generated by -Wshorten-64-to-32
...
when compiling for ia32 on Mac.
R=vegorov@google.com
Review URL: https://codereview.chromium.org//415513002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38499 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-23 14:10:13 +00:00
iposva@google.com
9f6006f8c8
Fix dartbug.com/19998
...
- Do not attempt to interact with files if hooks are not installed.
- Remove obsolete code observers.
- Remove obsolete API functions.
R=asiva@google.com , fschneider@google.com
Review URL: https://codereview.chromium.org//390043002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38226 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-15 09:14:40 +00:00
johnmccutchan@google.com
ef2adfc5c6
Allow StackFrameIterator to be used on a different thread than the isolate whose stack frames are being iterated over.
...
This is necessary to be able to use this in the profiler.
BUG=
R=asiva@google.com
Review URL: https://codereview.chromium.org//354063004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37886 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-01 17:38:13 +00:00
johnmccutchan@google.com
a0682663e0
Fix Android build warnings
...
BUG=
R=zra@google.com
Review URL: https://codereview.chromium.org//287933002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36183 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-14 18:32:11 +00:00
johnmccutchan@google.com
919dc2d6eb
* Introduce ThreadInterrupter which calls a TLS set callback when thread is interrupted.
...
* Threads can only register and unregister themselves with ThreadInterrupter.
* Profiler is no longer involved in interrupting threads. It's just a callback and the buffer.
* Profiler operates lock free using an atomic operation to reserve sample in sample buffer.
* Linux, Mac, and Windows done.
R=asiva@google.com
Review URL: https://codereview.chromium.org//109803002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31170 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-16 18:52:15 +00:00
iposva@google.com
d0b681f354
- Write the coverage data to a file instead of printing to stdout.
...
- Explicitly include lines with zero hits.
R=asiva@google.com , mlippautz@google.com
Review URL: https://codereview.chromium.org//24255013
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27726 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-20 21:37:48 +00:00
jacobr@google.com
605b33c1bc
fix cpp11 compile errors
...
R=asiva@google.com
Review URL: https://codereview.chromium.org//23072026
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26387 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-20 20:24:11 +00:00
iposva@google.com
c3c942407b
Fix dartbug.com/10415:
...
- Append 'on "$os_$arch"' to the version string on the VM.
Review URL: https://codereview.chromium.org//14593004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22452 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-07 07:59:03 +00:00
asiva@google.com
ea5a3919c5
Resubmit 22380 after fixing the windows build.
...
R=hausner@google.com
Review URL: https://codereview.chromium.org//14645025
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22396 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-03 22:50:26 +00:00