| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/renderer/render_thread_impl.h" | 5 #include "content/renderer/render_thread_impl.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <limits> | 8 #include <limits> |
| 9 #include <map> | 9 #include <map> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 1807 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1818 RendererMemoryMetrics memory_metrics; | 1818 RendererMemoryMetrics memory_metrics; |
| 1819 GetRendererMemoryMetrics(&memory_metrics); | 1819 GetRendererMemoryMetrics(&memory_metrics); |
| 1820 UMA_HISTOGRAM_MEMORY_KB( | 1820 UMA_HISTOGRAM_MEMORY_KB( |
| 1821 "PurgeAndSuspend.Experimental.MemoryGrowth.PartitionAllocKB", | 1821 "PurgeAndSuspend.Experimental.MemoryGrowth.PartitionAllocKB", |
| 1822 GET_MEMORY_GROWTH(memory_metrics, purge_and_suspend_memory_metrics_, | 1822 GET_MEMORY_GROWTH(memory_metrics, purge_and_suspend_memory_metrics_, |
| 1823 partition_alloc_kb)); | 1823 partition_alloc_kb)); |
| 1824 UMA_HISTOGRAM_MEMORY_KB( | 1824 UMA_HISTOGRAM_MEMORY_KB( |
| 1825 "PurgeAndSuspend.Experimental.MemoryGrowth.BlinkGCKB", | 1825 "PurgeAndSuspend.Experimental.MemoryGrowth.BlinkGCKB", |
| 1826 GET_MEMORY_GROWTH(memory_metrics, purge_and_suspend_memory_metrics_, | 1826 GET_MEMORY_GROWTH(memory_metrics, purge_and_suspend_memory_metrics_, |
| 1827 blink_gc_kb)); | 1827 blink_gc_kb)); |
| 1828 UMA_HISTOGRAM_MEMORY_MB( | 1828 UMA_HISTOGRAM_MEMORY_KB( |
| 1829 "PurgeAndSuspend.Experimental.MemoryGrowth.MallocKB", | 1829 "PurgeAndSuspend.Experimental.MemoryGrowth.MallocKB", |
| 1830 GET_MEMORY_GROWTH(memory_metrics, purge_and_suspend_memory_metrics_, | 1830 GET_MEMORY_GROWTH(memory_metrics, purge_and_suspend_memory_metrics_, |
| 1831 malloc_mb) * 1024); | 1831 malloc_mb) * 1024); |
| 1832 UMA_HISTOGRAM_MEMORY_KB( | 1832 UMA_HISTOGRAM_MEMORY_KB( |
| 1833 "PurgeAndSuspend.Experimental.MemoryGrowth.DiscardableKB", | 1833 "PurgeAndSuspend.Experimental.MemoryGrowth.DiscardableKB", |
| 1834 GET_MEMORY_GROWTH(memory_metrics, purge_and_suspend_memory_metrics_, | 1834 GET_MEMORY_GROWTH(memory_metrics, purge_and_suspend_memory_metrics_, |
| 1835 discardable_kb)); | 1835 discardable_kb)); |
| 1836 UMA_HISTOGRAM_MEMORY_MB( | 1836 UMA_HISTOGRAM_MEMORY_KB( |
| 1837 "PurgeAndSuspend.Experimental.MemoryGrowth.V8MainThreadIsolateKB", | 1837 "PurgeAndSuspend.Experimental.MemoryGrowth.V8MainThreadIsolateKB", |
| 1838 GET_MEMORY_GROWTH(memory_metrics, purge_and_suspend_memory_metrics_, | 1838 GET_MEMORY_GROWTH(memory_metrics, purge_and_suspend_memory_metrics_, |
| 1839 v8_main_thread_isolate_mb) * 1024); | 1839 v8_main_thread_isolate_mb) * 1024); |
| 1840 UMA_HISTOGRAM_MEMORY_MB( | 1840 UMA_HISTOGRAM_MEMORY_KB( |
| 1841 "PurgeAndSuspend.Experimental.MemoryGrowth.TotalAllocatedKB", | 1841 "PurgeAndSuspend.Experimental.MemoryGrowth.TotalAllocatedKB", |
| 1842 GET_MEMORY_GROWTH(memory_metrics, purge_and_suspend_memory_metrics_, | 1842 GET_MEMORY_GROWTH(memory_metrics, purge_and_suspend_memory_metrics_, |
| 1843 total_allocated_mb) * 1024); | 1843 total_allocated_mb) * 1024); |
| 1844 } | 1844 } |
| 1845 | 1845 |
| 1846 void RenderThreadImpl::OnProcessResume() { | 1846 void RenderThreadImpl::OnProcessResume() { |
| 1847 ChildThreadImpl::OnProcessResume(); | 1847 ChildThreadImpl::OnProcessResume(); |
| 1848 | 1848 |
| 1849 if (!RendererIsHidden()) | 1849 if (!RendererIsHidden()) |
| 1850 return; | 1850 return; |
| (...skipping 587 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2438 } | 2438 } |
| 2439 } | 2439 } |
| 2440 | 2440 |
| 2441 void RenderThreadImpl::OnRendererInterfaceRequest( | 2441 void RenderThreadImpl::OnRendererInterfaceRequest( |
| 2442 mojom::RendererAssociatedRequest request) { | 2442 mojom::RendererAssociatedRequest request) { |
| 2443 DCHECK(!renderer_binding_.is_bound()); | 2443 DCHECK(!renderer_binding_.is_bound()); |
| 2444 renderer_binding_.Bind(std::move(request)); | 2444 renderer_binding_.Bind(std::move(request)); |
| 2445 } | 2445 } |
| 2446 | 2446 |
| 2447 } // namespace content | 2447 } // namespace content |
| OLD | NEW |