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>
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>
This clock appears unreliable for durations shorter than ~10ms, which I suspect is the scheduling quantum.
Also remove unnecessary port allocation on macOS.
Bug: https://github.com/flutter/flutter/issues/13111
Change-Id: I9a61fdc076c0766c4519519b4ad6426f2aa556ae
Reviewed-on: https://dart-review.googlesource.com/22282
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
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>
Allows for direct conversion between ftl::TimePoint and Dart_TimelineGetMicros().
Change-Id: I253c9f109f9b80f86aee8e8ed5202a4d6e8b7a85
Reviewed-on: https://dart-review.googlesource.com/3301
Reviewed-by: Ryan Macnak <rmacnak@google.com>
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 .
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 .
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 .
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 .
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/26464R=zra@google.com
Review URL: https://codereview.chromium.org/1982613003 .
- [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 .
- 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 .