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

Side by Side Diff: src/serialize.h

Issue 946073003: Remove reinvented wheel for partial snapshot cache. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 10 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/isolate.cc ('k') | src/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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 #ifndef V8_SERIALIZE_H_ 5 #ifndef V8_SERIALIZE_H_
6 #define V8_SERIALIZE_H_ 6 #define V8_SERIALIZE_H_
7 7
8 #include "src/hashmap.h" 8 #include "src/hashmap.h"
9 #include "src/heap-profiler.h" 9 #include "src/heap-profiler.h"
10 #include "src/isolate.h" 10 #include "src/isolate.h"
(...skipping 796 matching lines...) Expand 10 before | Expand all | Expand 10 after
807 807
808 808
809 class StartupSerializer : public Serializer { 809 class StartupSerializer : public Serializer {
810 public: 810 public:
811 StartupSerializer(Isolate* isolate, SnapshotByteSink* sink) 811 StartupSerializer(Isolate* isolate, SnapshotByteSink* sink)
812 : Serializer(isolate, sink), root_index_wave_front_(0) { 812 : Serializer(isolate, sink), root_index_wave_front_(0) {
813 // Clear the cache of objects used by the partial snapshot. After the 813 // Clear the cache of objects used by the partial snapshot. After the
814 // strong roots have been serialized we can create a partial snapshot 814 // strong roots have been serialized we can create a partial snapshot
815 // which will repopulate the cache with objects needed by that partial 815 // which will repopulate the cache with objects needed by that partial
816 // snapshot. 816 // snapshot.
817 isolate->set_serialize_partial_snapshot_cache_length(0); 817 isolate->partial_snapshot_cache()->Clear();
818 InitializeCodeAddressMap(); 818 InitializeCodeAddressMap();
819 } 819 }
820 820
821 // The StartupSerializer has to serialize the root array, which is slightly 821 // The StartupSerializer has to serialize the root array, which is slightly
822 // different. 822 // different.
823 void VisitPointers(Object** start, Object** end) OVERRIDE; 823 void VisitPointers(Object** start, Object** end) OVERRIDE;
824 824
825 // Serialize the current state of the heap. The order is: 825 // Serialize the current state of the heap. The order is:
826 // 1) Strong references. 826 // 1) Strong references.
827 // 2) Partial snapshot cache. 827 // 2) Partial snapshot cache.
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
993 kNumInternalizedStringsOffset + kInt32Size; 993 kNumInternalizedStringsOffset + kInt32Size;
994 static const int kNumCodeStubKeysOffset = kNumReservationsOffset + kInt32Size; 994 static const int kNumCodeStubKeysOffset = kNumReservationsOffset + kInt32Size;
995 static const int kPayloadLengthOffset = kNumCodeStubKeysOffset + kInt32Size; 995 static const int kPayloadLengthOffset = kNumCodeStubKeysOffset + kInt32Size;
996 static const int kChecksum1Offset = kPayloadLengthOffset + kInt32Size; 996 static const int kChecksum1Offset = kPayloadLengthOffset + kInt32Size;
997 static const int kChecksum2Offset = kChecksum1Offset + kInt32Size; 997 static const int kChecksum2Offset = kChecksum1Offset + kInt32Size;
998 static const int kHeaderSize = kChecksum2Offset + kInt32Size; 998 static const int kHeaderSize = kChecksum2Offset + kInt32Size;
999 }; 999 };
1000 } } // namespace v8::internal 1000 } } // namespace v8::internal
1001 1001
1002 #endif // V8_SERIALIZE_H_ 1002 #endif // V8_SERIALIZE_H_
OLDNEW
« no previous file with comments | « src/isolate.cc ('k') | src/serialize.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698