diff options
author | vadimt <vadimt@chromium.org> | 2015-03-06 08:26:55 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-03-06 16:27:47 +0000 |
commit | a01ec209478a29e0a2b00999443875cd26daca1f (patch) | |
tree | c7158f443d01e5c9dcc87ee35ea55205ed89271b /base/tracked_objects.cc | |
parent | d8f23a5a8450540db1145ee70591325de570d2cf (diff) | |
download | chromium_src-a01ec209478a29e0a2b00999443875cd26daca1f.zip chromium_src-a01ec209478a29e0a2b00999443875cd26daca1f.tar.gz chromium_src-a01ec209478a29e0a2b00999443875cd26daca1f.tar.bz2 |
Removing unused DeathData::ResetMax() method
BUG=456354
Review URL: https://codereview.chromium.org/987593002
Cr-Commit-Position: refs/heads/master@{#319454}
Diffstat (limited to 'base/tracked_objects.cc')
-rw-r--r-- | base/tracked_objects.cc | 24 |
1 files changed, 7 insertions, 17 deletions
diff --git a/base/tracked_objects.cc b/base/tracked_objects.cc index fc29e2e..f7ee6da 100644 --- a/base/tracked_objects.cc +++ b/base/tracked_objects.cc @@ -163,11 +163,6 @@ int32 DeathData::queue_duration_sample() const { return queue_duration_sample_; } -void DeathData::ResetMax() { - run_duration_max_ = 0; - queue_duration_max_ = 0; -} - void DeathData::Clear() { count_ = 0; run_duration_sum_ = 0; @@ -399,12 +394,12 @@ void ThreadData::OnThreadTerminationCleanup() { } // static -void ThreadData::Snapshot(bool reset_max, ProcessDataSnapshot* process_data) { +void ThreadData::Snapshot(ProcessDataSnapshot* process_data) { // Add births that have run to completion to |collected_data|. // |birth_counts| tracks the total number of births recorded at each location // for which we have not seen a death count. BirthCountMap birth_counts; - ThreadData::SnapshotAllExecutedTasks(reset_max, process_data, &birth_counts); + ThreadData::SnapshotAllExecutedTasks(process_data, &birth_counts); // Add births that are still active -- i.e. objects that have tallied a birth, // but have not yet tallied a matching death, and hence must be either @@ -587,8 +582,7 @@ void ThreadData::TallyRunInAScopedRegionIfTracking( } // static -void ThreadData::SnapshotAllExecutedTasks(bool reset_max, - ProcessDataSnapshot* process_data, +void ThreadData::SnapshotAllExecutedTasks(ProcessDataSnapshot* process_data, BirthCountMap* birth_counts) { if (!kTrackAllTaskObjects) return; // Not compiled in. @@ -605,19 +599,18 @@ void ThreadData::SnapshotAllExecutedTasks(bool reset_max, for (ThreadData* thread_data = my_list; thread_data; thread_data = thread_data->next()) { - thread_data->SnapshotExecutedTasks(reset_max, process_data, birth_counts); + thread_data->SnapshotExecutedTasks(process_data, birth_counts); } } -void ThreadData::SnapshotExecutedTasks(bool reset_max, - ProcessDataSnapshot* process_data, +void ThreadData::SnapshotExecutedTasks(ProcessDataSnapshot* process_data, BirthCountMap* birth_counts) { // Get copy of data, so that the data will not change during the iterations // and processing. ThreadData::BirthMap birth_map; ThreadData::DeathMap death_map; ThreadData::ParentChildSet parent_child_set; - SnapshotMaps(reset_max, &birth_map, &death_map, &parent_child_set); + SnapshotMaps(&birth_map, &death_map, &parent_child_set); for (ThreadData::DeathMap::const_iterator it = death_map.begin(); it != death_map.end(); ++it) { @@ -641,8 +634,7 @@ void ThreadData::SnapshotExecutedTasks(bool reset_max, } // This may be called from another thread. -void ThreadData::SnapshotMaps(bool reset_max, - BirthMap* birth_map, +void ThreadData::SnapshotMaps(BirthMap* birth_map, DeathMap* death_map, ParentChildSet* parent_child_set) { base::AutoLock lock(map_lock_); @@ -652,8 +644,6 @@ void ThreadData::SnapshotMaps(bool reset_max, for (DeathMap::iterator it = death_map_.begin(); it != death_map_.end(); ++it) { (*death_map)[it->first] = it->second; - if (reset_max) - it->second.ResetMax(); } if (!kTrackParentChildLinks) |