Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(182)

Unified Diff: src/deoptimizer.cc

Issue 2488403003: Add v8_os_page_size flag for cross compilation (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/deoptimizer.cc
diff --git a/src/deoptimizer.cc b/src/deoptimizer.cc
index c489e701e1ce47dd9891dead803a6e0434cdb947..ad036b49038cd41f5ceb482802428f45b8a88444 100644
--- a/src/deoptimizer.cc
+++ b/src/deoptimizer.cc
@@ -24,9 +24,10 @@ namespace internal {
static MemoryChunk* AllocateCodeChunk(MemoryAllocator* allocator) {
return allocator->AllocateChunk(Deoptimizer::GetMaxDeoptTableSize(),
- base::OS::CommitPageSize(),
- EXECUTABLE,
- NULL);
+ FLAG_target_os_page_size != 0
Michael Lippautz 2016/11/14 09:24:43 The deoptimizer already uses the allocator here, s
+ ? FLAG_target_os_page_size
+ : base::OS::CommitPageSize(),
+ EXECUTABLE, NULL);
}
@@ -88,7 +89,9 @@ static const int kDeoptTableMaxEpilogueCodeSize = 2 * KB;
size_t Deoptimizer::GetMaxDeoptTableSize() {
int entries_size =
Deoptimizer::kMaxNumberOfEntries * Deoptimizer::table_entry_size_;
- int commit_page_size = static_cast<int>(base::OS::CommitPageSize());
+ int commit_page_size = static_cast<int>(FLAG_target_os_page_size != 0
+ ? FLAG_target_os_page_size
+ : base::OS::CommitPageSize());
int page_count = ((kDeoptTableMaxEpilogueCodeSize + entries_size - 1) /
commit_page_size) + 1;
return static_cast<size_t>(commit_page_size * page_count);

Powered by Google App Engine
This is Rietveld 408576698