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
iposva@google.com
9046a44a37
Prepare for removal of source_filter.gypi:
...
- Guard OS-dependent source files with #if TARGET_OS_* in a similar
fashion to the architecture dependent sources.
Review URL: https://codereview.chromium.org//12282051
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18786 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-20 21:17:38 +00:00
regis@google.com
cd746c8172
Initial revision of ARM simulator and (empty) MIPS simulator.
...
Review URL: https://codereview.chromium.org//12041056
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17623 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-25 01:16:35 +00:00
meh@google.com
432978367e
Clean up CodeObservers
...
Move CodeObserver registration to the OS abstraction.
Move Pprof logic to the OS abstraction.
Remove pprof from VM tests because now pprof logic is in the VM itself.
Add DISALLOW and AllStatic to Code Observers where appropriate.
Previous review: https://codereview.chromium.org/11572032/
BUG=7321
Review URL: https://codereview.chromium.org//11660011
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16462 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-22 00:23:25 +00:00
meh@google.com
ef737f105d
Revert "Clean up CodeObservers"
...
This reverts commit 43e5ada2fba69c7d5c009b5bf70a234f12941617.
BUG=
Review URL: https://codereview.chromium.org//11644074
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16446 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-21 17:45:36 +00:00
meh@google.com
6fbf9f1c2e
Clean up CodeObservers
...
Move CodeObserver registration to the OS abstraction
Move Pprof logic to the OS abstraction
Add DISALLOW and AllStatic to Code Observers where appropriate
BUG=7321
Committed: https://code.google.com/p/dart/source/detail?r=16273
Review URL: https://codereview.chromium.org//11572032
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16445 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-21 17:37:59 +00:00
meh@google.com
b406d5cb4e
Revert "Cleanup CodeObservers (and update build file)"
...
This reverts commit b528d673e762b0db88b902ec2e45f917e21d8a67.
BUG=
Review URL: https://codereview.chromium.org//11638002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16285 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-18 19:59:30 +00:00
meh@google.com
cc626035f1
Cleanup CodeObservers (and update build file)
...
- Move CodeObserver registration to the OS abstraction
- Add DISALLOW and AllStatic to Code Observers where appropriate
The builds for Mac and Windows broke when I submitted the earlier CL (11572032). This CL removes obselete files from the .gypi build file.
BUG=7321
Review URL: https://codereview.chromium.org//11630007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16284 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-18 19:54:12 +00:00
meh@google.com
4264ab7907
Revert "Cleanup CodeObservers"
...
This reverts commit 16a9677a8a8f0fb8f91c9e6348e188aa167b36c7.
BUG=
Review URL: https://codereview.chromium.org//11607022
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16277 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-18 19:11:09 +00:00
meh@google.com
6adb8b3e6d
Cleanup CodeObservers
...
Move CodeObserver registration to the OS abstraction
Add DISALLOW and AllStatic to Code Observers where appropriate
BUG=7321
Review URL: https://codereview.chromium.org//11572032
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16273 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-18 18:54:30 +00:00
johnmccutchan@google.com
d95f19ec88
Fix win32 build breakage
...
Change signature of OS::AlignedAllocate from using intptr_t to size_t
Review URL: https://codereview.chromium.org//11416291
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15603 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-30 21:39:09 +00:00
johnmccutchan@google.com
5642ee09f1
Expose transferable constructor to Int8List
...
Review URL: https://codereview.chromium.org//11414211
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15598 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-30 20:35:22 +00:00
tball@google.com
5f320829e7
Updated GetTimeZoneName() to return "" if localtime_r fails or has a NULL for its tm_zone value, like V8 does. Also updated GetTimeZoneOffsetInSeconds() to return 0 on localtime_r failure, like V8.
...
BUG=5943
Review URL: https://codereview.chromium.org//11267051
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14112 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-25 23:38:45 +00:00
turnidge@google.com
8b68d343c7
Enforce length/size limits for variable size heap object in order to
...
avoid overflow.
For each variable size heap object, compute the maximum number of
elements and use that in the ::New functions to avoid overflow. If a
bad length/size reaches a ::New function, that is a FATAL error -- the
problem should have been caught earlier by the dart api or by the
library code.
Add "border guards" in the dart api and in library calls which cause
new variable size heap objects to be allocated. We check for invalid
length/size and throw explanatory error messages.
Review URL: https://chromiumcodereview.appspot.com//10782016
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10130 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-01 18:22:30 +00:00
asiva@google.com
f4e3396989
Address some leftover review comments from previous CL.
...
Review URL: https://chromiumcodereview.appspot.com//10792019
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9721 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-17 21:16:08 +00:00
asiva@google.com
ac914d3b8a
Don't create a Bigint object first for every integer while parsing the sources, instead first check to see if it can be represented as a Smi or Mint. This avoids unnecessary creation of Bigint objects.
...
Review URL: https://chromiumcodereview.appspot.com//10703150
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9607 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-12 19:22:33 +00:00
turnidge@google.com
9cbae35238
Don't allow OS::SNPrint or OS::VSNPrint to return negative values.
...
If we encounter conditions that would have caused vsnprintf to return
a negative value, then something pretty wild is going on. We choose
to terminate the vm when this occurs.
This fixes security bug 1745.
Review URL: https://chromiumcodereview.appspot.com//10696165
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9558 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-11 17:54:24 +00:00
asiva@google.com
f05e3736d8
Fix issue 1968, replace usage of inline 'asm' constructs in 'stack alignment', 'jump to exception handler' and 'jump to error handler' code with calls to appropriate stubs.
...
Review URL: https://chromiumcodereview.appspot.com//10664004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9071 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-25 17:35:20 +00:00
floitsch@google.com
dd61a23829
Reapply "Refactor Date implementation in VM."
...
This reapplies fixed versions of commit 7542 and commit 8544.
Original review URLs:
https://chromiumcodereview.appspot.com//10533068
https://chromiumcodereview.appspot.com//10544109
Review URL: https://chromiumcodereview.appspot.com//10534114
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8655 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-14 13:05:22 +00:00
floitsch@google.com
eb92af4080
Revert "Refactor Date implementation in VM."
...
Also revert "Round days-computation to get rid of daylight-savings differences."
This reverts commit 7542 and commit 8544.
Review URL: https://chromiumcodereview.appspot.com//10534111
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8547 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-12 13:44:45 +00:00
floitsch@google.com
17de58fbaf
Reapply "Refactor Date implementation in VM."
...
This reapplies a fixed version of commit 8533.
https://chromiumcodereview.appspot.com//10533068
Review URL: https://chromiumcodereview.appspot.com//10536116
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8542 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-12 12:04:36 +00:00
floitsch@google.com
02f39238ae
Revert "Refactor Date implementation in VM."
...
This reverts commit 8533.
Review URL: https://chromiumcodereview.appspot.com//10536114
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8535 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-12 10:33:36 +00:00
floitsch@google.com
0e297362a2
Refactor Date implementation in VM.
...
Less (and simpler) native functions. More precise semantics (for both the
native functions as well as for the Date class itself).
Fixes issue 3201.
Review URL: https://chromiumcodereview.appspot.com//10533068
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8533 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-12 10:24:58 +00:00
floitsch@google.com
cc15d26cf7
Reapply "Add support for timezone offset and timezone name."
...
This reapplies commit 7800.
Review URL: https://chromiumcodereview.appspot.com//10417009
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7805 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-21 16:11:20 +00:00
floitsch@google.com
77ade89e4a
Revert "Add support for timezone offset and timezone name."
...
This reverts commit 7803.
Review URL: https://chromiumcodereview.appspot.com//10416008
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7804 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-21 15:13:46 +00:00
floitsch@google.com
618c649c33
Reapply "Add support for timezone offset and timezone name."
...
This reapplies commit 7800.
Original CL: https://chromiumcodereview.appspot.com/10383218/
Don't write *foo += x.
Review URL: https://chromiumcodereview.appspot.com//10413031
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7803 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-21 15:07:11 +00:00
floitsch@google.com
5b99866ecd
Revert "Add support for timezone offset and timezone name."
...
This reverts commit 7801..
Review URL: https://chromiumcodereview.appspot.com//10399106
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7802 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-21 14:40:27 +00:00
floitsch@google.com
36d9c69461
Add support for timezone offset and timezone name.
...
Review URL: https://chromiumcodereview.appspot.com//10383218
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7801 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-21 14:36:43 +00:00
floitsch@google.com
410e6bf600
Reapply "Set the TZ env to get the UTC-ms since epoch."
...
This reapplies a fixed version of commit 7285.
Review URL: https://chromiumcodereview.appspot.com//10359003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7288 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-03 15:40:40 +00:00
floitsch@google.com
a8e31e2a48
Revert "Set the TZ env to get the UTC-ms since epoch."
...
This reverts commit 7285.
Review URL: https://chromiumcodereview.appspot.com//10354011
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7287 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-03 14:54:09 +00:00
floitsch@google.com
9cf8b9a36d
Set the TZ env to get the UTC-ms since epoch.
...
Previously we tried to simply subtract the timezone difference from
the local value. Apparently this doesn't work...
Fixes issue 1268.
Review URL: https://chromiumcodereview.appspot.com//9969098
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7285 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-03 14:46:21 +00:00
sgjesse@google.com
65896148c9
Move utils.h and utils.cc from runtime/vm to runtime/platform
...
Moved additional parts of globals.h from vm/ to platform/ to support
types and constants used by utils.*.
R=ager@google.com , iposva@google.com
BUG=
TEST=
Review URL: http://codereview.chromium.org//9209001
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3337 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-16 13:23:40 +00:00
sgjesse@google.com
bf67f24098
Move assert.h/assert.cc from runtime/vm to runtime/platform
...
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
2012-01-16 12:28:10 +00:00