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

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

Issue 919953002: CPUProfiler: Push deopt reason further to ProfileNode. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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
« src/x87/assembler-x87.cc ('K') | « src/x87/lithium-codegen-x87.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 1f768790939251725d1ffe772e0e755ffae0ddc2..1ed08056eecc714ea7b53fe93c753e282c2f1682 100644
--- a/test/cctest/test-cpu-profiler.cc
+++ b/test/cctest/test-cpu-profiler.cc
@@ -1720,23 +1720,31 @@ TEST(DontStopOnFinishedProfileDelete) {
static const char* collect_deopt_events_test_source =
- "function opt_function(value) {\n"
- " return value / 10;\n"
+ "function opt_function(left, right) {\n"
+ " var k = left / 10;\n"
+ " var r = 10 / right;\n"
+ " return k + r;"
"}\n"
"\n"
- "function test(value) {\n"
- " return opt_function(value);\n"
+ "function test(left, right) {\n"
+ " return opt_function(left, right);\n"
"}\n"
"\n"
"startProfiling();\n"
"\n"
- "for (var i = 0; i < 10; ++i) test(10);\n"
+ "test(10, 10);\n"
"\n"
"%OptimizeFunctionOnNextCall(opt_function)\n"
"\n"
- "for (var i = 0; i < 10; ++i) test(10);\n"
+ "test(10, 10);\n"
"\n"
- "for (var i = 0; i < 10; ++i) test(undefined);\n"
+ "test(undefined, 10);\n"
+ "\n"
+ "%OptimizeFunctionOnNextCall(opt_function)\n"
+ "\n"
+ "test(10, 10);\n"
+ "\n"
+ "test(10, 0);\n"
"\n"
"stopProfiling();\n"
"\n";
@@ -1760,5 +1768,8 @@ TEST(CollectDeoptEvents) {
const v8::CpuProfileNode* opt_function = GetSimpleBranch(
env->GetIsolate(), profile->GetTopDownRoot(), branch, arraysize(branch));
CHECK(opt_function);
+ const i::ProfileNode* iopt_function =
+ reinterpret_cast<const i::ProfileNode*>(opt_function);
+ CHECK_EQ(2, iopt_function->deopt_infos().length());
alph 2015/02/12 13:19:46 can you also check the reasons and positions pleas
loislo 2015/02/12 15:20:01 Done.
iprofiler->DeleteProfile(iprofile);
}
« src/x87/assembler-x87.cc ('K') | « src/x87/lithium-codegen-x87.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698