New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 650352 link

Starred by 1 user

Issue metadata

Status: Archived
Owner:
Closed: May 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug
cwp



Sign in to add a comment

Runtime memory leak detector: record the length of an uptrend that triggered leak report

Project Member Reported by sque@chromium.org, Sep 26 2016

Issue description

Currently, we include the history of allocation breakdown by size and call site for the last 32 analysis intervals, measured by gross size allocated by the allocator and defined in MemoryLeakReportProto::Params::analysis_interval_bytes. (The limit of 32 puts a cap on the memory footprint of the leak detector.) This can show us the pattern over time but we don't have any data from before 32 * |analysis_interval_bytes|.

It would be useful to also record the overall increase in allocation count from the call site since the allocation count started increasing monotonically.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Oct 14 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/11aa96ed7e3423bd90af355e8a8e55db1c55fdae

commit 11aa96ed7e3423bd90af355e8a8e55db1c55fdae
Author: mwlodar <mwlodar@google.com>
Date: Fri Oct 14 21:17:44 2016

Leak reports collect information about the last uptrend

Leak reports collect information about the last uptrend in the number
of allocations for a given call stack. Changes include new public methods in
CallStackTable, new fields in LeakDetectorImpl::LeakReport and the mojo
structs, minor changes in LeakDetector and LeakDetectorImpl, and updates in
unit tests for CallStackTable and protobuf_to_mojo_converter.

BUG= 650352 

Review-Url: https://codereview.chromium.org/2403223002
Cr-Commit-Position: refs/heads/master@{#425464}

[modify] https://crrev.com/11aa96ed7e3423bd90af355e8a8e55db1c55fdae/components/metrics/leak_detector/call_stack_table.cc
[modify] https://crrev.com/11aa96ed7e3423bd90af355e8a8e55db1c55fdae/components/metrics/leak_detector/call_stack_table.h
[modify] https://crrev.com/11aa96ed7e3423bd90af355e8a8e55db1c55fdae/components/metrics/leak_detector/call_stack_table_unittest.cc
[modify] https://crrev.com/11aa96ed7e3423bd90af355e8a8e55db1c55fdae/components/metrics/leak_detector/leak_detector.cc
[modify] https://crrev.com/11aa96ed7e3423bd90af355e8a8e55db1c55fdae/components/metrics/leak_detector/leak_detector.mojom
[modify] https://crrev.com/11aa96ed7e3423bd90af355e8a8e55db1c55fdae/components/metrics/leak_detector/leak_detector_impl.cc
[modify] https://crrev.com/11aa96ed7e3423bd90af355e8a8e55db1c55fdae/components/metrics/leak_detector/leak_detector_impl.h
[modify] https://crrev.com/11aa96ed7e3423bd90af355e8a8e55db1c55fdae/components/metrics/leak_detector/leak_detector_impl_unittest.cc
[modify] https://crrev.com/11aa96ed7e3423bd90af355e8a8e55db1c55fdae/components/metrics/leak_detector/protobuf_to_mojo_converter.cc
[modify] https://crrev.com/11aa96ed7e3423bd90af355e8a8e55db1c55fdae/components/metrics/leak_detector/protobuf_to_mojo_converter_unittest.cc
[modify] https://crrev.com/11aa96ed7e3423bd90af355e8a8e55db1c55fdae/components/metrics/proto/memory_leak_report.proto

Project Member

Comment 2 by bugdroid1@chromium.org, Oct 14 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/b7042e4cf699d3a6b0683ed250791c0daddde78b

commit b7042e4cf699d3a6b0683ed250791c0daddde78b
Author: jyasskin <jyasskin@chromium.org>
Date: Fri Oct 14 23:55:37 2016

Revert of Leak reports collect information about the last uptrend (patchset #4 id:60001 of https://codereview.chromium.org/2403223002/ )

Reason for revert:
Broke the MSan build:

https://build.chromium.org/p/chromium.memory.full/builders/Chromium%20Linux%20ChromeOS%20MSan%20Builder/builds/2091/steps/compile/logs/stdio
In file included from ../../base/containers/hash_tables.h:9:
../../buildtools/third_party/libc++/trunk/include/unordered_map:785:5: error: static_assert failed "Invalid allocator::value_type"
    static_assert((is_same<value_type, typename allocator_type::value_type>::value),
    ^             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../components/metrics/leak_detector/call_stack_table.h:98:39: note: in instantiation of template class 'std::__1::unordered_map<const metrics::leak_detector::CallStack *, metrics::leak_detector::CallStackTable::CallStackCountInfo, metrics::leak_detector::CallStackTable::StoredHash, std::__1::equal_to<const metrics::leak_detector::CallStack *>, STLAllocator<std::__1::pair<const metrics::leak_detector::CallStack *const, unsigned int>, metrics::leak_detector::CustomAllocator> >' requested here
                 TableEntryAllocator> entry_map_;
                                      ^
../../components/metrics/leak_detector/call_stack_table.h:98:39: error: private field 'entry_map_' is not used [-Werror,-Wunused-private-field]
                 TableEntryAllocator> entry_map_;
                                      ^
2 errors generated.

Original issue's description:
> Leak reports collect information about the last uptrend
>
> Leak reports collect information about the last uptrend in the number
> of allocations for a given call stack. Changes include new public methods in
> CallStackTable, new fields in LeakDetectorImpl::LeakReport and the mojo
> structs, minor changes in LeakDetector and LeakDetectorImpl, and updates in
> unit tests for CallStackTable and protobuf_to_mojo_converter.
>
> BUG= 650352 
>
> Committed: https://crrev.com/11aa96ed7e3423bd90af355e8a8e55db1c55fdae
> Cr-Commit-Position: refs/heads/master@{#425464}

TBR=sque@google.com,sque@chromium.org,wfh@chromium.org,asvitkine@google.com,asvitkine@chromium.org,mwlodar@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG= 650352 

Review-Url: https://codereview.chromium.org/2417403002
Cr-Commit-Position: refs/heads/master@{#425513}

[modify] https://crrev.com/b7042e4cf699d3a6b0683ed250791c0daddde78b/components/metrics/leak_detector/call_stack_table.cc
[modify] https://crrev.com/b7042e4cf699d3a6b0683ed250791c0daddde78b/components/metrics/leak_detector/call_stack_table.h
[modify] https://crrev.com/b7042e4cf699d3a6b0683ed250791c0daddde78b/components/metrics/leak_detector/call_stack_table_unittest.cc
[modify] https://crrev.com/b7042e4cf699d3a6b0683ed250791c0daddde78b/components/metrics/leak_detector/leak_detector.cc
[modify] https://crrev.com/b7042e4cf699d3a6b0683ed250791c0daddde78b/components/metrics/leak_detector/leak_detector.mojom
[modify] https://crrev.com/b7042e4cf699d3a6b0683ed250791c0daddde78b/components/metrics/leak_detector/leak_detector_impl.cc
[modify] https://crrev.com/b7042e4cf699d3a6b0683ed250791c0daddde78b/components/metrics/leak_detector/leak_detector_impl.h
[modify] https://crrev.com/b7042e4cf699d3a6b0683ed250791c0daddde78b/components/metrics/leak_detector/leak_detector_impl_unittest.cc
[modify] https://crrev.com/b7042e4cf699d3a6b0683ed250791c0daddde78b/components/metrics/leak_detector/protobuf_to_mojo_converter.cc
[modify] https://crrev.com/b7042e4cf699d3a6b0683ed250791c0daddde78b/components/metrics/leak_detector/protobuf_to_mojo_converter_unittest.cc
[modify] https://crrev.com/b7042e4cf699d3a6b0683ed250791c0daddde78b/components/metrics/proto/memory_leak_report.proto

Project Member

Comment 3 by bugdroid1@chromium.org, Oct 18 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/90a2477a77b011177eca80a405c1a7f1a4022de7

commit 90a2477a77b011177eca80a405c1a7f1a4022de7
Author: sque <sque@chromium.org>
Date: Tue Oct 18 21:23:51 2016

Reland "Leak reports collect information about the last uptrend"

Leak reports collect information about the last uptrend in the number
of allocations for a given call stack. Changes include new public methods in
CallStackTable, new fields in LeakDetectorImpl::LeakReport and the mojo
structs, minor changes in LeakDetector and LeakDetectorImpl, and updates in
unit tests for CallStackTable and protobuf_to_mojo_converter.

- Reverted in https://codereview.chromium.org/2417403002
- Additional fix: Correct the allocator type

BUG= 650352 

Review-Url: https://codereview.chromium.org/2427493004
Cr-Commit-Position: refs/heads/master@{#426048}

[modify] https://crrev.com/90a2477a77b011177eca80a405c1a7f1a4022de7/components/metrics/leak_detector/call_stack_table.cc
[modify] https://crrev.com/90a2477a77b011177eca80a405c1a7f1a4022de7/components/metrics/leak_detector/call_stack_table.h
[modify] https://crrev.com/90a2477a77b011177eca80a405c1a7f1a4022de7/components/metrics/leak_detector/call_stack_table_unittest.cc
[modify] https://crrev.com/90a2477a77b011177eca80a405c1a7f1a4022de7/components/metrics/leak_detector/leak_detector.cc
[modify] https://crrev.com/90a2477a77b011177eca80a405c1a7f1a4022de7/components/metrics/leak_detector/leak_detector.mojom
[modify] https://crrev.com/90a2477a77b011177eca80a405c1a7f1a4022de7/components/metrics/leak_detector/leak_detector_impl.cc
[modify] https://crrev.com/90a2477a77b011177eca80a405c1a7f1a4022de7/components/metrics/leak_detector/leak_detector_impl.h
[modify] https://crrev.com/90a2477a77b011177eca80a405c1a7f1a4022de7/components/metrics/leak_detector/leak_detector_impl_unittest.cc
[modify] https://crrev.com/90a2477a77b011177eca80a405c1a7f1a4022de7/components/metrics/leak_detector/protobuf_to_mojo_converter.cc
[modify] https://crrev.com/90a2477a77b011177eca80a405c1a7f1a4022de7/components/metrics/leak_detector/protobuf_to_mojo_converter_unittest.cc
[modify] https://crrev.com/90a2477a77b011177eca80a405c1a7f1a4022de7/components/metrics/proto/memory_leak_report.proto

Comment 4 by sque@chromium.org, May 20 2017

Status: Fixed (was: Untriaged)

Comment 5 by dchan@chromium.org, Aug 1 2017

Labels: VerifyIn-61

Comment 6 by dchan@chromium.org, Jan 22 2018

Status: Archived (was: Fixed)

Sign in to add a comment