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

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

Issue 2995543004: [vm, gc] Require a safepoint for heap iteration. (Closed)
Patch Set: explicit-thread Created 3 years, 4 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/profiler_test.cc ('k') | runtime/vm/safepoint.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 (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/runtime_entry.h" 5 #include "vm/runtime_entry.h"
6 6
7 #include "vm/assembler.h" 7 #include "vm/assembler.h"
8 #include "vm/ast.h" 8 #include "vm/ast.h"
9 #include "vm/code_patcher.h" 9 #include "vm/code_patcher.h"
10 #include "vm/compiler.h" 10 #include "vm/compiler.h"
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 gc_at_instance_allocation, 89 gc_at_instance_allocation,
90 NULL, 90 NULL,
91 "Perform a GC before allocation of instances of " 91 "Perform a GC before allocation of instances of "
92 "the specified class"); 92 "the specified class");
93 #endif 93 #endif
94 94
95 #if defined(TESTING) || defined(DEBUG) 95 #if defined(TESTING) || defined(DEBUG)
96 void VerifyOnTransition() { 96 void VerifyOnTransition() {
97 Thread* thread = Thread::Current(); 97 Thread* thread = Thread::Current();
98 TransitionGeneratedToVM transition(thread); 98 TransitionGeneratedToVM transition(thread);
99 thread->isolate()->heap()->WaitForSweeperTasks(thread);
100 SafepointOperationScope safepoint_scope(thread);
101 VerifyPointersVisitor::VerifyPointers(); 99 VerifyPointersVisitor::VerifyPointers();
102 thread->isolate()->heap()->Verify(); 100 thread->isolate()->heap()->Verify();
103 } 101 }
104 #endif 102 #endif
105 103
106 // Add function to a class and that class to the class dictionary so that 104 // Add function to a class and that class to the class dictionary so that
107 // frame walking can be used. 105 // frame walking can be used.
108 const Function& RegisterFakeFunction(const char* name, const Code& code) { 106 const Function& RegisterFakeFunction(const char* name, const Code& code) {
109 Thread* thread = Thread::Current(); 107 Thread* thread = Thread::Current();
110 const String& class_name = String::Handle(Symbols::New(thread, "ownerClass")); 108 const String& class_name = String::Handle(Symbols::New(thread, "ownerClass"));
(...skipping 2252 matching lines...) Expand 10 before | Expand all | Expand 10 after
2363 true /* is_float */, 2361 true /* is_float */,
2364 reinterpret_cast<RuntimeFunction>(static_cast<UnaryMathCFunction>(&tan))); 2362 reinterpret_cast<RuntimeFunction>(static_cast<UnaryMathCFunction>(&tan)));
2365 2363
2366 DEFINE_RAW_LEAF_RUNTIME_ENTRY( 2364 DEFINE_RAW_LEAF_RUNTIME_ENTRY(
2367 LibcAtan, 2365 LibcAtan,
2368 1, 2366 1,
2369 true /* is_float */, 2367 true /* is_float */,
2370 reinterpret_cast<RuntimeFunction>(static_cast<UnaryMathCFunction>(&atan))); 2368 reinterpret_cast<RuntimeFunction>(static_cast<UnaryMathCFunction>(&atan)));
2371 2369
2372 } // namespace dart 2370 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/profiler_test.cc ('k') | runtime/vm/safepoint.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698