| OLD | NEW |
| 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 443 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 454 return NULL; | 454 return NULL; |
| 455 } | 455 } |
| 456 | 456 |
| 457 | 457 |
| 458 static const v8::CpuProfileNode* GetChild(v8::Local<v8::Context> context, | 458 static const v8::CpuProfileNode* GetChild(v8::Local<v8::Context> context, |
| 459 const v8::CpuProfileNode* node, | 459 const v8::CpuProfileNode* node, |
| 460 const char* name) { | 460 const char* name) { |
| 461 const v8::CpuProfileNode* result = FindChild(context, node, name); | 461 const v8::CpuProfileNode* result = FindChild(context, node, name); |
| 462 if (!result) { | 462 if (!result) { |
| 463 char buffer[100]; | 463 char buffer[100]; |
| 464 i::SNPrintF(Vector<char>(buffer, arraysize(buffer)), | 464 i::SNPrintF(i::ArrayVector(buffer), "Failed to GetChild: %s", name); |
| 465 "Failed to GetChild: %s", name); | |
| 466 FATAL(buffer); | 465 FATAL(buffer); |
| 467 } | 466 } |
| 468 return result; | 467 return result; |
| 469 } | 468 } |
| 470 | 469 |
| 471 | 470 |
| 472 static void CheckSimpleBranch(v8::Local<v8::Context> context, | 471 static void CheckSimpleBranch(v8::Local<v8::Context> context, |
| 473 const v8::CpuProfileNode* node, | 472 const v8::CpuProfileNode* node, |
| 474 const char* names[], int length) { | 473 const char* names[], int length) { |
| 475 for (int i = 0; i < length; i++) { | 474 for (int i = 0; i < length; i++) { |
| (...skipping 1548 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2024 iprofile->Print(); | 2023 iprofile->Print(); |
| 2025 v8::CpuProfile* profile = reinterpret_cast<v8::CpuProfile*>(iprofile); | 2024 v8::CpuProfile* profile = reinterpret_cast<v8::CpuProfile*>(iprofile); |
| 2026 | 2025 |
| 2027 const char* branch[] = {"", "test"}; | 2026 const char* branch[] = {"", "test"}; |
| 2028 const ProfileNode* itest_node = | 2027 const ProfileNode* itest_node = |
| 2029 GetSimpleBranch(env, profile, branch, arraysize(branch)); | 2028 GetSimpleBranch(env, profile, branch, arraysize(branch)); |
| 2030 CHECK_EQ(0U, itest_node->deopt_infos().size()); | 2029 CHECK_EQ(0U, itest_node->deopt_infos().size()); |
| 2031 | 2030 |
| 2032 iprofiler->DeleteProfile(iprofile); | 2031 iprofiler->DeleteProfile(iprofile); |
| 2033 } | 2032 } |
| OLD | NEW |