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

Issue 1369253002: Add Web Resources usage to chrome://tracing. (Closed)

Created:
5 years, 2 months ago by ssid
Modified:
5 years, 2 months ago
CC:
chromium-reviews, tasak, bashi
Base URL:
https://chromium.googlesource.com/chromium/src.git@web_cache2_base
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add Web Resources usage to chrome://tracing. The web resources downloaded are stored in MemoryCache. These resources allocate memory from either PartitionAlloc or Discardable (PurgeableVector). This CL adds the memory usage of the resources to tracing. BUG=520842 Committed: https://crrev.com/695d47eaa44d789ada5e81bfc1758929df52af93 Cr-Commit-Position: refs/heads/master@{#355283}

Patch Set 1 #

Patch Set 2 : Nits/. #

Total comments: 19

Patch Set 3 : Addressing comments. #

Total comments: 12

Patch Set 4 : Fixes. #

Total comments: 2

Patch Set 5 : Fix purgeable_size. #

Patch Set 6 : Rebase. #

Patch Set 7 : Use singleton provider. #

Total comments: 17

Patch Set 8 : Fixes. #

Total comments: 2

Patch Set 9 : Fix names. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+183 lines, -3 lines) Patch
M third_party/WebKit/Source/core/core.gypi View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/fetch/MemoryCache.h View 1 2 3 4 5 6 2 chunks +4 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/fetch/MemoryCache.cpp View 1 2 3 4 5 6 7 8 4 chunks +13 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/fetch/Resource.h View 1 2 3 4 5 6 7 8 2 chunks +5 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/fetch/Resource.cpp View 1 2 3 4 5 6 7 8 2 chunks +28 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/fetch/ScriptResource.h View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/fetch/ScriptResource.cpp View 1 2 3 4 5 6 7 8 2 chunks +10 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/core/fetch/WebCacheMemoryDumpProvider.h View 1 2 3 4 5 6 7 1 chunk +41 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/core/fetch/WebCacheMemoryDumpProvider.cpp View 1 2 3 4 5 6 7 1 chunk +36 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/PurgeableVector.h View 2 chunks +3 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/PurgeableVector.cpp View 1 2 3 4 5 2 chunks +14 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/SharedBuffer.h View 2 chunks +4 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/SharedBuffer.cpp View 1 2 3 4 5 6 7 8 2 chunks +15 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/web/WebKit.cpp View 1 2 3 4 5 6 7 8 3 chunks +6 lines, -3 lines 0 comments Download

Messages

Total messages: 35 (6 generated)
ssid
+haraken Just a rough idea of adding MemoryCache to tracing. WDYT?
5 years, 2 months ago (2015-09-28 14:29:38 UTC) #2
haraken
Thanks for working on this! The lifetime management of Resources are pretty complicated... https://codereview.chromium.org/1369253002/diff/20001/third_party/WebKit/Source/core/fetch/Resource.cpp File ...
5 years, 2 months ago (2015-09-28 14:54:02 UTC) #3
ssid
Thanks for patient review. Actually this CL depends on 3 other CLs which are in ...
5 years, 2 months ago (2015-09-28 16:24:39 UTC) #5
haraken
https://codereview.chromium.org/1369253002/diff/20001/third_party/WebKit/Source/platform/SharedBuffer.cpp File third_party/WebKit/Source/platform/SharedBuffer.cpp (right): https://codereview.chromium.org/1369253002/diff/20001/third_party/WebKit/Source/platform/SharedBuffer.cpp#newcode418 third_party/WebKit/Source/platform/SharedBuffer.cpp:418: if (m_size - m_buffer.size() > 0) { On 2015/09/28 ...
5 years, 2 months ago (2015-09-29 02:44:48 UTC) #6
ssid
Thanks Made changes, expect for the TODO. https://codereview.chromium.org/1369253002/diff/60001/third_party/WebKit/Source/core/fetch/Resource.cpp File third_party/WebKit/Source/core/fetch/Resource.cpp (right): https://codereview.chromium.org/1369253002/diff/60001/third_party/WebKit/Source/core/fetch/Resource.cpp#newcode727 third_party/WebKit/Source/core/fetch/Resource.cpp:727: if (!hasClients() ...
5 years, 2 months ago (2015-09-29 11:06:37 UTC) #8
haraken
Thanks, LGTM https://codereview.chromium.org/1369253002/diff/100001/third_party/WebKit/Source/core/fetch/Resource.cpp File third_party/WebKit/Source/core/fetch/Resource.cpp (right): https://codereview.chromium.org/1369253002/diff/100001/third_party/WebKit/Source/core/fetch/Resource.cpp#newcode734 third_party/WebKit/Source/core/fetch/Resource.cpp:734: dump->AddScalar("purgeable_size", "bytes", isPurgeable() ? encodedSize() + overheadSize() ...
5 years, 2 months ago (2015-09-29 12:36:47 UTC) #9
ssid
Yes, Added !purged condition now. Thanks https://codereview.chromium.org/1369253002/diff/100001/third_party/WebKit/Source/core/fetch/Resource.cpp File third_party/WebKit/Source/core/fetch/Resource.cpp (right): https://codereview.chromium.org/1369253002/diff/100001/third_party/WebKit/Source/core/fetch/Resource.cpp#newcode734 third_party/WebKit/Source/core/fetch/Resource.cpp:734: dump->AddScalar("purgeable_size", "bytes", isPurgeable() ...
5 years, 2 months ago (2015-09-29 16:10:00 UTC) #10
ssid
I made some changes to code. The issue was: 1. The dump providers must be ...
5 years, 2 months ago (2015-10-12 16:16:00 UTC) #11
haraken
On 2015/10/12 16:16:00, ssid wrote: > I made some changes to code. The issue was: ...
5 years, 2 months ago (2015-10-13 00:09:38 UTC) #12
ssid
> Maybe can we refactor code so that MemoryCache is always initialized in > WebKit::initialize ...
5 years, 2 months ago (2015-10-13 16:53:03 UTC) #13
haraken
https://codereview.chromium.org/1369253002/diff/160001/third_party/WebKit/Source/core/fetch/WebCacheMemoryDumpProvider.h File third_party/WebKit/Source/core/fetch/WebCacheMemoryDumpProvider.h (right): https://codereview.chromium.org/1369253002/diff/160001/third_party/WebKit/Source/core/fetch/WebCacheMemoryDumpProvider.h#newcode15 third_party/WebKit/Source/core/fetch/WebCacheMemoryDumpProvider.h:15: class BLINK_PLATFORM_EXPORT WebCacheMemoryDumpProvider final : public WebMemoryDumpProvider { It ...
5 years, 2 months ago (2015-10-14 00:57:42 UTC) #14
ssid
https://codereview.chromium.org/1369253002/diff/160001/third_party/WebKit/Source/core/fetch/WebCacheMemoryDumpProvider.h File third_party/WebKit/Source/core/fetch/WebCacheMemoryDumpProvider.h (right): https://codereview.chromium.org/1369253002/diff/160001/third_party/WebKit/Source/core/fetch/WebCacheMemoryDumpProvider.h#newcode15 third_party/WebKit/Source/core/fetch/WebCacheMemoryDumpProvider.h:15: class BLINK_PLATFORM_EXPORT WebCacheMemoryDumpProvider final : public WebMemoryDumpProvider { On ...
5 years, 2 months ago (2015-10-14 05:01:22 UTC) #15
haraken
https://codereview.chromium.org/1369253002/diff/160001/third_party/WebKit/Source/core/fetch/WebCacheMemoryDumpProvider.h File third_party/WebKit/Source/core/fetch/WebCacheMemoryDumpProvider.h (right): https://codereview.chromium.org/1369253002/diff/160001/third_party/WebKit/Source/core/fetch/WebCacheMemoryDumpProvider.h#newcode15 third_party/WebKit/Source/core/fetch/WebCacheMemoryDumpProvider.h:15: class BLINK_PLATFORM_EXPORT WebCacheMemoryDumpProvider final : public WebMemoryDumpProvider { On ...
5 years, 2 months ago (2015-10-14 05:09:44 UTC) #16
ssid
https://codereview.chromium.org/1369253002/diff/160001/third_party/WebKit/Source/core/fetch/WebCacheMemoryDumpProvider.h File third_party/WebKit/Source/core/fetch/WebCacheMemoryDumpProvider.h (right): https://codereview.chromium.org/1369253002/diff/160001/third_party/WebKit/Source/core/fetch/WebCacheMemoryDumpProvider.h#newcode15 third_party/WebKit/Source/core/fetch/WebCacheMemoryDumpProvider.h:15: class BLINK_PLATFORM_EXPORT WebCacheMemoryDumpProvider final : public WebMemoryDumpProvider { On ...
5 years, 2 months ago (2015-10-14 06:13:17 UTC) #17
haraken
https://codereview.chromium.org/1369253002/diff/160001/third_party/WebKit/Source/core/fetch/WebCacheMemoryDumpProvider.h File third_party/WebKit/Source/core/fetch/WebCacheMemoryDumpProvider.h (right): https://codereview.chromium.org/1369253002/diff/160001/third_party/WebKit/Source/core/fetch/WebCacheMemoryDumpProvider.h#newcode15 third_party/WebKit/Source/core/fetch/WebCacheMemoryDumpProvider.h:15: class BLINK_PLATFORM_EXPORT WebCacheMemoryDumpProvider final : public WebMemoryDumpProvider { On ...
5 years, 2 months ago (2015-10-14 08:15:44 UTC) #18
haraken
Sorry about the review iterations. LGTM. https://codereview.chromium.org/1369253002/diff/160001/third_party/WebKit/Source/core/fetch/MemoryCache.cpp File third_party/WebKit/Source/core/fetch/MemoryCache.cpp (right): https://codereview.chromium.org/1369253002/diff/160001/third_party/WebKit/Source/core/fetch/MemoryCache.cpp#newcode68 third_party/WebKit/Source/core/fetch/MemoryCache.cpp:68: *gMemoryCache = cache; ...
5 years, 2 months ago (2015-10-14 09:04:08 UTC) #19
Primiano Tucci (use gerrit)
Thanks for the hard work! Can I get a trace to see how this looks ...
5 years, 2 months ago (2015-10-14 11:06:58 UTC) #21
ssid
Thanks for the review and suggestions. I made changes. I have uploaded a sample trace ...
5 years, 2 months ago (2015-10-14 12:06:40 UTC) #22
haraken
LGTM on my side. Thanks for working on this! The loading team is starting analyzing ...
5 years, 2 months ago (2015-10-14 12:57:21 UTC) #23
Primiano Tucci (use gerrit)
Just looked at the trace, the subtraction math looks to partition_alloc looks correct to me ...
5 years, 2 months ago (2015-10-14 13:32:26 UTC) #24
ssid
On 2015/10/14 13:32:26, Primiano Tucci wrote: > Just looked at the trace, the subtraction math ...
5 years, 2 months ago (2015-10-14 15:05:35 UTC) #25
ssid
On 2015/10/14 15:05:35, ssid wrote: > On 2015/10/14 13:32:26, Primiano Tucci wrote: > > Just ...
5 years, 2 months ago (2015-10-15 15:26:02 UTC) #26
haraken
On 2015/10/15 15:26:02, ssid wrote: > On 2015/10/14 15:05:35, ssid wrote: > > On 2015/10/14 ...
5 years, 2 months ago (2015-10-15 23:10:02 UTC) #27
Primiano Tucci (use gerrit)
OK, so considering that ssid is out for 4 days, I'd land this with your ...
5 years, 2 months ago (2015-10-16 09:46:33 UTC) #28
ssid
I removed the decoded size and changed the overhead to metadata. The encoded size is ...
5 years, 2 months ago (2015-10-21 12:42:57 UTC) #29
ssid
On 2015/10/21 12:42:57, ssid wrote: > I removed the decoded size and changed the overhead ...
5 years, 2 months ago (2015-10-21 13:53:56 UTC) #30
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1369253002/200001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1369253002/200001
5 years, 2 months ago (2015-10-21 13:54:38 UTC) #33
commit-bot: I haz the power
Committed patchset #9 (id:200001)
5 years, 2 months ago (2015-10-21 13:58:47 UTC) #34
commit-bot: I haz the power
5 years, 2 months ago (2015-10-21 13:59:27 UTC) #35
Message was sent while issue was closed.
Patchset 9 (id:??) landed as
https://crrev.com/695d47eaa44d789ada5e81bfc1758929df52af93
Cr-Commit-Position: refs/heads/master@{#355283}

Powered by Google App Engine
This is Rietveld 408576698