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

Side by Side Diff: runtime/vm/thread.h

Issue 2565253004: Added task kind field to thread JSON output. (Closed)
Patch Set: Created 4 years 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 | « no previous file | runtime/vm/thread.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) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 #ifndef RUNTIME_VM_THREAD_H_ 5 #ifndef RUNTIME_VM_THREAD_H_
6 #define RUNTIME_VM_THREAD_H_ 6 #define RUNTIME_VM_THREAD_H_
7 7
8 #include "include/dart_api.h" 8 #include "include/dart_api.h"
9 #include "platform/assert.h" 9 #include "platform/assert.h"
10 #include "vm/atomic.h" 10 #include "vm/atomic.h"
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 public: 154 public:
155 // The kind of task this thread is performing. Sampled by the profiler. 155 // The kind of task this thread is performing. Sampled by the profiler.
156 enum TaskKind { 156 enum TaskKind {
157 kUnknownTask = 0x0, 157 kUnknownTask = 0x0,
158 kMutatorTask = 0x1, 158 kMutatorTask = 0x1,
159 kCompilerTask = 0x2, 159 kCompilerTask = 0x2,
160 kSweeperTask = 0x4, 160 kSweeperTask = 0x4,
161 kMarkerTask = 0x8, 161 kMarkerTask = 0x8,
162 kFinalizerTask = 0x10, 162 kFinalizerTask = 0x10,
163 }; 163 };
164 // Converts a TaskKind to its corresponding C-String name.
165 static const char* TaskKindToCString(TaskKind kind);
166
164 ~Thread(); 167 ~Thread();
165 168
166 // The currently executing thread, or NULL if not yet initialized. 169 // The currently executing thread, or NULL if not yet initialized.
167 static Thread* Current() { 170 static Thread* Current() {
168 BaseThread* thread = OSThread::GetCurrentTLS(); 171 BaseThread* thread = OSThread::GetCurrentTLS();
169 if (thread == NULL || thread->is_os_thread()) { 172 if (thread == NULL || thread->is_os_thread()) {
170 return NULL; 173 return NULL;
171 } 174 }
172 return reinterpret_cast<Thread*>(thread); 175 return reinterpret_cast<Thread*>(thread);
173 } 176 }
(...skipping 607 matching lines...) Expand 10 before | Expand all | Expand 10 after
781 // Disable thread interrupts. 784 // Disable thread interrupts.
782 class DisableThreadInterruptsScope : public StackResource { 785 class DisableThreadInterruptsScope : public StackResource {
783 public: 786 public:
784 explicit DisableThreadInterruptsScope(Thread* thread); 787 explicit DisableThreadInterruptsScope(Thread* thread);
785 ~DisableThreadInterruptsScope(); 788 ~DisableThreadInterruptsScope();
786 }; 789 };
787 790
788 } // namespace dart 791 } // namespace dart
789 792
790 #endif // RUNTIME_VM_THREAD_H_ 793 #endif // RUNTIME_VM_THREAD_H_
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698