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

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

Issue 2565733002: [deoptimizer] Fix Deoptimizer::GetDeoptInfo for last entry. (Closed)
Patch Set: 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/cctest.status ('k') | no next file » | 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 1854 matching lines...) Expand 10 before | Expand all | Expand 10 after
1865 ;;; deopted at script_id: 29 position: 108 with reason 'not a 1865 ;;; deopted at script_id: 29 position: 108 with reason 'not a
1866 heap number'. 1866 heap number'.
1867 0 opt_function1 30 #5 1867 0 opt_function1 30 #5
1868 1 opt_function1 30 #6 1868 1 opt_function1 30 #6
1869 ;;; deopted at script_id: 30 position: 108 with reason 'lost 1869 ;;; deopted at script_id: 30 position: 108 with reason 'lost
1870 precision or NaN'. 1870 precision or NaN'.
1871 */ 1871 */
1872 1872
1873 { 1873 {
1874 const char* branch[] = {"", "opt_function0", "opt_function0"}; 1874 const char* branch[] = {"", "opt_function0", "opt_function0"};
1875 CHECK_EQ(reason(i::DeoptimizeReason::kNotAHeapNumber), 1875 const char* deopt_reason =
1876 GetBranchDeoptReason(env, iprofile, branch, arraysize(branch))); 1876 GetBranchDeoptReason(env, iprofile, branch, arraysize(branch));
1877 if (deopt_reason != reason(i::DeoptimizeReason::kNotAHeapNumber) &&
1878 deopt_reason != reason(i::DeoptimizeReason::kNotASmi)) {
1879 FATAL(deopt_reason);
1880 }
1877 } 1881 }
1878 { 1882 {
1879 const char* branch[] = {"", "opt_function1", "opt_function1"}; 1883 const char* branch[] = {"", "opt_function1", "opt_function1"};
1880 const char* deopt_reason = 1884 const char* deopt_reason =
1881 GetBranchDeoptReason(env, iprofile, branch, arraysize(branch)); 1885 GetBranchDeoptReason(env, iprofile, branch, arraysize(branch));
1882 if (deopt_reason != reason(i::DeoptimizeReason::kNaN) && 1886 if (deopt_reason != reason(i::DeoptimizeReason::kNaN) &&
1883 deopt_reason != reason(i::DeoptimizeReason::kLostPrecisionOrNaN)) { 1887 deopt_reason != reason(i::DeoptimizeReason::kLostPrecisionOrNaN) &&
1888 deopt_reason != reason(i::DeoptimizeReason::kNotASmi)) {
1884 FATAL(deopt_reason); 1889 FATAL(deopt_reason);
1885 } 1890 }
1886 } 1891 }
1887 { 1892 {
1888 const char* branch[] = {"", "opt_function2", "opt_function2"}; 1893 const char* branch[] = {"", "opt_function2", "opt_function2"};
1889 CHECK_EQ(reason(i::DeoptimizeReason::kDivisionByZero), 1894 CHECK_EQ(reason(i::DeoptimizeReason::kDivisionByZero),
1890 GetBranchDeoptReason(env, iprofile, branch, arraysize(branch))); 1895 GetBranchDeoptReason(env, iprofile, branch, arraysize(branch)));
1891 } 1896 }
1892 iprofiler->DeleteProfile(iprofile); 1897 iprofiler->DeleteProfile(iprofile);
1893 } 1898 }
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after
2176 printf("Profile JSON: %s\n", profile_json.c_str()); 2181 printf("Profile JSON: %s\n", profile_json.c_str());
2177 std::string code = profile_checker + profile_json + ")"; 2182 std::string code = profile_checker + profile_json + ")";
2178 v8::Local<v8::Value> result = 2183 v8::Local<v8::Value> result =
2179 CompileRunChecked(CcTest::isolate(), code.c_str()); 2184 CompileRunChecked(CcTest::isolate(), code.c_str());
2180 v8::String::Utf8Value value(result); 2185 v8::String::Utf8Value value(result);
2181 printf("Check result: %*s\n", value.length(), *value); 2186 printf("Check result: %*s\n", value.length(), *value);
2182 CHECK_EQ(0, value.length()); 2187 CHECK_EQ(0, value.length());
2183 2188
2184 i::V8::SetPlatformForTesting(old_platform); 2189 i::V8::SetPlatformForTesting(old_platform);
2185 } 2190 }
OLDNEW
« no previous file with comments | « test/cctest/cctest.status ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698