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" | 19 #include "base/trace_event/memory_dump_session_state.h" |
20 #include "base/trace_event/trace_event_argument.h" | 20 #include "base/trace_event/trace_event_argument.h" |
21 #include "base/values.h" | 21 #include "base/values.h" |
22 #include "testing/gtest/include/gtest/gtest.h" | 22 #include "testing/gtest/include/gtest/gtest.h" |
23 | 23 |
| 24 #if 0 |
24 namespace { | 25 namespace { |
25 | 26 |
26 using base::trace_event::StackFrame; | 27 using base::trace_event::StackFrame; |
27 | 28 |
28 // Define all strings once, because the deduplicator requires pointer equality, | 29 // Define all strings once, because the deduplicator requires pointer equality, |
29 // and string interning is unreliable. | 30 // and string interning is unreliable. |
30 StackFrame kBrowserMain = StackFrame::FromTraceEventName("BrowserMain"); | 31 StackFrame kBrowserMain = StackFrame::FromTraceEventName("BrowserMain"); |
31 StackFrame kRendererMain = StackFrame::FromTraceEventName("RendererMain"); | 32 StackFrame kRendererMain = StackFrame::FromTraceEventName("RendererMain"); |
32 StackFrame kCreateWidget = StackFrame::FromTraceEventName("CreateWidget"); | 33 StackFrame kCreateWidget = StackFrame::FromTraceEventName("CreateWidget"); |
33 StackFrame kInitialize = StackFrame::FromTraceEventName("Initialize"); | 34 StackFrame kInitialize = StackFrame::FromTraceEventName("Initialize"); |
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
324 {1024 * 1024 + 400 + 512, 3}); | 325 {1024 * 1024 + 400 + 512, 3}); |
325 AssertSizeAndCountEq(dump, bt_browser_main, -1, {1024 * 1024 + 400 + 512, 3}); | 326 AssertSizeAndCountEq(dump, bt_browser_main, -1, {1024 * 1024 + 400 + 512, 3}); |
326 | 327 |
327 // Initialize was not significant, it should not have been dumped. | 328 // Initialize was not significant, it should not have been dumped. |
328 AssertNotDumped(dump, bt_initialize, -1); | 329 AssertNotDumped(dump, bt_initialize, -1); |
329 } | 330 } |
330 | 331 |
331 } // namespace internal | 332 } // namespace internal |
332 } // namespace trace_event | 333 } // namespace trace_event |
333 } // namespace base | 334 } // namespace base |
| 335 #endif |
OLD | NEW |