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

Unified Diff: runtime/vm/isolate.h

Issue 1412733008: Switch profiler from isolates to threads (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: 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
Index: runtime/vm/isolate.h
diff --git a/runtime/vm/isolate.h b/runtime/vm/isolate.h
index a88569aaa49f49f725e1aa44e18036c12cee729e..36d4b9c465b1ab229b72a89dd0993ef37dd7f6a6 100644
--- a/runtime/vm/isolate.h
+++ b/runtime/vm/isolate.h
@@ -154,6 +154,10 @@ class Isolate : public BaseIsolate {
bool MutatorThreadIsCurrentThread() {
return mutator_thread_ == Thread::Current();
}
+ bool IsMutatorThread(Thread* thread) {
+ ASSERT(thread != NULL);
+ return mutator_thread_ == thread;
+ }
siva 2015/10/26 23:45:26 Both these functions MutatorThreadIsCurrentThrea
Cutch 2015/10/27 22:36:24 I've switched to using thread->IsMutatorThread() a
const char* name() const { return name_; }
const char* debugger_name() const { return debugger_name_; }
@@ -327,6 +331,10 @@ class Isolate : public BaseIsolate {
Mutex* mutex() const { return mutex_; }
+ bool HasDebugger() const {
+ return debugger_ != NULL;
+ }
+
Debugger* debugger() const {
ASSERT(debugger_ != NULL);
return debugger_;
@@ -570,27 +578,12 @@ class Isolate : public BaseIsolate {
return defer_finalization_count_ == 0;
}
- Mutex* profiler_data_mutex() {
- return &profiler_data_mutex_;
- }
-
- void set_profiler_data(IsolateProfilerData* profiler_data) {
- profiler_data_ = profiler_data;
- }
-
- IsolateProfilerData* profiler_data() const {
- return profiler_data_;
- }
-
void PrintJSON(JSONStream* stream, bool ref = true);
CompilerStats* compiler_stats() {
return compiler_stats_;
}
- // Returns the number of sampled threads.
- intptr_t ProfileInterrupt();
-
VMTagCounters* vm_tag_counters() {
return &vm_tag_counters_;
}
@@ -813,9 +806,6 @@ class Isolate : public BaseIsolate {
// Trace buffer support.
TraceBuffer* trace_buffer_;
- IsolateProfilerData* profiler_data_;
- Mutex profiler_data_mutex_;
-
VMTagCounters vm_tag_counters_;
RawGrowableObjectArray* tag_table_;

Powered by Google App Engine
This is Rietveld 408576698