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

Issue 1629393003: Reland of [tracing] Dump child processes' memory metrics in browser (Closed)

Created:
4 years, 10 months ago by ssid
Modified:
4 years, 10 months ago
CC:
chromium-reviews, tracing+reviews_chromium.org, wfh+watch_chromium.org, darin-cc_chromium.org, jam, vmpstr+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@web_cache2_base
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Reland of [tracing] Dump child processes' memory metrics in browser (patchset #1 id:1 of https://codereview.chromium.org/1617263002/ ) Reason for revert: The crash was fixed in crrev.com/1620783002 Original issue's description: > Revert of [tracing] Dump child processes' memory metrics in browser (patchset #1 id:1 of https://codereview.chromium.org/1591553002/ ) > > Reason for revert: > TracingBrowserTest.TestMemoryInfra is failing on DrMemory bot with the following > error: > > UNADDRESSABLE ACCESS: reading 0x00000048-0x0000004c 4 byte(s) > # 0 base.dll!base::Thread::task_runner > [base\threading\thread.h:168] > # 1 base.dll!base::trace_event::MemoryDumpManager::CreateProcessDump > [base\trace_event\memory_dump_manager.cc:313] > # 2 content.dll!content::TracingControllerImpl::RequestGlobalMemoryDump > [content\browser\tracing\tracing_controller_impl.cc:1039] > # 3 content.dll!base::internal::Invoker<>::Run > [base\bind_internal.h:350] > > bug: crbug.com/580295 > > Original issue's description: > > Reland of [tracing] Dump child processes' memory metrics in browser (patchset #1 id:1 of https://codereview.chromium.org/1586893003/ ) > > > > The failure was due to flakiness fixed by crrev.com/1606983002. > > See crbug.com/578128. > > > > Original issue's description: > > > Revert of [tracing] Dump child processes' memory metrics in browser (patchset #15 id:400001 of https://codereview.chromium.org/1417003003/ ) > > > > > > Reason for revert: > > > This is suspected by Findit to cause failure in TracingBrowserTest.TestMemoryInfra under Mac ASan 64 Tests (1). > > > > > > Original issue's description: > > > > [tracing] Dump child processes' memory metrics in browser > > > > > > > > The sandbox in linux prevents the process from reading the process > > > > metrics file. To work around this issue, the browser process will now > > > > dump statistics of the child processes too. This requires the > > > > composable dumps support in trace viewer and telemetry. > > > > > > > > This CL makes following changes. > > > > 1. Move the process totals and memory maps dump provider into a single > > > > header as process_metrics_dump_provider in components/tracing. This is > > > > because it is not necessary to have this in base and now the provider > > > > knows/manages for different processes. Also the dump method are made to > > > > handle error better, since process can vanish while dumping. > > > > > > > > 2. Make the dump provider non-singleton and have a register / unregister > > > > that manages the lifetime of the dump providers. > > > > > > > > 3. The dump providers unregister using the new > > > > UnregisterAndDeleteDumpProviderAsync api added by crrev.com/1430073002. > > > > > > > > 4. On linux the browser process dumps metrics for all processes and on > > > > android the child processes can dump since seccomp sandbox is not > > > > enabled in android yet. > > > > > > > > 5. The proc/status file is human readable stats and is not guaranteed to > > > > have a field that is asked for. So, the NOTREACHED is removed in > > > > ReadProcStatusAndGetFieldAsSizeT. > > > > > > > > 6. Since we introduce other process dumps from browser process there > > > > could be races while unregistering and dumping. To test this, the > > > > browser test is updated. > > > > > > > > BUG=461788 > > > > > > > > Committed: https://crrev.com/4d77d76a42425282b1a3c5b7309db9b98e777f60 > > > > Cr-Commit-Position: refs/heads/master@{#369482} > > > > > > TBR=primiano@chromium.org,thakis@chromium.org,simonhatch@chromium.org,sievers@chromium.org,ssid@chromium.org > > > # Skipping CQ checks because original CL landed less than 1 days ago. > > > NOPRESUBMIT=true > > > NOTREECHECKS=true > > > NOTRY=true > > > BUG=461788 > > > > > > Committed: https://crrev.com/93aa967cfcb3e933000f169b9a4f7ac84dbd96da > > > Cr-Commit-Position: refs/heads/master@{#369535} > > > > TBR=primiano@chromium.org,thakis@chromium.org,simonhatch@chromium.org,sievers@chromium.org,huangs@chromium.org > > BUG=461788 > > CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel > > > > Committed: https://crrev.com/df4156349708e21844209290a2d3638b550e18b2 > > Cr-Commit-Position: refs/heads/master@{#370195} > > TBR=primiano@chromium.org,thakis@chromium.org,simonhatch@chromium.org,sievers@chromium.org,huangs@chromium.org,ssid@chromium.org > # Not skipping CQ checks because original CL landed more than 1 days ago. > BUG=461788 > > Committed: https://crrev.com/94bef8d8bf199e23102783a55a15c9f10bc88631 > Cr-Commit-Position: refs/heads/master@{#370836} TBR=primiano@chromium.org,thakis@chromium.org,simonhatch@chromium.org,sievers@chromium.org,huangs@chromium.org,oshima@chromium.org # Not skipping CQ checks because original CL landed more than 1 days ago. BUG=461788 Committed: https://crrev.com/e5fb5cd028dfd11dec74ffe183f4b5f360047989 Cr-Commit-Position: refs/heads/master@{#371495}

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+659 lines, -640 lines) Patch
M base/BUILD.gn View 6 chunks +0 lines, -11 lines 0 comments Download
M base/process/process_metrics_linux.cc View 1 chunk +2 lines, -1 line 0 comments Download
M base/trace_event/memory_dump_manager.cc View 2 chunks +0 lines, -18 lines 0 comments Download
D base/trace_event/process_memory_maps_dump_provider.h View 1 chunk +0 lines, -43 lines 0 comments Download
D base/trace_event/process_memory_maps_dump_provider.cc View 1 chunk +0 lines, -176 lines 0 comments Download
D base/trace_event/process_memory_maps_dump_provider_unittest.cc View 1 chunk +0 lines, -190 lines 0 comments Download
D base/trace_event/process_memory_totals_dump_provider.h View 1 chunk +0 lines, -48 lines 0 comments Download
D base/trace_event/process_memory_totals_dump_provider.cc View 1 chunk +0 lines, -92 lines 0 comments Download
D base/trace_event/process_memory_totals_dump_provider_unittest.cc View 1 chunk +0 lines, -48 lines 0 comments Download
M base/trace_event/trace_event.gypi View 3 chunks +0 lines, -12 lines 0 comments Download
M chrome/test/base/tracing_browsertest.cc View 1 chunk +11 lines, -1 line 0 comments Download
M components/components_tests.gyp View 1 chunk +1 line, -0 lines 0 comments Download
M components/tracing.gyp View 2 chunks +9 lines, -0 lines 0 comments Download
M components/tracing/BUILD.gn View 3 chunks +7 lines, -0 lines 0 comments Download
M components/tracing/child_memory_dump_manager_delegate_impl.cc View 2 chunks +9 lines, -0 lines 0 comments Download
A components/tracing/process_metrics_memory_dump_provider.h View 1 chunk +67 lines, -0 lines 0 comments Download
A components/tracing/process_metrics_memory_dump_provider.cc View 1 chunk +305 lines, -0 lines 0 comments Download
A components/tracing/process_metrics_memory_dump_provider_unittest.cc View 1 chunk +232 lines, -0 lines 0 comments Download
M content/browser/browser_main_loop.cc View 2 chunks +3 lines, -0 lines 0 comments Download
M content/browser/tracing/tracing_controller_impl.cc View 3 chunks +13 lines, -0 lines 0 comments Download

Messages

Total messages: 18 (6 generated)
ssid
Created Reland of [tracing] Dump child processes' memory metrics in browser
4 years, 10 months ago (2016-01-25 16:34:23 UTC) #1
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1629393003/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1629393003/1
4 years, 10 months ago (2016-01-25 18:11:32 UTC) #3
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_chromium_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/170796)
4 years, 10 months ago (2016-01-25 19:15:58 UTC) #5
Primiano Tucci (use gerrit)
LGTM as this seems a pure reland of 1417003003
4 years, 10 months ago (2016-01-25 19:29:35 UTC) #6
Primiano Tucci (use gerrit)
On 2016/01/25 19:29:35, Primiano Tucci wrote: > LGTM as this seems a pure reland of ...
4 years, 10 months ago (2016-01-25 19:31:55 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1629393003/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1629393003/1
4 years, 10 months ago (2016-01-25 19:34:30 UTC) #9
oshima
On 2016/01/25 19:34:30, commit-bot: I haz the power wrote: > CQ is trying da patch. ...
4 years, 10 months ago (2016-01-25 19:52:13 UTC) #10
Primiano Tucci (use gerrit)
On 2016/01/25 19:52:13, oshima wrote: > On 2016/01/25 19:34:30, commit-bot: I haz the power wrote: ...
4 years, 10 months ago (2016-01-25 20:13:30 UTC) #11
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/170868)
4 years, 10 months ago (2016-01-25 20:59:18 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1629393003/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1629393003/1
4 years, 10 months ago (2016-01-26 12:29:17 UTC) #15
commit-bot: I haz the power
Committed patchset #1 (id:1)
4 years, 10 months ago (2016-01-26 12:34:19 UTC) #16
commit-bot: I haz the power
4 years, 10 months ago (2016-01-26 12:36:33 UTC) #18
Message was sent while issue was closed.
Patchset 1 (id:??) landed as
https://crrev.com/e5fb5cd028dfd11dec74ffe183f4b5f360047989
Cr-Commit-Position: refs/heads/master@{#371495}

Powered by Google App Engine
This is Rietveld 408576698