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

Unified Diff: test/cctest/test-sampler-api.cc

Issue 638633002: Tick processor: Print C++ entry points (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 2 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
Index: test/cctest/test-sampler-api.cc
diff --git a/test/cctest/test-sampler-api.cc b/test/cctest/test-sampler-api.cc
index 2f6f92eb19c26556104a6920a6958d51b5a7f7c6..2fdcc79537ff9e63907f2c0eeee83bda4d76c2a5 100644
--- a/test/cctest/test-sampler-api.cc
+++ b/test/cctest/test-sampler-api.cc
@@ -194,7 +194,7 @@ SamplingTestHelper* SamplingTestHelper::instance_;
// waiting for the sampler to take a sample.
static const char* test_function =
"function func(depth) {"
- " if (depth == 2) CollectSample();"
+ " if (depth == 3) CollectSample();"
" else return func(depth - 1);"
"}";
@@ -214,9 +214,9 @@ TEST(StackDepthDoesNotExceedMaxValue) {
// The captured sample should have three pc values.
// They should fall in the range where the compiled code resides.
// The expected stack is:
-// bottom of stack [{anon script}, outer, inner] top of stack
-// ^ ^ ^
-// sample.stack indices 2 1 0
+// bottom of stack [{anon script}, outer, inner, c_entry] top of stack
+// ^ ^ ^ ^
+// sample.stack indices 3 2 1 0
TEST(StackFramesConsistent) {
// Note: The arguments.callee stuff is there so that the
// functions are not optimized away.
@@ -232,14 +232,14 @@ TEST(StackFramesConsistent) {
SamplingTestHelper helper(test_script);
Sample& sample = helper.sample();
- CHECK_EQ(3, sample.size());
+ CHECK_EQ(4, sample.size());
const SamplingTestHelper::CodeEventEntry* entry;
- entry = helper.FindEventEntry(sample.begin()[0]);
+ entry = helper.FindEventEntry(sample.begin()[1]);
CHECK_NE(NULL, entry);
CHECK(std::string::npos != entry->name.find("test_sampler_api_inner"));
- entry = helper.FindEventEntry(sample.begin()[1]);
+ entry = helper.FindEventEntry(sample.begin()[2]);
CHECK_NE(NULL, entry);
CHECK(std::string::npos != entry->name.find("test_sampler_api_outer"));
}

Powered by Google App Engine
This is Rietveld 408576698