memory-infra svc: expose an API to obatin mmaps for the heap profiler

Desktop / Chromium - Albert J. Wong [chromium.org] - 10 August 2017 10:25 EDT

The heap profiler needs to obtain the list of memory maps for the
various processes for symbolization purposes. Before this CL, the memory_instrumentation didn't offer any way to retrieve only the mmaps. Its only API, RequestGlobalMemoryDump():- has the major drawback of wasting time hopping through all the MemoryDumpProider(s) (e.g., gpu textures, skia font caches) which are useless for the heap profiler.
- does not expose the mmaps obtained for the various processes.

This CL introduces a new method GetVmRegionsForHeapProfiler() which exposes only the memory maps and doesn't attempt to collect the data from the MemoryDumpProviders.

See comments in https://chromium-review.googlesource.com/c/602454 for more context.

Bug: 728199 TBR: brettw Change-Id: I5233ca35842fa6c812a89468554916cac9ca042b Reviewed-on: https://chromium-review.googlesource.com/602623 Commit-Queue: Primiano Tucci

dce3afa memory-infra svc: expose an API to obatin mmaps for the heap profiler
base/trace_event/memory_dump_request_args.cc | 4 +
base/trace_event/memory_dump_request_args.h | 4 +-
.../process_memory_metrics_emitter_unittest.cc | 40 ++++--
chrome/profiling/json_exporter_unittest.cc | 6 +-
.../memory_instrumentation/coordinator_impl.cc | 69 +++++++++--
.../memory_instrumentation/coordinator_impl.h | 2 +
.../coordinator_impl_unittest.cc | 134 ++++++++++++++++++++-
.../memory_instrumentation.cc | 6 +
.../memory_instrumentation.h | 9 ++
.../memory_instrumentation_struct_traits.cc | 5 +
.../tracing_integration_unittest.cc | 8 +-
.../memory_instrumentation.mojom | 14 ++-
12 files changed, 270 insertions(+), 31 deletions(-)

Upstream: git.chromium.org


  • Share