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

Side by Side Diff: src/heap/objects-visiting-inl.h

Issue 1411513005: [serializer] Move clearing of optimized code map out of GC. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebased. Created 5 years, 1 month 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/objects.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_OBJECTS_VISITING_INL_H_ 5 #ifndef V8_OBJECTS_VISITING_INL_H_
6 #define V8_OBJECTS_VISITING_INL_H_ 6 #define V8_OBJECTS_VISITING_INL_H_
7 7
8 #include "src/heap/array-buffer-tracker.h" 8 #include "src/heap/array-buffer-tracker.h"
9 #include "src/heap/objects-visiting.h" 9 #include "src/heap/objects-visiting.h"
10 #include "src/ic/ic-state.h" 10 #include "src/ic/ic-state.h"
(...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after
436 void StaticMarkingVisitor<StaticVisitor>::VisitSharedFunctionInfo( 436 void StaticMarkingVisitor<StaticVisitor>::VisitSharedFunctionInfo(
437 Map* map, HeapObject* object) { 437 Map* map, HeapObject* object) {
438 Heap* heap = map->GetHeap(); 438 Heap* heap = map->GetHeap();
439 SharedFunctionInfo* shared = SharedFunctionInfo::cast(object); 439 SharedFunctionInfo* shared = SharedFunctionInfo::cast(object);
440 if (shared->ic_age() != heap->global_ic_age()) { 440 if (shared->ic_age() != heap->global_ic_age()) {
441 shared->ResetForNewContext(heap->global_ic_age()); 441 shared->ResetForNewContext(heap->global_ic_age());
442 } 442 }
443 if (FLAG_cleanup_code_caches_at_gc) { 443 if (FLAG_cleanup_code_caches_at_gc) {
444 shared->ClearTypeFeedbackInfoAtGCTime(); 444 shared->ClearTypeFeedbackInfoAtGCTime();
445 } 445 }
446 if ((FLAG_flush_optimized_code_cache || 446 if (FLAG_flush_optimized_code_cache &&
447 heap->isolate()->serializer_enabled()) &&
448 !shared->optimized_code_map()->IsSmi()) { 447 !shared->optimized_code_map()->IsSmi()) {
449 // Always flush the optimized code map if requested by flag. 448 // Always flush the optimized code map if requested by flag.
450 shared->ClearOptimizedCodeMap(); 449 shared->ClearOptimizedCodeMap();
451 } 450 }
452 MarkCompactCollector* collector = heap->mark_compact_collector(); 451 MarkCompactCollector* collector = heap->mark_compact_collector();
453 if (collector->is_code_flushing_enabled()) { 452 if (collector->is_code_flushing_enabled()) {
454 if (!shared->optimized_code_map()->IsSmi()) { 453 if (!shared->optimized_code_map()->IsSmi()) {
455 // Add the shared function info holding an optimized code map to 454 // Add the shared function info holding an optimized code map to
456 // the code flusher for processing of code maps after marking. 455 // the code flusher for processing of code maps after marking.
457 collector->code_flusher()->AddOptimizedCodeMap(shared); 456 collector->code_flusher()->AddOptimizedCodeMap(shared);
(...skipping 440 matching lines...) Expand 10 before | Expand all | Expand 10 after
898 897
899 RelocIterator it(this, mode_mask); 898 RelocIterator it(this, mode_mask);
900 for (; !it.done(); it.next()) { 899 for (; !it.done(); it.next()) {
901 it.rinfo()->template Visit<StaticVisitor>(heap); 900 it.rinfo()->template Visit<StaticVisitor>(heap);
902 } 901 }
903 } 902 }
904 } // namespace internal 903 } // namespace internal
905 } // namespace v8 904 } // namespace v8
906 905
907 #endif // V8_OBJECTS_VISITING_INL_H_ 906 #endif // V8_OBJECTS_VISITING_INL_H_
OLDNEW
« no previous file with comments | « no previous file | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698