New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 668195 link

Starred by 3 users

Issue metadata

Status: Duplicate
Merged: issue 653535
Owner:
Closed: Nov 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Android
Pri: 2
Type: Bug



Sign in to add a comment

Startup tracing doesn't include netlog events.

Project Member Reported by lizeb@chromium.org, Nov 23 2016

Issue description

On Android, startup tracing never includes netlog events.

Example:
$ adb shell 'echo "_ --trace-startup=*,netlog" > /data/local/tmp/chrome-command-line'
$ adb shell 'am force-stop com.google.android.apps.chrome' &&
  adb shell am start -a 'android.intent.action.VIEW' -n com.google.android.apps.chrome/.Main -d 'https://android.com'"



 
Components: Internals>Network>Logging
Could you explain a bit more on why we want to add NetLog events to Startup Tracing? And when will Startup Tracing be used?

NetLog trace events are currently quite spammy (there can be a lot of them). If NetLog category is enabled using a startup flag, the events can take up a lot of space.

Comment 2 by nduca@chromium.org, Nov 28 2016

Cc: zh...@chromium.org oysteine@chromium.org

Comment 3 by lizeb@chromium.org, Nov 29 2016

This is something that I want to use to look at startup performance. On Android, when a link is clicked in a native app, Chrome opens and loads the URL.

This is really common, and the only real way to trace that is to use startup tracing. That's why I wanted to look at netlog for startup tracing, and discovered that it's currently not possible to enable it.


Is it possible to make netlog events observable in startup tracing, but disabled by default?
Currently, enabling the category does nothing.
> Is it possible to make netlog events observable in startup tracing, but disabled by default?

That would be ideal. Without the tracing UI and the prompt about "Buffer Usage X%," I think disabling it by default makes sense.

Comment 5 by nduca@chromium.org, Nov 29 2016

I tend to think we shoudl just fix whatever bug is causing netlog to not work with stratup tracing, rather than doing special casign here for netlog.

Netlog events arent nearly as verbose as other events. Messageloop is 10x more verbose than other events, in nearly every trace. Those work in startup traces. And we don't special case them.

We also don't have a precident for having events that behave differently during startup tracing vs regular tracing. I'd be very cautious in laying precident here.

So, with all that in mind, shouldn't be special casing netlog behavior for startup tracing. If netlog events aren't disbled by default right now, we shouldn't move them as part of this.

Do we have a guess at why startup tracing isn't working for netlog?

Comment 6 by zh...@chromium.org, Nov 29 2016

Mergedinto: 653535
Status: Duplicate (was: Assigned)
This is not just on Android. We have another bug tracking this, too.
lizeb@ has a CL at https://codereview.chromium.org/2524043002/.
If verbosity isn't a concern with startup tracing, I am fine with not special casing. It's just there is no way to turn the category off (unlike regular tracing) at least in the CL above.

Comment 8 by lizeb@chromium.org, Nov 30 2016

Duplicating the comment from the CL to avoid un-necessary indirection:

Note that a trace configuration can be provided for startup tracing, either
through command-line flags or through the trace config file. Since changing the
flags is necessary to enable startup tracing anyway, then the control does exist
for users.

Project Member

Comment 9 by bugdroid1@chromium.org, Dec 2 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/9da0f1a6adf25390c93d0ddd384defcedda25f89

commit 9da0f1a6adf25390c93d0ddd384defcedda25f89
Author: lizeb <lizeb@chromium.org>
Date: Fri Dec 02 09:26:48 2016

Android: Make netlog available in startup traces.

Netlog events are made available to trace events through
TraceNetLogObserver. On Android, it is created after tracing has
started, yet only listens for tracing state changes. Before listening
for tracing state changes, first check whether tracing is already
enabled.

TEST=
$ adb shell 'echo "_ --trace-startup=*,netlog" > /data/local/tmp/chrome-command-line'
$ adb shell 'am force-stop com.google.android.apps.chrome' &&
  adb shell am start -a 'android.intent.action.VIEW' -n com.google.android.apps.chrome/.Main -d 'https://android.com'"

This was busted before, works with this patch.

BUG= 668195 

Review-Url: https://codereview.chromium.org/2524043002
Cr-Commit-Position: refs/heads/master@{#435895}

[modify] https://crrev.com/9da0f1a6adf25390c93d0ddd384defcedda25f89/net/log/trace_net_log_observer.cc
[modify] https://crrev.com/9da0f1a6adf25390c93d0ddd384defcedda25f89/net/log/trace_net_log_observer_unittest.cc

Components: Speed>Tracing
Labels: -Performance-Tracing

Sign in to add a comment