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

Issue 468083004: Use NESTABLE_ASYNC APIs to get NetLog data into Tracing (Closed)

Created:
6 years, 4 months ago by xunjieli
Modified:
6 years, 3 months ago
CC:
chromium-reviews, cbentzel+watch_chromium.org, eroman, wfh+watch_chromium.org, dsinclair+watch_chromium.org, erikwright+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

This CL adds a NetLog observer, and uses the newly added NESTABLE_ASYNC APIs (https://codereview.chromium.org/536503002/) to log NetLog entries in Tracing. This CL is a part of the effort to get NetLog data into Tracing. Design Doc: https://docs.google.com/document/d/1Z2uqj59UEts5IiXX78mkdU4kd6e7kE3JUKPoDK97bVs/edit?usp=sharing BUG=399701 Committed: https://crrev.com/eb290602c4dbfee90191c3044e68e53a0db4c3e3 Cr-Commit-Position: refs/heads/master@{#295089}

Patch Set 1 #

Total comments: 45

Patch Set 2 : Addressed Matt's Comments #

Patch Set 3 : Added Unit Tests #

Total comments: 90

Patch Set 4 : Addressed Comments #

Patch Set 5 : Added a missing header #

Total comments: 16

Patch Set 6 : Addressed New Comments #

Total comments: 34

Patch Set 7 : Added comments and cleaned up tests #

Total comments: 4

Patch Set 8 : Separated trace changes #

Total comments: 25

Patch Set 9 : Addressed Comments #

Patch Set 10 : Filtered trace events in unittests #

Total comments: 22

Patch Set 11 : Removed SetCurrentThreadBlocksMessageLoop and addressed comments #

Total comments: 6

Patch Set 12 : Addressed comments #

Patch Set 13 : Rebased (tracing changes committed in two other CLs) #

Patch Set 14 : Removed TraceLog::DeleteForTesting() from unit test #

Unified diffs Side-by-side diffs Delta from patch set Stats (+541 lines, -0 lines) Patch
M chrome/browser/net/chrome_net_log.h View 1 2 chunks +3 lines, -0 lines 0 comments Download
M chrome/browser/net/chrome_net_log.cc View 1 3 chunks +6 lines, -0 lines 0 comments Download
A net/base/trace_net_log_observer.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +49 lines, -0 lines 0 comments Download
A net/base/trace_net_log_observer.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +106 lines, -0 lines 0 comments Download
A net/base/trace_net_log_observer_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +374 lines, -0 lines 0 comments Download
M net/net.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +3 lines, -0 lines 0 comments Download

Messages

Total messages: 48 (6 generated)
xunjieli
Hi Nat and Matt, This is just a CL to get things set-up. Could you ...
6 years, 4 months ago (2014-08-15 20:01:18 UTC) #1
xunjieli
https://codereview.chromium.org/468083004/diff/1/net/base/trace_net_log_observer.cc File net/base/trace_net_log_observer.cc (right): https://codereview.chromium.org/468083004/diff/1/net/base/trace_net_log_observer.cc#newcode67 net/base/trace_net_log_observer.cc:67: "netlog", NetLog::EventTypeToString(entry.type()), entry.source().id, Nat, if I understand correctly, the ...
6 years, 4 months ago (2014-08-15 20:10:03 UTC) #2
mmenke
Just nits, for the most part. I think we're going to want some simple unit ...
6 years, 4 months ago (2014-08-15 20:42:54 UTC) #3
mmenke
Also, I'm happy to offer some guidance on unit tests, I'll need to look over ...
6 years, 4 months ago (2014-08-15 20:46:12 UTC) #4
xunjieli
Thanks Matt for the initial review! I incorporated the suggestions. Will work on the unit ...
6 years, 4 months ago (2014-08-15 21:55:17 UTC) #5
mmenke
https://codereview.chromium.org/468083004/diff/1/net/base/trace_net_log_observer.h File net/base/trace_net_log_observer.h (right): https://codereview.chromium.org/468083004/diff/1/net/base/trace_net_log_observer.h#newcode45 net/base/trace_net_log_observer.h:45: DISALLOW_COPY_AND_ASSIGN(TraceNetLogObserver); On 2014/08/15 21:55:16, xunjieli1 wrote: > On 2014/08/15 ...
6 years, 4 months ago (2014-08-15 21:59:16 UTC) #6
mmenke
What I'm thinking of for unit tests: Set up a NetLog and a TraceNetLogObserver, and ...
6 years, 4 months ago (2014-08-18 14:55:27 UTC) #7
mmenke
Should also test events with and without params, and make sure we produce valid JSON ...
6 years, 4 months ago (2014-08-18 14:57:00 UTC) #8
mmenke
On 2014/08/18 14:57:00, mmenke wrote: > Should also test events with and without params, and ...
6 years, 4 months ago (2014-08-18 15:03:48 UTC) #9
xunjieli
Hi Matt, I wrote some simple unit tests (one test for each scenario you mentioned). ...
6 years, 4 months ago (2014-08-20 22:00:43 UTC) #10
mmenke
Mostly just a lot of nits, and a couple test suggestions. https://codereview.chromium.org/468083004/diff/40001/net/base/trace_net_log_observer.cc File net/base/trace_net_log_observer.cc (right): ...
6 years, 4 months ago (2014-08-21 15:35:42 UTC) #11
xunjieli
Matt, thanks for the detailed reviews! Your suggestions are very helpful! I have addressed them. ...
6 years, 4 months ago (2014-08-22 17:20:12 UTC) #12
mmenke
Quick comments. This is looking good, but I want to carefully go over the tests. ...
6 years, 4 months ago (2014-08-22 18:28:15 UTC) #13
xunjieli
Thanks Matt! Don't worry about the delay. I still need to ping Nat on the ...
6 years, 4 months ago (2014-08-22 19:04:40 UTC) #14
mmenke
I haven't forgotten about this, I'll get to it tomorrow.
6 years, 3 months ago (2014-08-26 21:53:34 UTC) #15
mmenke
Mostly nits. Think we're just about there. https://codereview.chromium.org/468083004/diff/100001/net/base/trace_net_log_observer.cc File net/base/trace_net_log_observer.cc (right): https://codereview.chromium.org/468083004/diff/100001/net/base/trace_net_log_observer.cc#newcode80 net/base/trace_net_log_observer.cc:80: void TraceNetLogObserver::WatchForTraceStart(NetLog* ...
6 years, 3 months ago (2014-08-27 19:03:15 UTC) #16
xunjieli
Thanks Matt for the detailed feedback! By the way, the trace deadlock bug will be ...
6 years, 3 months ago (2014-09-02 16:37:34 UTC) #17
nduca
can you do the trace_event change separately? Also, your phase letters would seem to collide ...
6 years, 3 months ago (2014-09-02 20:03:12 UTC) #18
dsinclair
https://codereview.chromium.org/468083004/diff/110001/base/debug/trace_event.h File base/debug/trace_event.h (right): https://codereview.chromium.org/468083004/diff/110001/base/debug/trace_event.h#newcode650 base/debug/trace_event.h:650: #define TRACE_EVENT_NET_LOG_BEGIN(category_group, name, id, arg1_name, \ Each of these ...
6 years, 3 months ago (2014-09-02 20:11:45 UTC) #20
xunjieli
Thanks dsinclair and nduca, I have separated trace_event.h into another cl (https://codereview.chromium.org/536503002/) https://codereview.chromium.org/468083004/diff/110001/base/debug/trace_event.h File base/debug/trace_event.h ...
6 years, 3 months ago (2014-09-02 20:26:06 UTC) #21
mmenke
https://codereview.chromium.org/468083004/diff/130001/net/base/trace_net_log_observer.h File net/base/trace_net_log_observer.h (right): https://codereview.chromium.org/468083004/diff/130001/net/base/trace_net_log_observer.h#newcode28 net/base/trace_net_log_observer.h:28: // This can't be called if TraceNetLogObserver is currently ...
6 years, 3 months ago (2014-09-02 21:29:00 UTC) #22
xunjieli
Thanks Matt for the review! there is one issue about the trace_events_ list. I replied ...
6 years, 3 months ago (2014-09-02 23:57:17 UTC) #23
mmenke
Quick response https://codereview.chromium.org/468083004/diff/130001/net/base/trace_net_log_observer_unittest.cc File net/base/trace_net_log_observer_unittest.cc (right): https://codereview.chromium.org/468083004/diff/130001/net/base/trace_net_log_observer_unittest.cc#newcode126 net/base/trace_net_log_observer_unittest.cc:126: if (dict->GetString("name", &actual_type)) { Thanks, I didn't ...
6 years, 3 months ago (2014-09-03 00:07:23 UTC) #24
Ryan Sleevi
Removing myself, as I won't have the bandwidth to even stay on top of these ...
6 years, 3 months ago (2014-09-03 00:32:26 UTC) #26
xunjieli
On 2014/09/03 00:07:23, mmenke wrote: > Quick response > > https://codereview.chromium.org/468083004/diff/130001/net/base/trace_net_log_observer_unittest.cc > File net/base/trace_net_log_observer_unittest.cc (right): ...
6 years, 3 months ago (2014-09-03 18:36:14 UTC) #27
mmenke
This looks really good! https://codereview.chromium.org/468083004/diff/170001/net/base/trace_net_log_observer.h File net/base/trace_net_log_observer.h (right): https://codereview.chromium.org/468083004/diff/170001/net/base/trace_net_log_observer.h#newcode15 net/base/trace_net_log_observer.h:15: // TraceNetLogObserver watches for Trace ...
6 years, 3 months ago (2014-09-03 19:12:12 UTC) #28
xunjieli
Xianzhu fixed the deadlock bug, I have rebased and removed SetCurrentThreadBlocksMessageLoop(). I added BASE_EXPORT to ...
6 years, 3 months ago (2014-09-08 14:08:42 UTC) #30
mmenke
Fix these, and I'll sign off. https://codereview.chromium.org/468083004/diff/210001/net/base/trace_net_log_observer_unittest.cc File net/base/trace_net_log_observer_unittest.cc (right): https://codereview.chromium.org/468083004/diff/210001/net/base/trace_net_log_observer_unittest.cc#newcode44 net/base/trace_net_log_observer_unittest.cc:44: value.GetString("args.source_type", &info.source_type); These ...
6 years, 3 months ago (2014-09-08 16:02:04 UTC) #31
xunjieli
Thanks Matt for the detailed explanation, which is very helpful! I have uploaded a new ...
6 years, 3 months ago (2014-09-08 19:47:45 UTC) #32
xunjieli
Matt, right now only ios_dbg_simulator is failing. I don't it's related to my change. WDYT?
6 years, 3 months ago (2014-09-09 20:58:37 UTC) #33
mmenke
I agree the failures look unrelated. LGTM!
6 years, 3 months ago (2014-09-09 21:02:46 UTC) #34
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/xunjieli@chromium.org/468083004/250001
6 years, 3 months ago (2014-09-09 21:22:11 UTC) #36
commit-bot: I haz the power
Try jobs failed on following builders: ios_dbg_simulator on tryserver.chromium.mac (http://build.chromium.org/p/tryserver.chromium.mac/builders/ios_dbg_simulator/builds/13388)
6 years, 3 months ago (2014-09-09 22:19:22 UTC) #38
xunjieli
Matt, on a second look, I think the ios_dbg_simulator is related to my change. If ...
6 years, 3 months ago (2014-09-10 14:24:31 UTC) #39
mmenke
On 2014/09/10 14:24:31, xunjieli1 wrote: > Matt, on a second look, I think the ios_dbg_simulator ...
6 years, 3 months ago (2014-09-10 14:32:43 UTC) #40
mmenke
On 2014/09/10 14:32:43, mmenke wrote: > On 2014/09/10 14:24:31, xunjieli1 wrote: > > Matt, on ...
6 years, 3 months ago (2014-09-10 14:33:38 UTC) #41
xunjieli
Per discussion on https://codereview.chromium.org/568073003/ , I have changed the unit tests to not delete TraceLog. ...
6 years, 3 months ago (2014-09-15 21:29:54 UTC) #42
mmenke
LGTM!
6 years, 3 months ago (2014-09-16 15:57:58 UTC) #43
xunjieli
Thanks Matt! You are an awesome reviewer!
6 years, 3 months ago (2014-09-16 16:03:01 UTC) #45
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patchset/468083004/270001
6 years, 3 months ago (2014-09-16 16:03:43 UTC) #46
commit-bot: I haz the power
Committed patchset #14 (id:270001) as 7baee9c0a6d1b62f5186f336f26e5c2d830f1c78
6 years, 3 months ago (2014-09-16 17:14:11 UTC) #47
commit-bot: I haz the power
6 years, 3 months ago (2014-09-16 17:15:38 UTC) #48
Message was sent while issue was closed.
Patchset 14 (id:??) landed as
https://crrev.com/eb290602c4dbfee90191c3044e68e53a0db4c3e3
Cr-Commit-Position: refs/heads/master@{#295089}

Powered by Google App Engine
This is Rietveld 408576698