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

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

Issue 1751963003: Fix crash when --ll_prof is enabled after cb29f9c (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@int_profile_sourcepos
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/log.cc ('k') | src/snapshot/serializer.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 346 matching lines...) Expand 10 before | Expand all | Expand 10 after
357 address = obj->address(); 357 address = obj->address();
358 next_alignment_ = kWordAligned; 358 next_alignment_ = kWordAligned;
359 } else { 359 } else {
360 address = Allocate(space_number, size); 360 address = Allocate(space_number, size);
361 obj = HeapObject::FromAddress(address); 361 obj = HeapObject::FromAddress(address);
362 } 362 }
363 363
364 isolate_->heap()->OnAllocationEvent(obj, size); 364 isolate_->heap()->OnAllocationEvent(obj, size);
365 Object** current = reinterpret_cast<Object**>(address); 365 Object** current = reinterpret_cast<Object**>(address);
366 Object** limit = current + (size >> kPointerSizeLog2); 366 Object** limit = current + (size >> kPointerSizeLog2);
367 if (FLAG_log_snapshot_positions) { 367 int position = source_.position();
368 LOG(isolate_, SnapshotPositionEvent(address, source_.position()));
369 }
370 368
371 if (ReadData(current, limit, space_number, address)) { 369 if (ReadData(current, limit, space_number, address)) {
372 // Only post process if object content has not been deferred. 370 // Only post process if object content has not been deferred.
373 obj = PostProcessNewObject(obj, space_number); 371 obj = PostProcessNewObject(obj, space_number);
374 } 372 }
373 if (FLAG_log_snapshot_positions) {
374 LOG(isolate_, SnapshotPositionEvent(obj, position));
375 }
375 376
376 Object* write_back_obj = obj; 377 Object* write_back_obj = obj;
377 UnalignedCopy(write_back, &write_back_obj); 378 UnalignedCopy(write_back, &write_back_obj);
378 #ifdef DEBUG 379 #ifdef DEBUG
379 if (obj->IsCode()) { 380 if (obj->IsCode()) {
380 DCHECK(space_number == CODE_SPACE || space_number == LO_SPACE); 381 DCHECK(space_number == CODE_SPACE || space_number == LO_SPACE);
381 } else { 382 } else {
382 DCHECK(space_number != CODE_SPACE); 383 DCHECK(space_number != CODE_SPACE);
383 } 384 }
384 #endif // DEBUG 385 #endif // DEBUG
(...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after
803 804
804 default: 805 default:
805 CHECK(false); 806 CHECK(false);
806 } 807 }
807 } 808 }
808 CHECK_EQ(limit, current); 809 CHECK_EQ(limit, current);
809 return true; 810 return true;
810 } 811 }
811 } // namespace internal 812 } // namespace internal
812 } // namespace v8 813 } // namespace v8
OLDNEW
« no previous file with comments | « src/log.cc ('k') | src/snapshot/serializer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698