New issue
Advanced search Search tips

Issue 709253 link

Starred by 3 users

Issue metadata

Status: Archived
Owner:
Closed: Apr 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug


Participants' hotlists:
Hotlist-4


Sign in to add a comment

Log tab/app discards

Project Member Reported by teravest@chromium.org, Apr 6 2017

Issue description

Filing a bug so there's a place to discuss if this is sane.

OomMemoryDetails currently logs the memory/fd use of tabs, apps, and extensions under critical memory pressure. However, when reading through feedback reports, it's hard to know what action was taken in response.

TabManager::DiscardTabById only logs at VLOG(1) if a tab is discarded. I think that all of the branches of TabManager::DiscardTab() should log something if an action was taken, and we should log a message if no tabs could be found to kill, either.

Given that we already log a lot of memory information at this time, logging the action taken should be uncontroversial, but I'm curious what others think; I would have expected this information to already be logged.
 
Cc: derat@chromium.org

Comment 2 by derat@chromium.org, Apr 6 2017

Cc: steve...@chromium.org
Logging (a warning?) whenever we discard a tab seems reasonable to me and is something I would've expected us to already be doing.

If it's too spammy, maybe we could use the device log feature, which I think is still included in feedback reports (Steven?).

We shouldn't log any identifying details about the tab (URL, origin, etc.) since there are PII concerns there, but it's final memory footprint would be useful.

Comment 3 by derat@chromium.org, Apr 6 2017

its final memory footprint :-(
Yep, device_event_log shows up in feedback reports. I would suggest adding a new type 'MEMORY' and judiciously adding MEMORY_LOG(...) entries.

I've avoided 'WARNING', use 'ERROR' if you also want (important, unusual, non-spammy) log entries to also go to the chrome log, otherwise use 'EVENT' or 'DEBUG'.

Labels: -Pri-3 Pri-2
Yes, I've been monitoring tab discards in real time (tail -f /home/chronos/user/log/chrome | grep <something>), and also noticed the lack of a clear message, although many log lines are emitted for those events.  One extra line won't make a difference, and I am pretty sure we had such line in the past.

Tab/app discards are rare enough that we can afford to produce many lines of logs.  If the number of discards becomes that high, the spew will be the least of our problems.

Comment 6 by derat@chromium.org, Apr 10 2017

Status: Started (was: Untriaged)
Project Member

Comment 7 by bugdroid1@chromium.org, Apr 12 2017

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

commit 53cb7fcf9db050cac655e47ff85d02daac7dbb22
Author: teravest <teravest@chromium.org>
Date: Wed Apr 12 14:36:28 2017

Log app and tab discards.

On critical memory pressure, we already log entries at least for every
tab and extension and the corresponding memory usage. However, there's
no logging for the action that was taken in response.

This should help us understand discard behavior in feedback reports from
users.

BUG= 709253 
TEST=build

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

[modify] https://crrev.com/53cb7fcf9db050cac655e47ff85d02daac7dbb22/chrome/browser/memory/tab_manager_delegate_chromeos.cc
[modify] https://crrev.com/53cb7fcf9db050cac655e47ff85d02daac7dbb22/chrome/browser/memory/tab_manager_delegate_chromeos_unittest.cc
[modify] https://crrev.com/53cb7fcf9db050cac655e47ff85d02daac7dbb22/components/device_event_log/device_event_log.h
[modify] https://crrev.com/53cb7fcf9db050cac655e47ff85d02daac7dbb22/components/device_event_log/device_event_log_impl.cc

Status: Fixed (was: Started)

Comment 9 by dchan@google.com, May 30 2017

Labels: VerifyIn-60
Labels: VerifyIn-61

Comment 11 by dchan@chromium.org, Jan 22 2018

Status: Archived (was: Fixed)

Sign in to add a comment