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

Unified Diff: runtime/vm/profiler.h

Issue 418433002: Profiler tweaks (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 5 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 | « no previous file | 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 0f629c6b42995d1a84ea69c8e985bbf11daa8b75..05e25768e9d502bc4a672ce8a511de4eb26b5f2f 100644
--- a/runtime/vm/profiler.h
+++ b/runtime/vm/profiler.h
@@ -241,6 +241,14 @@ class Sample {
state_ = IgnoreBit::update(ignore_sample, state_);
}
+ bool exit_frame_sample() const {
+ return ExitFrameBit::decode(state_);
+ }
+
+ void set_exit_frame_sample(bool exit_frame_sample) {
+ state_ = ExitFrameBit::update(exit_frame_sample, state_);
+ }
+
static void InitOnce();
static intptr_t instance_size() {
@@ -256,10 +264,12 @@ class Sample {
kProcessedBit = 0,
kLeafFrameIsDartBit = 1,
kIgnoreBit = 2,
+ kExitFrameBit = 3,
};
class ProcessedBit : public BitField<bool, kProcessedBit, 1> {};
class LeafFrameIsDart : public BitField<bool, kLeafFrameIsDartBit, 1> {};
class IgnoreBit : public BitField<bool, kIgnoreBit, 1> {};
+ class ExitFrameBit : public BitField<bool, kExitFrameBit, 1> {};
int64_t timestamp_;
ThreadId tid_;
@@ -304,6 +314,10 @@ class SampleBuffer {
const intptr_t length = capacity();
for (intptr_t i = 0; i < length; i++) {
Sample* sample = At(i);
+ if (sample->ignore_sample()) {
+ // Bad sample.
+ continue;
+ }
if (sample->isolate() != visitor->isolate()) {
// Another isolate.
continue;
« no previous file with comments | « no previous file | runtime/vm/profiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698