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/serialize.h

Issue 1173013002: Deserializer: flush code objects in large object space. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 6 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 | « no previous file | src/snapshot/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_SNAPSHOT_SERIALIZE_H_ 5 #ifndef V8_SNAPSHOT_SERIALIZE_H_
6 #define V8_SNAPSHOT_SERIALIZE_H_ 6 #define V8_SNAPSHOT_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 554 matching lines...) Expand 10 before | Expand all | Expand 10 after
565 // space id is used for the write barrier. The object_address is the address 565 // space id is used for the write barrier. The object_address is the address
566 // of the object we are writing into, or NULL if we are not writing into an 566 // of the object we are writing into, or NULL if we are not writing into an
567 // object, i.e. if we are writing a series of tagged values that are not on 567 // object, i.e. if we are writing a series of tagged values that are not on
568 // the heap. Return false if the object content has been deferred. 568 // the heap. Return false if the object content has been deferred.
569 bool ReadData(Object** start, Object** end, int space, 569 bool ReadData(Object** start, Object** end, int space,
570 Address object_address); 570 Address object_address);
571 void ReadObject(int space_number, Object** write_back); 571 void ReadObject(int space_number, Object** write_back);
572 Address Allocate(int space_index, int size); 572 Address Allocate(int space_index, int size);
573 573
574 // Special handling for serialized code like hooking up internalized strings. 574 // Special handling for serialized code like hooking up internalized strings.
575 HeapObject* PostProcessNewObject(HeapObject* obj); 575 HeapObject* PostProcessNewObject(HeapObject* obj, int space);
576
577 void RelinkAllocationSite(AllocationSite* obj);
578 576
579 // This returns the address of an object that has been described in the 577 // This returns the address of an object that has been described in the
580 // snapshot by chunk index and offset. 578 // snapshot by chunk index and offset.
581 HeapObject* GetBackReferencedObject(int space); 579 HeapObject* GetBackReferencedObject(int space);
582 580
583 // Cached current isolate. 581 // Cached current isolate.
584 Isolate* isolate_; 582 Isolate* isolate_;
585 583
586 // Objects from the attached object descriptions in the serialized user code. 584 // Objects from the attached object descriptions in the serialized user code.
587 Vector<Handle<Object> > attached_objects_; 585 Vector<Handle<Object> > attached_objects_;
588 586
589 SnapshotByteSource source_; 587 SnapshotByteSource source_;
590 uint32_t magic_number_; 588 uint32_t magic_number_;
591 589
592 // The address of the next object that will be allocated in each space. 590 // The address of the next object that will be allocated in each space.
593 // Each space has a number of chunks reserved by the GC, with each chunk 591 // Each space has a number of chunks reserved by the GC, with each chunk
594 // fitting into a page. Deserialized objects are allocated into the 592 // fitting into a page. Deserialized objects are allocated into the
595 // current chunk of the target space by bumping up high water mark. 593 // current chunk of the target space by bumping up high water mark.
596 Heap::Reservation reservations_[kNumberOfSpaces]; 594 Heap::Reservation reservations_[kNumberOfSpaces];
597 uint32_t current_chunk_[kNumberOfPreallocatedSpaces]; 595 uint32_t current_chunk_[kNumberOfPreallocatedSpaces];
598 Address high_water_[kNumberOfPreallocatedSpaces]; 596 Address high_water_[kNumberOfPreallocatedSpaces];
599 597
600 ExternalReferenceTable* external_reference_table_; 598 ExternalReferenceTable* external_reference_table_;
601 599
602 List<HeapObject*> deserialized_large_objects_; 600 List<HeapObject*> deserialized_large_objects_;
601 List<Code*> new_code_objects_;
603 602
604 bool deserializing_user_code_; 603 bool deserializing_user_code_;
605 604
606 DISALLOW_COPY_AND_ASSIGN(Deserializer); 605 DISALLOW_COPY_AND_ASSIGN(Deserializer);
607 }; 606 };
608 607
609 608
610 class CodeAddressMap; 609 class CodeAddressMap;
611 610
612 // There can be only one serializer per V8 process. 611 // There can be only one serializer per V8 process.
(...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after
1031 kNumInternalizedStringsOffset + kInt32Size; 1030 kNumInternalizedStringsOffset + kInt32Size;
1032 static const int kNumCodeStubKeysOffset = kNumReservationsOffset + kInt32Size; 1031 static const int kNumCodeStubKeysOffset = kNumReservationsOffset + kInt32Size;
1033 static const int kPayloadLengthOffset = kNumCodeStubKeysOffset + kInt32Size; 1032 static const int kPayloadLengthOffset = kNumCodeStubKeysOffset + kInt32Size;
1034 static const int kChecksum1Offset = kPayloadLengthOffset + kInt32Size; 1033 static const int kChecksum1Offset = kPayloadLengthOffset + kInt32Size;
1035 static const int kChecksum2Offset = kChecksum1Offset + kInt32Size; 1034 static const int kChecksum2Offset = kChecksum1Offset + kInt32Size;
1036 static const int kHeaderSize = kChecksum2Offset + kInt32Size; 1035 static const int kHeaderSize = kChecksum2Offset + kInt32Size;
1037 }; 1036 };
1038 } } // namespace v8::internal 1037 } } // namespace v8::internal
1039 1038
1040 #endif // V8_SNAPSHOT_SERIALIZE_H_ 1039 #endif // V8_SNAPSHOT_SERIALIZE_H_
OLDNEW
« no previous file with comments | « no previous file | src/snapshot/serialize.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698