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

Issue 2661333002: Track SimpleCache memory usage in net/ MemoryDumpProvider (Closed)

Created:
3 years, 10 months ago by xunjieli
Modified:
3 years, 10 months ago
Reviewers:
jkarlin, ssid, DmitrySkiba
CC:
chromium-reviews, cbentzel+watch_chromium.org, gavinp+disk_chromium.org, net-reviews_chromium.org, Primiano Tucci (use gerrit)
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Track SimpleCache memory usage in net/ MemoryDumpProvider This CL includes SimpleCache in net/ MemoryDumpProvider. BlockFile and In-memory cache will be implemented in a follow-up. BUG=669108 Review-Url: https://codereview.chromium.org/2661333002 Cr-Commit-Position: refs/heads/master@{#452541} Committed: https://chromium.googlesource.com/chromium/src/+/a0166f483ff1baccd7e2b0a3e8f2956c9ab1b3b6

Patch Set 1 #

Total comments: 6

Patch Set 2 : Address ssid comments #

Total comments: 4

Patch Set 3 : Attempt 2. Make estimate cover more #

Patch Set 4 : fix test compile #

Patch Set 5 : self #

Total comments: 2

Patch Set 6 : self review #

Total comments: 16

Patch Set 7 : Pure rebase before addressing comments #

Total comments: 3

Patch Set 8 : Address comments #

Total comments: 1

Patch Set 9 : fix signature #

Total comments: 6

Patch Set 10 : Address jkarlin@ comments #

Total comments: 6

Patch Set 11 : Pure rebase before addressing comments #

Patch Set 12 : address comments #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+181 lines, -1 line) Patch
M content/browser/cache_storage/cache_storage_cache_unittest.cc View 1 2 3 2 chunks +5 lines, -0 lines 0 comments Download
M net/disk_cache/backend_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 4 chunks +8 lines, -1 line 0 comments Download
M net/disk_cache/blockfile/backend_impl.h View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M net/disk_cache/blockfile/backend_impl.cc View 1 2 1 chunk +5 lines, -0 lines 0 comments Download
M net/disk_cache/disk_cache.h View 1 2 1 chunk +3 lines, -0 lines 0 comments Download
M net/disk_cache/memory/mem_backend_impl.h View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M net/disk_cache/memory/mem_backend_impl.cc View 1 2 1 chunk +5 lines, -0 lines 0 comments Download
M net/disk_cache/simple/simple_backend_impl.h View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M net/disk_cache/simple/simple_backend_impl.cc View 1 2 3 4 5 6 7 8 9 3 chunks +15 lines, -0 lines 2 comments Download
M net/disk_cache/simple/simple_entry_impl.h View 1 2 3 4 5 6 7 1 chunk +3 lines, -0 lines 0 comments Download
M net/disk_cache/simple/simple_entry_impl.cc View 1 2 3 4 5 6 7 8 9 3 chunks +17 lines, -0 lines 0 comments Download
M net/disk_cache/simple/simple_index.h View 1 2 3 4 5 6 7 1 chunk +3 lines, -0 lines 0 comments Download
M net/disk_cache/simple/simple_index.cc View 1 2 3 4 5 6 7 2 chunks +6 lines, -0 lines 0 comments Download
M net/http/http_cache.h View 1 2 3 4 5 6 7 8 9 3 chunks +9 lines, -0 lines 0 comments Download
M net/http/http_cache.cc View 1 2 3 4 5 6 7 8 9 10 11 5 chunks +37 lines, -0 lines 0 comments Download
M net/http/http_cache_transaction.h View 1 2 3 4 5 6 7 8 9 1 chunk +3 lines, -0 lines 0 comments Download
M net/http/http_cache_transaction.cc View 1 2 3 4 5 6 7 8 9 1 chunk +5 lines, -0 lines 0 comments Download
M net/http/http_cache_unittest.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +45 lines, -0 lines 0 comments Download
M net/http/mock_http_cache.h View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M net/http/mock_http_cache.cc View 1 2 3 4 5 6 7 1 chunk +4 lines, -0 lines 0 comments Download
M net/url_request/url_request_context.cc View 1 2 3 4 5 6 2 chunks +4 lines, -0 lines 0 comments Download

Messages

Total messages: 62 (36 generated)
xunjieli
Gavin and Sid: PTAL. Thanks!
3 years, 10 months ago (2017-01-31 20:49:09 UTC) #4
ssid
My main question here is do we have stats about how much memory other parts ...
3 years, 10 months ago (2017-01-31 22:24:20 UTC) #7
xunjieli
> My main question here is do we have stats about how much memory other ...
3 years, 10 months ago (2017-02-01 01:15:52 UTC) #8
ssid
On 2017/02/01 01:15:52, xunjieli wrote: > > My main question here is do we have ...
3 years, 10 months ago (2017-02-01 02:45:48 UTC) #9
pasko
On 2017/02/01 01:15:52, xunjieli wrote: > > My main question here is do we have ...
3 years, 10 months ago (2017-02-01 05:39:40 UTC) #10
xunjieli
My method is simply open a couple of tabs (with a reused profile) wait for ...
3 years, 10 months ago (2017-02-01 14:55:18 UTC) #12
ssid
lgtm thanks! https://codereview.chromium.org/2661333002/diff/80001/net/http/http_cache.cc File net/http/http_cache.cc (right): https://codereview.chromium.org/2661333002/diff/80001/net/http/http_cache.cc#newcode128 net/http/http_cache.cc:128: base::trace_event::EstimateMemoryUsage(writer) + Do we need to measure ...
3 years, 10 months ago (2017-02-02 19:30:01 UTC) #24
xunjieli
jkarlin@: PTAL at content/browser/cache_storage/cache_storage_cache_unittest.cc Gavin: a friendly ping! Thanks. https://codereview.chromium.org/2661333002/diff/80001/net/http/http_cache.cc File net/http/http_cache.cc (right): https://codereview.chromium.org/2661333002/diff/80001/net/http/http_cache.cc#newcode128 net/http/http_cache.cc:128: ...
3 years, 10 months ago (2017-02-03 17:30:27 UTC) #26
jkarlin
cache_storage/ lgtm
3 years, 10 months ago (2017-02-03 17:46:13 UTC) #27
pasko
On 2017/02/01 14:55:18, xunjieli wrote: > My method is simply open a couple of tabs ...
3 years, 10 months ago (2017-02-03 22:39:16 UTC) #32
xunjieli
On 2017/02/03 22:39:16, pasko wrote: > On 2017/02/01 14:55:18, xunjieli wrote: > > My method ...
3 years, 10 months ago (2017-02-03 22:44:40 UTC) #33
jkarlin
Removing gavinp@ as he is OOO for awhile. I'll take a look at net/ as ...
3 years, 10 months ago (2017-02-17 16:05:31 UTC) #35
jkarlin
Exciting! https://codereview.chromium.org/2661333002/diff/100001/net/disk_cache/simple/simple_backend_impl.cc File net/disk_cache/simple/simple_backend_impl.cc (right): https://codereview.chromium.org/2661333002/diff/100001/net/disk_cache/simple/simple_backend_impl.cc#newcode558 net/disk_cache/simple/simple_backend_impl.cc:558: base::trace_event::EstimateMemoryUsage(active_entries_); Too bad we don't support tracing closures, ...
3 years, 10 months ago (2017-02-17 17:43:06 UTC) #36
jkarlin
https://codereview.chromium.org/2661333002/diff/100001/net/http/http_cache.cc File net/http/http_cache.cc (right): https://codereview.chromium.org/2661333002/diff/100001/net/http/http_cache.cc#newcode129 net/http/http_cache.cc:129: base::trace_event::EstimateMemoryUsage(pending_queue); On 2017/02/17 17:43:06, jkarlin wrote: > + disk_entry ...
3 years, 10 months ago (2017-02-17 18:03:43 UTC) #37
jkarlin
https://codereview.chromium.org/2661333002/diff/100001/net/http/http_cache.cc File net/http/http_cache.cc (right): https://codereview.chromium.org/2661333002/diff/100001/net/http/http_cache.cc#newcode113 net/http/http_cache.cc:113: return base::trace_event::EstimateMemoryUsage(readers) + You'll need to EMU HttpCache::Transaction, which ...
3 years, 10 months ago (2017-02-17 18:13:08 UTC) #38
xunjieli
Dmitry: Could you take a look at the question below? Thank you. https://codereview.chromium.org/2661333002/diff/140001/net/disk_cache/simple/simple_backend_impl.cc File net/disk_cache/simple/simple_backend_impl.cc ...
3 years, 10 months ago (2017-02-17 22:59:11 UTC) #40
DmitrySkiba
On 2017/02/17 22:59:11, xunjieli wrote: > Dmitry: Could you take a look at the question ...
3 years, 10 months ago (2017-02-17 23:41:05 UTC) #41
xunjieli
Josh, thanks for the very helpful review! dskiba@ helped me with adding a static EMU() ...
3 years, 10 months ago (2017-02-21 15:20:39 UTC) #42
jkarlin
https://codereview.chromium.org/2661333002/diff/120001/net/disk_cache/simple/simple_index.cc File net/disk_cache/simple/simple_index.cc (right): https://codereview.chromium.org/2661333002/diff/120001/net/disk_cache/simple/simple_index.cc#newcode144 net/disk_cache/simple/simple_index.cc:144: return 0; At least index_file_ should be counted here ...
3 years, 10 months ago (2017-02-21 16:23:29 UTC) #45
xunjieli
Thanks! PTAL https://codereview.chromium.org/2661333002/diff/120001/net/disk_cache/simple/simple_index.h File net/disk_cache/simple/simple_index.h (right): https://codereview.chromium.org/2661333002/diff/120001/net/disk_cache/simple/simple_index.h#newcode62 net/disk_cache/simple/simple_index.h:62: size_t EstimateMemoryUsage() const; On 2017/02/21 16:23:29, jkarlin ...
3 years, 10 months ago (2017-02-21 19:44:14 UTC) #48
jkarlin
lgtm with a few comments https://codereview.chromium.org/2661333002/diff/180001/net/disk_cache/backend_unittest.cc File net/disk_cache/backend_unittest.cc (right): https://codereview.chromium.org/2661333002/diff/180001/net/disk_cache/backend_unittest.cc#newcode368 net/disk_cache/backend_unittest.cc:368: base::trace_event::EstimateMemoryUsage(cache_); Can you verify ...
3 years, 10 months ago (2017-02-23 15:14:57 UTC) #53
xunjieli
Thanks! https://codereview.chromium.org/2661333002/diff/180001/net/disk_cache/backend_unittest.cc File net/disk_cache/backend_unittest.cc (right): https://codereview.chromium.org/2661333002/diff/180001/net/disk_cache/backend_unittest.cc#newcode368 net/disk_cache/backend_unittest.cc:368: base::trace_event::EstimateMemoryUsage(cache_); On 2017/02/23 15:14:57, jkarlin wrote: > Can ...
3 years, 10 months ago (2017-02-23 16:40:59 UTC) #54
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2661333002/220001
3 years, 10 months ago (2017-02-23 16:41:52 UTC) #57
commit-bot: I haz the power
Committed patchset #12 (id:220001) as https://chromium.googlesource.com/chromium/src/+/a0166f483ff1baccd7e2b0a3e8f2956c9ab1b3b6
3 years, 10 months ago (2017-02-23 17:45:47 UTC) #60
jkarlin
https://codereview.chromium.org/2661333002/diff/220001/net/disk_cache/simple/simple_backend_impl.cc File net/disk_cache/simple/simple_backend_impl.cc (right): https://codereview.chromium.org/2661333002/diff/220001/net/disk_cache/simple/simple_backend_impl.cc#newcode211 net/disk_cache/simple/simple_backend_impl.cc:211: size_t EstimateMemoryUsage(const SimpleEntryImpl* const& entry_impl) { Have you verified ...
3 years, 10 months ago (2017-02-24 18:38:10 UTC) #61
xunjieli
3 years, 10 months ago (2017-02-24 18:42:18 UTC) #62
Message was sent while issue was closed.
https://codereview.chromium.org/2661333002/diff/220001/net/disk_cache/simple/...
File net/disk_cache/simple/simple_backend_impl.cc (right):

https://codereview.chromium.org/2661333002/diff/220001/net/disk_cache/simple/...
net/disk_cache/simple/simple_backend_impl.cc:211: size_t
EstimateMemoryUsage(const SimpleEntryImpl* const& entry_impl) {
On 2017/02/24 18:38:09, jkarlin wrote:
> Have you verified that this actually gets called? I don't see it defined in
the
> header.
> 
> I think we need more tests to verify that everything is actually being
counted.

I verified manually that this is called. (build chrome locally and get a trace
from chrome://tracing). The unit test (backend_unittest.cc) also enters this
code, but I am not sure what's the best way to write a stricter test expectation
(rather than using LT(0, EMU()).

Powered by Google App Engine
This is Rietveld 408576698