| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "content/child/child_discardable_shared_memory_manager.h" | 5 #include "content/child/child_discardable_shared_memory_manager.h" |
| 6 | 6 |
| 7 #include <inttypes.h> | 7 #include <inttypes.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <utility> | 10 #include <utility> |
| 11 | 11 |
| 12 #include "base/atomic_sequence_num.h" | 12 #include "base/atomic_sequence_num.h" |
| 13 #include "base/bind.h" | 13 #include "base/bind.h" |
| 14 #include "base/debug/crash_logging.h" | 14 #include "base/debug/crash_logging.h" |
| 15 #include "base/macros.h" | 15 #include "base/macros.h" |
| 16 #include "base/memory/discardable_memory.h" | 16 #include "base/memory/discardable_memory.h" |
| 17 #include "base/memory/discardable_shared_memory.h" | 17 #include "base/memory/discardable_shared_memory.h" |
| 18 #include "base/memory/ptr_util.h" | 18 #include "base/memory/ptr_util.h" |
| 19 #include "base/metrics/histogram.h" | 19 #include "base/metrics/histogram_macros.h" |
| 20 #include "base/process/memory.h" | 20 #include "base/process/memory.h" |
| 21 #include "base/process/process_metrics.h" | 21 #include "base/process/process_metrics.h" |
| 22 #include "base/strings/string_number_conversions.h" | 22 #include "base/strings/string_number_conversions.h" |
| 23 #include "base/strings/stringprintf.h" | 23 #include "base/strings/stringprintf.h" |
| 24 #include "base/threading/thread_task_runner_handle.h" | 24 #include "base/threading/thread_task_runner_handle.h" |
| 25 #include "base/trace_event/memory_dump_manager.h" | 25 #include "base/trace_event/memory_dump_manager.h" |
| 26 #include "base/trace_event/trace_event.h" | 26 #include "base/trace_event/trace_event.h" |
| 27 #include "content/common/child_process_messages.h" | 27 #include "content/common/child_process_messages.h" |
| 28 | 28 |
| 29 namespace content { | 29 namespace content { |
| (...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 338 "discardable-memory-allocated"; | 338 "discardable-memory-allocated"; |
| 339 base::debug::SetCrashKeyValue(kDiscardableMemoryAllocatedKey, | 339 base::debug::SetCrashKeyValue(kDiscardableMemoryAllocatedKey, |
| 340 base::Uint64ToString(new_bytes_total)); | 340 base::Uint64ToString(new_bytes_total)); |
| 341 | 341 |
| 342 static const char kDiscardableMemoryFreeKey[] = "discardable-memory-free"; | 342 static const char kDiscardableMemoryFreeKey[] = "discardable-memory-free"; |
| 343 base::debug::SetCrashKeyValue(kDiscardableMemoryFreeKey, | 343 base::debug::SetCrashKeyValue(kDiscardableMemoryFreeKey, |
| 344 base::Uint64ToString(new_bytes_free)); | 344 base::Uint64ToString(new_bytes_free)); |
| 345 } | 345 } |
| 346 | 346 |
| 347 } // namespace content | 347 } // namespace content |
| OLD | NEW |