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

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

Issue 2832933003: Add the UMA metric Memory.Gpu.PhysicalFootprint.MacOS (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
« no previous file with comments | « chrome/browser/memory_details.cc ('k') | chrome/browser/metrics/metrics_memory_details.cc » ('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 "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 66
66 processes->push_back(info); 67 processes->push_back(info);
67 } 68 }
68 69
69 } // namespace 70 } // namespace
70 71
71 MemoryDetails::MemoryDetails() { 72 MemoryDetails::MemoryDetails() {
72 const base::FilePath browser_process_path = 73 const base::FilePath browser_process_path =
73 base::GetProcessExecutablePath(base::GetCurrentProcessHandle()); 74 base::GetProcessExecutablePath(base::GetCurrentProcessHandle());
74 75
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 125
125 // Collect data about Chrome/Chromium. 126 // Collect data about Chrome/Chromium.
126 for (const base::ProcessId& pid : all_pids) 127 for (const base::ProcessId& pid : all_pids)
127 CollectProcessDataForChromeProcess(child_info, pid, chrome_processes); 128 CollectProcessDataForChromeProcess(child_info, pid, chrome_processes);
128 129
129 // Finally return to the browser thread. 130 // Finally return to the browser thread.
130 BrowserThread::PostTask( 131 BrowserThread::PostTask(
131 BrowserThread::UI, FROM_HERE, 132 BrowserThread::UI, FROM_HERE,
132 base::Bind(&MemoryDetails::CollectChildInfoOnUIThread, this)); 133 base::Bind(&MemoryDetails::CollectChildInfoOnUIThread, this));
133 } 134 }
OLDNEW
« no previous file with comments | « chrome/browser/memory_details.cc ('k') | chrome/browser/metrics/metrics_memory_details.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698