Memory-infra: make the bg thread less dynamic |
||
Issue descriptionWhile 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).
,
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
,
May 9 2017
,
May 9 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/49ce146674cbe4be5d7e1b53d270d229830a64ce commit 49ce146674cbe4be5d7e1b53d270d229830a64ce Author: hjd <hjd@chromium.org> Date: Tue May 09 15:23:22 2017 memory-infra: Remove is_enabled_ from MDM This is one step the eventual refactor to remove Enable/Disable. BUG= 705564 Review-Url: https://codereview.chromium.org/2845633002 Cr-Commit-Position: refs/heads/master@{#470340} [modify] https://crrev.com/49ce146674cbe4be5d7e1b53d270d229830a64ce/base/trace_event/memory_dump_manager.cc [modify] https://crrev.com/49ce146674cbe4be5d7e1b53d270d229830a64ce/base/trace_event/memory_dump_manager.h [modify] https://crrev.com/49ce146674cbe4be5d7e1b53d270d229830a64ce/base/trace_event/memory_dump_manager_unittest.cc [modify] https://crrev.com/49ce146674cbe4be5d7e1b53d270d229830a64ce/base/trace_event/process_memory_dump.cc |
||
►
Sign in to add a comment |
||
Comment 1 by hjd@chromium.org
, Apr 11 2017