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

Side by Side Diff: chrome/browser/memory_details_mac.cc

Issue 2838803003: Add a field platform_private_footprint_ to ProcessMemoryTotals. (Closed)
Patch Set: Comments from mark. Created 3 years, 8 months 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
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 "chrome/browser/memory_details.h" 5 #include "chrome/browser/memory_details.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>
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 info.titles = child.titles; 55 info.titles = child.titles;
56 info.process_type = child.process_type; 56 info.process_type = child.process_type;
57 break; 57 break;
58 } 58 }
59 } 59 }
60 60
61 std::unique_ptr<base::ProcessMetrics> metrics = 61 std::unique_ptr<base::ProcessMetrics> metrics =
62 base::ProcessMetrics::CreateProcessMetrics( 62 base::ProcessMetrics::CreateProcessMetrics(
63 pid, content::BrowserChildProcessHost::GetPortProvider()); 63 pid, content::BrowserChildProcessHost::GetPortProvider());
64 metrics->GetCommittedAndWorkingSetKBytes(&info.committed, &info.working_set); 64 metrics->GetCommittedAndWorkingSetKBytes(&info.committed, &info.working_set);
65 info.phys_footprint = metrics->GetPhysicalFootprint(); 65 info.phys_footprint = metrics->GetTaskVMInfo().phys_footprint;
66 66
67 processes->push_back(info); 67 processes->push_back(info);
68 } 68 }
69 69
70 } // namespace 70 } // namespace
71 71
72 MemoryDetails::MemoryDetails() { 72 MemoryDetails::MemoryDetails() {
73 const base::FilePath browser_process_path = 73 const base::FilePath browser_process_path =
74 base::GetProcessExecutablePath(base::GetCurrentProcessHandle()); 74 base::GetProcessExecutablePath(base::GetCurrentProcessHandle());
75 75
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 125
126 // Collect data about Chrome/Chromium. 126 // Collect data about Chrome/Chromium.
127 for (const base::ProcessId& pid : all_pids) 127 for (const base::ProcessId& pid : all_pids)
128 CollectProcessDataForChromeProcess(child_info, pid, chrome_processes); 128 CollectProcessDataForChromeProcess(child_info, pid, chrome_processes);
129 129
130 // Finally return to the browser thread. 130 // Finally return to the browser thread.
131 BrowserThread::PostTask( 131 BrowserThread::PostTask(
132 BrowserThread::UI, FROM_HERE, 132 BrowserThread::UI, FROM_HERE,
133 base::Bind(&MemoryDetails::CollectChildInfoOnUIThread, this)); 133 base::Bind(&MemoryDetails::CollectChildInfoOnUIThread, this));
134 } 134 }
OLDNEW
« no previous file with comments | « base/trace_event/process_memory_totals.cc ('k') | components/tracing/common/process_metrics_memory_dump_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698