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

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

Issue 1215063007: Serializer forces flushing of optimized code map. (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 | no next file » | 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/objects-visiting.h" 8 #include "src/heap/objects-visiting.h"
9 9
10 namespace v8 { 10 namespace v8 {
(...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after
402 void StaticMarkingVisitor<StaticVisitor>::VisitSharedFunctionInfo( 402 void StaticMarkingVisitor<StaticVisitor>::VisitSharedFunctionInfo(
403 Map* map, HeapObject* object) { 403 Map* map, HeapObject* object) {
404 Heap* heap = map->GetHeap(); 404 Heap* heap = map->GetHeap();
405 SharedFunctionInfo* shared = SharedFunctionInfo::cast(object); 405 SharedFunctionInfo* shared = SharedFunctionInfo::cast(object);
406 if (shared->ic_age() != heap->global_ic_age()) { 406 if (shared->ic_age() != heap->global_ic_age()) {
407 shared->ResetForNewContext(heap->global_ic_age()); 407 shared->ResetForNewContext(heap->global_ic_age());
408 } 408 }
409 if (FLAG_cleanup_code_caches_at_gc) { 409 if (FLAG_cleanup_code_caches_at_gc) {
410 shared->ClearTypeFeedbackInfoAtGCTime(); 410 shared->ClearTypeFeedbackInfoAtGCTime();
411 } 411 }
412 if (FLAG_flush_optimized_code_cache && 412 if ((FLAG_flush_optimized_code_cache ||
413 heap->isolate()->serializer_enabled()) &&
413 !shared->optimized_code_map()->IsSmi()) { 414 !shared->optimized_code_map()->IsSmi()) {
414 // Always flush the optimized code map if requested by flag. 415 // Always flush the optimized code map if requested by flag.
415 shared->ClearOptimizedCodeMap(); 416 shared->ClearOptimizedCodeMap();
416 } 417 }
417 MarkCompactCollector* collector = heap->mark_compact_collector(); 418 MarkCompactCollector* collector = heap->mark_compact_collector();
418 if (collector->is_code_flushing_enabled()) { 419 if (collector->is_code_flushing_enabled()) {
419 if (!shared->optimized_code_map()->IsSmi()) { 420 if (!shared->optimized_code_map()->IsSmi()) {
420 // Add the shared function info holding an optimized code map to 421 // Add the shared function info holding an optimized code map to
421 // the code flusher for processing of code maps after marking. 422 // the code flusher for processing of code maps after marking.
422 collector->code_flusher()->AddOptimizedCodeMap(shared); 423 collector->code_flusher()->AddOptimizedCodeMap(shared);
(...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after
835 836
836 RelocIterator it(this, mode_mask); 837 RelocIterator it(this, mode_mask);
837 for (; !it.done(); it.next()) { 838 for (; !it.done(); it.next()) {
838 it.rinfo()->template Visit<StaticVisitor>(heap); 839 it.rinfo()->template Visit<StaticVisitor>(heap);
839 } 840 }
840 } 841 }
841 } 842 }
842 } // namespace v8::internal 843 } // namespace v8::internal
843 844
844 #endif // V8_OBJECTS_VISITING_INL_H_ 845 #endif // V8_OBJECTS_VISITING_INL_H_
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698