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

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

Issue 2161543002: [turbofan] Add support for eager/soft deoptimization reasons. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Do the ports properly Created 4 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 | « src/x87/assembler-x87.h ('k') | test/unittests/compiler/escape-analysis-unittest.cc » ('j') | 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 6eb1f0bbac6cd320f1ea29f585c20001fc784479..be2a8945d836ad1214c85030374a355a601e30ae 100644
--- a/test/cctest/test-cpu-profiler.cc
+++ b/test/cctest/test-cpu-profiler.cc
@@ -63,8 +63,8 @@ static size_t offset(const char* src, const char* substring) {
return static_cast<size_t>(it - src);
}
-static const char* reason(const i::Deoptimizer::DeoptReason reason) {
- return i::Deoptimizer::GetDeoptReason(reason);
+static const char* reason(const i::DeoptimizeReason reason) {
+ return i::DeoptimizeReasonToString(reason);
}
TEST(StartStop) {
@@ -1853,21 +1853,21 @@ TEST(CollectDeoptEvents) {
{
const char* branch[] = {"", "opt_function0", "opt_function0"};
- CHECK_EQ(reason(i::Deoptimizer::kNotAHeapNumber),
+ CHECK_EQ(reason(i::DeoptimizeReason::kNotAHeapNumber),
GetBranchDeoptReason(env, iprofile, branch, arraysize(branch)));
}
{
const char* branch[] = {"", "opt_function1", "opt_function1"};
const char* deopt_reason =
GetBranchDeoptReason(env, iprofile, branch, arraysize(branch));
- if (deopt_reason != reason(i::Deoptimizer::kNaN) &&
- deopt_reason != reason(i::Deoptimizer::kLostPrecisionOrNaN)) {
+ if (deopt_reason != reason(i::DeoptimizeReason::kNaN) &&
+ deopt_reason != reason(i::DeoptimizeReason::kLostPrecisionOrNaN)) {
FATAL(deopt_reason);
}
}
{
const char* branch[] = {"", "opt_function2", "opt_function2"};
- CHECK_EQ(reason(i::Deoptimizer::kDivisionByZero),
+ CHECK_EQ(reason(i::DeoptimizeReason::kDivisionByZero),
GetBranchDeoptReason(env, iprofile, branch, arraysize(branch)));
}
iprofiler->DeleteProfile(iprofile);
@@ -1957,7 +1957,7 @@ TEST(DeoptAtFirstLevelInlinedSource) {
CHECK_EQ(1U, deopt_infos.size());
const v8::CpuProfileDeoptInfo& info = deopt_infos[0];
- CHECK_EQ(reason(i::Deoptimizer::kNotAHeapNumber), info.deopt_reason);
+ CHECK_EQ(reason(i::DeoptimizeReason::kNotAHeapNumber), info.deopt_reason);
CHECK_EQ(2U, info.stack.size());
CHECK_EQ(inlined_script_id, info.stack[0].script_id);
CHECK_EQ(offset(inlined_source, "left /"), info.stack[0].position);
@@ -2030,7 +2030,7 @@ TEST(DeoptAtSecondLevelInlinedSource) {
CHECK_EQ(1U, deopt_infos.size());
const v8::CpuProfileDeoptInfo info = deopt_infos[0];
- CHECK_EQ(reason(i::Deoptimizer::kNotAHeapNumber), info.deopt_reason);
+ CHECK_EQ(reason(i::DeoptimizeReason::kNotAHeapNumber), info.deopt_reason);
CHECK_EQ(3U, info.stack.size());
CHECK_EQ(inlined_script_id, info.stack[0].script_id);
CHECK_EQ(offset(inlined_source, "left /"), info.stack[0].position);
« no previous file with comments | « src/x87/assembler-x87.h ('k') | test/unittests/compiler/escape-analysis-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698