Zachary Anderson
44a04f18f9
Use tcmalloc on Linux
...
Statically linking in the tcmalloc code is enough
to override the built-in malloc. I have this set up to
exclude the code for collecting heap profiles in a
Product build. There's still about a 230KB increase in
binary size, though. I think this isn't a big problem
since right now this is enabled only for server Linux.
product binary size:
before x64: 9569600
after x64: 9807840
increase: 238240 (2.5%)
before ia32: 9122836
after ia32: 9360944
increase: 238108 (2.6%)
before mips: 9418680
after mips: 9640940
increase: 222260 (2.4%)
InitialRSS:
product:
before x64: 6307840
after x64: 7430144
increase: 1122304 (17.8%)
release (--no-profiler)
before x64: 7843840
after x64: 9207808
increase: 1363968 (17.4%)
R=asiva@google.com , whesse@google.com
Review URL: https://codereview.chromium.org/2316813002 .
2016-09-16 08:24:54 -07:00
Ryan Macnak
227927a8bb
Make Android gyp flags more like Linux gyp flags. Fix cases of -Wconversion-null.
...
R=zra@google.com
Review URL: https://codereview.chromium.org/2018723002 .
2016-05-26 14:56:24 -07:00
Zachary Anderson
3d7202bad3
DBC: Adds simdbc64 target, adds arm64 arithmetic overflow logic
...
There were differences between linux gcc, android gcc,
MacOS clang, and 32 vs. 64-bit w.r.t the __builtin
functions for detecting arithmetic overflow. I couldn't get
them all working at the same time. Instead, I removed them,
and changed to always use the inline assembly. This works
in all the configurations above.
This change also adds a simdbc64 target for building simdbc
for 64-bit, and sets up the android targets. simdbc targets
arm, and simdbc64 targets arm64. You can build them with:
$ ./tools/build.py -m release -a simdbc{64} --os=android runtime
R=iposva@google.com
Review URL: https://codereview.chromium.org/1904153003 .
2016-04-25 12:48:34 -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
Ivan Posva
f28d46161b
Fix ARM cross build:
...
- Don't try to pass '-mno-omit-leaf-frame-pointer' to the C++
compiler on any platform for now.
BUG=
Review URL: https://codereview.chromium.org/1666063002 .
2016-02-03 21:38:49 -08:00
Ivan Posva
9c0c6cb5c2
Add product mode:
...
- 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 .
2016-02-03 21:10:30 -08:00
Zachary Anderson
80f358dede
Adds targets for simarmv6 and armv6
...
related #25562
R=rmacnak@google.com
Review URL: https://codereview.chromium.org/1624593002 .
2016-01-22 13:07:48 -08:00
Ryan Macnak
08f443f540
Address clang warning regarding incorrect flag attempting to force non-executable stacks.
...
Cf. 6d018b8ce3
R=fschneider@google.com
Review URL: https://codereview.chromium.org/1498983002 .
2015-12-04 09:58:53 -08:00
Florian Schneider
64e71a0b2e
VM: Make more globals constant where easily possible.
...
Remove -fdata-section again from the Linux build configuration: It prevented
some optimizations in gcc and clang - fewer things were recognized as constants.
Add const to pointers/arrays in some places to help compilers with determining
what is a constant. A common pattern is strlen of a string literal const char*,
or an array of function pointers.
Tested with gcc 4.8.4 / clang 3.4 and improves code qualtiy + reduces binary size.
BUG=
R=iposva@google.com , rmacnak@google.com
Review URL: https://codereview.chromium.org/1462953002 .
2015-11-20 10:52:07 +01:00
Florian Schneider
f0a35b3260
VM: Add dart_precompiled build target, a standalone VM without the JIT compiler.
...
This removes most of the compiler-related code from dart_precompiled:
x64 stripped binary size 13M -> 9.1M
ARM stripped binary size 12M -> 8.3M
The precompiled build defines the DART_PRECOMPILED macro. This
stubs out the public interface to the compiler/parser with empty
function bodies.
Use gcc options -ffunction-sections and --gc-sections to make the linker remove
unused functions/symbols.
BUG=
R=rmacnak@google.com
Review URL: https://codereview.chromium.org/1459443002 .
2015-11-19 10:13:16 +01:00
Florian Schneider
9f54259d57
VM: Fix FP math discrepancies by adding -mfpmath=sse to 32-bit simulator and cross host builds.
...
BUG=dartbug.com/24517
R=zra@google.com
Review URL: https://codereview.chromium.org/1395543003 .
2015-10-08 17:16:46 +02:00
Ryan Macnak
6d018b8ce3
Force non-executable stack and enable stack canaries.
...
BUG=http://b/22479195
R=asiva@google.com
Review URL: https://codereview.chromium.org//1238003002 .
2015-07-16 16:05:02 -07:00
Ryan Macnak
248f216887
"The "now" option forces the linker to resolve all dynamic symbols at program start time and the "relro" option marks the Global Offset Table (GOT) as read-only. Together, these options prevent attacks that try to overwrite libc function pointers in the GOT."
...
BUG=http://b/22479195
R=asiva@google.com
Review URL: https://codereview.chromium.org//1236933004 .
2015-07-16 09:39:45 -07:00
Ryan Macnak
d09e04eff8
Enable Fortify Source functions.
...
BUG=http://b/22479195
R=asiva@google.com
Review URL: https://codereview.chromium.org//1223263007 .
2015-07-15 15:53:11 -07:00
Ryan Macnak
3d190ddd2d
Pass -EL for MIPS cross builds to allow for using a bi-endian toolchain and work around CXXFLAGS being passed to both host and target.
...
R=zra@google.com
Review URL: https://codereview.chromium.org//1184873002 .
2015-06-12 14:02:27 -07:00
koda@google.com
2c4dfb60c8
Don't attempt to walk the native stack by default.
...
This was unintentially enabled by default as a consequence of
https://codereview.chromium.org/1104323003/
BUG=23368
R=johnmccutchan@google.com
Review URL: https://codereview.chromium.org//1130253005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45666 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-08 22:34:17 +00:00
johnmccutchan@google.com
3490490ac2
Fix android cross compile
...
BUG=
Review URL: https://codereview.chromium.org//1109303002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45445 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-29 00:08:14 +00:00
zra@google.com
86bfd7cb30
Adds a simarmv5te build and test target.
...
Also:
- Removes command line flags to choose simulated arm version.
I think we should use build targets instead, like in this change,
to make building and testing more obvious.
- Skips pkg tests on all simulators.
R=regis@google.com , ricow@google.com
Review URL: https://codereview.chromium.org//1077823002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45181 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-15 20:44:43 +00:00
zra@google.com
34044a4ca8
Adds armv5 build and test target.
...
R=regis@google.com
Review URL: https://codereview.chromium.org//1043263002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44828 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-31 23:11:33 +00:00
johnmccutchan@google.com
3d0a6d019a
Address comments on c_frame_pointers CL
...
R=iposva@google.com
Review URL: https://codereview.chromium.org//431263002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38990 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-07 15:52:47 +00:00
johnmccutchan@google.com
ae9b2a9dd5
Add build configuration variable 'c_frame_pointers' to control whether or not frame pointers are included and which stack walker the profiler uses.
...
BUG=
R=iposva@google.com
Review URL: https://codereview.chromium.org//414303004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38711 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-29 22:48:57 +00:00
johnmccutchan@google.com
7f8adad6e8
Disable frame pointers
...
BUG=
R=asiva@google.com
Review URL: https://codereview.chromium.org//407293002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38512 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-23 16:13:53 +00:00
zra@google.com
9c73009ff9
Prepares for arm64 cross-build.
...
With this change, the cross-build succeeds with the Linaro arm64 toolchain.
R=regis@google.com
Review URL: https://codereview.chromium.org//303443010
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36698 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-27 18:05:20 +00:00
zra@google.com
0c562fdd16
For arm, chooses hard vs. soft fp ABI based on compiler.
...
We have been hard-coding hardfp in the gyp file. This makes
using softfp hard. This change detects hardfp by looking at
a predefined gcc macro, and otherwise uses softfp. This
change also adds a flag to simarm so that we can test softfp.
R=regis@google.com
Review URL: https://codereview.chromium.org//298533002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36337 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-19 23:13:25 +00:00
srdjan@google.com
e51a243e52
Add SSE2 compilation mode ofr Linux ia32.
...
R=iposva@google.com
Review URL: https://codereview.chromium.org//236193003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35001 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-12 00:29:54 +00:00
zra@google.com
2fe51715e5
Begins work on ARM64, first assembler test.
...
Most new code is in constants_arm64.h and
{assembler,disassembler,simulator}_arm64.{h,cc}
The rest of the CL just #def's out tests, modifies status files,
and adds UNIMPLEMENTED functions, etc.
R=regis@google.com
Review URL: https://codereview.chromium.org//221133002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34654 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-02 17:39:32 +00:00
iposva@google.com
d20121e855
- Enable automatic cross-builds across ARM and MIPS architectures.
...
R=ricow@google.com
Review URL: https://codereview.chromium.org//192543002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33482 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-10 12:00:06 +00:00
iposva@google.com
d2055b487a
- Start to distinguish between cross-build and native build environments.
...
- Create configurations for both on MIPS builds.
Review URL: https://codereview.chromium.org//189093012
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33446 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-07 20:10:09 +00:00
zra@google.com
7c91e88e6e
Adds support for ARMv6.
...
When we detect ARMv6, instead of using movw and
movt, this change loads each individual byte.
Although this is not the best way to achieve this,
a modification to store large constants in the
object pool would be more invasive. Further,
this change will be easier to back-out once
ARMv6 is obsolete.
R=regis@google.com
Review URL: https://codereview.chromium.org//183803024
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33442 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-07 19:17:36 +00:00
zra@google.com
3508d336dd
Simplifies standalone VM Android build.
...
This change also avoids the need to
do another 'gclient runhooks' when switching
between Android and Linux builds, and between
IA32 and ARM Android builds.
gyp does not allow 'libraries' sections inside of
configurations. Therefore, since some architecture
specific paths, libraries, etc. must be specified
on the Android NDK's linker command line, to avoid
re-gyping when switching between Android IA32 and ARM,
this change moves the architecture specific linker
flags to a script, android_link.py.
To avoid re-gyping when swtiching between Linux and
Android, this change creates new configurations
that specify the target OS as well as the the target
architecture, e.g. ReleaseLinuxARM or ReleaseAndroidARM
instead of ReleaseARM.
This change also adds a --toolchain flag to build.py,
and removes obsoleted logic for setting up the Android
build.
R=iposva@google.com
Review URL: https://codereview.chromium.org//105223002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31340 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-20 17:51:34 +00:00
johnmccutchan@google.com
dc217a8aa0
Fix crash walking call stack on Linux.
...
BUG=
R=asiva@google.com
Review URL: https://codereview.chromium.org//116703003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31192 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-17 16:48:55 +00:00
johnmccutchan@google.com
eb99334209
Attempt at enabling profiler
...
BUG=
Review URL: https://codereview.chromium.org//78713003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30478 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-20 17:57:56 +00:00
johnmccutchan@google.com
31989f3b4d
Post landing fixes
...
TBR
Review URL: https://codereview.chromium.org//65983005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30420 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-19 19:11:41 +00:00
johnmccutchan@google.com
97ac18aee9
Sampling profiler
...
BUG=4350
R=asiva@google.com
Review URL: https://codereview.chromium.org//25909002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30419 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-19 18:26:10 +00:00
zra@google.com
df1e5247fe
Adds support for ARM softfp calling convention.
...
The cross-compiler with the Android NDK doesn't support
the 'hard' calling convention, so we need both. I've
added a preprocessor define to the gyp file for the
standalone vm indicating support for 'hard' so that I
don't have to modify the Dartium gyp files.
R=srdjan@google.com
Review URL: https://codereview.chromium.org//52803002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29577 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-30 18:57:55 +00:00
kustermann@google.com
058b7f648d
Remove -static from ldflags after precise upgrade
...
R=zra@google.com
Review URL: https://codereview.chromium.org//22835004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26055 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-13 15:15:21 +00:00
fschneider@google.com
bedc0fe042
Revert r25914 because of clang build error.
...
TBR=ricow@google.com
Review URL: https://codereview.chromium.org//22672002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25916 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-08 07:52:35 +00:00
fschneider@google.com
27ea45d8e1
Fix inconsistent equality with doubles and large integers on ia32.
...
For numbers a == b should be the same as b == a. This is done by avoiding
generating 80-bit precision x87 FP code.
x64 and Mac OS already compile using SSE2.
BUG=https://code.google.com/p/dart/issues/detail?id=8829
TEST=tests/language/large_integer_equality_vm_test.dart
R=srdjan@google.com
Review URL: https://codereview.chromium.org//22370006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25914 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-08 07:42:59 +00:00
asiva@google.com
da491fce35
Fix compilation flag that was inadvertently changed
...
in https://codereview.chromium.org/16973003/
R=srdjan@google.com
Review URL: https://codereview.chromium.org//16872003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24113 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-17 22:39:14 +00:00
asiva@google.com
51651ee00b
Split dart_api.h into multiple parts:
...
dart_api.h - Has the core API functions
dart_mirrors_api.h - Has API functions to support Mirrors or reflection
dart_native_api.h - Has parts which support the native message handling,
profilling and other internal tools
R=sgjesse@google.com , vsm@google.com
Review URL: https://codereview.chromium.org//16973003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24062 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-14 23:47:40 +00:00
kustermann@google.com
f73188d127
Use gnueabihf for ARM + enabled corelib/isolate/lib/standalone tests on ARM again
...
R=regis@google.com
Review URL: https://codereview.chromium.org//16638009
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23854 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-11 14:21:28 +00:00
zra@google.com
e6cf04a8bb
Changes to run "Hello, world!" on MIPS hardware.
...
R=regis@google.com
Review URL: https://codereview.chromium.org//16160013
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23484 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-31 18:41:41 +00:00
kustermann@google.com
506240c825
Add '-static' to ldflags when target architecture is ARM.
...
R=zra@google.com
Review URL: https://codereview.chromium.org//15293005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22916 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-21 07:15:01 +00:00
kustermann@google.com
d8411ffe56
Remove v8 source dependency, enable more compiler warnings
...
R=ricow@google.com
Review URL: https://codereview.chromium.org//14769009
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22299 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-02 07:20:50 +00:00
zra@google.com
dae5068650
Enables cross-compilation of the VM for ARM.
...
Uses the "toolset" feature of gyp to build the dart VM
for ARM, but restricts building of snapshot generation
to the host machine.
For generated source files, it also changes to using
LIB_DIR instead of SHARED_INTERMEDIATE_DIR to avoid
generation of duplicate Makefile rules (gyp doesn't
know that generated source files from toolchains it
thinks are different will be the same.)
Review URL: https://codereview.chromium.org//12726011
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21757 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-19 18:05:44 +00:00
iposva@google.com
0d1af8b22c
- Do not emit PIC code and frame pointers for release targets.
...
Review URL: https://codereview.chromium.org//13826002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21120 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-08 23:05:52 +00:00
johnmccutchan@google.com
9fb0984c9d
SSE Assembler + Linux build fixes
...
Review URL: https://codereview.chromium.org//12223115
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18493 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-13 23:05:17 +00:00
iposva@google.com
44bc457424
- Fix simarm/simmips builds on Mac.
...
Review URL: https://codereview.chromium.org//12033063
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17505 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-23 22:17:26 +00:00
regis@google.com
350fa57800
Add mips and simmips build targets.
...
Review URL: https://codereview.chromium.org//11859034
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17319 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-18 21:34:53 +00:00
ager@google.com
2ab635e6c7
Remove output directory from library path on Linux.
...
Move the setting of -rdynamic to the two executables that need
it (dart, dart_no_snapshot). It is needed to allow dynamically
loaded libraries to lookup the API symbols in the binary. We
use that for native extensions.
R=whesse@google.com ,iposva@google.com
BUG=
Review URL: https://codereview.chromium.org//11316144
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15258 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-22 14:41:34 +00:00