Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(153)

Side by Side Diff: content/renderer/render_thread_impl.cc

Issue 2459733002: Move discardable memory to //components from //content (Closed)
Patch Set: Fix build error Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « content/renderer/render_thread_impl.h ('k') | content/test/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 30 matching lines...) Expand all
41 #include "cc/base/histograms.h" 41 #include "cc/base/histograms.h"
42 #include "cc/base/switches.h" 42 #include "cc/base/switches.h"
43 #include "cc/blink/web_layer_impl.h" 43 #include "cc/blink/web_layer_impl.h"
44 #include "cc/output/buffer_to_texture_target_map.h" 44 #include "cc/output/buffer_to_texture_target_map.h"
45 #include "cc/output/compositor_frame_sink.h" 45 #include "cc/output/compositor_frame_sink.h"
46 #include "cc/output/copy_output_request.h" 46 #include "cc/output/copy_output_request.h"
47 #include "cc/output/vulkan_in_process_context_provider.h" 47 #include "cc/output/vulkan_in_process_context_provider.h"
48 #include "cc/raster/task_graph_runner.h" 48 #include "cc/raster/task_graph_runner.h"
49 #include "cc/trees/layer_tree_host_common.h" 49 #include "cc/trees/layer_tree_host_common.h"
50 #include "cc/trees/layer_tree_settings.h" 50 #include "cc/trees/layer_tree_settings.h"
51 #include "components/discardable_memory/client/client_discardable_shared_memory_ manager.h"
51 #include "content/child/appcache/appcache_dispatcher.h" 52 #include "content/child/appcache/appcache_dispatcher.h"
52 #include "content/child/appcache/appcache_frontend_impl.h" 53 #include "content/child/appcache/appcache_frontend_impl.h"
53 #include "content/child/blob_storage/blob_message_filter.h" 54 #include "content/child/blob_storage/blob_message_filter.h"
54 #include "content/child/child_discardable_shared_memory_manager.h"
55 #include "content/child/child_gpu_memory_buffer_manager.h" 55 #include "content/child/child_gpu_memory_buffer_manager.h"
56 #include "content/child/child_histogram_message_filter.h" 56 #include "content/child/child_histogram_message_filter.h"
57 #include "content/child/child_resource_message_filter.h" 57 #include "content/child/child_resource_message_filter.h"
58 #include "content/child/child_shared_bitmap_manager.h" 58 #include "content/child/child_shared_bitmap_manager.h"
59 #include "content/child/content_child_helpers.h" 59 #include "content/child/content_child_helpers.h"
60 #include "content/child/db_message_filter.h" 60 #include "content/child/db_message_filter.h"
61 #include "content/child/indexed_db/indexed_db_dispatcher.h" 61 #include "content/child/indexed_db/indexed_db_dispatcher.h"
62 #include "content/child/indexed_db/indexed_db_message_filter.h" 62 #include "content/child/indexed_db/indexed_db_message_filter.h"
63 #include "content/child/memory/child_memory_coordinator_impl.h" 63 #include "content/child/memory/child_memory_coordinator_impl.h"
64 #include "content/child/resource_dispatcher.h" 64 #include "content/child/resource_dispatcher.h"
(...skipping 1780 matching lines...) Expand 10 before | Expand all | Expand 10 after
1845 size_t malloc_usage = minfo.uordblks; 1845 size_t malloc_usage = minfo.uordblks;
1846 #else 1846 #else
1847 size_t malloc_usage = minfo.hblkhd + minfo.arena; 1847 size_t malloc_usage = minfo.hblkhd + minfo.arena;
1848 #endif 1848 #endif
1849 #else 1849 #else
1850 size_t malloc_usage = GetMallocUsage(); 1850 size_t malloc_usage = GetMallocUsage();
1851 #endif 1851 #endif
1852 UMA_HISTOGRAM_MEMORY_MB("PurgeAndSuspend.Memory.MallocMB", 1852 UMA_HISTOGRAM_MEMORY_MB("PurgeAndSuspend.Memory.MallocMB",
1853 malloc_usage / 1024 / 1024); 1853 malloc_usage / 1024 / 1024);
1854 1854
1855 ChildDiscardableSharedMemoryManager::Statistics discardable_stats = 1855 discardable_memory::ClientDiscardableSharedMemoryManager::Statistics
1856 ChildThreadImpl::discardable_shared_memory_manager()->GetStatistics(); 1856 discardable_stats =
1857 ChildThreadImpl::discardable_shared_memory_manager()->GetStatistics();
1857 size_t discardable_usage = 1858 size_t discardable_usage =
1858 discardable_stats.total_size - discardable_stats.freelist_size; 1859 discardable_stats.total_size - discardable_stats.freelist_size;
1859 UMA_HISTOGRAM_MEMORY_KB("PurgeAndSuspend.Memory.DiscardableKB", 1860 UMA_HISTOGRAM_MEMORY_KB("PurgeAndSuspend.Memory.DiscardableKB",
1860 discardable_usage / 1024); 1861 discardable_usage / 1024);
1861 1862
1862 size_t v8_usage = 0; 1863 size_t v8_usage = 0;
1863 if (v8::Isolate* isolate = blink::mainThreadIsolate()) { 1864 if (v8::Isolate* isolate = blink::mainThreadIsolate()) {
1864 v8::HeapStatistics v8_heap_statistics; 1865 v8::HeapStatistics v8_heap_statistics;
1865 isolate->GetHeapStatistics(&v8_heap_statistics); 1866 isolate->GetHeapStatistics(&v8_heap_statistics);
1866 v8_usage = v8_heap_statistics.total_heap_size(); 1867 v8_usage = v8_heap_statistics.total_heap_size();
(...skipping 615 matching lines...) Expand 10 before | Expand all | Expand 10 after
2482 } 2483 }
2483 } 2484 }
2484 2485
2485 void RenderThreadImpl::OnRendererInterfaceRequest( 2486 void RenderThreadImpl::OnRendererInterfaceRequest(
2486 mojom::RendererAssociatedRequest request) { 2487 mojom::RendererAssociatedRequest request) {
2487 DCHECK(!renderer_binding_.is_bound()); 2488 DCHECK(!renderer_binding_.is_bound());
2488 renderer_binding_.Bind(std::move(request)); 2489 renderer_binding_.Bind(std::move(request));
2489 } 2490 }
2490 2491
2491 } // namespace content 2492 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/render_thread_impl.h ('k') | content/test/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698