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

Side by Side Diff: src/snapshot/deserializer.cc

Issue 1804433004: [serializer] add options to compile eagerly and pre-age for code cache. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 9 months 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 unified diff | Download patch
« no previous file with comments | « src/objects.cc ('k') | test/cctest/test-serialize.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/snapshot/deserializer.h" 5 #include "src/snapshot/deserializer.h"
6 6
7 #include "src/bootstrapper.h" 7 #include "src/bootstrapper.h"
8 #include "src/heap/heap.h" 8 #include "src/heap/heap.h"
9 #include "src/isolate.h" 9 #include "src/isolate.h"
10 #include "src/macro-assembler.h" 10 #include "src/macro-assembler.h"
(...skipping 23 matching lines...) Expand all
34 while (it.has_next()) { 34 while (it.has_next()) {
35 Page* p = it.next(); 35 Page* p = it.next();
36 Assembler::FlushICache(isolate_, p->area_start(), 36 Assembler::FlushICache(isolate_, p->area_start(),
37 p->area_end() - p->area_start()); 37 p->area_end() - p->area_start());
38 } 38 }
39 } 39 }
40 40
41 void Deserializer::FlushICacheForNewCodeObjects() { 41 void Deserializer::FlushICacheForNewCodeObjects() {
42 DCHECK(deserializing_user_code_); 42 DCHECK(deserializing_user_code_);
43 for (Code* code : new_code_objects_) { 43 for (Code* code : new_code_objects_) {
44 if (FLAG_serialize_age_code) code->PreAge(isolate_);
44 Assembler::FlushICache(isolate_, code->instruction_start(), 45 Assembler::FlushICache(isolate_, code->instruction_start(),
45 code->instruction_size()); 46 code->instruction_size());
46 } 47 }
47 } 48 }
48 49
49 bool Deserializer::ReserveSpace() { 50 bool Deserializer::ReserveSpace() {
50 #ifdef DEBUG 51 #ifdef DEBUG
51 for (int i = NEW_SPACE; i < kNumberOfSpaces; ++i) { 52 for (int i = NEW_SPACE; i < kNumberOfSpaces; ++i) {
52 CHECK(reservations_[i].length() > 0); 53 CHECK(reservations_[i].length() > 0);
53 } 54 }
(...skipping 750 matching lines...) Expand 10 before | Expand all | Expand 10 after
804 805
805 default: 806 default:
806 CHECK(false); 807 CHECK(false);
807 } 808 }
808 } 809 }
809 CHECK_EQ(limit, current); 810 CHECK_EQ(limit, current);
810 return true; 811 return true;
811 } 812 }
812 } // namespace internal 813 } // namespace internal
813 } // namespace v8 814 } // namespace v8
OLDNEW
« no previous file with comments | « src/objects.cc ('k') | test/cctest/test-serialize.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698