Commit d11bc86e authored by Erik Chen's avatar Erik Chen Committed by Commit Bot

Remove GetTotalsSummary.

The method is a duplicate of GetVmSwapBytes

Change-Id: I1bfc11484035c8c3452831bee0553a98e07a8cce
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1637746Reviewed-by: default avatarAhmed Fakhry <afakhry@chromium.org>
Reviewed-by: default avatarDaniel Cheng <dcheng@chromium.org>
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Erik Chen <erikchen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#666437}
parent 7dc76c8d
...@@ -98,14 +98,6 @@ class BASE_EXPORT ProcessMetrics { ...@@ -98,14 +98,6 @@ class BASE_EXPORT ProcessMetrics {
BASE_EXPORT size_t GetResidentSetSize() const; BASE_EXPORT size_t GetResidentSetSize() const;
#endif #endif
#if defined(OS_CHROMEOS)
struct TotalsSummary {
size_t swap_kb;
};
// Returns memory stats for the process.
BASE_EXPORT TotalsSummary GetTotalsSummary() const;
#endif
// Returns the percentage of time spent executing, across all threads of the // Returns the percentage of time spent executing, across all threads of the
// process, in the interval since the last time the method was called. Since // process, in the interval since the last time the method was called. Since
// this considers the total execution time across all threads in a process, // this considers the total execution time across all threads in a process,
......
...@@ -307,14 +307,6 @@ ProcessMetrics::ProcessMetrics(ProcessHandle process) ...@@ -307,14 +307,6 @@ ProcessMetrics::ProcessMetrics(ProcessHandle process)
ProcessMetrics::ProcessMetrics(ProcessHandle process) : process_(process) {} ProcessMetrics::ProcessMetrics(ProcessHandle process) : process_(process) {}
#endif #endif
#if defined(OS_CHROMEOS)
ProcessMetrics::TotalsSummary ProcessMetrics::GetTotalsSummary() const {
ProcessMetrics::TotalsSummary summary = {};
summary.swap_kb = GetVmSwapBytes() >> 10;
return summary;
}
#endif
size_t GetSystemCommitCharge() { size_t GetSystemCommitCharge() {
SystemMemoryInfoKB meminfo; SystemMemoryInfoKB meminfo;
if (!GetSystemMemoryInfo(&meminfo)) if (!GetSystemMemoryInfo(&meminfo))
......
...@@ -137,9 +137,7 @@ int64_t TaskGroupSampler::RefreshSwappedMem() { ...@@ -137,9 +137,7 @@ int64_t TaskGroupSampler::RefreshSwappedMem() {
DCHECK(worker_pool_sequenced_checker_.CalledOnValidSequence()); DCHECK(worker_pool_sequenced_checker_.CalledOnValidSequence());
#if defined(OS_CHROMEOS) #if defined(OS_CHROMEOS)
base::ProcessMetrics::TotalsSummary summary = return process_metrics_->GetVmSwapBytes();
process_metrics_->GetTotalsSummary();
return summary.swap_kb * 1024;
#endif // defined(OS_CHROMEOS) #endif // defined(OS_CHROMEOS)
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment