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

Unified Diff: runtime/vm/profiler.h

Issue 1814813003: Collect samples for background threads. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 9 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/precompiler.cc ('k') | runtime/vm/profiler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/profiler.h
diff --git a/runtime/vm/profiler.h b/runtime/vm/profiler.h
index 0b1207ffd2329fc0707da90e398eac6f46ef7a19..450e5da3f6e22c89d2580fcf631b5d12bb4fab25 100644
--- a/runtime/vm/profiler.h
+++ b/runtime/vm/profiler.h
@@ -274,6 +274,14 @@ class Sample {
state_ = ClassAllocationSampleBit::update(allocation_sample, state_);
}
+ bool is_mutator_thread() const {
+ return MutatorThreadBit::decode(state_);
+ }
+
+ void set_is_mutator_thread(bool mutator_thread) {
+ state_ = MutatorThreadBit::update(mutator_thread, state_);
+ }
+
bool is_continuation_sample() const {
return ContinuationSampleBit::decode(state_);
}
@@ -338,6 +346,7 @@ class Sample {
kTruncatedTraceBit = 5,
kClassAllocationSampleBit = 6,
kContinuationSampleBit = 7,
+ kMutatorThreadBit = 8,
};
class HeadSampleBit : public BitField<uword, bool, kHeadSampleBit, 1> {};
class LeafFrameIsDart :
@@ -352,6 +361,8 @@ class Sample {
: public BitField<uword, bool, kClassAllocationSampleBit, 1> {};
class ContinuationSampleBit
: public BitField<uword, bool, kContinuationSampleBit, 1> {};
+ class MutatorThreadBit
+ : public BitField<uword, bool, kMutatorThreadBit, 1> {};
int64_t timestamp_;
ThreadId tid_;
« no previous file with comments | « runtime/vm/precompiler.cc ('k') | runtime/vm/profiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698