I would like to confirm. Your suggestion is that it is better to re-use the
exising UMAs: Memory.Renderer.Large2, ... and so on for purge+suspend?
(1) Because the UMAs (and ProcessData used to generate the UMAs) are only
available for browser process.
Since the UMAs are reported in chrome/browser/metrics/metrics_memory_details.cc,
only browser process can report the UMAs, I think.
However purge+suspend is implemented in renderer processes.
So if we want to re-use the UMAs, we probably need to send some IPC message from
renderer process to browser process.
I'm not sure whether the messaging code is simple or not.
(2) Because in the near future I would like to replace the hacky code with
memory-infra.
I expect that it will be possible to invoke memory-infra without tracing in the
near future. Since my hacky code is based on OnMemoryDump, I expect that we can
compare the hacky purge+suspend UMAs with UMAs using memory-infra.
(3) Because I would like to see each allocator's memory usage if possible.
If we have the data, at least it will be possible to see whether "purge" is
working well or not.
For example, I have already found that sometimes "malloc" memory usage increases
because it is not possible to suspend compositor-related workers.
https://codereview.chromium.org/2350423003/