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

Unified Diff: test/cctest/test-cpu-profiler.cc

Issue 1062053004: Revert of CpuProfiler: public API for deopt info in cpu profiler. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 8 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/profile-generator.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-cpu-profiler.cc
diff --git a/test/cctest/test-cpu-profiler.cc b/test/cctest/test-cpu-profiler.cc
index b46db63b616909eb15f119123be2800ed4fcd3fb..a8cbdd505cfe0626de7669c6d952a5cccd8dca52 100644
--- a/test/cctest/test-cpu-profiler.cc
+++ b/test/cctest/test-cpu-profiler.cc
@@ -56,10 +56,8 @@
}
-static size_t offset(const char* src, const char* substring) {
- const char* it = strstr(src, substring);
- CHECK(it);
- return static_cast<size_t>(it - src);
+static int offset(const char* src, const char* substring) {
+ return static_cast<int>(strstr(src, substring) - src);
}
@@ -1900,11 +1898,10 @@
const char* branch[] = {"", "test"};
const ProfileNode* itest_node =
GetSimpleBranch(profile, branch, arraysize(branch));
- const std::vector<v8::CpuProfileDeoptInfo>& deopt_infos =
- itest_node->deopt_infos();
+ const std::vector<i::DeoptInfo>& deopt_infos = itest_node->deopt_infos();
CHECK_EQ(1, deopt_infos.size());
- const v8::CpuProfileDeoptInfo& info = deopt_infos[0];
+ const i::DeoptInfo& info = deopt_infos[0];
CHECK_EQ(reason(i::Deoptimizer::kNotAHeapNumber), info.deopt_reason);
CHECK_EQ(2, info.stack.size());
CHECK_EQ(inlined_script_id, info.stack[0].script_id);
@@ -1973,11 +1970,10 @@
const char* branch[] = {"", "test1"};
const ProfileNode* itest_node =
GetSimpleBranch(profile, branch, arraysize(branch));
- const std::vector<v8::CpuProfileDeoptInfo>& deopt_infos =
- itest_node->deopt_infos();
+ const std::vector<i::DeoptInfo>& deopt_infos = itest_node->deopt_infos();
CHECK_EQ(1, deopt_infos.size());
- const v8::CpuProfileDeoptInfo info = deopt_infos[0];
+ const i::DeoptInfo info = deopt_infos[0];
CHECK_EQ(reason(i::Deoptimizer::kNotAHeapNumber), info.deopt_reason);
CHECK_EQ(3, info.stack.size());
CHECK_EQ(inlined_script_id, info.stack[0].script_id);
« no previous file with comments | « src/profile-generator.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698