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

Side by Side Diff: runtime/vm/gc_marker.cc

Issue 1814243002: Add Thread TaskKind (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
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 | « runtime/vm/compiler.cc ('k') | runtime/vm/gc_sweeper.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 (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/gc_marker.h" 5 #include "vm/gc_marker.h"
6 6
7 #include <map> 7 #include <map>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 582 matching lines...) Expand 10 before | Expand all | Expand 10 after
593 marking_stack_(marking_stack), 593 marking_stack_(marking_stack),
594 delay_set_(delay_set), 594 delay_set_(delay_set),
595 barrier_(barrier), 595 barrier_(barrier),
596 collect_code_(collect_code), 596 collect_code_(collect_code),
597 task_index_(task_index), 597 task_index_(task_index),
598 num_tasks_(num_tasks), 598 num_tasks_(num_tasks),
599 num_busy_(num_busy) { 599 num_busy_(num_busy) {
600 } 600 }
601 601
602 virtual void Run() { 602 virtual void Run() {
603 bool result = Thread::EnterIsolateAsHelper(isolate_, true); 603 bool result =
604 Thread::EnterIsolateAsHelper(isolate_, Thread::kMarkerTask, true);
604 ASSERT(result); 605 ASSERT(result);
605 { 606 {
606 Thread* thread = Thread::Current(); 607 Thread* thread = Thread::Current();
607 TIMELINE_FUNCTION_GC_DURATION(thread, "MarkTask"); 608 TIMELINE_FUNCTION_GC_DURATION(thread, "MarkTask");
608 StackZone stack_zone(thread); 609 StackZone stack_zone(thread);
609 Zone* zone = stack_zone.GetZone(); 610 Zone* zone = stack_zone.GetZone();
610 SkippedCodeFunctions* skipped_code_functions = 611 SkippedCodeFunctions* skipped_code_functions =
611 collect_code_ ? new(zone) SkippedCodeFunctions() : NULL; 612 collect_code_ ? new(zone) SkippedCodeFunctions() : NULL;
612 SyncMarkingVisitor visitor(isolate_, heap_, page_space_, marking_stack_, 613 SyncMarkingVisitor visitor(isolate_, heap_, page_space_, marking_stack_,
613 delay_set_, skipped_code_functions); 614 delay_set_, skipped_code_functions);
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
750 barrier.Exit(); 751 barrier.Exit();
751 } 752 }
752 delay_set.ClearReferences(); 753 delay_set.ClearReferences();
753 ProcessWeakTables(page_space); 754 ProcessWeakTables(page_space);
754 ProcessObjectIdTable(isolate); 755 ProcessObjectIdTable(isolate);
755 } 756 }
756 Epilogue(isolate, invoke_api_callbacks); 757 Epilogue(isolate, invoke_api_callbacks);
757 } 758 }
758 759
759 } // namespace dart 760 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/compiler.cc ('k') | runtime/vm/gc_sweeper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698