| Index: test/cctest/test-heap-profiler.cc
|
| diff --git a/test/cctest/test-heap-profiler.cc b/test/cctest/test-heap-profiler.cc
|
| index c8e918d1226d54d77be4f3852bcc770c12e6ae75..eeb722c7fb5e405544be8c363dc21fa3bb6c5827 100644
|
| --- a/test/cctest/test-heap-profiler.cc
|
| +++ b/test/cctest/test-heap-profiler.cc
|
| @@ -2875,6 +2875,15 @@ static const v8::AllocationProfile::Node* FindAllocationProfileNode(
|
| return node;
|
| }
|
|
|
| +static void CheckNoZeroCountNodes(v8::AllocationProfile::Node* node) {
|
| + for (auto alloc : node->allocations) {
|
| + CHECK_GT(alloc.count, 0u);
|
| + }
|
| + for (auto child : node->children) {
|
| + CheckNoZeroCountNodes(child);
|
| + }
|
| +}
|
| +
|
| TEST(SamplingHeapProfiler) {
|
| v8::HandleScope scope(v8::Isolate::GetCurrent());
|
| LocalContext env;
|
| @@ -3002,6 +3011,8 @@ TEST(SamplingHeapProfiler) {
|
| heap_profiler->GetAllocationProfile());
|
| CHECK(!profile.is_empty());
|
|
|
| + CheckNoZeroCountNodes(profile->GetRootNode());
|
| +
|
| heap_profiler->StopSamplingHeapProfiler();
|
| }
|
| }
|
|
|