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

Issue 1906243002: [tracing] Add a memory dump provider for DOM storage (Closed)

Created:
4 years, 8 months ago by ssid
Modified:
4 years, 7 months ago
CC:
chromium-reviews, darin-cc_chromium.org, jam
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[tracing] Add a memory dump provider for DOM storage This CL adds a memory dump provider for DOM storage in browser. It only accounts for the memory usage of the buffer map and session storage database, not the local backing databases. This will be done in next CL. The areas can be accessed only on DOMStorageTaskRunner's PRIMARY_SEQUENCE. Since memory infra supports collection of dumps from SequencedTaskRunner, a SequencedTaskRunner is extracted from DOMStorageTaskRunner's worker pool to pass to memory-infra. BUG=605785 Committed: https://crrev.com/d0fd26c479bfa0b52f3764ee8925a1c82bf305ca Cr-Commit-Position: refs/heads/master@{#391455}

Patch Set 1 : #

Patch Set 2 : nits. #

Total comments: 4

Patch Set 3 : fix loop. #

Total comments: 2

Patch Set 4 : Fix test builds. #

Total comments: 4

Patch Set 5 : context_impl as mdp and merge cls. #

Patch Set 6 : nits. #

Total comments: 3

Patch Set 7 : add dchecks. #

Patch Set 8 : Fix unittests. #

Total comments: 4

Patch Set 9 : Fix dcheck and return value. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+158 lines, -3 lines) Patch
M content/browser/dom_storage/dom_storage_area.h View 1 2 3 4 2 chunks +9 lines, -0 lines 0 comments Download
M content/browser/dom_storage/dom_storage_area.cc View 1 2 3 4 5 6 2 chunks +30 lines, -0 lines 0 comments Download
M content/browser/dom_storage/dom_storage_context_impl.h View 1 2 3 4 4 chunks +8 lines, -2 lines 0 comments Download
M content/browser/dom_storage/dom_storage_context_impl.cc View 1 2 3 4 5 6 7 8 4 chunks +28 lines, -0 lines 0 comments Download
M content/browser/dom_storage/dom_storage_context_impl_unittest.cc View 1 2 3 4 5 6 7 3 chunks +7 lines, -1 line 0 comments Download
M content/browser/dom_storage/dom_storage_namespace.h View 1 2 3 4 5 6 7 8 2 chunks +9 lines, -0 lines 0 comments Download
M content/browser/dom_storage/dom_storage_namespace.cc View 1 2 3 4 5 6 7 8 1 chunk +7 lines, -0 lines 0 comments Download
M content/browser/dom_storage/dom_storage_task_runner.h View 1 2 3 3 chunks +9 lines, -0 lines 0 comments Download
M content/browser/dom_storage/dom_storage_task_runner.cc View 1 2 3 2 chunks +10 lines, -0 lines 0 comments Download
M content/browser/dom_storage/session_storage_database.h View 1 2 3 4 5 6 7 8 2 chunks +9 lines, -0 lines 0 comments Download
M content/browser/dom_storage/session_storage_database.cc View 1 2 3 4 5 6 7 8 2 chunks +32 lines, -0 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 40 (17 generated)
ssid
ptal, thanks.
4 years, 8 months ago (2016-04-21 23:40:53 UTC) #3
ssid
+michaeln This CL is to capture dom storage memory usage in tracing. ptal, thanks.
4 years, 8 months ago (2016-04-21 23:52:49 UTC) #5
Primiano Tucci (use gerrit)
LGTM from the memory-infra viewpoint. https://codereview.chromium.org/1906243002/diff/40001/content/browser/dom_storage/dom_storage_area.cc File content/browser/dom_storage/dom_storage_area.cc (right): https://codereview.chromium.org/1906243002/diff/40001/content/browser/dom_storage/dom_storage_area.cc#newcode346 content/browser/dom_storage/dom_storage_area.cc:346: std::string name = StringPrintf("dom_storage/%s/%p", ...
4 years, 8 months ago (2016-04-22 09:56:40 UTC) #6
ssid
done thanks. https://codereview.chromium.org/1906243002/diff/40001/content/browser/dom_storage/dom_storage_area.cc File content/browser/dom_storage/dom_storage_area.cc (right): https://codereview.chromium.org/1906243002/diff/40001/content/browser/dom_storage/dom_storage_area.cc#newcode346 content/browser/dom_storage/dom_storage_area.cc:346: std::string name = StringPrintf("dom_storage/%s/%p", url.c_str(), this); On ...
4 years, 8 months ago (2016-04-22 23:28:16 UTC) #8
michaeln
lgtm 2 https://codereview.chromium.org/1906243002/diff/60001/content/browser/dom_storage/dom_storage_area.cc File content/browser/dom_storage/dom_storage_area.cc (right): https://codereview.chromium.org/1906243002/diff/60001/content/browser/dom_storage/dom_storage_area.cc#newcode344 content/browser/dom_storage/dom_storage_area.cc:344: url[index] = '_'; From a privacy perspective, ...
4 years, 8 months ago (2016-04-22 23:39:42 UTC) #9
ssid
Thanks for the review. https://codereview.chromium.org/1906243002/diff/60001/content/browser/dom_storage/dom_storage_area.cc File content/browser/dom_storage/dom_storage_area.cc (right): https://codereview.chromium.org/1906243002/diff/60001/content/browser/dom_storage/dom_storage_area.cc#newcode344 content/browser/dom_storage/dom_storage_area.cc:344: url[index] = '_'; On 2016/04/22 ...
4 years, 8 months ago (2016-04-23 00:19:15 UTC) #11
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1906243002/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1906243002/100001
4 years, 8 months ago (2016-04-23 00:19:51 UTC) #13
michaeln
https://codereview.chromium.org/1906243002/diff/100001/content/browser/dom_storage/dom_storage_namespace.cc File content/browser/dom_storage/dom_storage_namespace.cc (right): https://codereview.chromium.org/1906243002/diff/100001/content/browser/dom_storage/dom_storage_namespace.cc#newcode44 content/browser/dom_storage/dom_storage_namespace.cc:44: base::trace_event::MemoryDumpManager::GetInstance()->UnregisterDumpProvider( is the thread-safety-ness of this dependent on the ...
4 years, 8 months ago (2016-04-23 00:28:38 UTC) #14
ssid
https://codereview.chromium.org/1906243002/diff/100001/content/browser/dom_storage/dom_storage_namespace.cc File content/browser/dom_storage/dom_storage_namespace.cc (right): https://codereview.chromium.org/1906243002/diff/100001/content/browser/dom_storage/dom_storage_namespace.cc#newcode44 content/browser/dom_storage/dom_storage_namespace.cc:44: base::trace_event::MemoryDumpManager::GetInstance()->UnregisterDumpProvider( On 2016/04/23 00:28:38, michaeln wrote: > is the ...
4 years, 8 months ago (2016-04-23 00:33:14 UTC) #15
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 8 months ago (2016-04-23 02:31:02 UTC) #17
ssid
On 2016/04/23 02:31:02, commit-bot: I haz the power wrote: > Dry run: This issue passed ...
4 years, 8 months ago (2016-04-25 21:24:28 UTC) #18
michaeln
This cl isn't threadsafe and i have haven't looked closely enough at the other to ...
4 years, 8 months ago (2016-04-25 21:44:20 UTC) #19
ssid
I merged both the CLs. added a single dump provider on the primary sequenced task ...
4 years, 8 months ago (2016-04-26 00:51:55 UTC) #22
michaeln
https://codereview.chromium.org/1906243002/diff/160001/content/browser/dom_storage/dom_storage_area.cc File content/browser/dom_storage/dom_storage_area.cc (right): https://codereview.chromium.org/1906243002/diff/160001/content/browser/dom_storage/dom_storage_area.cc#newcode337 content/browser/dom_storage/dom_storage_area.cc:337: void DOMStorageArea::OnMemoryDump(base::trace_event::ProcessMemoryDump* pmd) { do give people warm fuzzies, ...
4 years, 8 months ago (2016-04-26 22:56:25 UTC) #23
michaeln
> i bet there are cases where that is not true :( bah, redness... here's ...
4 years, 8 months ago (2016-04-27 00:07:44 UTC) #24
ssid
Sorry for late reply, I was travelling. On 2016/04/27 00:07:44, michaeln wrote: > > i ...
4 years, 7 months ago (2016-04-28 05:39:08 UTC) #25
michaeln
lgtm https://codereview.chromium.org/1906243002/diff/200001/content/browser/dom_storage/dom_storage_context_impl.cc File content/browser/dom_storage/dom_storage_context_impl.cc (right): https://codereview.chromium.org/1906243002/diff/200001/content/browser/dom_storage/dom_storage_context_impl.cc#newcode189 content/browser/dom_storage/dom_storage_context_impl.cc:189: void DOMStorageContextImpl::Shutdown() { DCHECK(!task_runner_ || task_runner_->IsRunningOnPrimarySequence()); Can you ...
4 years, 7 months ago (2016-05-02 22:47:12 UTC) #26
ssid
Thanks. fixed. https://codereview.chromium.org/1906243002/diff/160001/content/browser/dom_storage/dom_storage_area.cc File content/browser/dom_storage/dom_storage_area.cc (right): https://codereview.chromium.org/1906243002/diff/160001/content/browser/dom_storage/dom_storage_area.cc#newcode337 content/browser/dom_storage/dom_storage_area.cc:337: void DOMStorageArea::OnMemoryDump(base::trace_event::ProcessMemoryDump* pmd) { On 2016/04/26 22:56:25, ...
4 years, 7 months ago (2016-05-04 06:06:14 UTC) #29
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1906243002/260001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1906243002/260001
4 years, 7 months ago (2016-05-04 06:07:16 UTC) #31
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 7 months ago (2016-05-04 06:47:39 UTC) #33
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1906243002/260001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1906243002/260001
4 years, 7 months ago (2016-05-04 07:24:37 UTC) #36
commit-bot: I haz the power
Committed patchset #9 (id:260001)
4 years, 7 months ago (2016-05-04 07:28:57 UTC) #38
commit-bot: I haz the power
4 years, 7 months ago (2016-05-04 07:30:02 UTC) #40
Message was sent while issue was closed.
Patchset 9 (id:??) landed as
https://crrev.com/d0fd26c479bfa0b52f3764ee8925a1c82bf305ca
Cr-Commit-Position: refs/heads/master@{#391455}

Powered by Google App Engine
This is Rietveld 408576698