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 2525743002: Make URLRequestContext a MemoryDumpProvider (Abandoned) (Closed)

Created:
4 years, 1 month ago by xunjieli
Modified:
4 years ago
Reviewers:
eroman, davidben, ssid
CC:
chromium-reviews, grt+watch_chromium.org, cbentzel+watch_chromium.org, mmenke, Primiano Tucci (use gerrit)
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Make URLRequestContext a MemoryDumpProvider This CL makes URLRequestContext implement MemoryDumpProvider. URLRequestContext will call into relevant classes to gather memory usage stats via DumpMemoryStats(). This CL is mostly plumbing with the following exceptions: (1) SSLClientSocketImpl reports cert size and buffer size (2) SSLClientSessionCache reports cert size. (3) SdchManager reports dictionaries size. The goal of this CL is to lay a foundation on how the rest of net/ could be instrumented using MemmoryDumpProvider. Once this initial CL is reviewed and landed, there will be follow-up CLs to instrument other parts of net/ and make the instrumentation better. BUG=669108

Patch Set 1 #

Patch Set 2 : Fix Compile #

Patch Set 3 : Fix test #

Total comments: 4

Patch Set 4 : Fix a second test #

Patch Set 5 : Fix net::SourceStream #

Total comments: 2

Patch Set 6 : rebased to 7f3d142161b15869f6bea58ac43c5f52ce5834ac #

Total comments: 18

Patch Set 7 : unabstract and inline #

Patch Set 8 : unabstract and inline SourceStream::DumpMemoryStats #

Patch Set 9 : Address Eric's comments #

Patch Set 10 : self review #

Total comments: 14
Unified diffs Side-by-side diffs Delta from patch set Stats (+555 lines, -54 lines) Patch
M chrome/browser/io_thread.cc View 1 2 3 4 5 6 7 8 2 chunks +2 lines, -0 lines 1 comment Download
M chrome/browser/profiles/profile_io_data.cc View 3 chunks +4 lines, -0 lines 0 comments Download
M chrome/browser/safe_browsing/safe_browsing_service.cc View 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/ssl/chrome_expect_ct_reporter_unittest.cc View 1 2 3 4 5 6 7 8 2 chunks +10 lines, -8 lines 1 comment Download
M content/browser/appcache/appcache_request_handler_unittest.cc View 1 2 3 4 5 6 7 8 23 chunks +45 lines, -42 lines 1 comment Download
M net/base/sdch_manager.h View 1 2 3 4 5 6 7 8 2 chunks +9 lines, -0 lines 1 comment Download
M net/base/sdch_manager.cc View 1 2 3 4 5 6 7 8 2 chunks +37 lines, -0 lines 2 comments Download
M net/filter/brotli_source_stream.cc View 2 chunks +15 lines, -0 lines 1 comment Download
M net/filter/filter_source_stream.h View 1 2 3 4 5 6 7 8 3 chunks +16 lines, -0 lines 1 comment Download
M net/filter/filter_source_stream.cc View 2 chunks +9 lines, -0 lines 0 comments Download
M net/filter/sdch_source_stream.h View 3 chunks +5 lines, -1 line 0 comments Download
M net/filter/sdch_source_stream.cc View 2 chunks +15 lines, -0 lines 0 comments Download
M net/filter/source_stream.h View 1 2 3 4 5 6 7 2 chunks +12 lines, -0 lines 0 comments Download
M net/http/http_network_session.h View 1 2 3 4 5 2 chunks +9 lines, -0 lines 0 comments Download
M net/http/http_network_session.cc View 1 2 3 4 5 6 7 8 2 chunks +23 lines, -0 lines 1 comment Download
M net/net.gypi View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M net/socket/client_socket_pool_base.h View 1 3 chunks +9 lines, -0 lines 0 comments Download
M net/socket/client_socket_pool_base.cc View 1 2 3 4 5 6 7 8 2 chunks +28 lines, -0 lines 0 comments Download
M net/socket/client_socket_pool_manager.h View 1 2 3 4 5 2 chunks +5 lines, -0 lines 1 comment Download
M net/socket/client_socket_pool_manager_impl.h View 2 chunks +9 lines, -0 lines 0 comments Download
M net/socket/client_socket_pool_manager_impl.cc View 1 chunk +5 lines, -0 lines 0 comments Download
M net/socket/mock_client_socket_pool_manager.h View 1 chunk +2 lines, -0 lines 0 comments Download
M net/socket/mock_client_socket_pool_manager.cc View 1 chunk +3 lines, -0 lines 0 comments Download
M net/socket/socket_bio_adapter.h View 1 chunk +3 lines, -0 lines 0 comments Download
M net/socket/socket_bio_adapter.cc View 1 chunk +10 lines, -0 lines 0 comments Download
M net/socket/ssl_client_socket_impl.h View 2 chunks +9 lines, -0 lines 0 comments Download
M net/socket/ssl_client_socket_impl.cc View 2 chunks +43 lines, -0 lines 0 comments Download
M net/socket/ssl_client_socket_pool.h View 1 chunk +5 lines, -0 lines 0 comments Download
M net/socket/ssl_client_socket_pool.cc View 1 chunk +5 lines, -0 lines 0 comments Download
M net/socket/stream_socket.h View 1 2 3 4 5 6 2 chunks +12 lines, -0 lines 0 comments Download
M net/ssl/ssl_client_session_cache.h View 1 2 3 4 5 6 7 8 2 chunks +5 lines, -0 lines 2 comments Download
M net/ssl/ssl_client_session_cache.cc View 1 2 3 4 5 6 7 8 2 chunks +43 lines, -0 lines 1 comment Download
M net/url_request/url_request.h View 1 2 3 4 5 2 chunks +8 lines, -0 lines 0 comments Download
M net/url_request/url_request.cc View 1 2 3 4 5 6 7 8 2 chunks +13 lines, -0 lines 0 comments Download
M net/url_request/url_request_context.h View 5 chunks +20 lines, -2 lines 1 comment Download
M net/url_request/url_request_context.cc View 1 2 3 4 5 6 7 8 3 chunks +38 lines, -1 line 0 comments Download
A net/url_request/url_request_context_unittest.cc View 1 chunk +53 lines, -0 lines 0 comments Download
M net/url_request/url_request_job.h View 1 2 3 4 5 1 chunk +5 lines, -0 lines 0 comments Download
M net/url_request/url_request_job.cc View 1 2 3 4 2 chunks +9 lines, -0 lines 0 comments Download

Messages

Total messages: 55 (46 generated)
xunjieli
This is an initial draft. Eric, could you take a look at the overall approach? ...
4 years ago (2016-11-28 18:27:46 UTC) #21
eroman
general approach lg. I didn't dig through the entire CL, but tried to look for ...
4 years ago (2016-11-29 22:22:51 UTC) #41
xunjieli
Thanks for the quick reply. I will address the comments. I tried the non-abstract approach ...
4 years ago (2016-11-29 22:42:04 UTC) #42
eroman
I imagine that is due to component build. You should be able to fix it ...
4 years ago (2016-11-29 22:49:43 UTC) #43
xunjieli
Thanks a lot for the review! The change looks better and more manageable now after ...
4 years ago (2016-11-30 16:02:03 UTC) #46
eroman
lgtm. Splitting this into separate CLs sgtm https://codereview.chromium.org/2525743002/diff/400001/chrome/browser/io_thread.cc File chrome/browser/io_thread.cc (right): https://codereview.chromium.org/2525743002/diff/400001/chrome/browser/io_thread.cc#newcode897 chrome/browser/io_thread.cc:897: context->set_name_string("system"); maybe ...
4 years ago (2016-12-01 21:04:37 UTC) #51
xunjieli
Thanks a lot for the review! I will close this one and address the new ...
4 years ago (2016-12-01 21:48:24 UTC) #52
ssid
Please change the interface to pass around pmd instead of mad. Right now you are ...
4 years ago (2016-12-02 21:36:35 UTC) #54
xunjieli
4 years ago (2016-12-02 22:01:23 UTC) #55
Message was sent while issue was closed.
One quick reply on making SSLClientSessionCache as a standalone MDP below. I
will cc you and address other comments in upcoming CLs.

https://codereview.chromium.org/2525743002/diff/400001/net/ssl/ssl_client_ses...
File net/ssl/ssl_client_session_cache.h (right):

https://codereview.chromium.org/2525743002/diff/400001/net/ssl/ssl_client_ses...
net/ssl/ssl_client_session_cache.h:62: void
DumpMemoryStats(base::trace_event::ProcessMemoryDump* pmd);
On 2016/12/02 21:36:35, ssid wrote:
> I wonder if it is better to add a MemoryDumpProvider implementation to this
> class instead of calling this multiple times and dumping only the first time.
> This class already seems to implement MemoryCoordinatorClient, so it should be
> possible to implement MemoryDumpProvider.

There is an effort underway to tie it with a URLRequestContext (such that
SSLClientSessionCache won't be a singleton). I will keep it this way and not
make it into a MDP.

Powered by Google App Engine
This is Rietveld 408576698