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

Unified Diff: test/cctest/test-profile-generator.cc

Issue 1709873002: Do not record CPU profile samples when stack collection is failed. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Make spoiled samples still contribute to the stats. Created 4 years, 10 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 | « src/profiler/sampler.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-profile-generator.cc
diff --git a/test/cctest/test-profile-generator.cc b/test/cctest/test-profile-generator.cc
index 82c0f30bd6f257888c289e20fccd132454ea0551..fa7dc155ee747fcf4ff204a779e707e84f8b3f73 100644
--- a/test/cctest/test-profile-generator.cc
+++ b/test/cctest/test-profile-generator.cc
@@ -428,11 +428,13 @@ TEST(SampleIds) {
// (root)#1 -> aaa #2 -> bbb #4 -> ccc #5 - sample2
// -> ccc #6 -> aaa #7 - sample3
TickSample sample1;
+ sample1.timestamp = v8::base::TimeTicks::HighResolutionNow();
sample1.pc = ToAddress(0x1600);
sample1.stack[0] = ToAddress(0x1510);
sample1.frames_count = 1;
generator.RecordTickSample(sample1);
TickSample sample2;
+ sample2.timestamp = v8::base::TimeTicks::HighResolutionNow();
sample2.pc = ToAddress(0x1925);
sample2.stack[0] = ToAddress(0x1780);
sample2.stack[1] = ToAddress(0x10000); // non-existent.
@@ -440,6 +442,7 @@ TEST(SampleIds) {
sample2.frames_count = 3;
generator.RecordTickSample(sample2);
TickSample sample3;
+ sample3.timestamp = v8::base::TimeTicks::HighResolutionNow();
sample3.pc = ToAddress(0x1510);
sample3.stack[0] = ToAddress(0x1910);
sample3.stack[1] = ToAddress(0x1610);
« no previous file with comments | « src/profiler/sampler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698