| 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_heap_dump_writer.h" | 5 #include "base/trace_event/heap_profiler_heap_dump_writer.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <set> | 10 #include <set> |
| 11 #include <string> | 11 #include <string> |
| 12 | 12 |
| 13 #include "base/json/json_reader.h" | 13 #include "base/json/json_reader.h" |
| 14 #include "base/macros.h" | 14 #include "base/macros.h" |
| 15 #include "base/memory/ptr_util.h" | 15 #include "base/memory/ptr_util.h" |
| 16 #include "base/trace_event/heap_profiler_allocation_context.h" | 16 #include "base/trace_event/heap_profiler_allocation_context.h" |
| 17 #include "base/trace_event/heap_profiler_stack_frame_deduplicator.h" | 17 #include "base/trace_event/heap_profiler_stack_frame_deduplicator.h" |
| 18 #include "base/trace_event/heap_profiler_type_name_deduplicator.h" | 18 #include "base/trace_event/heap_profiler_type_name_deduplicator.h" |
| 19 #include "base/trace_event/memory_dump_session_state.h" | |
| 20 #include "base/trace_event/trace_event_argument.h" | 19 #include "base/trace_event/trace_event_argument.h" |
| 21 #include "base/values.h" | 20 #include "base/values.h" |
| 22 #include "testing/gtest/include/gtest/gtest.h" | 21 #include "testing/gtest/include/gtest/gtest.h" |
| 23 | 22 |
| 24 namespace { | 23 namespace { |
| 25 | 24 |
| 26 using base::trace_event::StackFrame; | 25 using base::trace_event::StackFrame; |
| 27 | 26 |
| 28 // Define all strings once, because the deduplicator requires pointer equality, | 27 // Define all strings once, because the deduplicator requires pointer equality, |
| 29 // and string interning is unreliable. | 28 // and string interning is unreliable. |
| (...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 324 {1024 * 1024 + 400 + 512, 3}); | 323 {1024 * 1024 + 400 + 512, 3}); |
| 325 AssertSizeAndCountEq(dump, bt_browser_main, -1, {1024 * 1024 + 400 + 512, 3}); | 324 AssertSizeAndCountEq(dump, bt_browser_main, -1, {1024 * 1024 + 400 + 512, 3}); |
| 326 | 325 |
| 327 // Initialize was not significant, it should not have been dumped. | 326 // Initialize was not significant, it should not have been dumped. |
| 328 AssertNotDumped(dump, bt_initialize, -1); | 327 AssertNotDumped(dump, bt_initialize, -1); |
| 329 } | 328 } |
| 330 | 329 |
| 331 } // namespace internal | 330 } // namespace internal |
| 332 } // namespace trace_event | 331 } // namespace trace_event |
| 333 } // namespace base | 332 } // namespace base |
| OLD | NEW |