Index: test/cctest/test-heap-profiler.cc |
diff --git a/test/cctest/test-heap-profiler.cc b/test/cctest/test-heap-profiler.cc |
index 12972f2687bd4cbb4460ca9369c50b7733c7d622..767c5cd4b4670d3231400ca268c5261eef401809 100644 |
--- a/test/cctest/test-heap-profiler.cc |
+++ b/test/cctest/test-heap-profiler.cc |
@@ -44,6 +44,7 @@ using i::AllocationTraceNode; |
using i::AllocationTraceTree; |
using i::AllocationTracker; |
using i::HashMap; |
+using i::ArrayVector; |
using i::Vector; |
namespace { |
@@ -2513,8 +2514,7 @@ TEST(ArrayGrowLeftTrim) { |
// Print for better diagnostics in case of failure. |
tracker->trace_tree()->Print(tracker); |
- AllocationTraceNode* node = |
- FindNode(tracker, Vector<const char*>(names, arraysize(names))); |
+ AllocationTraceNode* node = FindNode(tracker, ArrayVector(names)); |
CHECK(node); |
CHECK_GE(node->allocation_count(), 2u); |
CHECK_GE(node->allocation_size(), 4u * 5u); |
@@ -2540,8 +2540,7 @@ TEST(TrackHeapAllocations) { |
tracker->trace_tree()->Print(tracker); |
const char* names[] = {"", "start", "f_0_0", "f_0_1", "f_0_2"}; |
- AllocationTraceNode* node = |
- FindNode(tracker, Vector<const char*>(names, arraysize(names))); |
+ AllocationTraceNode* node = FindNode(tracker, ArrayVector(names)); |
CHECK(node); |
CHECK_GE(node->allocation_count(), 100u); |
CHECK_GE(node->allocation_size(), 4 * node->allocation_count()); |
@@ -2590,8 +2589,7 @@ TEST(TrackBumpPointerAllocations) { |
// Print for better diagnostics in case of failure. |
tracker->trace_tree()->Print(tracker); |
- AllocationTraceNode* node = |
- FindNode(tracker, Vector<const char*>(names, arraysize(names))); |
+ AllocationTraceNode* node = FindNode(tracker, ArrayVector(names)); |
CHECK(node); |
CHECK_GE(node->allocation_count(), 100u); |
CHECK_GE(node->allocation_size(), 4 * node->allocation_count()); |
@@ -2616,8 +2614,7 @@ TEST(TrackBumpPointerAllocations) { |
// Print for better diagnostics in case of failure. |
tracker->trace_tree()->Print(tracker); |
- AllocationTraceNode* node = |
- FindNode(tracker, Vector<const char*>(names, arraysize(names))); |
+ AllocationTraceNode* node = FindNode(tracker, ArrayVector(names)); |
CHECK(node); |
CHECK_LT(node->allocation_count(), 100u); |
@@ -2646,8 +2643,7 @@ TEST(TrackV8ApiAllocation) { |
// Print for better diagnostics in case of failure. |
tracker->trace_tree()->Print(tracker); |
- AllocationTraceNode* node = |
- FindNode(tracker, Vector<const char*>(names, arraysize(names))); |
+ AllocationTraceNode* node = FindNode(tracker, ArrayVector(names)); |
CHECK(node); |
CHECK_GE(node->allocation_count(), 2u); |
CHECK_GE(node->allocation_size(), 4 * node->allocation_count()); |
@@ -2922,8 +2918,7 @@ TEST(SamplingHeapProfiler) { |
CHECK(!profile.is_empty()); |
const char* names[] = {"", "foo", "bar"}; |
- auto node_bar = FindAllocationProfileNode( |
- *profile, Vector<const char*>(names, arraysize(names))); |
+ auto node_bar = FindAllocationProfileNode(*profile, ArrayVector(names)); |
CHECK(node_bar); |
// Count the number of allocations we sampled from bar. |
@@ -2950,8 +2945,7 @@ TEST(SamplingHeapProfiler) { |
CHECK(!profile.is_empty()); |
const char* names[] = {"", "foo", "bar"}; |
- auto node_bar = FindAllocationProfileNode( |
- *profile, Vector<const char*>(names, arraysize(names))); |
+ auto node_bar = FindAllocationProfileNode(*profile, ArrayVector(names)); |
CHECK(node_bar); |
// Count the number of allocations we sampled from bar. |
@@ -2985,13 +2979,11 @@ TEST(SamplingHeapProfiler) { |
CHECK(!profile.is_empty()); |
const char* names1[] = {"", "start", "f_0_0", "f_0_1", "f_0_2"}; |
- auto node1 = FindAllocationProfileNode( |
- *profile, Vector<const char*>(names1, arraysize(names1))); |
+ auto node1 = FindAllocationProfileNode(*profile, ArrayVector(names1)); |
CHECK(node1); |
const char* names2[] = {"", "generateFunctions"}; |
- auto node2 = FindAllocationProfileNode( |
- *profile, Vector<const char*>(names2, arraysize(names2))); |
+ auto node2 = FindAllocationProfileNode(*profile, ArrayVector(names2)); |
CHECK(node2); |
heap_profiler->StopSamplingHeapProfiler(); |
@@ -3034,8 +3026,7 @@ TEST(SamplingHeapProfilerApiAllocation) { |
heap_profiler->GetAllocationProfile()); |
CHECK(!profile.is_empty()); |
const char* names[] = {"(V8 API)"}; |
- auto node = FindAllocationProfileNode( |
- *profile, Vector<const char*>(names, arraysize(names))); |
+ auto node = FindAllocationProfileNode(*profile, ArrayVector(names)); |
CHECK(node); |
heap_profiler->StopSamplingHeapProfiler(); |