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

Unified Diff: runtime/vm/thread.cc

Issue 1314673008: Migrate logging infrastructure Isolate->Thread (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Fix test. Created 5 years, 3 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') | runtime/vm/timeline_analysis.cc » ('j') | 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 7d817d3072249ccff66e41f6ef07c2fca4890a76..6e203b1d083d12d4fd9dd3ce5cd12987053ccd9c 100644
--- a/runtime/vm/thread.cc
+++ b/runtime/vm/thread.cc
@@ -7,6 +7,7 @@
#include "vm/growable_array.h"
#include "vm/isolate.h"
#include "vm/lockers.h"
+#include "vm/log.h"
#include "vm/object.h"
#include "vm/os_thread.h"
#include "vm/profiler.h"
@@ -52,6 +53,8 @@ Thread::~Thread() {
// Clear |this| from all isolate's thread registry.
ThreadPruner pruner(this);
Isolate::VisitIsolates(&pruner);
+ delete log_;
+ log_ = NULL;
}
@@ -108,7 +111,8 @@ Thread::Thread(bool init_vm_constants)
thread_interrupt_data_(NULL),
isolate_(NULL),
heap_(NULL),
- store_buffer_block_(NULL) {
+ store_buffer_block_(NULL),
+ log_(new class Log()) {
Ivan Posva 2015/09/10 15:40:32 Now we can drop the "class" here.
ClearState();
#define DEFAULT_INIT(type_name, member_name, init_expr, default_init_value) \
@@ -307,6 +311,11 @@ void Thread::set_cha(CHA* value) {
}
+Log* Thread::log() const {
+ return log_;
+}
+
+
void Thread::SetThreadInterrupter(ThreadInterruptCallback callback,
void* data) {
ASSERT(Thread::Current() == this);
« no previous file with comments | « runtime/vm/thread.h ('k') | runtime/vm/timeline_analysis.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698