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

Issue 705564 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: May 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Bug

Blocking:
issue 703184



Sign in to add a comment

Memory-infra: make the bg thread less dynamic

Project Member Reported by primiano@chromium.org, Mar 27 2017

Issue description

While investigating the steps for decoupling MemoryDumpManager from tracing, I realized that today there is an insane level of complexity due to the fact that we dynamically create and tear down the memory-infra bg thread.

IMHO Trying to maintain that craziness is going to end up in a big fail and debugging pain for no good reason.
I think the first step here is to make the bg thread indefinitely lived, i.e. create it the first time we need memory-infra and never tear it down.
That would allow us to get rid of *a lot* of the workarounds in MDM. most of the MDM code will become a plain and simple "post task to mdm thread".

In a future evolution we should look into using LukyLuke (base's TaskScheduler).
However, I don't want to do this right now, as that might open the opportunity for  deadlocks (until we get in a clean state we might end up interlocking the threads).
 

Comment 1 by hjd@chromium.org, Apr 11 2017

Labels: Hotlist-MemoryInfraUma
Project Member

Comment 2 by bugdroid1@chromium.org, Apr 27 2017

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

commit 7af20094a387dfa6a3f0eb5fb5b15066bdf90f19
Author: hjd <hjd@chromium.org>
Date: Thu Apr 27 14:40:18 2017

memory-infra: Never kill memory-infra background thread

We want ultimately to move to a model where memory-infra does not have its own
custom thread and instead uses base::scheduler. However this is risky at the
moment given the tracing entanglement and the various other refactorings going
on. For now we change the logic to never kill the background thread. This will
simplify the logic of the MemoryDumpManager significantly and pave the way for
us to disentangle tracing.

BUG= 705564 
BUG= 702289 

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

[modify] https://crrev.com/7af20094a387dfa6a3f0eb5fb5b15066bdf90f19/base/trace_event/memory_dump_manager.cc
[modify] https://crrev.com/7af20094a387dfa6a3f0eb5fb5b15066bdf90f19/base/trace_event/memory_dump_manager.h

Comment 3 by hjd@chromium.org, May 9 2017

Status: Fixed (was: Untriaged)

Sign in to add a comment