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
Ryan Macnak
09f63eef5a
[vm] Don't collect thread CPU time for timeline events on iOS.
...
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 >
2017-11-21 17:13:39 +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
Ryan Macnak
a456515c6e
[ios] Use mach_absolute_time instead of boot time for the monotonic clock.
...
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 >
2017-09-05 16:49:35 +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
Siva Annamalai
9b1412031b
Fixes issue 29539 with the workaround of initializing libnotify early by calling localtime_r in OS::InitOnce().
...
BUG=Fixes #29539
R=rmacnak@google.com
Review-Url: https://codereview.chromium.org/2854303005 .
2017-05-03 18:24:39 -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
John McCutchan
4653729898
Fix ios build
...
BUG=
Review URL: https://codereview.chromium.org/1997813002 .
2016-05-19 12:45:57 -07:00
John McCutchan
7434bcad57
Allow Dart_TimelineGetMicros to be called before Dart_Initialize on Mac
...
Fixes #26486
R=rmacnak@google.com
Review URL: https://codereview.chromium.org/1991013002 .
2016-05-18 14:48:43 -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
20bff77701
Implement OS::GetCurrentThreadCPUMicros for iOS
...
BUG=
R=rmacnak@google.com
Review URL: https://codereview.chromium.org/1962613003 .
2016-05-10 09:49:40 -07:00
Chinmay Garde
e4db01fdd4
Fix syntax error in os_macos.cc on iOS.
...
R=rmacnak@google.com
Review URL: https://codereview.chromium.org/1958513002 .
2016-05-05 17:21:56 -07:00
John McCutchan
204de1dc68
Fix MacOS build breakage
...
BUG=
Review URL: https://codereview.chromium.org/1952253003 .
2016-05-05 16:43:26 -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
Zach Anderson
a7295bbb2a
Fixes DBC build for Mac
...
Also, adds an option to the GN build for DBC
R=johnmccutchan@google.com
Review URL: https://codereview.chromium.org/1910453003 .
2016-04-20 14:38:49 -07: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
Ryan Macnak
f3759dedd3
Report iOS as iOS rather than OS X.
...
R=iposva@google.com
Review URL: https://codereview.chromium.org/1417013011 .
2015-11-13 11:15:04 -08:00
Chinmay Garde
1fc938ac92
Return correct ActivationFrameAlignment for iOS simulator variants
...
R=rmacnak@google.com
Review URL: https://codereview.chromium.org/1432603002 .
2015-11-03 13:24:58 -08:00
Ryan Macnak
41f3aaed40
Direct OS:Print[Err] to syslog on iOS.
...
R=chinmaygarde@google.com
Review URL: https://codereview.chromium.org/1415573004 .
2015-10-29 12:30:02 -07:00
Chinmay Garde
dfd7c0b221
Fix CPU features detection and stack alignment assert on iOS
...
R=zra@google.com
Review URL: https://codereview.chromium.org/1413643004 .
2015-10-27 14:23:36 -07:00
William Hesse
e6b85bb28c
Use #if TARGET_OS_IOS instead of #ifdef TARGET_OS_IOS.
...
New versions of the OS X SDK always define TARGET_OS_IOS, as 0 or 1.
BUG=https://github.com/dart-lang/sdk/issues/24501
BUG=https://github.com/dart-lang/sdk/issues/24453
R=iposva@google.com
Review URL: https://codereview.chromium.org/1388973002 .
2015-10-12 12:38:10 +02:00
Chinmay Garde
8a2d122e1a
Fix build breaks on iOS. Adds missing import and avoid use of unavailable macro.
...
BUG=
R=rmacnak@google.com
Review URL: https://codereview.chromium.org/1384063002 .
2015-10-02 11:14:24 -07: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
4bc59321ce
Fix mac build
...
BUG=
Review URL: https://codereview.chromium.org//1337783004 .
2015-09-11 00:35:12 -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
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
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
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
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
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
iposva@google.com
830508be13
- memmove instead of memcpy.
...
Review URL: https://codereview.chromium.org//14121009
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21370 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-12 16:27:59 +00:00
iposva@google.com
0d8ff3ef16
- Add OS::StrNDup instead of redefining it when needed.
...
Review URL: https://codereview.chromium.org//13994008
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21368 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-12 16:19:10 +00:00