summaryrefslogtreecommitdiffstats
path: root/chrome/browser/metrics
diff options
context:
space:
mode:
authorsail@chromium.org <sail@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-09 01:38:32 +0000
committersail@chromium.org <sail@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-09 01:38:32 +0000
commit134d74a0d65ef932d51adef62868612aec1ef9e0 (patch)
tree59e95f00797fbd9986e90d7aaa6d7856e83804f5 /chrome/browser/metrics
parent1404b2170426f0c5f37e34d45d194050102eecee (diff)
downloadchromium_src-134d74a0d65ef932d51adef62868612aec1ef9e0.zip
chromium_src-134d74a0d65ef932d51adef62868612aec1ef9e0.tar.gz
chromium_src-134d74a0d65ef932d51adef62868612aec1ef9e0.tar.bz2
Remove unused memory usage collection in MetricsService
MetricsService was calling MemoryDetails::StartFetch but wasn't using the result so I'm removing the call entirely. BUG=43207 TEST=None git-svn-id: svn://svn.chromium.org/chrome/trunk/src@77398 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/metrics')
-rw-r--r--chrome/browser/metrics/metrics_service.cc42
-rw-r--r--chrome/browser/metrics/metrics_service.h4
2 files changed, 8 insertions, 38 deletions
diff --git a/chrome/browser/metrics/metrics_service.cc b/chrome/browser/metrics/metrics_service.cc
index 601ad82..b3d24f3 100644
--- a/chrome/browser/metrics/metrics_service.cc
+++ b/chrome/browser/metrics/metrics_service.cc
@@ -169,7 +169,6 @@
#include "chrome/browser/browser_list.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/load_notification_details.h"
-#include "chrome/browser/memory_details.h"
#include "chrome/browser/metrics/histogram_synchronizer.h"
#include "chrome/browser/metrics/metrics_log.h"
#include "chrome/browser/prefs/pref_service.h"
@@ -316,23 +315,6 @@ struct MetricsService::ChildProcessStats {
ChildProcessInfo::ProcessType process_type;
};
-// Handles asynchronous fetching of memory details.
-// Will run the provided task after finished.
-class MetricsMemoryDetails : public MemoryDetails {
- public:
- explicit MetricsMemoryDetails(Task* completion) : completion_(completion) {}
-
- virtual void OnDetailsAvailable() {
- MessageLoop::current()->PostTask(FROM_HERE, completion_);
- }
-
- private:
- ~MetricsMemoryDetails() {}
-
- Task* completion_;
- DISALLOW_COPY_AND_ASSIGN(MetricsMemoryDetails);
-};
-
class MetricsService::InitTaskComplete : public Task {
public:
explicit InitTaskComplete(
@@ -972,10 +954,8 @@ void MetricsService::StartLogTransmissionTimer() {
// Right before the UMA transmission gets started, there's one more thing we'd
// like to record: the histogram of memory usage, so we spawn a task to
- // collect the memory details and when that task is finished, it will call
- // OnMemoryDetailCollectionDone, which will call HistogramSynchronization to
- // collect histograms from all renderers and then we will call
- // OnHistogramSynchronizationDone to continue processing.
+ // collect histograms from all the renderers and when that task is finished,
+ // it will call OnHistogramSynchronizationDone to continue processing.
MessageLoop::current()->PostDelayedTask(FROM_HERE,
log_sender_factory_.
NewRunnableMethod(&MetricsService::LogTransmissionTimerDone),
@@ -983,19 +963,6 @@ void MetricsService::StartLogTransmissionTimer() {
}
void MetricsService::LogTransmissionTimerDone() {
- Task* task = log_sender_factory_.
- NewRunnableMethod(&MetricsService::OnMemoryDetailCollectionDone);
-
- scoped_refptr<MetricsMemoryDetails> details(new MetricsMemoryDetails(task));
- details->StartFetch();
-
- // Collect WebCore cache information to put into a histogram.
- for (RenderProcessHost::iterator i(RenderProcessHost::AllHostsIterator());
- !i.IsAtEnd(); i.Advance())
- i.GetCurrentValue()->Send(new ViewMsg_GetCacheResourceStats());
-}
-
-void MetricsService::OnMemoryDetailCollectionDone() {
DCHECK(IsSingleThreaded());
// HistogramSynchronizer will Collect histograms from all renderers and it
@@ -1013,6 +980,11 @@ void MetricsService::OnMemoryDetailCollectionDone() {
HistogramSynchronizer::FetchRendererHistogramsAsynchronously(
MessageLoop::current(), callback_task,
kMaxHistogramGatheringWaitDuration);
+
+ // Collect WebCore cache information to put into a histogram.
+ for (RenderProcessHost::iterator i(RenderProcessHost::AllHostsIterator());
+ !i.IsAtEnd(); i.Advance())
+ i.GetCurrentValue()->Send(new ViewMsg_GetCacheResourceStats());
}
void MetricsService::OnHistogramSynchronizationDone() {
diff --git a/chrome/browser/metrics/metrics_service.h b/chrome/browser/metrics/metrics_service.h
index a8f386e..14df39c 100644
--- a/chrome/browser/metrics/metrics_service.h
+++ b/chrome/browser/metrics/metrics_service.h
@@ -230,10 +230,8 @@ class MetricsService : public NotificationObserver,
// Internal function to collect process memory information.
void LogTransmissionTimerDone();
- // Do not call OnMemoryDetailCollectionDone() or
- // OnHistogramSynchronizationDone() directly.
+ // Do not call OnHistogramSynchronizationDone() directly.
// Use StartLogTransmissionTimer() to schedule a call.
- void OnMemoryDetailCollectionDone();
void OnHistogramSynchronizationDone();
// Takes whatever log should be uploaded next (according to the state_)