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

Unified Diff: runtime/vm/profiler_test.cc

Issue 1258783005: Fix profiler exclusive code tree node counts (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 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 | « runtime/vm/profiler_service.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/profiler_test.cc
diff --git a/runtime/vm/profiler_test.cc b/runtime/vm/profiler_test.cc
index 5a8e5378cfd61739917790ad7ab478255dfb9b13..f2bd9f5767911537bbd113e97f4a8a0ad5f4f8a6 100644
--- a/runtime/vm/profiler_test.cc
+++ b/runtime/vm/profiler_test.cc
@@ -378,13 +378,30 @@ TEST_CASE(Profiler_CodeTicks) {
// Move down from the root.
EXPECT(walker.Down());
EXPECT_STREQ("B.boo", walker.CurrentName());
+ EXPECT_EQ(3, walker.CurrentNodeTickCount());
EXPECT_EQ(3, walker.CurrentInclusiveTicks());
EXPECT_EQ(3, walker.CurrentExclusiveTicks());
EXPECT(walker.Down());
EXPECT_STREQ("main", walker.CurrentName());
+ EXPECT_EQ(3, walker.CurrentNodeTickCount());
EXPECT_EQ(3, walker.CurrentInclusiveTicks());
EXPECT_EQ(0, walker.CurrentExclusiveTicks());
EXPECT(!walker.Down());
+
+ // Inclusive code: main -> B.boo.
+ walker.Reset(Profile::kInclusiveCode);
+ // Move down from the root.
+ EXPECT(walker.Down());
+ EXPECT_STREQ("main", walker.CurrentName());
+ EXPECT_EQ(3, walker.CurrentNodeTickCount());
+ EXPECT_EQ(3, walker.CurrentInclusiveTicks());
+ EXPECT_EQ(0, walker.CurrentExclusiveTicks());
+ EXPECT(walker.Down());
+ EXPECT_STREQ("B.boo", walker.CurrentName());
+ EXPECT_EQ(3, walker.CurrentNodeTickCount());
+ EXPECT_EQ(3, walker.CurrentInclusiveTicks());
+ EXPECT_EQ(3, walker.CurrentExclusiveTicks());
+ EXPECT(!walker.Down());
}
}
« no previous file with comments | « runtime/vm/profiler_service.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698