diff options
author | asvitkine <asvitkine@chromium.org> | 2015-01-21 12:50:37 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-01-21 20:51:57 +0000 |
commit | 6f5f3596aa4517f0d4f84da40175ac2f596a4828 (patch) | |
tree | 018878fdd205514512353adbeba8b89d6c95ec1d /chrome/browser/feedback | |
parent | 075d9d1f37299ce12753f49d00d8ee27b1775c18 (diff) | |
download | chromium_src-6f5f3596aa4517f0d4f84da40175ac2f596a4828.zip chromium_src-6f5f3596aa4517f0d4f84da40175ac2f596a4828.tar.gz chromium_src-6f5f3596aa4517f0d4f84da40175ac2f596a4828.tar.bz2 |
Optimize MetricsDetails classes to avoid a lot of redundant work.
Prior to this change, every time MetricsDetails is used, the code
would collect memory usage information from all running browsers,
even if the intention was to just get information about Chrome (e.g.
when logging Memory.* histograms).
On some platforms, like Mac, this was particularly expensive as
getting information about other processes involves running PS or
TOP as a sub-process. This would happen for all users opted-in
to UMA reporting shortly after start up and then periodically.
This CL adds a mode param to the implementation that specifies
whether the client is interested in metrics about all browsers or
just Chrome processes.
Also, this CL modernizes some of the related code - such as
using C++11 for loops and moving functions to the anonymous
namespace.
BUG=448834
Review URL: https://codereview.chromium.org/857063002
Cr-Commit-Position: refs/heads/master@{#312449}
Diffstat (limited to 'chrome/browser/feedback')
-rw-r--r-- | chrome/browser/feedback/system_logs/log_sources/memory_details_log_source.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/chrome/browser/feedback/system_logs/log_sources/memory_details_log_source.cc b/chrome/browser/feedback/system_logs/log_sources/memory_details_log_source.cc index 21c5766..c44ce22 100644 --- a/chrome/browser/feedback/system_logs/log_sources/memory_details_log_source.cc +++ b/chrome/browser/feedback/system_logs/log_sources/memory_details_log_source.cc @@ -45,7 +45,7 @@ void MemoryDetailsLogSource::Fetch(const SysLogsSourceCallback& callback) { scoped_refptr<SystemLogsMemoryHandler> handler(new SystemLogsMemoryHandler(callback)); - handler->StartFetch(); + handler->StartFetch(MemoryDetails::FROM_CHROME_ONLY); } } // namespace system_logs |