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

Issue 2363003: Rework the logging for sockets/connectjobs.... (Closed)

Created:
10 years, 7 months ago by eroman
Modified:
9 years, 6 months ago
CC:
chromium-reviews, cbentzel+watch_chromium.org, ben+cc_chromium.org, darin-cc_chromium.org, Paweł Hajdan Jr., Mike Belshe
Visibility:
Public.

Description

Rework the logging for sockets/connectjobs. In particular, make it work better when using backup jobs / late binding (the display was very confused before because of how these asynchronous events would nest). Also changed the paradigm for how PassiveLogCollector preserves these async associations -- this fixes how it replays the events to net-internals. (Before we would collapse the event streams into the SOURCE_URL_REQUEST which lost some hiearchy.. now I keep the separate streams). Some of the particular changes to the event streams: * ConnectJobs now create their own source stream internally. * Sockets are now bounded by +SOCKET_ALIVE / -SOCKET_ALIVE events (removed the one-off SOCKET_DONE event). * The socket log streams contains +SOCKET_IN_USE / -SOCKET_IN_USE event blocks to show which URLRequest was controlling it at various points in time (this makes it much easier to understand which read/writes belonged to a particular network transaction when a socket gets re-used). * ConnectJobs are bounded by +SOCKET_POOL_CONNECT_JOB / - SOCKET_POOL_CONNECT_JOB events. * ConnectJobs log the net error they failed with. * Removed the SOCKET_BACKUP_TIMER_EXTENDED event. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=48797

Patch Set 1 #

Patch Set 2 : '' #

Total comments: 18

Patch Set 3 : Address willchan's first batch of comments #

Patch Set 4 : Add missing files #

Patch Set 5 : Add some missing files that lead to compile error #

Total comments: 34

Patch Set 6 : Address first batch of willchan's comments #

Patch Set 7 : Address second batch of comments #

Patch Set 8 : Add missing file for windows #

Patch Set 9 : fix unsigned/singed mismatch #

Patch Set 10 : add two more unittest files that were missing #

Total comments: 6

Patch Set 11 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+816 lines, -1441 lines) Patch
M chrome/browser/dom_ui/net_internals_ui.cc View 4 5 6 7 8 9 10 1 chunk +1 line, -2 lines 0 comments Download
M chrome/browser/net/chrome_url_request_context.cc View 1 2 3 4 5 6 7 8 9 10 3 chunks +3 lines, -0 lines 0 comments Download
M chrome/browser/net/connection_tester.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/net/passive_log_collector.h View 1 2 3 4 5 6 7 8 9 10 11 chunks +100 lines, -77 lines 0 comments Download
M chrome/browser/net/passive_log_collector.cc View 1 2 3 4 5 6 7 8 9 10 14 chunks +201 lines, -344 lines 0 comments Download
M chrome/browser/net/passive_log_collector_unittest.cc View 1 2 3 4 5 6 7 8 9 10 8 chunks +189 lines, -827 lines 0 comments Download
M chrome/service/net/service_url_request_context.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +2 lines, -1 line 0 comments Download
M chrome_frame/test/test_server_test.cc View 8 9 10 1 chunk +2 lines, -1 line 0 comments Download
M net/base/net_log.h View 1 2 3 4 5 6 7 8 9 10 2 chunks +20 lines, -1 line 0 comments Download
M net/base/net_log.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +11 lines, -0 lines 0 comments Download
M net/base/net_log_event_type_list.h View 1 2 3 4 5 6 7 8 9 10 4 chunks +39 lines, -19 lines 0 comments Download
M net/base/net_log_source_type_list.h View 4 5 6 7 8 9 10 1 chunk +9 lines, -7 lines 0 comments Download
M net/http/http_cache.h View 1 2 3 4 5 6 7 8 9 10 3 chunks +3 lines, -0 lines 0 comments Download
M net/http/http_cache.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +3 lines, -1 line 0 comments Download
M net/http/http_network_layer.h View 1 2 3 4 5 6 7 8 9 10 4 chunks +6 lines, -2 lines 0 comments Download
M net/http/http_network_layer.cc View 1 2 3 4 5 6 7 8 9 10 5 chunks +11 lines, -4 lines 0 comments Download
net/http/http_network_layer_unittest.cc View 1 2 3 4 5 6 7 8 9 10 3 chunks +3 lines, -3 lines 0 comments Download
M net/http/http_network_session.h View 1 2 3 4 5 6 7 8 9 10 2 chunks +3 lines, -1 line 0 comments Download
M net/http/http_network_session.cc View 1 2 3 4 5 6 7 8 9 10 5 chunks +13 lines, -7 lines 0 comments Download
M net/http/http_network_transaction_unittest.cc View 1 2 3 4 5 6 7 8 9 10 3 chunks +5 lines, -4 lines 0 comments Download
M net/proxy/proxy_script_fetcher_unittest.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -1 line 0 comments Download
M net/socket/client_socket_handle.h View 1 2 3 4 5 6 7 8 9 10 3 chunks +5 lines, -0 lines 0 comments Download
M net/socket/client_socket_handle.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +10 lines, -0 lines 0 comments Download
M net/socket/client_socket_pool_base.h View 1 2 3 4 5 6 7 8 9 10 8 chunks +13 lines, -10 lines 0 comments Download
M net/socket/client_socket_pool_base.cc View 1 2 3 4 5 6 7 8 9 10 11 chunks +52 lines, -41 lines 0 comments Download
M net/socket/client_socket_pool_base_unittest.cc View 1 2 3 4 5 6 7 8 9 10 9 chunks +44 lines, -41 lines 0 comments Download
M net/socket/socks_client_socket_pool.h View 1 2 3 4 5 6 7 8 9 10 5 chunks +10 lines, -7 lines 0 comments Download
M net/socket/socks_client_socket_pool.cc View 1 2 3 4 5 6 7 8 9 10 3 chunks +10 lines, -8 lines 0 comments Download
M net/socket/socks_client_socket_pool_unittest.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +2 lines, -2 lines 0 comments Download
M net/socket/ssl_client_socket_unittest.cc View 10 3 chunks +3 lines, -3 lines 0 comments Download
M net/socket/tcp_client_socket_libevent.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +2 lines, -1 line 0 comments Download
M net/socket/tcp_client_socket_pool.h View 1 2 3 4 5 6 7 8 9 10 4 chunks +9 lines, -6 lines 0 comments Download
M net/socket/tcp_client_socket_pool.cc View 1 2 3 4 5 6 7 8 9 10 4 chunks +10 lines, -8 lines 0 comments Download
M net/socket/tcp_client_socket_pool_unittest.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +3 lines, -1 line 0 comments Download
M net/socket/tcp_client_socket_unittest.cc View 10 1 chunk +3 lines, -4 lines 0 comments Download
M net/socket/tcp_client_socket_win.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +2 lines, -1 line 0 comments Download
M net/spdy/spdy_network_transaction_unittest.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +2 lines, -1 line 0 comments Download
M net/spdy/spdy_session_unittest.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -0 lines 0 comments Download
M net/spdy/spdy_stream_unittest.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +2 lines, -1 line 0 comments Download
M net/tools/fetch/fetch_client.cc View 5 6 7 8 9 10 1 chunk +3 lines, -1 line 0 comments Download
M net/url_request/url_request_unittest.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +2 lines, -1 line 0 comments Download
M webkit/tools/test_shell/test_shell_request_context.cc View 5 6 7 8 9 10 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 11 (0 generated)
eroman
10 years, 7 months ago (2010-05-28 19:35:38 UTC) #1
willchan no longer on Chromium
Feel free not to start addressing these comments. They're half-baked still. I'm still digesting everything. ...
10 years, 7 months ago (2010-05-28 23:14:22 UTC) #2
eroman
http://codereview.chromium.org/2363003/diff/28001/29003 File chrome/browser/net/passive_log_collector.cc (right): http://codereview.chromium.org/2363003/diff/28001/29003#newcode48 chrome/browser/net/passive_log_collector.cc:48: init_proxy_resolver_tracker_.func; \ On 2010/05/28 23:14:23, willchan wrote: > Can ...
10 years, 7 months ago (2010-05-29 01:16:23 UTC) #3
willchan no longer on Chromium
I think I've got the PassiveLogCollector stuff all in my head now. I'm starting to ...
10 years, 6 months ago (2010-06-01 19:39:47 UTC) #4
willchan no longer on Chromium
Read through the rest of the files too now. Mod the tests. http://codereview.chromium.org/2363003/diff/69001/70010 File net/base/net_log_event_type_list.h ...
10 years, 6 months ago (2010-06-01 20:08:22 UTC) #5
eroman
Responses to first batch of comments. http://codereview.chromium.org/2363003/diff/69001/70004 File chrome/browser/net/passive_log_collector.cc (right): http://codereview.chromium.org/2363003/diff/69001/70004#newcode40 chrome/browser/net/passive_log_collector.cc:40: #define FOR_EACH_TRACKER(func) \ ...
10 years, 6 months ago (2010-06-01 21:06:25 UTC) #6
eroman
http://codereview.chromium.org/2363003/diff/69001/70005 File chrome/browser/net/passive_log_collector.h (right): http://codereview.chromium.org/2363003/diff/69001/70005#newcode46 chrome/browser/net/passive_log_collector.h:46: struct RequestInfo { On 2010/06/01 21:06:25, eroman wrote: > ...
10 years, 6 months ago (2010-06-01 21:08:52 UTC) #7
eroman
Last batch of comments addressed: http://codereview.chromium.org/2363003/diff/69001/70010 File net/base/net_log_event_type_list.h (right): http://codereview.chromium.org/2363003/diff/69001/70010#newcode296 net/base/net_log_event_type_list.h:296: // "dependent_source": <Source identifer ...
10 years, 6 months ago (2010-06-01 22:56:17 UTC) #8
willchan no longer on Chromium
I need to re-read parts of the code again, but here are some responses to ...
10 years, 6 months ago (2010-06-01 23:31:18 UTC) #9
willchan no longer on Chromium
LGTM http://codereview.chromium.org/2363003/diff/123002/106008 File chrome/browser/net/passive_log_collector_unittest.cc (right): http://codereview.chromium.org/2363003/diff/123002/106008#newcode75 chrome/browser/net/passive_log_collector_unittest.cc:75: const PassiveLogCollector::RequestTrackerBase* tracker) { My style pref is ...
10 years, 6 months ago (2010-06-02 22:40:44 UTC) #10
eroman
10 years, 6 months ago (2010-06-02 22:52:56 UTC) #11
http://codereview.chromium.org/2363003/diff/123002/106008
File chrome/browser/net/passive_log_collector_unittest.cc (right):

http://codereview.chromium.org/2363003/diff/123002/106008#newcode75
chrome/browser/net/passive_log_collector_unittest.cc:75: const
PassiveLogCollector::RequestTrackerBase* tracker) {
On 2010/06/02 22:40:45, willchan wrote:
> My style pref is to use a const reference instead of a pointer, to show that
it
> can't be NULL.

Done.

(I was preferring pointer since it was a base class, but reference works too).

http://codereview.chromium.org/2363003/diff/123002/106013
File net/base/net_log_event_type_list.h (right):

http://codereview.chromium.org/2363003/diff/123002/106013#newcode293
net/base/net_log_event_type_list.h:293: //      "source_dependency": <Source
identifer for the connect job we bound to>
On 2010/06/02 22:40:45, willchan wrote:
> s/identifer/identifier/
> "we bound to" sounds weird.  maybe "we are bound to"?

Done.

http://codereview.chromium.org/2363003/diff/123002/106033
File net/socket/tcp_client_socket_libevent.cc (right):

http://codereview.chromium.org/2363003/diff/123002/106033#newcode113
net/socket/tcp_client_socket_libevent.cc:113:
net_log_.BeginEvent(NetLog::TYPE_SOCKET_ALIVE, NULL);
On 2010/06/02 22:40:45, willchan wrote:
> I wonder if we'd actually be better off monitoring between when the socket is
> connected and disconnected.  I don't have any concrete data here.  Just
> wondering.

My preference is both.

We already track the socket object's lifetime, as well as the  calls to
Connect().

The only omission right now is we don't track the calls to Disconnect(). (I
actually intend to add that soon, which is why I separated Disconnect() and
DoDisconnect() in an earlier change :).

Powered by Google App Engine
This is Rietveld 408576698