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

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

Issue 1916393002: Refactoring to use ArrayVector where applicable (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@wasm-offset-table-2
Patch Set: also refactor src/builtins.cc Created 4 years, 7 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 unified diff | Download patch
« no previous file with comments | « src/parsing/parser.cc ('k') | test/cctest/test-heap-profiler.cc » ('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 443 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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 }
OLDNEW
« no previous file with comments | « src/parsing/parser.cc ('k') | test/cctest/test-heap-profiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698