• primiano's avatar
    [tracing] Add support to pre-load and merge ProcessMemoryDump(s). · c7336081
    primiano authored
    Allows MemoryDumpProvider(s) with dump-time constraints (mostly GC
    allocators) to create out-of-band MemoryAllocatorDump(s) and merge
    them during the onMemoryDump callback.
    
    So far, the architecture of MemoryDumpProvider expected to never
    instantiate ProcessMemoryDump(s) directly, but just fill up the
    one passed as argument to the onMemoryDump(ProcessMemoryDump*)
    callback.
    This, however, doesn't cover the cases of dumpers that cannot dump
    at arbitrary times (i.e. during onMemoryDump callback) and
    need to pre-fill the dump stats before the actual callback
    comes.
    A concrete case of this are dump providers for garbage-collected
    allocators (specifically BlinkGC) where some of the stats can be
    collected only during the GC.
    
    BUG=466141
    
    Review URL: https://codereview.chromium.org/1151603004
    
    Cr-Commit-Position: refs/heads/master@{#330924}
    c7336081
process_memory_dump_unittest.cc 1.9 KB