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

Side by Side Diff: src/deoptimizer.cc

Issue 1225573002: Record code slots that may point to evacuation candidate objects after deoptimizing them. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 5 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/heap/mark-compact.h » ('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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/accessors.h" 7 #include "src/accessors.h"
8 #include "src/codegen.h" 8 #include "src/codegen.h"
9 #include "src/cpu-profiler.h" 9 #include "src/cpu-profiler.h"
10 #include "src/deoptimizer.h" 10 #include "src/deoptimizer.h"
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after
407 DeoptimizationInputData* deopt_data = 407 DeoptimizationInputData* deopt_data =
408 DeoptimizationInputData::cast(codes[i]->deoptimization_data()); 408 DeoptimizationInputData::cast(codes[i]->deoptimization_data());
409 SharedFunctionInfo* shared = 409 SharedFunctionInfo* shared =
410 SharedFunctionInfo::cast(deopt_data->SharedFunctionInfo()); 410 SharedFunctionInfo::cast(deopt_data->SharedFunctionInfo());
411 shared->EvictFromOptimizedCodeMap(codes[i], "deoptimized code"); 411 shared->EvictFromOptimizedCodeMap(codes[i], "deoptimized code");
412 412
413 // Do platform-specific patching to force any activations to lazy deopt. 413 // Do platform-specific patching to force any activations to lazy deopt.
414 PatchCodeForDeoptimization(isolate, codes[i]); 414 PatchCodeForDeoptimization(isolate, codes[i]);
415 415
416 // We might be in the middle of incremental marking with compaction. 416 // We might be in the middle of incremental marking with compaction.
417 // Ignore all slots that might have been recorded on the deoptimized code 417 // Ignore all slots that might have been recorded in the body of the
418 // object. 418 // deoptimized code object.
419 isolate->heap()->mark_compact_collector()->RemoveObjectSlots(codes[i]); 419 Code* code = codes[i];
420 isolate->heap()->mark_compact_collector()->RemoveObjectSlots(
421 code->instruction_start(), code->address() + code->Size());
420 } 422 }
421 } 423 }
422 424
423 425
424 void Deoptimizer::DeoptimizeAll(Isolate* isolate) { 426 void Deoptimizer::DeoptimizeAll(Isolate* isolate) {
425 if (FLAG_trace_deopt) { 427 if (FLAG_trace_deopt) {
426 CodeTracer::Scope scope(isolate->GetCodeTracer()); 428 CodeTracer::Scope scope(isolate->GetCodeTracer());
427 PrintF(scope.file(), "[deoptimize all code in all contexts]\n"); 429 PrintF(scope.file(), "[deoptimize all code in all contexts]\n");
428 } 430 }
429 DisallowHeapAllocation no_allocation; 431 DisallowHeapAllocation no_allocation;
(...skipping 2941 matching lines...) Expand 10 before | Expand all | Expand 10 after
3371 DCHECK(value_info->IsMaterializedObject()); 3373 DCHECK(value_info->IsMaterializedObject());
3372 3374
3373 value_info->value_ = 3375 value_info->value_ =
3374 Handle<Object>(previously_materialized_objects->get(i), isolate_); 3376 Handle<Object>(previously_materialized_objects->get(i), isolate_);
3375 } 3377 }
3376 } 3378 }
3377 } 3379 }
3378 3380
3379 } // namespace internal 3381 } // namespace internal
3380 } // namespace v8 3382 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/heap/mark-compact.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698