New issue
Advanced search Search tips

Issue 803276 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Oct 10
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Feature



Sign in to add a comment

Implement Sampling Native Heap Profiler

Project Member Reported by alph@chromium.org, Jan 18 2018

Issue description

This is a project tracking bug for Sampling Native Heap Profiler implementation.

The project proposal and the roadmap are summarized in the working draft: https://docs.google.com/document/d/1Qz4tWMERFHRRk5uoiFKpYT2M9JSso4xFBvRmgXk32x8/edit?usp=sharing
 
Project Member

Comment 1 by bugdroid1@chromium.org, Jan 20 2018

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

commit 958e86caee516974831b1471b1a4cb79248220b3
Author: Alexei Filippov <alph@chromium.org>
Date: Sat Jan 20 04:53:00 2018

DevTools: Initial implementation of Sampling Native Heap Profiler.

The initial implementation has a single allocator instrumented and hooks onto the
base::allocator shim.
Support for other allocators (Oilpan GC, PartitionAlloc) as well as experimental DevTools UI
will be added in upcoming patches.

The API to control the profiler is available through DevTools protocol. It introduces
the following methods to the Memory domain:
  - startSamplingNativeHeapProfile
  - stopSamplingNativeHeapProfile
  - getSamplingNativeHeapProfile

BUG= 803276 

Change-Id: Id2df663cdaef3ee2a5fc7afbda66c8728921a732
Reviewed-on: https://chromium-review.googlesource.com/872120
Commit-Queue: Alexei Filippov <alph@chromium.org>
Reviewed-by: Primiano Tucci <primiano@chromium.org>
Reviewed-by: Pavel Feldman <pfeldman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#530753}
[modify] https://crrev.com/958e86caee516974831b1471b1a4cb79248220b3/third_party/WebKit/LayoutTests/TestExpectations
[add] https://crrev.com/958e86caee516974831b1471b1a4cb79248220b3/third_party/WebKit/LayoutTests/inspector-protocol/memory/sampling-native-profile-expected.txt
[add] https://crrev.com/958e86caee516974831b1471b1a4cb79248220b3/third_party/WebKit/LayoutTests/inspector-protocol/memory/sampling-native-profile.js
[modify] https://crrev.com/958e86caee516974831b1471b1a4cb79248220b3/third_party/WebKit/Source/core/inspector/InspectorMemoryAgent.cpp
[modify] https://crrev.com/958e86caee516974831b1471b1a4cb79248220b3/third_party/WebKit/Source/core/inspector/InspectorMemoryAgent.h
[modify] https://crrev.com/958e86caee516974831b1471b1a4cb79248220b3/third_party/WebKit/Source/core/inspector/browser_protocol.json
[modify] https://crrev.com/958e86caee516974831b1471b1a4cb79248220b3/third_party/WebKit/Source/core/inspector/browser_protocol.pdl
[modify] https://crrev.com/958e86caee516974831b1471b1a4cb79248220b3/third_party/WebKit/Source/core/inspector/inspector_protocol_config.json
[modify] https://crrev.com/958e86caee516974831b1471b1a4cb79248220b3/third_party/WebKit/Source/platform/BUILD.gn
[add] https://crrev.com/958e86caee516974831b1471b1a4cb79248220b3/third_party/WebKit/Source/platform/memory_profiler/DEPS
[add] https://crrev.com/958e86caee516974831b1471b1a4cb79248220b3/third_party/WebKit/Source/platform/memory_profiler/OWNERS
[add] https://crrev.com/958e86caee516974831b1471b1a4cb79248220b3/third_party/WebKit/Source/platform/memory_profiler/SamplingNativeHeapProfiler.cpp
[add] https://crrev.com/958e86caee516974831b1471b1a4cb79248220b3/third_party/WebKit/Source/platform/memory_profiler/SamplingNativeHeapProfiler.h

Project Member

Comment 2 by bugdroid1@chromium.org, Jan 22 2018

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

commit cb6090e4fb1211fc252941dec186096e937010fb
Author: Mikel Astiz <mastiz@chromium.org>
Date: Mon Jan 22 10:32:50 2018

Revert "DevTools: Initial implementation of Sampling Native Heap Profiler."

This reverts commit 958e86caee516974831b1471b1a4cb79248220b3.

Reason for revert: tests broken on multiple builders, see linked bug.

Original change's description:
> DevTools: Initial implementation of Sampling Native Heap Profiler.
> 
> The initial implementation has a single allocator instrumented and hooks onto the
> base::allocator shim.
> Support for other allocators (Oilpan GC, PartitionAlloc) as well as experimental DevTools UI
> will be added in upcoming patches.
> 
> The API to control the profiler is available through DevTools protocol. It introduces
> the following methods to the Memory domain:
>   - startSamplingNativeHeapProfile
>   - stopSamplingNativeHeapProfile
>   - getSamplingNativeHeapProfile
> 
> BUG= 803276 
> 
> Change-Id: Id2df663cdaef3ee2a5fc7afbda66c8728921a732
> Reviewed-on: https://chromium-review.googlesource.com/872120
> Commit-Queue: Alexei Filippov <alph@chromium.org>
> Reviewed-by: Primiano Tucci <primiano@chromium.org>
> Reviewed-by: Pavel Feldman <pfeldman@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#530753}

TBR=primiano@chromium.org,alph@chromium.org,pfeldman@chromium.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug:  803276 
Bug:  804241 
Change-Id: I99b168a77239013f4c3b61b97d424bcf623edc2e
Reviewed-on: https://chromium-review.googlesource.com/878159
Reviewed-by: Mikel Astiz <mastiz@chromium.org>
Commit-Queue: Mikel Astiz <mastiz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#530830}
[modify] https://crrev.com/cb6090e4fb1211fc252941dec186096e937010fb/third_party/WebKit/LayoutTests/TestExpectations
[delete] https://crrev.com/a7a96e217861f61c0aa297a04447be39b43dce24/third_party/WebKit/LayoutTests/inspector-protocol/memory/sampling-native-profile-expected.txt
[delete] https://crrev.com/a7a96e217861f61c0aa297a04447be39b43dce24/third_party/WebKit/LayoutTests/inspector-protocol/memory/sampling-native-profile.js
[modify] https://crrev.com/cb6090e4fb1211fc252941dec186096e937010fb/third_party/WebKit/Source/core/inspector/InspectorMemoryAgent.cpp
[modify] https://crrev.com/cb6090e4fb1211fc252941dec186096e937010fb/third_party/WebKit/Source/core/inspector/InspectorMemoryAgent.h
[modify] https://crrev.com/cb6090e4fb1211fc252941dec186096e937010fb/third_party/WebKit/Source/core/inspector/browser_protocol.json
[modify] https://crrev.com/cb6090e4fb1211fc252941dec186096e937010fb/third_party/WebKit/Source/core/inspector/browser_protocol.pdl
[modify] https://crrev.com/cb6090e4fb1211fc252941dec186096e937010fb/third_party/WebKit/Source/core/inspector/inspector_protocol_config.json
[modify] https://crrev.com/cb6090e4fb1211fc252941dec186096e937010fb/third_party/WebKit/Source/platform/BUILD.gn
[delete] https://crrev.com/a7a96e217861f61c0aa297a04447be39b43dce24/third_party/WebKit/Source/platform/memory_profiler/DEPS
[delete] https://crrev.com/a7a96e217861f61c0aa297a04447be39b43dce24/third_party/WebKit/Source/platform/memory_profiler/OWNERS
[delete] https://crrev.com/a7a96e217861f61c0aa297a04447be39b43dce24/third_party/WebKit/Source/platform/memory_profiler/SamplingNativeHeapProfiler.cpp
[delete] https://crrev.com/a7a96e217861f61c0aa297a04447be39b43dce24/third_party/WebKit/Source/platform/memory_profiler/SamplingNativeHeapProfiler.h

Project Member

Comment 3 by bugdroid1@chromium.org, Jan 22 2018

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

commit 3d5de298cfa4064dd48cbc2c7d4172f960c69ecb
Author: Alexei Filippov <alph@chromium.org>
Date: Mon Jan 22 20:26:29 2018

Reland "DevTools: Initial implementation of Sampling Native Heap Profiler."

This is a reland of 958e86caee516974831b1471b1a4cb79248220b3.

Original change's description:
> DevTools: Initial implementation of Sampling Native Heap Profiler.
>
> The initial implementation has a single allocator instrumented and hooks onto the
> base::allocator shim.
> Support for other allocators (Oilpan GC, PartitionAlloc) as well as experimental DevTools UI
> will be added in upcoming patches.
>
> The API to control the profiler is available through DevTools protocol. It introduces
> the following methods to the Memory domain:
>   - startSamplingNativeHeapProfile
>   - stopSamplingNativeHeapProfile
>   - getSamplingNativeHeapProfile
>
> BUG= 803276 
>
> Change-Id: Id2df663cdaef3ee2a5fc7afbda66c8728921a732
> Reviewed-on: https://chromium-review.googlesource.com/872120
> Commit-Queue: Alexei Filippov <alph@chromium.org>
> Reviewed-by: Primiano Tucci <primiano@chromium.org>
> Reviewed-by: Pavel Feldman <pfeldman@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#530753}

TBR=primiano@chromium.org,pfeldman@chromium.org

Bug:  803276 
Change-Id: I7f9b1982081df47bb71cfbc68895fd95559fdc32
Reviewed-on: https://chromium-review.googlesource.com/878925
Commit-Queue: Alexei Filippov <alph@chromium.org>
Reviewed-by: Alexei Filippov <alph@chromium.org>
Cr-Commit-Position: refs/heads/master@{#530972}
[modify] https://crrev.com/3d5de298cfa4064dd48cbc2c7d4172f960c69ecb/third_party/WebKit/LayoutTests/ASANExpectations
[modify] https://crrev.com/3d5de298cfa4064dd48cbc2c7d4172f960c69ecb/third_party/WebKit/LayoutTests/MSANExpectations
[modify] https://crrev.com/3d5de298cfa4064dd48cbc2c7d4172f960c69ecb/third_party/WebKit/LayoutTests/TestExpectations
[add] https://crrev.com/3d5de298cfa4064dd48cbc2c7d4172f960c69ecb/third_party/WebKit/LayoutTests/inspector-protocol/memory/sampling-native-profile-expected.txt
[add] https://crrev.com/3d5de298cfa4064dd48cbc2c7d4172f960c69ecb/third_party/WebKit/LayoutTests/inspector-protocol/memory/sampling-native-profile.js
[modify] https://crrev.com/3d5de298cfa4064dd48cbc2c7d4172f960c69ecb/third_party/WebKit/Source/core/inspector/InspectorMemoryAgent.cpp
[modify] https://crrev.com/3d5de298cfa4064dd48cbc2c7d4172f960c69ecb/third_party/WebKit/Source/core/inspector/InspectorMemoryAgent.h
[modify] https://crrev.com/3d5de298cfa4064dd48cbc2c7d4172f960c69ecb/third_party/WebKit/Source/core/inspector/browser_protocol.json
[modify] https://crrev.com/3d5de298cfa4064dd48cbc2c7d4172f960c69ecb/third_party/WebKit/Source/core/inspector/browser_protocol.pdl
[modify] https://crrev.com/3d5de298cfa4064dd48cbc2c7d4172f960c69ecb/third_party/WebKit/Source/core/inspector/inspector_protocol_config.json
[modify] https://crrev.com/3d5de298cfa4064dd48cbc2c7d4172f960c69ecb/third_party/WebKit/Source/platform/BUILD.gn
[add] https://crrev.com/3d5de298cfa4064dd48cbc2c7d4172f960c69ecb/third_party/WebKit/Source/platform/memory_profiler/DEPS
[add] https://crrev.com/3d5de298cfa4064dd48cbc2c7d4172f960c69ecb/third_party/WebKit/Source/platform/memory_profiler/OWNERS
[add] https://crrev.com/3d5de298cfa4064dd48cbc2c7d4172f960c69ecb/third_party/WebKit/Source/platform/memory_profiler/SamplingNativeHeapProfiler.cpp
[add] https://crrev.com/3d5de298cfa4064dd48cbc2c7d4172f960c69ecb/third_party/WebKit/Source/platform/memory_profiler/SamplingNativeHeapProfiler.h

Project Member

Comment 5 by bugdroid1@chromium.org, Jan 23 2018

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

commit 59ae56fddd4f7b232ac327e86b8c333bd165bde3
Author: Alexei Filippov <alph@chromium.org>
Date: Tue Jan 23 18:30:48 2018

DevTools: Add stopping status to the native heap profile recording.

Drive-by: increase sampling interval to 64KiB.

BUG= 803276 

Change-Id: Iaa460d8ee65884d345960268e773fcadfeed1da9
Reviewed-on: https://chromium-review.googlesource.com/879748
Commit-Queue: Alexei Filippov <alph@chromium.org>
Reviewed-by: Andrey Kosyakov <caseq@chromium.org>
Cr-Commit-Position: refs/heads/master@{#531282}
[modify] https://crrev.com/59ae56fddd4f7b232ac327e86b8c333bd165bde3/third_party/WebKit/Source/devtools/front_end/profiler/HeapProfileView.js
[modify] https://crrev.com/59ae56fddd4f7b232ac327e86b8c333bd165bde3/third_party/WebKit/Source/devtools/front_end/sdk/HeapProfilerModel.js

Project Member

Comment 6 by bugdroid1@chromium.org, Jan 25 2018

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

commit 8ce7a58b7af092b5b51f5ffc5e18e656e55fb570
Author: Alexei Filippov <alph@chromium.org>
Date: Thu Jan 25 19:38:39 2018

Sampling Heap Profiler: Return only samples recorded during the session.

The SamplingNativeHeapProfiler::GetSamples used to return all the
memory allocation samples recorded since first call to Start.

Make it return samples recorded since arbitrary Start event.

BUG= 803276 

Change-Id: I66de31267c6e976a02988c0d85df3c46ae00cd9b
Reviewed-on: https://chromium-review.googlesource.com/879431
Commit-Queue: Alexei Filippov <alph@chromium.org>
Reviewed-by: Pavel Feldman <pfeldman@chromium.org>
Reviewed-by: Primiano Tucci <primiano@chromium.org>
Cr-Commit-Position: refs/heads/master@{#531978}
[modify] https://crrev.com/8ce7a58b7af092b5b51f5ffc5e18e656e55fb570/third_party/WebKit/Source/core/inspector/InspectorMemoryAgent.cpp
[modify] https://crrev.com/8ce7a58b7af092b5b51f5ffc5e18e656e55fb570/third_party/WebKit/Source/core/inspector/InspectorMemoryAgent.h
[modify] https://crrev.com/8ce7a58b7af092b5b51f5ffc5e18e656e55fb570/third_party/WebKit/Source/platform/memory_profiler/SamplingNativeHeapProfiler.cpp
[modify] https://crrev.com/8ce7a58b7af092b5b51f5ffc5e18e656e55fb570/third_party/WebKit/Source/platform/memory_profiler/SamplingNativeHeapProfiler.h

Project Member

Comment 7 by bugdroid1@chromium.org, Jan 26 2018

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

commit 70e7884a44c52ff8013faff7a9ac48e9174fba23
Author: Alexei Filippov <alph@chromium.org>
Date: Fri Jan 26 18:46:39 2018

Sampling Heap Profiler: Optimize fast path of the allocation hooks.

Do not create Sample object ahead.
Moved all the hooks into the SamplingNativeHeapProfiler class to improve
code readability.

BUG= 803276 

Change-Id: I88a920c338d19fc89689c3f797d2c002a3d976cb
Reviewed-on: https://chromium-review.googlesource.com/879595
Commit-Queue: Alexei Filippov <alph@chromium.org>
Reviewed-by: Pavel Feldman <pfeldman@chromium.org>
Reviewed-by: Primiano Tucci <primiano@chromium.org>
Cr-Commit-Position: refs/heads/master@{#532028}
[modify] https://crrev.com/70e7884a44c52ff8013faff7a9ac48e9174fba23/third_party/WebKit/Source/platform/memory_profiler/SamplingNativeHeapProfiler.cpp
[modify] https://crrev.com/70e7884a44c52ff8013faff7a9ac48e9174fba23/third_party/WebKit/Source/platform/memory_profiler/SamplingNativeHeapProfiler.h

Project Member

Comment 8 by bugdroid1@chromium.org, Jan 27 2018

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

commit 9877275d8c2ba6115b61703accc433385d4522f8
Author: Alexei Filippov <alph@chromium.org>
Date: Sat Jan 27 08:26:52 2018

Sampling Heap Profiler: Add --sampling-heap-profiler command-line switch.

The patch adds --sampling-heap-profiler command-line switch that enables
profiler at the renderer process startup.
If the rate is not provided it uses the default sampling interval of 128 KiB.

BUG= 803276 

Change-Id: I6da0e5fc5083a20b8eec7dc987df6105db24b6d7
Reviewed-on: https://chromium-review.googlesource.com/882604
Commit-Queue: Alexei Filippov <alph@chromium.org>
Reviewed-by: Pavel Feldman <pfeldman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#532204}
[modify] https://crrev.com/9877275d8c2ba6115b61703accc433385d4522f8/chrome/browser/about_flags.cc
[modify] https://crrev.com/9877275d8c2ba6115b61703accc433385d4522f8/chrome/browser/flag_descriptions.cc
[modify] https://crrev.com/9877275d8c2ba6115b61703accc433385d4522f8/chrome/browser/flag_descriptions.h
[modify] https://crrev.com/9877275d8c2ba6115b61703accc433385d4522f8/content/browser/renderer_host/render_process_host_impl.cc
[modify] https://crrev.com/9877275d8c2ba6115b61703accc433385d4522f8/content/public/common/content_switches.cc
[modify] https://crrev.com/9877275d8c2ba6115b61703accc433385d4522f8/content/public/common/content_switches.h
[modify] https://crrev.com/9877275d8c2ba6115b61703accc433385d4522f8/content/renderer/renderer_main.cc
[modify] https://crrev.com/9877275d8c2ba6115b61703accc433385d4522f8/third_party/WebKit/Source/platform/memory_profiler/SamplingNativeHeapProfiler.cpp
[modify] https://crrev.com/9877275d8c2ba6115b61703accc433385d4522f8/third_party/WebKit/Source/platform/memory_profiler/SamplingNativeHeapProfiler.h
[modify] https://crrev.com/9877275d8c2ba6115b61703accc433385d4522f8/third_party/WebKit/public/BUILD.gn
[add] https://crrev.com/9877275d8c2ba6115b61703accc433385d4522f8/third_party/WebKit/public/platform/SamplingHeapProfiler.h
[modify] https://crrev.com/9877275d8c2ba6115b61703accc433385d4522f8/tools/metrics/histograms/enums.xml

Project Member

Comment 9 by bugdroid1@chromium.org, Jan 27 2018

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

commit 0ed5a808697b9b36ef56bd53c0f0f210c0f3f2f3
Author: Alexei Filippov <alph@chromium.org>
Date: Sat Jan 27 17:20:58 2018

DevTools: Introduce Memory.getAllTimeSamplingProfile command

It retrieves the currently collected native heap sampling snapshot.
The renderer process had to be started with --sampling-heap-profiler flag to
obtain the snapshot.

BUG= 803276 

Change-Id: I26ffe5e366abb33245d2f83ffa02bd4350737b7a
Reviewed-on: https://chromium-review.googlesource.com/882290
Commit-Queue: Alexei Filippov <alph@chromium.org>
Reviewed-by: Pavel Feldman <pfeldman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#532233}
[modify] https://crrev.com/0ed5a808697b9b36ef56bd53c0f0f210c0f3f2f3/third_party/WebKit/LayoutTests/ASANExpectations
[modify] https://crrev.com/0ed5a808697b9b36ef56bd53c0f0f210c0f3f2f3/third_party/WebKit/LayoutTests/MSANExpectations
[modify] https://crrev.com/0ed5a808697b9b36ef56bd53c0f0f210c0f3f2f3/third_party/WebKit/LayoutTests/TestExpectations
[modify] https://crrev.com/0ed5a808697b9b36ef56bd53c0f0f210c0f3f2f3/third_party/WebKit/LayoutTests/VirtualTestSuites
[add] https://crrev.com/0ed5a808697b9b36ef56bd53c0f0f210c0f3f2f3/third_party/WebKit/LayoutTests/inspector-protocol/memory/sampling-native-snapshot-expected.txt
[add] https://crrev.com/0ed5a808697b9b36ef56bd53c0f0f210c0f3f2f3/third_party/WebKit/LayoutTests/inspector-protocol/memory/sampling-native-snapshot.js
[add] https://crrev.com/0ed5a808697b9b36ef56bd53c0f0f210c0f3f2f3/third_party/WebKit/LayoutTests/virtual/sampling-heap-profiler/inspector-protocol/memory/README.txt
[add] https://crrev.com/0ed5a808697b9b36ef56bd53c0f0f210c0f3f2f3/third_party/WebKit/LayoutTests/virtual/sampling-heap-profiler/inspector-protocol/memory/sampling-native-snapshot-expected.txt
[modify] https://crrev.com/0ed5a808697b9b36ef56bd53c0f0f210c0f3f2f3/third_party/WebKit/Source/core/inspector/InspectorMemoryAgent.cpp
[modify] https://crrev.com/0ed5a808697b9b36ef56bd53c0f0f210c0f3f2f3/third_party/WebKit/Source/core/inspector/InspectorMemoryAgent.h
[modify] https://crrev.com/0ed5a808697b9b36ef56bd53c0f0f210c0f3f2f3/third_party/WebKit/Source/core/inspector/browser_protocol.json
[modify] https://crrev.com/0ed5a808697b9b36ef56bd53c0f0f210c0f3f2f3/third_party/WebKit/Source/core/inspector/browser_protocol.pdl
[modify] https://crrev.com/0ed5a808697b9b36ef56bd53c0f0f210c0f3f2f3/third_party/WebKit/Source/core/inspector/inspector_protocol_config.json

Project Member

Comment 11 by bugdroid1@chromium.org, Jan 27 2018

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

commit bb975bfe5e972bf297e17decc9865d9672b8edf9
Author: Alexei Filippov <alph@chromium.org>
Date: Sat Jan 27 19:36:47 2018

Sampling Heap Profiler: Avoid SEGV crashes when allocation is aligned with a page.

BUG= 803276 

Change-Id: I1722ef6d2a9b529919189d7babb767bfc7cbbf83
Reviewed-on: https://chromium-review.googlesource.com/888328
Commit-Queue: Alexei Filippov <alph@chromium.org>
Reviewed-by: Pavel Feldman <pfeldman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#532243}
[modify] https://crrev.com/bb975bfe5e972bf297e17decc9865d9672b8edf9/third_party/WebKit/Source/platform/memory_profiler/SamplingNativeHeapProfiler.cpp
[modify] https://crrev.com/bb975bfe5e972bf297e17decc9865d9672b8edf9/third_party/WebKit/Source/platform/memory_profiler/SamplingNativeHeapProfiler.h

Project Member

Comment 12 by bugdroid1@chromium.org, Jan 30 2018

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

commit 47502d85407025dbe30c794032b5fbcde003126f
Author: Alexei Filippov <alph@chromium.org>
Date: Mon Jan 29 23:58:59 2018

Sampling Heap Profiler: Simplify allocator hooks logic.

Do not place magic constant before the sampled allocations.
This have the following benefits:
  - Much simpler logic of allocator hooks.
  - Will later allow easily hook Oilpan allocator and PartitionAlloc
    as they do not allow shimming, but just provide observers interface.

The only negative effect is lower performance, but it will be addressed
in an upcoming patch.

BUG= 803276 

Change-Id: Ia3de003f0b7286a1be4e62a33be28b1770f73018
Reviewed-on: https://chromium-review.googlesource.com/890819
Commit-Queue: Alexei Filippov <alph@chromium.org>
Reviewed-by: Pavel Feldman <pfeldman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#532672}
[modify] https://crrev.com/47502d85407025dbe30c794032b5fbcde003126f/third_party/WebKit/Source/platform/memory_profiler/SamplingNativeHeapProfiler.cpp
[modify] https://crrev.com/47502d85407025dbe30c794032b5fbcde003126f/third_party/WebKit/Source/platform/memory_profiler/SamplingNativeHeapProfiler.h

Project Member

Comment 13 by bugdroid1@chromium.org, Jan 30 2018

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

commit 46639e2ffee652f42c6882c4ebb52d367db3b732
Author: Alexei Filippov <alph@chromium.org>
Date: Tue Jan 30 03:39:12 2018

Sampling Heap Profiler: Implement MacOS specific alloc hooks

The following hooks are implemented:
  - batch_malloc_function
  - batch_free_function
  - free_definite_size_function

BUG= 803276 

Change-Id: Icea416e33ec87674c4829115aa99f086cc09f4c5
Reviewed-on: https://chromium-review.googlesource.com/884742
Commit-Queue: Alexei Filippov <alph@chromium.org>
Reviewed-by: Primiano Tucci <primiano@chromium.org>
Cr-Commit-Position: refs/heads/master@{#532743}
[modify] https://crrev.com/46639e2ffee652f42c6882c4ebb52d367db3b732/third_party/WebKit/Source/platform/memory_profiler/SamplingNativeHeapProfiler.cpp

Project Member

Comment 14 by bugdroid1@chromium.org, Jan 30 2018

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

commit 2101dec0ae7536a18b74e6f492a8fc90fc524e3b
Author: Alexei Filippov <alph@chromium.org>
Date: Tue Jan 30 07:18:54 2018

Sampling Heap Profiler: Refactor move allocator hooks into an anonymous namespace.

After the hooks being simplified it doesn't make sense to have them in the class.

BUG= 803276 

Change-Id: I201f8edb6638ef5b9de97ca05b2b16c8e2fcd3c0
Reviewed-on: https://chromium-review.googlesource.com/891551
Commit-Queue: Alexei Filippov <alph@chromium.org>
Reviewed-by: Primiano Tucci <primiano@chromium.org>
Cr-Commit-Position: refs/heads/master@{#532799}
[modify] https://crrev.com/2101dec0ae7536a18b74e6f492a8fc90fc524e3b/third_party/WebKit/Source/platform/memory_profiler/SamplingNativeHeapProfiler.cpp
[modify] https://crrev.com/2101dec0ae7536a18b74e6f492a8fc90fc524e3b/third_party/WebKit/Source/platform/memory_profiler/SamplingNativeHeapProfiler.h

Project Member

Comment 15 by bugdroid1@chromium.org, Jan 31 2018

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

commit 694c17b5a343567e70f8d59977d15374d02bb19a
Author: Alexei Filippov <alph@chromium.org>
Date: Wed Jan 31 03:45:50 2018

DevTools: Cache symbolized addresses for faster access in MemoryAgent.

BUG= 803276 

Change-Id: I2076d974810c247ec79ac36897a54dc58e80c4a9
Reviewed-on: https://chromium-review.googlesource.com/894884
Reviewed-by: Pavel Feldman <pfeldman@chromium.org>
Commit-Queue: Alexei Filippov <alph@chromium.org>
Cr-Commit-Position: refs/heads/master@{#533189}
[modify] https://crrev.com/694c17b5a343567e70f8d59977d15374d02bb19a/third_party/WebKit/Source/core/inspector/InspectorMemoryAgent.cpp
[modify] https://crrev.com/694c17b5a343567e70f8d59977d15374d02bb19a/third_party/WebKit/Source/core/inspector/InspectorMemoryAgent.h

Project Member

Comment 16 by bugdroid1@chromium.org, Feb 6 2018

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

commit 45d52b4fa28ff0c9c840b7f25e109a7a502313aa
Author: Alexei Filippov <alph@chromium.org>
Date: Tue Feb 06 18:48:36 2018

Sampling Heap Profiler: Implement lock free version on MaybeFreeSample

It is not necessary to hold a lock while looking for a sample in
the samples_ std::unordered_map container unless container is modified.

BUG= 803276 

Change-Id: I1305e848f01860f89d6c631b7af44ffa3a900f0b
Reviewed-on: https://chromium-review.googlesource.com/891651
Commit-Queue: Alexei Filippov <alph@chromium.org>
Reviewed-by: Primiano Tucci <primiano@chromium.org>
Cr-Commit-Position: refs/heads/master@{#534736}
[modify] https://crrev.com/45d52b4fa28ff0c9c840b7f25e109a7a502313aa/third_party/WebKit/Source/platform/memory_profiler/SamplingNativeHeapProfiler.cpp

Project Member

Comment 17 by bugdroid1@chromium.org, Feb 7 2018

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

commit 9fbb754e04fc4484b2198fd43632b0a5a5f0ea2d
Author: Alexei Filippov <alph@chromium.org>
Date: Wed Feb 07 09:56:57 2018

Sampling Heap Profiler: Move profiler to WebKit/common/heap_profiler

BUG= 803276 

Change-Id: I3e8391fa2fe8a78b29e8ee14323ae0d01671e911
Reviewed-on: https://chromium-review.googlesource.com/900683
Commit-Queue: Alexei Filippov <alph@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Cr-Commit-Position: refs/heads/master@{#534969}
[modify] https://crrev.com/9fbb754e04fc4484b2198fd43632b0a5a5f0ea2d/content/renderer/renderer_main.cc
[modify] https://crrev.com/9fbb754e04fc4484b2198fd43632b0a5a5f0ea2d/third_party/WebKit/Source/core/inspector/InspectorMemoryAgent.cpp
[modify] https://crrev.com/9fbb754e04fc4484b2198fd43632b0a5a5f0ea2d/third_party/WebKit/Source/platform/BUILD.gn
[delete] https://crrev.com/6dcaabf221e9d6a0061ff609b5c24f0a370d5f1b/third_party/WebKit/Source/platform/memory_profiler/DEPS
[delete] https://crrev.com/6dcaabf221e9d6a0061ff609b5c24f0a370d5f1b/third_party/WebKit/Source/platform/memory_profiler/SamplingNativeHeapProfiler.h
[modify] https://crrev.com/9fbb754e04fc4484b2198fd43632b0a5a5f0ea2d/third_party/WebKit/common/BUILD.gn
[rename] https://crrev.com/9fbb754e04fc4484b2198fd43632b0a5a5f0ea2d/third_party/WebKit/common/sampling_heap_profiler/OWNERS
[rename] https://crrev.com/9fbb754e04fc4484b2198fd43632b0a5a5f0ea2d/third_party/WebKit/common/sampling_heap_profiler/sampling_heap_profiler.cc
[add] https://crrev.com/9fbb754e04fc4484b2198fd43632b0a5a5f0ea2d/third_party/WebKit/common/sampling_heap_profiler/sampling_heap_profiler.h
[modify] https://crrev.com/9fbb754e04fc4484b2198fd43632b0a5a5f0ea2d/third_party/WebKit/public/BUILD.gn
[delete] https://crrev.com/6dcaabf221e9d6a0061ff609b5c24f0a370d5f1b/third_party/WebKit/public/platform/SamplingHeapProfiler.h

Project Member

Comment 19 by bugdroid1@chromium.org, Feb 8 2018

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

commit 13bf5029406a500474a86d03c13d1247107a1ffa
Author: Alexei Filippov <alph@chromium.org>
Date: Thu Feb 08 05:25:59 2018

Sampling Heap Profiler: Streamline sample selection algorithm.

BUG= 803276 

Change-Id: I19fe0a833f78a2d032d49c0b8753ed46a9e3d703
Reviewed-on: https://chromium-review.googlesource.com/879533
Commit-Queue: Alexei Filippov <alph@chromium.org>
Reviewed-by: Primiano Tucci <primiano@chromium.org>
Cr-Commit-Position: refs/heads/master@{#535310}
[modify] https://crrev.com/13bf5029406a500474a86d03c13d1247107a1ffa/third_party/WebKit/common/sampling_heap_profiler/sampling_heap_profiler.cc
[modify] https://crrev.com/13bf5029406a500474a86d03c13d1247107a1ffa/third_party/WebKit/common/sampling_heap_profiler/sampling_heap_profiler.h

Project Member

Comment 20 by bugdroid1@chromium.org, Feb 10 2018

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

commit 6cd45c9b4593ee8599bdfdd61ded66c9959b4ac8
Author: Alexei Filippov <alph@chromium.org>
Date: Sat Feb 10 03:29:15 2018

Sampling Heap Profiler: Enable browser heap sampling under the --sampling-heap-profiler flag.

BUG= 803276 

Change-Id: I296f73a684ba291cc26570a91afd9ced100c43fb
Reviewed-on: https://chromium-review.googlesource.com/911876
Reviewed-by: Pavel Feldman <pfeldman@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Alexei Filippov <alph@chromium.org>
Cr-Commit-Position: refs/heads/master@{#535948}
[modify] https://crrev.com/6cd45c9b4593ee8599bdfdd61ded66c9959b4ac8/content/browser/browser_main_runner.cc
[modify] https://crrev.com/6cd45c9b4593ee8599bdfdd61ded66c9959b4ac8/third_party/WebKit/common/sampling_heap_profiler/sampling_heap_profiler.cc

Project Member

Comment 21 by bugdroid1@chromium.org, Feb 10 2018

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

commit 0ba932e552bc64309a799fe1efcc74c6a19c944a
Author: Alexei Filippov <alph@chromium.org>
Date: Sat Feb 10 07:49:01 2018

Sampling Heap Profiler: Add synthetic node for V8 heap into the profile

With the synthetic node it is easier to see what portion of renderer memory belongs to V8

BUG= 803276 

Change-Id: I86d3ffdd4aaca1ad432ee4c78b781287ff0f82ef
Reviewed-on: https://chromium-review.googlesource.com/912748
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Alexei Filippov <alph@chromium.org>
Cr-Commit-Position: refs/heads/master@{#535968}
[modify] https://crrev.com/0ba932e552bc64309a799fe1efcc74c6a19c944a/third_party/WebKit/Source/core/inspector/InspectorMemoryAgent.cpp

Project Member

Comment 22 by bugdroid1@chromium.org, Feb 10 2018

Project Member

Comment 23 by bugdroid1@chromium.org, Feb 10 2018

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

commit 0585261703927f02ced2365e34980510147eb077
Author: Alexei Filippov <alph@chromium.org>
Date: Sat Feb 10 08:22:29 2018

Sampling Heap Profiler: Add SamplesObserver interface

The interface allows various clients to collect extra data on samples.
E.g. DevTools heap profilers may collect JS stacks.

BUG= 803276 

Change-Id: I34e90a7df59d11f726564671b54f31e1a6f8cfa4
Reviewed-on: https://chromium-review.googlesource.com/911970
Commit-Queue: Alexei Filippov <alph@chromium.org>
Reviewed-by: Pavel Feldman <pfeldman@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Cr-Commit-Position: refs/heads/master@{#535970}
[modify] https://crrev.com/0585261703927f02ced2365e34980510147eb077/third_party/WebKit/common/BUILD.gn
[modify] https://crrev.com/0585261703927f02ced2365e34980510147eb077/third_party/WebKit/common/sampling_heap_profiler/sampling_heap_profiler.cc
[modify] https://crrev.com/0585261703927f02ced2365e34980510147eb077/third_party/WebKit/common/sampling_heap_profiler/sampling_heap_profiler.h
[add] https://crrev.com/0585261703927f02ced2365e34980510147eb077/third_party/WebKit/common/sampling_heap_profiler/sampling_heap_profiler_unittest.cc

Project Member

Comment 24 by bugdroid1@chromium.org, Feb 21 2018

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

commit 8371762a9f479195f22f0254344da6a17c534bb5
Author: Alexei Filippov <alph@chromium.org>
Date: Wed Feb 21 21:44:40 2018

Sampling Heap Profiler: Move the profiler into base/

BUG= 803276 

Change-Id: Ie834f66cdfa6c5e1dcfc4059022e7b5779b379ab
Reviewed-on: https://chromium-review.googlesource.com/913111
Commit-Queue: Alexei Filippov <alph@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Pavel Feldman <pfeldman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#538218}
[modify] https://crrev.com/8371762a9f479195f22f0254344da6a17c534bb5/base/BUILD.gn
[rename] https://crrev.com/8371762a9f479195f22f0254344da6a17c534bb5/base/sampling_heap_profiler/OWNERS
[rename] https://crrev.com/8371762a9f479195f22f0254344da6a17c534bb5/base/sampling_heap_profiler/sampling_heap_profiler.cc
[rename] https://crrev.com/8371762a9f479195f22f0254344da6a17c534bb5/base/sampling_heap_profiler/sampling_heap_profiler.h
[rename] https://crrev.com/8371762a9f479195f22f0254344da6a17c534bb5/base/sampling_heap_profiler/sampling_heap_profiler_unittest.cc
[modify] https://crrev.com/8371762a9f479195f22f0254344da6a17c534bb5/content/browser/browser_main_runner.cc
[modify] https://crrev.com/8371762a9f479195f22f0254344da6a17c534bb5/content/browser/devtools/protocol/memory_handler.cc
[modify] https://crrev.com/8371762a9f479195f22f0254344da6a17c534bb5/content/renderer/renderer_main.cc
[add] https://crrev.com/8371762a9f479195f22f0254344da6a17c534bb5/third_party/WebKit/Source/core/inspector/DEPS
[modify] https://crrev.com/8371762a9f479195f22f0254344da6a17c534bb5/third_party/WebKit/Source/core/inspector/InspectorMemoryAgent.cpp
[modify] https://crrev.com/8371762a9f479195f22f0254344da6a17c534bb5/third_party/WebKit/Tools/Scripts/audit-non-blink-usage.py
[modify] https://crrev.com/8371762a9f479195f22f0254344da6a17c534bb5/third_party/WebKit/common/BUILD.gn

Project Member

Comment 25 by bugdroid1@chromium.org, Feb 22 2018

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

commit 1eb85b5b661df3ecd4673910ac569c11aa2fc636
Author: Alexei Filippov <alph@chromium.org>
Date: Thu Feb 22 03:58:47 2018

Sampling Heap Profiler: support plugging external allocators.

BUG= 803276 

Change-Id: I84724327d63fd2563f431855687841674533bbb7
Reviewed-on: https://chromium-review.googlesource.com/912663
Commit-Queue: Alexei Filippov <alph@chromium.org>
Reviewed-by: Primiano Tucci <primiano@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Cr-Commit-Position: refs/heads/master@{#538342}
[modify] https://crrev.com/1eb85b5b661df3ecd4673910ac569c11aa2fc636/base/sampling_heap_profiler/sampling_heap_profiler.cc
[modify] https://crrev.com/1eb85b5b661df3ecd4673910ac569c11aa2fc636/base/sampling_heap_profiler/sampling_heap_profiler.h

Project Member

Comment 27 by bugdroid1@chromium.org, Mar 1 2018

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

commit 3b50778ff955b420c0f66e47ddd0186fdd258879
Author: Alexei Filippov <alph@chromium.org>
Date: Thu Mar 01 04:12:30 2018

Sampling Heap Profiler: Do not try to symbolize stacks on platforms other than Linux

The symbolization is not supported there anyway.

BUG= 803276 

Change-Id: I2e0a6663f11dc1f3563e7c087929d592bc5e495b
Reviewed-on: https://chromium-review.googlesource.com/942201
Reviewed-by: Pavel Feldman <pfeldman@chromium.org>
Commit-Queue: Alexei Filippov <alph@chromium.org>
Cr-Commit-Position: refs/heads/master@{#540043}
[modify] https://crrev.com/3b50778ff955b420c0f66e47ddd0186fdd258879/third_party/WebKit/Source/core/inspector/InspectorMemoryAgent.cpp

Project Member

Comment 29 by bugdroid1@chromium.org, Mar 1 2018

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

commit e6633efca4412abcbd803069587b31de807b36ab
Author: Alexei Filippov <alph@chromium.org>
Date: Thu Mar 01 19:31:58 2018

Sampling Heap Profiler: Replace count with total in sample record

Turned out the rounding made to calculate count could add significant
errors to the samples on regular allocation patterns. The patch
replaces count with the total value attributed to the sample.

BUG= 803276 

Change-Id: I2f40ad403275817696330d502dadfd76657a552a
Reviewed-on: https://chromium-review.googlesource.com/941734
Commit-Queue: Alexei Filippov <alph@chromium.org>
Reviewed-by: Pavel Feldman <pfeldman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#540252}
[modify] https://crrev.com/e6633efca4412abcbd803069587b31de807b36ab/base/sampling_heap_profiler/sampling_heap_profiler.cc
[modify] https://crrev.com/e6633efca4412abcbd803069587b31de807b36ab/base/sampling_heap_profiler/sampling_heap_profiler.h
[modify] https://crrev.com/e6633efca4412abcbd803069587b31de807b36ab/base/sampling_heap_profiler/sampling_heap_profiler_unittest.cc
[modify] https://crrev.com/e6633efca4412abcbd803069587b31de807b36ab/content/browser/devtools/protocol/memory_handler.cc
[modify] https://crrev.com/e6633efca4412abcbd803069587b31de807b36ab/third_party/WebKit/Source/core/inspector/InspectorMemoryAgent.cpp
[modify] https://crrev.com/e6633efca4412abcbd803069587b31de807b36ab/third_party/WebKit/Source/core/inspector/browser_protocol.json
[modify] https://crrev.com/e6633efca4412abcbd803069587b31de807b36ab/third_party/WebKit/Source/core/inspector/browser_protocol.pdl
[modify] https://crrev.com/e6633efca4412abcbd803069587b31de807b36ab/third_party/WebKit/Source/devtools/front_end/sdk/HeapProfilerModel.js

Project Member

Comment 30 by bugdroid1@chromium.org, Mar 12 2018

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

commit b956afc8367e2c2aa038b2afd37b204eca2c6dc8
Author: Alexei Filippov <alph@chromium.org>
Date: Mon Mar 12 22:41:08 2018

Sampling Heap Profiler: Use TLS for accumulated bytes.

The TLS version has the same performance compared to lock-free version,
and also has the following benefits:
  - simpler code
  - handles multithreaded allocations with higher accuracy

It although has a potential corner case issue when there are lots
or short living threads each allocating small amount of memory.

BUG= 803276 ,812262

Change-Id: Ie868f07b99559d8cc95d134eed6592bffe1f63aa
Reviewed-on: https://chromium-review.googlesource.com/944052
Commit-Queue: Alexei Filippov <alph@chromium.org>
Reviewed-by: Pavel Feldman <pfeldman@chromium.org>
Reviewed-by: Primiano Tucci <primiano@chromium.org>
Reviewed-by: Erik Chen <erikchen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#542635}
[modify] https://crrev.com/b956afc8367e2c2aa038b2afd37b204eca2c6dc8/base/sampling_heap_profiler/sampling_heap_profiler.cc
[modify] https://crrev.com/b956afc8367e2c2aa038b2afd37b204eca2c6dc8/base/sampling_heap_profiler/sampling_heap_profiler.h
[modify] https://crrev.com/b956afc8367e2c2aa038b2afd37b204eca2c6dc8/base/sampling_heap_profiler/sampling_heap_profiler_unittest.cc
[modify] https://crrev.com/b956afc8367e2c2aa038b2afd37b204eca2c6dc8/content/browser/browser_main_runner.cc
[modify] https://crrev.com/b956afc8367e2c2aa038b2afd37b204eca2c6dc8/content/renderer/renderer_main.cc

Project Member

Comment 31 by bugdroid1@chromium.org, May 23 2018

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

commit 0a57e5df6406a9817f3e941e6a31f3046b9021b3
Author: Alexei Filippov <alph@chromium.org>
Date: Wed May 23 18:13:55 2018

[sampling heap profiler] Speed up RecordFree by removing atomic locks.

The patch removes all the atomic-based locking from RecordFree function.
To make it work we prohibit rehashing the samples map. Instead if the
map comes close enough to the rehashing treshold, the map gets copied
into a larger one which becomes current for all future accesses from
the RecordFree function. To resolve the race with threads that might
currently run the RecordFree we keep all the previous copies of the map.

Performance wise it speeds up the sampler 2x on sampling interval of 128KB.
It comes at the cost of spending twice more memory for samples map.

BUG= 803276 

Change-Id: Icdcdfb7b168b10d9d83d1277328ccc7944d0d795
Reviewed-on: https://chromium-review.googlesource.com/1060088
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Reviewed-by: Primiano Tucci <primiano@chromium.org>
Commit-Queue: Alexei Filippov <alph@chromium.org>
Cr-Commit-Position: refs/heads/master@{#561159}
[add] https://crrev.com/0a57e5df6406a9817f3e941e6a31f3046b9021b3/base/sampling_heap_profiler/benchmark-octane.js
[modify] https://crrev.com/0a57e5df6406a9817f3e941e6a31f3046b9021b3/base/sampling_heap_profiler/sampling_heap_profiler.cc
[modify] https://crrev.com/0a57e5df6406a9817f3e941e6a31f3046b9021b3/base/sampling_heap_profiler/sampling_heap_profiler.h

Screenshot from 2018-07-09 15-49-38.png
280 KB View Download
Project Member

Comment 33 by bugdroid1@chromium.org, Jul 10

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

commit 496428b3980415dba7e6c7da69630a59091e506f
Author: Alexei Filippov <alph@chromium.org>
Date: Tue Jul 10 00:17:48 2018

DevTools: Initial implementation of text view for native memory profiles.

The text representation can be easily copied to the symbolization service.

BUG= 803276 

Change-Id: Ice8157f0ba7544be4b300d5a97df36d41cc02db6
Reviewed-on: https://chromium-review.googlesource.com/1130498
Reviewed-by: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Commit-Queue: Alexei Filippov <alph@chromium.org>
Cr-Commit-Position: refs/heads/master@{#573548}
[modify] https://crrev.com/496428b3980415dba7e6c7da69630a59091e506f/third_party/blink/renderer/devtools/front_end/profiler/HeapProfileView.js
[modify] https://crrev.com/496428b3980415dba7e6c7da69630a59091e506f/third_party/blink/renderer/devtools/front_end/profiler/ProfileView.js
[modify] https://crrev.com/496428b3980415dba7e6c7da69630a59091e506f/third_party/blink/renderer/devtools/front_end/profiler/profilesPanel.css

Project Member

Comment 35 by bugdroid1@chromium.org, Jul 10

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

commit 52601a565375e7e60fdee70568f5e85242b76441
Author: Alexei Filippov <alph@chromium.org>
Date: Tue Jul 10 20:16:55 2018

[sampling heap profiler] Support stack collection on Android

BUG= 803276 

Change-Id: I60d7925104b8614aa68c135d52f6089a76675d22
Reviewed-on: https://chromium-review.googlesource.com/1128630
Reviewed-by: Siddhartha S <ssid@chromium.org>
Commit-Queue: Alexei Filippov <alph@chromium.org>
Cr-Commit-Position: refs/heads/master@{#573880}
[modify] https://crrev.com/52601a565375e7e60fdee70568f5e85242b76441/base/sampling_heap_profiler/sampling_heap_profiler.cc
[modify] https://crrev.com/52601a565375e7e60fdee70568f5e85242b76441/base/sampling_heap_profiler/sampling_heap_profiler.h

Project Member

Comment 36 by bugdroid1@chromium.org, Jul 11

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

commit db0cac4eafdcc6cbd13e19eacc3eba15c15bfa2c
Author: Dirk Pranke <dpranke@chromium.org>
Date: Wed Jul 11 01:32:14 2018

Revert "[sampling heap profiler] Support stack collection on Android"

This reverts commit 52601a565375e7e60fdee70568f5e85242b76441.

Reason for revert: Speculatively reverting to see if this is confusing crashpad on the Mac somehow. See  crbug.com/862466 .

Original change's description:
> [sampling heap profiler] Support stack collection on Android
> 
> BUG= 803276 
> 
> Change-Id: I60d7925104b8614aa68c135d52f6089a76675d22
> Reviewed-on: https://chromium-review.googlesource.com/1128630
> Reviewed-by: Siddhartha S <ssid@chromium.org>
> Commit-Queue: Alexei Filippov <alph@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#573880}

TBR=alph@chromium.org,ssid@chromium.org

Change-Id: Ie7b4f8b20cd5526420ef836d3a21dda27d4090bb
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug:  803276 
Reviewed-on: https://chromium-review.googlesource.com/1132357
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Dirk Pranke <dpranke@chromium.org>
Cr-Commit-Position: refs/heads/master@{#574032}
[modify] https://crrev.com/db0cac4eafdcc6cbd13e19eacc3eba15c15bfa2c/base/sampling_heap_profiler/sampling_heap_profiler.cc
[modify] https://crrev.com/db0cac4eafdcc6cbd13e19eacc3eba15c15bfa2c/base/sampling_heap_profiler/sampling_heap_profiler.h

Project Member

Comment 37 by bugdroid1@chromium.org, Jul 11

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

commit 0a3c0496180f1a183b3ca8061440d3888ff0722a
Author: Dirk Pranke <dpranke@chromium.org>
Date: Wed Jul 11 22:26:10 2018

Reland "[sampling heap profiler] Support stack collection on Android"

This reverts commit db0cac4eafdcc6cbd13e19eacc3eba15c15bfa2c.

Reason for revert: The revert didn't affect anything, so re-landing.

Original change's description:
> Revert "[sampling heap profiler] Support stack collection on Android"
> 
> This reverts commit 52601a565375e7e60fdee70568f5e85242b76441.
> 
> Reason for revert: Speculatively reverting to see if this is confusing crashpad on the Mac somehow. See  crbug.com/862466 .
> 
> Original change's description:
> > [sampling heap profiler] Support stack collection on Android
> > 
> > BUG= 803276 
> > 
> > Change-Id: I60d7925104b8614aa68c135d52f6089a76675d22
> > Reviewed-on: https://chromium-review.googlesource.com/1128630
> > Reviewed-by: Siddhartha S <ssid@chromium.org>
> > Commit-Queue: Alexei Filippov <alph@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#573880}
> 
> TBR=alph@chromium.org,ssid@chromium.org
> 
> Change-Id: Ie7b4f8b20cd5526420ef836d3a21dda27d4090bb
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug:  803276 
> Reviewed-on: https://chromium-review.googlesource.com/1132357
> Reviewed-by: Dirk Pranke <dpranke@chromium.org>
> Commit-Queue: Dirk Pranke <dpranke@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#574032}

TBR=dpranke@chromium.org,alph@chromium.org,ssid@chromium.org

Change-Id: I41392b0836e75c25ae6b0b9aa243daeef95b6ee7
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug:  803276 
Reviewed-on: https://chromium-review.googlesource.com/1134142
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Dirk Pranke <dpranke@chromium.org>
Cr-Commit-Position: refs/heads/master@{#574379}
[modify] https://crrev.com/0a3c0496180f1a183b3ca8061440d3888ff0722a/base/sampling_heap_profiler/sampling_heap_profiler.cc
[modify] https://crrev.com/0a3c0496180f1a183b3ca8061440d3888ff0722a/base/sampling_heap_profiler/sampling_heap_profiler.h

Project Member

Comment 38 by bugdroid1@chromium.org, Jul 24

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

commit f63c9a8418e2cd7239537fefa820f8f41698a504
Author: Alexei Filippov <alph@chromium.org>
Date: Tue Jul 24 00:05:46 2018

[sampling heap profiler] Introduce ModuleCache

The class provides support for module lookups for
memory addresses.

BUG= 803276 
TBR=dcheng@chromium.org

Change-Id: Iaae0d70c6e7091ced6276e321321b74a6496255a
Reviewed-on: https://chromium-review.googlesource.com/1132545
Commit-Queue: Alexei Filippov <alph@chromium.org>
Reviewed-by: Mike Wittman <wittman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#577352}
[modify] https://crrev.com/f63c9a8418e2cd7239537fefa820f8f41698a504/base/BUILD.gn
[modify] https://crrev.com/f63c9a8418e2cd7239537fefa820f8f41698a504/base/profiler/native_stack_sampler.h
[modify] https://crrev.com/f63c9a8418e2cd7239537fefa820f8f41698a504/base/profiler/native_stack_sampler_mac.cc
[modify] https://crrev.com/f63c9a8418e2cd7239537fefa820f8f41698a504/base/profiler/native_stack_sampler_posix.cc
[modify] https://crrev.com/f63c9a8418e2cd7239537fefa820f8f41698a504/base/profiler/native_stack_sampler_win.cc
[modify] https://crrev.com/f63c9a8418e2cd7239537fefa820f8f41698a504/base/profiler/stack_sampling_profiler.cc
[modify] https://crrev.com/f63c9a8418e2cd7239537fefa820f8f41698a504/base/profiler/stack_sampling_profiler.h
[add] https://crrev.com/f63c9a8418e2cd7239537fefa820f8f41698a504/base/sampling_heap_profiler/module_cache.cc
[add] https://crrev.com/f63c9a8418e2cd7239537fefa820f8f41698a504/base/sampling_heap_profiler/module_cache.h
[add] https://crrev.com/f63c9a8418e2cd7239537fefa820f8f41698a504/base/sampling_heap_profiler/module_cache_unittest.cc

Cc: erikc...@chromium.org
Project Member

Comment 40 by bugdroid1@chromium.org, Aug 7

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

commit 920d2d6b702a22d77fce0a1782d207dc0c03719a
Author: Alexei Filippov <alph@chromium.org>
Date: Tue Aug 07 20:11:41 2018

[sampling heap profiler] Report modules through protocol.

To allow external symbolization the profile has to include modules info.

BUG= 803276 
TBR=pfeldman@chromium.org

Change-Id: I0802678210e07ec89a2d2e5eae9a02f7d5dc1568
Reviewed-on: https://chromium-review.googlesource.com/1147525
Reviewed-by: Alexei Filippov <alph@chromium.org>
Reviewed-by: Pavel Feldman <pfeldman@chromium.org>
Reviewed-by: Mike Wittman <wittman@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Alexei Filippov <alph@chromium.org>
Cr-Commit-Position: refs/heads/master@{#581323}
[modify] https://crrev.com/920d2d6b702a22d77fce0a1782d207dc0c03719a/base/sampling_heap_profiler/module_cache.cc
[modify] https://crrev.com/920d2d6b702a22d77fce0a1782d207dc0c03719a/base/sampling_heap_profiler/module_cache.h
[modify] https://crrev.com/920d2d6b702a22d77fce0a1782d207dc0c03719a/base/sampling_heap_profiler/module_cache_unittest.cc
[modify] https://crrev.com/920d2d6b702a22d77fce0a1782d207dc0c03719a/content/browser/devtools/protocol/memory_handler.cc
[modify] https://crrev.com/920d2d6b702a22d77fce0a1782d207dc0c03719a/third_party/blink/renderer/core/inspector/DEPS
[modify] https://crrev.com/920d2d6b702a22d77fce0a1782d207dc0c03719a/third_party/blink/renderer/core/inspector/browser_protocol.pdl
[modify] https://crrev.com/920d2d6b702a22d77fce0a1782d207dc0c03719a/third_party/blink/renderer/core/inspector/inspector_memory_agent.cc
[modify] https://crrev.com/920d2d6b702a22d77fce0a1782d207dc0c03719a/third_party/blink/tools/audit_non_blink_usage.py

Project Member

Comment 41 by bugdroid1@chromium.org, Aug 7

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

commit 6550945ca9be279faa97f3e87c386eb3954e8b2d
Author: Alexei Filippov <alph@chromium.org>
Date: Tue Aug 07 22:38:01 2018

DevTools: Report modules in Heap snapshot text view.

Module names and address offsets within the module can be used by
symbolizers to determine symbol names.

BUG= 803276 

Change-Id: Id3cca2b5f39a3e4f6bb5eb9ddd4c2bb8ec80ed68
Reviewed-on: https://chromium-review.googlesource.com/1159363
Commit-Queue: Alexei Filippov <alph@chromium.org>
Reviewed-by: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#581376}
[modify] https://crrev.com/6550945ca9be279faa97f3e87c386eb3954e8b2d/third_party/blink/renderer/devtools/front_end/profiler/HeapProfileView.js
[modify] https://crrev.com/6550945ca9be279faa97f3e87c386eb3954e8b2d/third_party/blink/renderer/devtools/front_end/sdk/HeapProfilerModel.js

Project Member

Comment 42 by bugdroid1@chromium.org, Aug 9

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

commit abf1475f425aa7cb6c00aa3a8d953dee03c1f9f9
Author: Alexei Filippov <alph@chromium.org>
Date: Thu Aug 09 15:39:45 2018

[sampling heap profiler] Implement CreateModuleForAddress for Win platform.

Also move the function and its helpers to ModuleCache.

BUG= 803276 
TBR=dcheng@chromium.org

Change-Id: I4a7e868f2c65e2da67d362a97ab2d92fe1d0c120
Reviewed-on: https://chromium-review.googlesource.com/1166206
Reviewed-by: Mike Wittman <wittman@chromium.org>

[modify] https://crrev.com/abf1475f425aa7cb6c00aa3a8d953dee03c1f9f9/base/BUILD.gn
[modify] https://crrev.com/abf1475f425aa7cb6c00aa3a8d953dee03c1f9f9/base/profiler/native_stack_sampler.h
[modify] https://crrev.com/abf1475f425aa7cb6c00aa3a8d953dee03c1f9f9/base/profiler/native_stack_sampler_mac.cc
[modify] https://crrev.com/abf1475f425aa7cb6c00aa3a8d953dee03c1f9f9/base/profiler/native_stack_sampler_posix.cc
[modify] https://crrev.com/abf1475f425aa7cb6c00aa3a8d953dee03c1f9f9/base/profiler/native_stack_sampler_win.cc
[modify] https://crrev.com/abf1475f425aa7cb6c00aa3a8d953dee03c1f9f9/base/profiler/stack_sampling_profiler.cc
[modify] https://crrev.com/abf1475f425aa7cb6c00aa3a8d953dee03c1f9f9/base/profiler/stack_sampling_profiler.h
[modify] https://crrev.com/abf1475f425aa7cb6c00aa3a8d953dee03c1f9f9/base/profiler/stack_sampling_profiler_unittest.cc
[modify] https://crrev.com/abf1475f425aa7cb6c00aa3a8d953dee03c1f9f9/base/profiler/win32_stack_frame_unwinder.cc
[modify] https://crrev.com/abf1475f425aa7cb6c00aa3a8d953dee03c1f9f9/base/sampling_heap_profiler/module_cache.cc
[modify] https://crrev.com/abf1475f425aa7cb6c00aa3a8d953dee03c1f9f9/base/sampling_heap_profiler/module_cache.h
[add] https://crrev.com/abf1475f425aa7cb6c00aa3a8d953dee03c1f9f9/base/sampling_heap_profiler/module_cache_mac.cc
[add] https://crrev.com/abf1475f425aa7cb6c00aa3a8d953dee03c1f9f9/base/sampling_heap_profiler/module_cache_posix.cc
[modify] https://crrev.com/abf1475f425aa7cb6c00aa3a8d953dee03c1f9f9/base/sampling_heap_profiler/module_cache_unittest.cc
[add] https://crrev.com/abf1475f425aa7cb6c00aa3a8d953dee03c1f9f9/base/sampling_heap_profiler/module_cache_win.cc
[modify] https://crrev.com/abf1475f425aa7cb6c00aa3a8d953dee03c1f9f9/components/metrics/call_stack_profile_builder.cc

Project Member

Comment 43 by bugdroid1@chromium.org, Aug 9

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

commit a944b0d7f322400a54def81b313f16b9e125167b
Author: Findit <findit-for-me@appspot.gserviceaccount.com>
Date: Thu Aug 09 16:05:28 2018

Revert "[sampling heap profiler] Implement CreateModuleForAddress for Win platform."

This reverts commit abf1475f425aa7cb6c00aa3a8d953dee03c1f9f9.

Reason for revert:

Findit (https://goo.gl/kROfz5) identified CL at revision abf1475f425aa7cb6c00aa3a8d953dee03c1f9f9 as the
culprit for failures in the build cycles as shown on:
https://findit-for-me.appspot.com/waterfall/culprit?key=ag9zfmZpbmRpdC1mb3ItbWVyRAsSDVdmU3VzcGVjdGVkQ0wiMWNocm9taXVtL2FiZjE0NzVmNDI1YWE3Y2I2YzAwYWEzYThkOTUzZGVlMDNjMWY5ZjkM

Sample Failed Build: https://ci.chromium.org/buildbot/chromium.linux/Cast%20Audio%20Linux/17825

Sample Failed Step: compile

Original change's description:
> [sampling heap profiler] Implement CreateModuleForAddress for Win platform.
> 
> Also move the function and its helpers to ModuleCache.
> 
> BUG= 803276 
> TBR=dcheng@chromium.org
> 
> Change-Id: I4a7e868f2c65e2da67d362a97ab2d92fe1d0c120
> Reviewed-on: https://chromium-review.googlesource.com/1166206
> Reviewed-by: Mike Wittman <wittman@chromium.org>


No-Presubmit: true
No-Tree-Checks: true
No-Try: true
BUG= 803276 

Change-Id: Ieca1fc42a251087652a2cad0ea84a2a34cfc2cce
Reviewed-on: https://chromium-review.googlesource.com/1169502

[modify] https://crrev.com/a944b0d7f322400a54def81b313f16b9e125167b/base/BUILD.gn
[modify] https://crrev.com/a944b0d7f322400a54def81b313f16b9e125167b/base/profiler/native_stack_sampler.h
[modify] https://crrev.com/a944b0d7f322400a54def81b313f16b9e125167b/base/profiler/native_stack_sampler_mac.cc
[modify] https://crrev.com/a944b0d7f322400a54def81b313f16b9e125167b/base/profiler/native_stack_sampler_posix.cc
[modify] https://crrev.com/a944b0d7f322400a54def81b313f16b9e125167b/base/profiler/native_stack_sampler_win.cc
[modify] https://crrev.com/a944b0d7f322400a54def81b313f16b9e125167b/base/profiler/stack_sampling_profiler.cc
[modify] https://crrev.com/a944b0d7f322400a54def81b313f16b9e125167b/base/profiler/stack_sampling_profiler.h
[modify] https://crrev.com/a944b0d7f322400a54def81b313f16b9e125167b/base/profiler/stack_sampling_profiler_unittest.cc
[modify] https://crrev.com/a944b0d7f322400a54def81b313f16b9e125167b/base/profiler/win32_stack_frame_unwinder.cc
[modify] https://crrev.com/a944b0d7f322400a54def81b313f16b9e125167b/base/sampling_heap_profiler/module_cache.cc
[modify] https://crrev.com/a944b0d7f322400a54def81b313f16b9e125167b/base/sampling_heap_profiler/module_cache.h
[delete] https://crrev.com/abf1475f425aa7cb6c00aa3a8d953dee03c1f9f9/base/sampling_heap_profiler/module_cache_mac.cc
[delete] https://crrev.com/abf1475f425aa7cb6c00aa3a8d953dee03c1f9f9/base/sampling_heap_profiler/module_cache_posix.cc
[modify] https://crrev.com/a944b0d7f322400a54def81b313f16b9e125167b/base/sampling_heap_profiler/module_cache_unittest.cc
[delete] https://crrev.com/abf1475f425aa7cb6c00aa3a8d953dee03c1f9f9/base/sampling_heap_profiler/module_cache_win.cc
[modify] https://crrev.com/a944b0d7f322400a54def81b313f16b9e125167b/components/metrics/call_stack_profile_builder.cc

Project Member

Comment 44 by bugdroid1@chromium.org, Aug 9

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

commit f328da79969437aee7de1c3ac77b3eca2b7a3c0a
Author: Alexei Filippov <alph@chromium.org>
Date: Thu Aug 09 19:12:10 2018

Reland "[sampling heap profiler] Implement CreateModuleForAddress for Win platform."

This is a reland of abf1475f425aa7cb6c00aa3a8d953dee03c1f9f9
Intended as a revert of Findit's revert of the above in CL
https://us1-mirror-chromium-review.googlesource.com/c/chromium/src/+/1169502
Rational: Due to Gerrit outage  http://crbug.com/872722 ,
we are reverting this CL. Please, re-land it after all clear is given.
If you have questions, please ask on the bug. Sorry for the inconvenience.


Original change's description:
> [sampling heap profiler] Implement CreateModuleForAddress for Win platform.
>
> Also move the function and its helpers to ModuleCache.
>
> BUG= 803276 
> TBR=dcheng@chromium.org
>
> Change-Id: I4a7e868f2c65e2da67d362a97ab2d92fe1d0c120
> Reviewed-on: https://chromium-review.googlesource.com/1166206
> Reviewed-by: Mike Wittman <wittman@chromium.org>

Bug:  803276 
Change-Id: Ie12a8be575005ce35de284907dd7cb5c4959eaf4
Reviewed-on: https://chromium-review.googlesource.com/1169844
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>

[modify] https://crrev.com/f328da79969437aee7de1c3ac77b3eca2b7a3c0a/base/BUILD.gn
[modify] https://crrev.com/f328da79969437aee7de1c3ac77b3eca2b7a3c0a/base/profiler/native_stack_sampler.h
[modify] https://crrev.com/f328da79969437aee7de1c3ac77b3eca2b7a3c0a/base/profiler/native_stack_sampler_mac.cc
[modify] https://crrev.com/f328da79969437aee7de1c3ac77b3eca2b7a3c0a/base/profiler/native_stack_sampler_posix.cc
[modify] https://crrev.com/f328da79969437aee7de1c3ac77b3eca2b7a3c0a/base/profiler/native_stack_sampler_win.cc
[modify] https://crrev.com/f328da79969437aee7de1c3ac77b3eca2b7a3c0a/base/profiler/stack_sampling_profiler.cc
[modify] https://crrev.com/f328da79969437aee7de1c3ac77b3eca2b7a3c0a/base/profiler/stack_sampling_profiler.h
[modify] https://crrev.com/f328da79969437aee7de1c3ac77b3eca2b7a3c0a/base/profiler/stack_sampling_profiler_unittest.cc
[modify] https://crrev.com/f328da79969437aee7de1c3ac77b3eca2b7a3c0a/base/profiler/win32_stack_frame_unwinder.cc
[modify] https://crrev.com/f328da79969437aee7de1c3ac77b3eca2b7a3c0a/base/sampling_heap_profiler/module_cache.cc
[modify] https://crrev.com/f328da79969437aee7de1c3ac77b3eca2b7a3c0a/base/sampling_heap_profiler/module_cache.h
[add] https://crrev.com/f328da79969437aee7de1c3ac77b3eca2b7a3c0a/base/sampling_heap_profiler/module_cache_mac.cc
[add] https://crrev.com/f328da79969437aee7de1c3ac77b3eca2b7a3c0a/base/sampling_heap_profiler/module_cache_posix.cc
[modify] https://crrev.com/f328da79969437aee7de1c3ac77b3eca2b7a3c0a/base/sampling_heap_profiler/module_cache_unittest.cc
[add] https://crrev.com/f328da79969437aee7de1c3ac77b3eca2b7a3c0a/base/sampling_heap_profiler/module_cache_win.cc
[modify] https://crrev.com/f328da79969437aee7de1c3ac77b3eca2b7a3c0a/components/metrics/call_stack_profile_builder.cc

Project Member

Comment 45 by bugdroid1@chromium.org, Aug 9

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

commit 052af253a58d9855eb88907243e053b80951afcd
Author: Andrii Shyshkalov <tandrii@chromium.org>
Date: Thu Aug 09 19:13:19 2018

Revert "[sampling heap profiler] Implement CreateModuleForAddress for Win platform."

This reverts commit abf1475f425aa7cb6c00aa3a8d953dee03c1f9f9.

Reason for revert: Due to Gerrit outage  http://crbug.com/872722 , we are reverting this CL. Please, re-land it after all clear is given. If you have questions, please ask on the bug. Sorry for the inconvenience.

Original change's description:
> [sampling heap profiler] Implement CreateModuleForAddress for Win platform.
> 
> Also move the function and its helpers to ModuleCache.
> 
> BUG= 803276 
> TBR=dcheng@chromium.org
> 
> Change-Id: I4a7e868f2c65e2da67d362a97ab2d92fe1d0c120
> Reviewed-on: https://chromium-review.googlesource.com/1166206
> Reviewed-by: Mike Wittman <wittman@chromium.org>

TBR=dcheng@chromium.org,wittman@chromium.org,alph@chromium.org

Change-Id: I40c0f339db1b4dbcb22805ab43959dfa1b5a0995
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug:  803276 
Reviewed-on: https://chromium-review.googlesource.com/1169866
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>

[modify] https://crrev.com/052af253a58d9855eb88907243e053b80951afcd/base/BUILD.gn
[modify] https://crrev.com/052af253a58d9855eb88907243e053b80951afcd/base/profiler/native_stack_sampler.h
[modify] https://crrev.com/052af253a58d9855eb88907243e053b80951afcd/base/profiler/native_stack_sampler_mac.cc
[modify] https://crrev.com/052af253a58d9855eb88907243e053b80951afcd/base/profiler/native_stack_sampler_posix.cc
[modify] https://crrev.com/052af253a58d9855eb88907243e053b80951afcd/base/profiler/native_stack_sampler_win.cc
[modify] https://crrev.com/052af253a58d9855eb88907243e053b80951afcd/base/profiler/stack_sampling_profiler.cc
[modify] https://crrev.com/052af253a58d9855eb88907243e053b80951afcd/base/profiler/stack_sampling_profiler.h
[modify] https://crrev.com/052af253a58d9855eb88907243e053b80951afcd/base/profiler/stack_sampling_profiler_unittest.cc
[modify] https://crrev.com/052af253a58d9855eb88907243e053b80951afcd/base/profiler/win32_stack_frame_unwinder.cc
[modify] https://crrev.com/052af253a58d9855eb88907243e053b80951afcd/base/sampling_heap_profiler/module_cache.cc
[modify] https://crrev.com/052af253a58d9855eb88907243e053b80951afcd/base/sampling_heap_profiler/module_cache.h
[delete] https://crrev.com/f328da79969437aee7de1c3ac77b3eca2b7a3c0a/base/sampling_heap_profiler/module_cache_mac.cc
[delete] https://crrev.com/f328da79969437aee7de1c3ac77b3eca2b7a3c0a/base/sampling_heap_profiler/module_cache_posix.cc
[modify] https://crrev.com/052af253a58d9855eb88907243e053b80951afcd/base/sampling_heap_profiler/module_cache_unittest.cc
[delete] https://crrev.com/f328da79969437aee7de1c3ac77b3eca2b7a3c0a/base/sampling_heap_profiler/module_cache_win.cc
[modify] https://crrev.com/052af253a58d9855eb88907243e053b80951afcd/components/metrics/call_stack_profile_builder.cc

Project Member

Comment 46 by bugdroid1@chromium.org, Aug 9

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

commit bf5264fd30724a56e42a1d29ece6c54063b842d1
Author: Alexei Filippov <alph@chromium.org>
Date: Thu Aug 09 23:48:14 2018

[sampling heap profiler] Implement CreateModuleForAddress for Win platform.

Also move the function and its helpers to ModuleCache.

BUG= 803276 
TBR=dcheng@chromium.org
TBR=wittman@chromium.org

Reviewed-on: https://chromium-review.googlesource.com/1166206
Reviewed-by: Mike Wittman <wittman@chromium.org>
Change-Id: I28ad62df7a3f2f597f1a4f36069c51b541e7dc29
Reviewed-on: https://chromium-review.googlesource.com/1169533
Reviewed-by: Alexei Filippov <alph@chromium.org>
Commit-Queue: Alexei Filippov <alph@chromium.org>
Cr-Commit-Position: refs/heads/master@{#581963}
[modify] https://crrev.com/bf5264fd30724a56e42a1d29ece6c54063b842d1/base/BUILD.gn
[modify] https://crrev.com/bf5264fd30724a56e42a1d29ece6c54063b842d1/base/profiler/native_stack_sampler.h
[modify] https://crrev.com/bf5264fd30724a56e42a1d29ece6c54063b842d1/base/profiler/native_stack_sampler_mac.cc
[modify] https://crrev.com/bf5264fd30724a56e42a1d29ece6c54063b842d1/base/profiler/native_stack_sampler_posix.cc
[modify] https://crrev.com/bf5264fd30724a56e42a1d29ece6c54063b842d1/base/profiler/native_stack_sampler_win.cc
[modify] https://crrev.com/bf5264fd30724a56e42a1d29ece6c54063b842d1/base/profiler/stack_sampling_profiler.cc
[modify] https://crrev.com/bf5264fd30724a56e42a1d29ece6c54063b842d1/base/profiler/stack_sampling_profiler.h
[modify] https://crrev.com/bf5264fd30724a56e42a1d29ece6c54063b842d1/base/profiler/stack_sampling_profiler_unittest.cc
[modify] https://crrev.com/bf5264fd30724a56e42a1d29ece6c54063b842d1/base/profiler/win32_stack_frame_unwinder.cc
[modify] https://crrev.com/bf5264fd30724a56e42a1d29ece6c54063b842d1/base/sampling_heap_profiler/module_cache.cc
[modify] https://crrev.com/bf5264fd30724a56e42a1d29ece6c54063b842d1/base/sampling_heap_profiler/module_cache.h
[add] https://crrev.com/bf5264fd30724a56e42a1d29ece6c54063b842d1/base/sampling_heap_profiler/module_cache_mac.cc
[add] https://crrev.com/bf5264fd30724a56e42a1d29ece6c54063b842d1/base/sampling_heap_profiler/module_cache_posix.cc
[modify] https://crrev.com/bf5264fd30724a56e42a1d29ece6c54063b842d1/base/sampling_heap_profiler/module_cache_unittest.cc
[add] https://crrev.com/bf5264fd30724a56e42a1d29ece6c54063b842d1/base/sampling_heap_profiler/module_cache_win.cc
[modify] https://crrev.com/bf5264fd30724a56e42a1d29ece6c54063b842d1/components/metrics/call_stack_profile_builder.cc
[modify] https://crrev.com/bf5264fd30724a56e42a1d29ece6c54063b842d1/components/metrics/call_stack_profile_builder_unittest.cc

Project Member

Comment 47 by bugdroid1@chromium.org, Aug 22

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

commit 90cec6adea6299184b6dde2377be8bd10867d299
Author: Alexei Filippov <alph@chromium.org>
Date: Wed Aug 22 16:21:06 2018

[sampling heap profiler] Adjust SamplesObserver interface to provide extra info.

OOPHP needs address, allocator type, and context fileds.

BUG= 803276 

Change-Id: Id2c93825921f768d7a10d779a2ac25c19c2b004b
Reviewed-on: https://chromium-review.googlesource.com/1183860
Reviewed-by: Erik Chen <erikchen@chromium.org>
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Alexei Filippov <alph@chromium.org>
Cr-Commit-Position: refs/heads/master@{#585035}
[modify] https://crrev.com/90cec6adea6299184b6dde2377be8bd10867d299/base/sampling_heap_profiler/sampling_heap_profiler.cc
[modify] https://crrev.com/90cec6adea6299184b6dde2377be8bd10867d299/base/sampling_heap_profiler/sampling_heap_profiler.h
[modify] https://crrev.com/90cec6adea6299184b6dde2377be8bd10867d299/base/sampling_heap_profiler/sampling_heap_profiler_unittest.cc
[modify] https://crrev.com/90cec6adea6299184b6dde2377be8bd10867d299/third_party/blink/renderer/platform/heap/process_heap.cc

Project Member

Comment 48 by bugdroid1@chromium.org, Aug 24

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

commit ad2bd7f6ac872d47fe976a63067d2e688a98dcd6
Author: Alexei Filippov <alph@chromium.org>
Date: Fri Aug 24 05:58:08 2018

[sampling heap profiler] Add a reentry guard for libmalloc hooks on MacOS.

On MacOS the implementation of libmalloc sometimes calls malloc recursively,
delegating allocations between zones. That causes our hooks being called
twice. The scoped guard allows us to detect that, and avoid double counting.

BUG= 803276 

Change-Id: I96bfa2c7cf29b0f21777033f259c2e2d8286b2e2
Reviewed-on: https://chromium-review.googlesource.com/1187831
Commit-Queue: Alexei Filippov <alph@chromium.org>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Reviewed-by: Erik Chen <erikchen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#585711}
[modify] https://crrev.com/ad2bd7f6ac872d47fe976a63067d2e688a98dcd6/base/sampling_heap_profiler/sampling_heap_profiler.cc

Project Member

Comment 49 by bugdroid1@chromium.org, Aug 27

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

commit d6363e4704d6cf99f816a4fecc7d912c5c76f186
Author: Alexei Filippov <alph@chromium.org>
Date: Mon Aug 27 19:31:39 2018

[sampling heap profiler] Extract Poisson sampler into a separate class.

Make Poisson sampler a separate class that is responsible for listening
for allocation and doing the sampling with given sampling interval.

SamplingHeapProfiler is now an observer of PoissonAllocationObserver.
Once a sample added it record the native stack and stores the sample
in the map. The list of recorded samples can then be retrieved by clients.

TBR=ajwong@chromium.org
BUG= 803276 

Change-Id: I1e568b9839d9cc0099704ba1b9f047c14a46a0ee
Reviewed-on: https://chromium-review.googlesource.com/1189713
Reviewed-by: Alexei Filippov <alph@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Erik Chen <erikchen@chromium.org>
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Commit-Queue: Alexei Filippov <alph@chromium.org>
Cr-Commit-Position: refs/heads/master@{#586369}
[modify] https://crrev.com/d6363e4704d6cf99f816a4fecc7d912c5c76f186/base/BUILD.gn
[add] https://crrev.com/d6363e4704d6cf99f816a4fecc7d912c5c76f186/base/sampling_heap_profiler/poisson_allocation_sampler.cc
[add] https://crrev.com/d6363e4704d6cf99f816a4fecc7d912c5c76f186/base/sampling_heap_profiler/poisson_allocation_sampler.h
[modify] https://crrev.com/d6363e4704d6cf99f816a4fecc7d912c5c76f186/base/sampling_heap_profiler/sampling_heap_profiler.cc
[modify] https://crrev.com/d6363e4704d6cf99f816a4fecc7d912c5c76f186/base/sampling_heap_profiler/sampling_heap_profiler.h
[modify] https://crrev.com/d6363e4704d6cf99f816a4fecc7d912c5c76f186/base/sampling_heap_profiler/sampling_heap_profiler_unittest.cc
[modify] https://crrev.com/d6363e4704d6cf99f816a4fecc7d912c5c76f186/base/threading/thread_local_storage.h
[modify] https://crrev.com/d6363e4704d6cf99f816a4fecc7d912c5c76f186/components/heap_profiling/test_driver.cc
[modify] https://crrev.com/d6363e4704d6cf99f816a4fecc7d912c5c76f186/components/services/heap_profiling/public/cpp/allocator_shim.cc
[modify] https://crrev.com/d6363e4704d6cf99f816a4fecc7d912c5c76f186/components/services/heap_profiling/public/cpp/sampling_profiler_wrapper.cc
[modify] https://crrev.com/d6363e4704d6cf99f816a4fecc7d912c5c76f186/components/services/heap_profiling/public/cpp/sampling_profiler_wrapper.h
[modify] https://crrev.com/d6363e4704d6cf99f816a4fecc7d912c5c76f186/content/browser/browser_main_runner_impl.cc
[modify] https://crrev.com/d6363e4704d6cf99f816a4fecc7d912c5c76f186/content/browser/devtools/protocol/memory_handler.cc
[modify] https://crrev.com/d6363e4704d6cf99f816a4fecc7d912c5c76f186/content/renderer/renderer_main.cc
[modify] https://crrev.com/d6363e4704d6cf99f816a4fecc7d912c5c76f186/third_party/blink/renderer/core/inspector/DEPS
[modify] https://crrev.com/d6363e4704d6cf99f816a4fecc7d912c5c76f186/third_party/blink/renderer/core/inspector/inspector_memory_agent.cc
[modify] https://crrev.com/d6363e4704d6cf99f816a4fecc7d912c5c76f186/third_party/blink/renderer/platform/DEPS
[modify] https://crrev.com/d6363e4704d6cf99f816a4fecc7d912c5c76f186/third_party/blink/renderer/platform/heap/DEPS
[modify] https://crrev.com/d6363e4704d6cf99f816a4fecc7d912c5c76f186/third_party/blink/renderer/platform/heap/process_heap.cc
[modify] https://crrev.com/d6363e4704d6cf99f816a4fecc7d912c5c76f186/third_party/blink/tools/audit_non_blink_usage.py

Project Member

Comment 50 by bugdroid1@chromium.org, Sep 14

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

commit bc379630527efbd444d70ab27872eb81d46c1567
Author: Alexei Filippov <alph@chromium.org>
Date: Fri Sep 14 22:29:06 2018

[sampling heap profiler] Fix memory leak caused by thread exit + TLS

During thread exits TLS clears its storage vector. If after that
a memory is allocated/deallocated profiler hooks gets triggered and
access the TLS which makes it reallocate the storage vector that
is then never deallocated.

The patch makes profiler do not rely on base::ThreadLocalStorage
and use the OS primitives directly.

BUG=881352, 803276 

Change-Id: I8493768e57e4121c9ce38d09c77f8d38b04941b3
Reviewed-on: https://chromium-review.googlesource.com/1225280
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: Erik Chen <erikchen@chromium.org>
Commit-Queue: Alexei Filippov <alph@chromium.org>
Cr-Commit-Position: refs/heads/master@{#591501}
[modify] https://crrev.com/bc379630527efbd444d70ab27872eb81d46c1567/base/sampling_heap_profiler/poisson_allocation_sampler.cc
[modify] https://crrev.com/bc379630527efbd444d70ab27872eb81d46c1567/base/sampling_heap_profiler/poisson_allocation_sampler.h
[modify] https://crrev.com/bc379630527efbd444d70ab27872eb81d46c1567/base/sampling_heap_profiler/sampling_heap_profiler.cc
[modify] https://crrev.com/bc379630527efbd444d70ab27872eb81d46c1567/base/sampling_heap_profiler/sampling_heap_profiler_unittest.cc
[modify] https://crrev.com/bc379630527efbd444d70ab27872eb81d46c1567/base/threading/thread_local_storage.h
[modify] https://crrev.com/bc379630527efbd444d70ab27872eb81d46c1567/chrome/common/heap_profiler_controller_unittest.cc

Project Member

Comment 51 by bugdroid1@chromium.org, Sep 18

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

commit 678cb250c00b84b1be0941c888cc939b3b498bc0
Author: Alexei Filippov <alph@chromium.org>
Date: Tue Sep 18 01:11:15 2018

[sampling heap profiler] Speedup sampler hooks

Move the cold code out of RecordAlloc function to make it inlineable.

BUG= 803276 

Change-Id: Ibfd8973e51f721d8b57b52f3718b116bfe368147
Reviewed-on: https://chromium-review.googlesource.com/1226513
Reviewed-by: Erik Chen <erikchen@chromium.org>
Commit-Queue: Alexei Filippov <alph@chromium.org>
Cr-Commit-Position: refs/heads/master@{#591905}
[modify] https://crrev.com/678cb250c00b84b1be0941c888cc939b3b498bc0/base/sampling_heap_profiler/poisson_allocation_sampler.cc
[modify] https://crrev.com/678cb250c00b84b1be0941c888cc939b3b498bc0/base/sampling_heap_profiler/poisson_allocation_sampler.h
[modify] https://crrev.com/678cb250c00b84b1be0941c888cc939b3b498bc0/base/sampling_heap_profiler/sampling_heap_profiler_unittest.cc

Project Member

Comment 52 by bugdroid1@chromium.org, Sep 19

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

commit 597ab41e0204c308eade08664cd19789b05f86ed
Author: Alexei Filippov <alph@chromium.org>
Date: Wed Sep 19 21:49:04 2018

[heap profiler] Do not record top 3 frames related to profiler.

That makes the stack traces more clean thus reducing confusion during
stack attribution.
As a bonus less data is collected and sent.

BUG= 803276 

Change-Id: I8d320a356594d3077feed593fe653db246bc12a6
Reviewed-on: https://chromium-review.googlesource.com/1232413
Commit-Queue: Alexei Filippov <alph@chromium.org>
Reviewed-by: Erik Chen <erikchen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#592558}
[modify] https://crrev.com/597ab41e0204c308eade08664cd19789b05f86ed/components/services/heap_profiling/public/cpp/allocator_shim.cc

Project Member

Comment 53 by bugdroid1@chromium.org, Oct 3

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

commit f823e9e727a40f637a177771ade64b4c2784f425
Author: Alexei Filippov <alph@chromium.org>
Date: Wed Oct 03 18:55:56 2018

[sampling heap profiler] Fix accounting for the very first allocation on a thread.

The sampler used to always record the very first allocation on each thread
because the accumulator is initialized with zero. The patch makes such
allocations be treates as all the others.

BUG= 803276 

Change-Id: I3eeec1e069ecc640e6c9756f707dfc336d16e159
Reviewed-on: https://chromium-review.googlesource.com/1257597
Commit-Queue: Alexei Filippov <alph@chromium.org>
Reviewed-by: Erik Chen <erikchen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#596306}
[modify] https://crrev.com/f823e9e727a40f637a177771ade64b4c2784f425/base/sampling_heap_profiler/poisson_allocation_sampler.cc

Status: Fixed (was: Started)

Sign in to add a comment