summaryrefslogtreecommitdiff
path: root/deps/v8
diff options
context:
space:
mode:
authorBen Noordhuis <info@bnoordhuis.nl>2013-02-25 23:00:08 +0100
committerBen Noordhuis <info@bnoordhuis.nl>2013-02-25 23:45:02 +0100
commit03fe7fb55cd5dad49ffc9ae5d4067ff46bf06c95 (patch)
tree75a4a7320af6c8eb5d17de3bae0a3c1b49380969 /deps/v8
parentb15a10e7a014674ef6f71c51ad84032fb7b802e2 (diff)
downloadnode-03fe7fb55cd5dad49ffc9ae5d4067ff46bf06c95.tar.gz
v8: reapply floating patches
Reapply floating patches. Special mention: also reapplies 017009f but with the extra change of removing DescriptorArray::kTransitionsIndex from the postmortem metadata generator because said field no longer exists in V8 3.14.
Diffstat (limited to 'deps/v8')
-rw-r--r--deps/v8/build/common.gypi9
-rw-r--r--deps/v8/src/platform-posix.cc17
-rw-r--r--deps/v8/tools/gen-postmortem-metadata.py14
3 files changed, 23 insertions, 17 deletions
diff --git a/deps/v8/build/common.gypi b/deps/v8/build/common.gypi
index 78888b8d7..427949373 100644
--- a/deps/v8/build/common.gypi
+++ b/deps/v8/build/common.gypi
@@ -378,15 +378,6 @@
'conditions': [
['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="netbsd" \
or OS=="android"', {
- 'cflags!': [
- '-O2',
- '-Os',
- ],
- 'cflags': [
- '-fdata-sections',
- '-ffunction-sections',
- '-O3',
- ],
'conditions': [
[ 'gcc_version==44 and clang==0', {
'cflags': [
diff --git a/deps/v8/src/platform-posix.cc b/deps/v8/src/platform-posix.cc
index 3bc83733c..2b8001516 100644
--- a/deps/v8/src/platform-posix.cc
+++ b/deps/v8/src/platform-posix.cc
@@ -109,11 +109,20 @@ void* OS::GetRandomMmapAddr() {
raw_addr &= V8_UINT64_C(0x3ffffffff000);
#else
uint32_t raw_addr = V8::RandomPrivate(isolate);
- // The range 0x20000000 - 0x60000000 is relatively unpopulated across a
- // variety of ASLR modes (PAE kernel, NX compat mode, etc) and on macos
- // 10.6 and 10.7.
+
+ // For our 32-bit mmap() hint, we pick a random address in the bottom
+ // half of the top half of the address space (that is, the third quarter).
+ // Because we do not MAP_FIXED, this will be treated only as a hint -- the
+ // system will not fail to mmap() because something else happens to already
+ // be mapped at our random address. We deliberately set the hint high enough
+ // to get well above the system's break (that is, the heap); systems will
+ // either try the hint and if that fails move higher (MacOS and other BSD
+ // derivatives) or try the hint and if that fails allocate as if there were
+ // no hint at all (Linux, Solaris, illumos and derivatives). The high hint
+ // prevents the break from getting hemmed in at low values, ceding half of
+ // the address space to the system heap.
raw_addr &= 0x3ffff000;
- raw_addr += 0x20000000;
+ raw_addr += 0x80000000;
#endif
return reinterpret_cast<void*>(raw_addr);
}
diff --git a/deps/v8/tools/gen-postmortem-metadata.py b/deps/v8/tools/gen-postmortem-metadata.py
index f59cfd303..792edee05 100644
--- a/deps/v8/tools/gen-postmortem-metadata.py
+++ b/deps/v8/tools/gen-postmortem-metadata.py
@@ -78,14 +78,20 @@ consts_misc = [
{ 'name': 'SmiValueShift', 'value': 'kSmiTagSize' },
{ 'name': 'PointerSizeLog2', 'value': 'kPointerSizeLog2' },
- { 'name': 'prop_idx_transitions',
- 'value': 'DescriptorArray::kTransitionsIndex' },
+ { 'name': 'prop_desc_key',
+ 'value': 'DescriptorArray::kDescriptorKey' },
+ { 'name': 'prop_desc_details',
+ 'value': 'DescriptorArray::kDescriptorDetails' },
+ { 'name': 'prop_desc_value',
+ 'value': 'DescriptorArray::kDescriptorValue' },
+ { 'name': 'prop_desc_size',
+ 'value': 'DescriptorArray::kDescriptorSize' },
{ 'name': 'prop_idx_first',
'value': 'DescriptorArray::kFirstIndex' },
{ 'name': 'prop_type_field',
'value': 'FIELD' },
{ 'name': 'prop_type_first_phantom',
- 'value': 'MAP_TRANSITION' },
+ 'value': 'Code::MAP_TRANSITION' },
{ 'name': 'prop_type_mask',
'value': 'PropertyDetails::TypeField::kMask' },
@@ -107,7 +113,7 @@ extras_accessors = [
'JSObject, elements, Object, kElementsOffset',
'FixedArray, data, uintptr_t, kHeaderSize',
'Map, instance_attributes, int, kInstanceAttributesOffset',
- 'Map, instance_descriptors, int, kInstanceDescriptorsOrBitField3Offset',
+ 'Map, transitions, uintptr_t, kTransitionsOrBackPointerOffset',
'Map, inobject_properties, int, kInObjectPropertiesOffset',
'Map, instance_size, int, kInstanceSizeOffset',
'HeapNumber, value, double, kValueOffset',