Commit 546b3e55 authored by danno@chromium.org's avatar danno@chromium.org

Revert "Rename kIs64BitArch with kRequiresCodeRange."

TBR=haitao.feng@intel.com

Review URL: https://codereview.chromium.org/325343003

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21801 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 1562d8e3
...@@ -465,12 +465,11 @@ void ResourceConstraints::ConfigureDefaults(uint64_t physical_memory, ...@@ -465,12 +465,11 @@ void ResourceConstraints::ConfigureDefaults(uint64_t physical_memory,
set_max_available_threads(i::Max(i::Min(number_of_processors, 4u), 1u)); set_max_available_threads(i::Max(i::Min(number_of_processors, 4u), 1u));
if (virtual_memory_limit > 0 && i::kRequiresCodeRange) { if (virtual_memory_limit > 0 && i::kIs64BitArch) {
// Reserve no more than 1/8 of the memory for the code range, but at most // Reserve no more than 1/8 of the memory for the code range, but at most
// kMaximalCodeRangeSize. // 512 MB.
set_code_range_size( set_code_range_size(
i::Min(i::kMaximalCodeRangeSize / i::MB, i::Min(512, static_cast<int>((virtual_memory_limit >> 3) / i::MB)));
static_cast<int>((virtual_memory_limit >> 3) / i::MB)));
} }
} }
......
...@@ -153,14 +153,12 @@ const int kDoubleSizeLog2 = 3; ...@@ -153,14 +153,12 @@ const int kDoubleSizeLog2 = 3;
const int kPointerSizeLog2 = 3; const int kPointerSizeLog2 = 3;
const intptr_t kIntptrSignBit = V8_INT64_C(0x8000000000000000); const intptr_t kIntptrSignBit = V8_INT64_C(0x8000000000000000);
const uintptr_t kUintptrAllBitsSet = V8_UINT64_C(0xFFFFFFFFFFFFFFFF); const uintptr_t kUintptrAllBitsSet = V8_UINT64_C(0xFFFFFFFFFFFFFFFF);
const bool kRequiresCodeRange = true; const bool kIs64BitArch = true;
const int kMaximalCodeRangeSize = 512 * MB;
#else #else
const int kPointerSizeLog2 = 2; const int kPointerSizeLog2 = 2;
const intptr_t kIntptrSignBit = 0x80000000; const intptr_t kIntptrSignBit = 0x80000000;
const uintptr_t kUintptrAllBitsSet = 0xFFFFFFFFu; const uintptr_t kUintptrAllBitsSet = 0xFFFFFFFFu;
const bool kRequiresCodeRange = false; const bool kIs64BitArch = false;
const int kMaximalCodeRangeSize = 0 * MB;
#endif #endif
const int kBitsPerByte = 8; const int kBitsPerByte = 8;
......
...@@ -115,17 +115,15 @@ bool CodeRange::SetUp(size_t requested) { ...@@ -115,17 +115,15 @@ bool CodeRange::SetUp(size_t requested) {
ASSERT(code_range_ == NULL); ASSERT(code_range_ == NULL);
if (requested == 0) { if (requested == 0) {
// When a target requires the code range feature, we put all code objects // On 64-bit platform(s), we put all code objects in a 512 MB range of
// in a kMaximalCodeRangeSize range of virtual address space, so that // virtual address space, so that they can call each other with near calls.
// they can call each other with near calls. if (kIs64BitArch) {
if (kRequiresCodeRange) { requested = 512 * MB;
requested = kMaximalCodeRangeSize;
} else { } else {
return true; return true;
} }
} }
ASSERT(requested <= kMaximalCodeRangeSize);
code_range_ = new VirtualMemory(requested); code_range_ = new VirtualMemory(requested);
CHECK(code_range_ != NULL); CHECK(code_range_ != NULL);
if (!code_range_->IsReserved()) { if (!code_range_->IsReserved()) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment