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

Unified Diff: components/metrics/leak_detector/leak_detector_impl.cc

Issue 2417403002: Revert of Leak reports collect information about the last uptrend (Closed)
Patch Set: Created 4 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: components/metrics/leak_detector/leak_detector_impl.cc
diff --git a/components/metrics/leak_detector/leak_detector_impl.cc b/components/metrics/leak_detector/leak_detector_impl.cc
index 43bd0d242484987f814bd472b3fbf4452acbf419..5fd4653316aff4773395edf9e4ab65560cba322d 100644
--- a/components/metrics/leak_detector/leak_detector_impl.cc
+++ b/components/metrics/leak_detector/leak_detector_impl.cc
@@ -173,8 +173,7 @@
address_map_.erase(iter);
}
-void LeakDetectorImpl::TestForLeaks(InternalVector<LeakReport>* reports,
- size_t timestamp) {
+void LeakDetectorImpl::TestForLeaks(InternalVector<LeakReport>* reports) {
// Add net alloc counts for each size to a ranked list.
RankedSet size_ranked_set(kRankedSetSize);
for (size_t i = 0; i < size_entries_.size(); ++i) {
@@ -184,7 +183,7 @@
}
size_leak_analyzer_.AddSample(std::move(size_ranked_set));
- RecordCurrentAllocationDataInHistory(timestamp);
+ RecordCurrentAllocationDataInHistory();
UpdateLeakCooldowns();
@@ -231,7 +230,7 @@
report->call_stack_[j] = GetOffset(call_stack->stack[j]);
}
- StoreHistoricalDataInReport(size, call_stack, report, timestamp);
+ StoreHistoricalDataInReport(size, call_stack, report);
ResetLeakCooldown(size, call_stack);
}
}
@@ -254,7 +253,7 @@
return UINTPTR_MAX;
}
-void LeakDetectorImpl::RecordCurrentAllocationDataInHistory(size_t timestamp) {
+void LeakDetectorImpl::RecordCurrentAllocationDataInHistory() {
// Record a snapshot of the current size table.
InternalVector<uint32_t> current_size_table_record;
current_size_table_record.reserve(kNumSizeEntriesInHistory);
@@ -274,7 +273,6 @@
continue;
RankedSet top_call_stacks(kNumTopCallStacksInHistory);
entry.stack_table->GetTopCallStacks(&top_call_stacks);
- entry.stack_table->UpdateLastDropInfo(timestamp);
entry.call_site_breakdown_history.push_back(std::move(top_call_stacks));
if (entry.call_site_breakdown_history.size() > kMaxNumHistoryEntries)
entry.call_site_breakdown_history.pop_front();
@@ -283,8 +281,7 @@
void LeakDetectorImpl::StoreHistoricalDataInReport(size_t size,
const CallStack* call_site,
- LeakReport* report,
- size_t timestamp) {
+ LeakReport* report) {
using AllocationBreakdown = LeakReport::AllocationBreakdown;
// Copy historical allocation data into the report.
InternalVector<AllocationBreakdown>* dest = &report->alloc_breakdown_history_;
@@ -320,10 +317,6 @@
++src_iter;
++dest_iter;
}
-
- size_entries_[SizeToIndex(size)].stack_table->GetLastUptrendInfo(
- call_site, timestamp, &report->num_rising_intervals_,
- &report->num_allocs_increase_);
}
bool LeakDetectorImpl::ReadyToGenerateReport(
« no previous file with comments | « components/metrics/leak_detector/leak_detector_impl.h ('k') | components/metrics/leak_detector/leak_detector_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698