gecko-dev/tools/profiler
Nicholas Nethercote 94ec493862 Bug 1557907 - Fix `jemalloc_replace_dynamic()`. r=glandium
`jemalloc_replace_dynamic()` is badly broken. If you install a malloc table
other than the default at startup (e.g. DMD's or PHC's), when you call
`jemalloc_replace_dynamic()` it installs a new allocator that wraps the
*default* allocator, and then when you call `jemalloc_replace_dynamic(nullptr)`
it switches back to the *default* allocator.

This commits makes numerous improvements.

- It removes the "flip-flopping" between malloc tables, which didn't really
  work and isn't necessary.

- `jemalloc_replace_dynamic()` now switches between the *original* malloc table
  and the new one, rather than the *default* malloc table and the new one.

- It renames various things, to make the names shorter and clearer.

- It clearly documents the dangers and limitations of
  `jemalloc_replace_dynamic()`.

- It removes and inlines `profiler::Init()`, because there was only one call
  site.

- It rearranges `install_memory_counter()` so the control flow is simpler.

Differential Revision: https://phabricator.services.mozilla.com/D34266

--HG--
extra : moz-landing-system : lando
2019-06-13 20:42:19 +00:00
..
core Bug 1557907 - Fix `jemalloc_replace_dynamic()`. r=glandium 2019-06-13 20:42:19 +00:00
gecko Bug 1540731 - Part 2: Move toplevel actors to override ActorDestroy, r=froydnj 2019-05-21 17:04:21 +00:00
lul Bug 1549232 - Only use profiler_current_{process,thread}_id in the Gecko Profiler instead of alternatives - r=mstange 2019-05-09 18:26:15 +00:00
public Bug 1551355 - Use TimeStamp::NowUnfuzzed() instead of TimeStamp::Now() during gecko profiling r=mstange 2019-06-10 17:35:42 +00:00
rust-helper Bug 1505719 - Try harder when computing breakpad IDs for Android system libraries. r=ted 2018-12-03 19:21:44 +00:00
tasktracer Bug 1549232 - Only use profiler_current_{process,thread}_id in the Gecko Profiler instead of alternatives - r=mstange 2019-05-09 18:26:15 +00:00
tests Bug 1551106 part 2. Stop using [array] in profiler's GetFeatures/GetAllFeatures. r=gerald 2019-05-21 14:43:10 +00:00
moz.build Bug 1549232 - Only use profiler_current_{process,thread}_id in the Gecko Profiler instead of alternatives - r=mstange 2019-05-09 18:26:15 +00:00