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

Unified Diff: runtime/vm/thread.cc

Issue 1387643002: Move vm_tags from isolate to thread, since we may have multiple threads in same isolate (GC, backgr… (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: More comment cleanups Created 5 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/thread.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/thread.cc
diff --git a/runtime/vm/thread.cc b/runtime/vm/thread.cc
index eff09226730aae79e914661012fe30fbb87aeb2e..0828f4058dcb31970f475691fa2038398e08b48e 100644
--- a/runtime/vm/thread.cc
+++ b/runtime/vm/thread.cc
@@ -113,7 +113,8 @@ Thread::Thread(bool init_vm_constants)
isolate_(NULL),
heap_(NULL),
store_buffer_block_(NULL),
- log_(new class Log()) {
+ log_(new class Log()),
+ vm_tag_(0) {
ClearState();
#define DEFAULT_INIT(type_name, member_name, init_expr, default_init_value) \
@@ -188,7 +189,7 @@ void Thread::EnterIsolate(Isolate* isolate) {
ASSERT(!isolate->HasMutatorThread());
thread->isolate_ = isolate;
isolate->MakeCurrentThreadMutator(thread);
- isolate->set_vm_tag(VMTag::kVMTagId);
+ thread->set_vm_tag(VMTag::kVMTagId);
ASSERT(thread->store_buffer_block_ == NULL);
thread->StoreBufferAcquire();
ASSERT(isolate->heap() != NULL);
@@ -209,9 +210,9 @@ void Thread::ExitIsolate() {
// TODO(koda): Move store_buffer_block_ into State.
thread->StoreBufferRelease();
if (isolate->is_runnable()) {
- isolate->set_vm_tag(VMTag::kIdleTagId);
+ thread->set_vm_tag(VMTag::kIdleTagId);
} else {
- isolate->set_vm_tag(VMTag::kLoadWaitTagId);
+ thread->set_vm_tag(VMTag::kLoadWaitTagId);
}
isolate->ClearMutatorThread();
thread->isolate_ = NULL;
« no previous file with comments | « runtime/vm/thread.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698