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

Side by Side Diff: test/cctest/test-cpu-profiler.cc

Issue 2505933008: [compiler] Ensure code unsupported by Crankshaft goes to Ignition. (Closed)
Patch Set: Fix GetBaselineCode Created 4 years 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 unified diff | Download patch
« no previous file with comments | « test/cctest/test-api.cc ('k') | test/debugger/debugger.status » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 1557 matching lines...) Expand 10 before | Expand all | Expand 10 after
1568 GetChild(env, start_node, "CallJsFunction"); 1568 GetChild(env, start_node, "CallJsFunction");
1569 const v8::CpuProfileNode* bar_node = GetChild(env, native_node, "bar"); 1569 const v8::CpuProfileNode* bar_node = GetChild(env, native_node, "bar");
1570 GetChild(env, bar_node, "foo"); 1570 GetChild(env, bar_node, "foo");
1571 1571
1572 profile->Delete(); 1572 profile->Delete();
1573 } 1573 }
1574 1574
1575 static const char* inlining_test_source = 1575 static const char* inlining_test_source =
1576 "%NeverOptimizeFunction(action);\n" 1576 "%NeverOptimizeFunction(action);\n"
1577 "%NeverOptimizeFunction(start);\n" 1577 "%NeverOptimizeFunction(start);\n"
1578 "level1()\n"
1578 "%OptimizeFunctionOnNextCall(level1);\n" 1579 "%OptimizeFunctionOnNextCall(level1);\n"
1579 "%OptimizeFunctionOnNextCall(level2);\n" 1580 "%OptimizeFunctionOnNextCall(level2);\n"
1580 "%OptimizeFunctionOnNextCall(level3);\n" 1581 "%OptimizeFunctionOnNextCall(level3);\n"
1581 "var finish = false;\n" 1582 "var finish = false;\n"
1582 "function action(n) {\n" 1583 "function action(n) {\n"
1583 " var s = 0;\n" 1584 " var s = 0;\n"
1584 " for (var i = 0; i < n; ++i) s += i*i*i;\n" 1585 " for (var i = 0; i < n; ++i) s += i*i*i;\n"
1585 " if (finish)\n" 1586 " if (finish)\n"
1586 " startProfiling('my_profile');\n" 1587 " startProfiling('my_profile');\n"
1587 " return s;\n" 1588 " return s;\n"
(...skipping 587 matching lines...) Expand 10 before | Expand all | Expand 10 after
2175 printf("Profile JSON: %s\n", profile_json.c_str()); 2176 printf("Profile JSON: %s\n", profile_json.c_str());
2176 std::string code = profile_checker + profile_json + ")"; 2177 std::string code = profile_checker + profile_json + ")";
2177 v8::Local<v8::Value> result = 2178 v8::Local<v8::Value> result =
2178 CompileRunChecked(CcTest::isolate(), code.c_str()); 2179 CompileRunChecked(CcTest::isolate(), code.c_str());
2179 v8::String::Utf8Value value(result); 2180 v8::String::Utf8Value value(result);
2180 printf("Check result: %*s\n", value.length(), *value); 2181 printf("Check result: %*s\n", value.length(), *value);
2181 CHECK_EQ(0, value.length()); 2182 CHECK_EQ(0, value.length());
2182 2183
2183 i::V8::SetPlatformForTesting(old_platform); 2184 i::V8::SetPlatformForTesting(old_platform);
2184 } 2185 }
OLDNEW
« no previous file with comments | « test/cctest/test-api.cc ('k') | test/debugger/debugger.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698