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

Side by Side Diff: src/heap/heap.cc

Issue 1209403005: Let the second pass phantom callbacks run in a separate task on the foreground thread. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Run second pass callbacks synchronously when GC is forced. 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 | « src/global-handles.cc ('k') | src/list.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 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 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/accessors.h" 7 #include "src/accessors.h"
8 #include "src/api.h" 8 #include "src/api.h"
9 #include "src/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/base/once.h" 10 #include "src/base/once.h"
(...skipping 1288 matching lines...) Expand 10 before | Expand all | Expand 10 after
1299 mark_compact_collector_.marking_deque()->Uninitialize(); 1299 mark_compact_collector_.marking_deque()->Uninitialize();
1300 mark_compact_collector_.EnsureMarkingDequeIsCommitted( 1300 mark_compact_collector_.EnsureMarkingDequeIsCommitted(
1301 MarkCompactCollector::kMinMarkingDequeSize); 1301 MarkCompactCollector::kMinMarkingDequeSize);
1302 } 1302 }
1303 1303
1304 gc_post_processing_depth_++; 1304 gc_post_processing_depth_++;
1305 { 1305 {
1306 AllowHeapAllocation allow_allocation; 1306 AllowHeapAllocation allow_allocation;
1307 GCTracer::Scope scope(tracer(), GCTracer::Scope::EXTERNAL); 1307 GCTracer::Scope scope(tracer(), GCTracer::Scope::EXTERNAL);
1308 freed_global_handles = 1308 freed_global_handles =
1309 isolate_->global_handles()->PostGarbageCollectionProcessing(collector); 1309 isolate_->global_handles()->PostGarbageCollectionProcessing(
1310 collector, gc_callback_flags);
1310 } 1311 }
1311 gc_post_processing_depth_--; 1312 gc_post_processing_depth_--;
1312 1313
1313 isolate_->eternal_handles()->PostGarbageCollectionProcessing(this); 1314 isolate_->eternal_handles()->PostGarbageCollectionProcessing(this);
1314 1315
1315 // Update relocatables. 1316 // Update relocatables.
1316 Relocatable::PostGarbageCollectionProcessing(isolate_); 1317 Relocatable::PostGarbageCollectionProcessing(isolate_);
1317 1318
1318 double gc_speed = tracer()->CombinedMarkCompactSpeedInBytesPerMillisecond(); 1319 double gc_speed = tracer()->CombinedMarkCompactSpeedInBytesPerMillisecond();
1319 double mutator_speed = static_cast<double>( 1320 double mutator_speed = static_cast<double>(
(...skipping 5566 matching lines...) Expand 10 before | Expand all | Expand 10 after
6886 *object_type = "CODE_TYPE"; \ 6887 *object_type = "CODE_TYPE"; \
6887 *object_sub_type = "CODE_AGE/" #name; \ 6888 *object_sub_type = "CODE_AGE/" #name; \
6888 return true; 6889 return true;
6889 CODE_AGE_LIST_COMPLETE(COMPARE_AND_RETURN_NAME) 6890 CODE_AGE_LIST_COMPLETE(COMPARE_AND_RETURN_NAME)
6890 #undef COMPARE_AND_RETURN_NAME 6891 #undef COMPARE_AND_RETURN_NAME
6891 } 6892 }
6892 return false; 6893 return false;
6893 } 6894 }
6894 } // namespace internal 6895 } // namespace internal
6895 } // namespace v8 6896 } // namespace v8
OLDNEW
« no previous file with comments | « src/global-handles.cc ('k') | src/list.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698