OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "base/trace_event/heap_profiler_allocation_register.h" | 5 #include "base/trace_event/heap_profiler_allocation_register.h" |
6 | 6 |
| 7 #include <stddef.h> |
| 8 #include <stdint.h> |
| 9 |
7 #include "base/process/process_metrics.h" | 10 #include "base/process/process_metrics.h" |
8 #include "base/trace_event/heap_profiler_allocation_context.h" | 11 #include "base/trace_event/heap_profiler_allocation_context.h" |
9 #include "testing/gtest/include/gtest/gtest.h" | 12 #include "testing/gtest/include/gtest/gtest.h" |
10 | 13 |
11 namespace base { | 14 namespace base { |
12 namespace trace_event { | 15 namespace trace_event { |
13 | 16 |
14 class AllocationRegisterTest : public testing::Test { | 17 class AllocationRegisterTest : public testing::Test { |
15 public: | 18 public: |
16 static const uint32_t kNumBuckets = AllocationRegister::kNumBuckets; | 19 static const uint32_t kNumBuckets = AllocationRegister::kNumBuckets; |
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
224 const size_t cells_per_page = GetNumCellsPerPage(); | 227 const size_t cells_per_page = GetNumCellsPerPage(); |
225 | 228 |
226 ASSERT_DEATH(for (size_t j = 0; j < cells_per_page; j++) { | 229 ASSERT_DEATH(for (size_t j = 0; j < cells_per_page; j++) { |
227 reg.Insert(reinterpret_cast<void*>(i + j), 0, ctx); | 230 reg.Insert(reinterpret_cast<void*>(i + j), 0, ctx); |
228 }, ""); | 231 }, ""); |
229 } | 232 } |
230 #endif | 233 #endif |
231 | 234 |
232 } // namespace trace_event | 235 } // namespace trace_event |
233 } // namespace base | 236 } // namespace base |
OLD | NEW |