Hello Team,
I am from the Edge Mobile team, and I am reaching out to seek guidance on Android memory optimization.
While tools like Android Studio Profiler, Perfetto, and chrome://tracing are useful for offline analysis, they often cannot fully show how memory is used by users in real life. I am therefore wondering whether there are any online tools or mechanisms available
to attribute and analyze memory issues in production.
In Chromium repo, I noticed a class called sampling_heap_profiler.cc. Could this be used to collect memory dumps online and perform attribution? From my understanding, it seems that this approach requires server-side support to parse SampledProfile data. Does
this mean that server-side cooperation is necessary for memory attribution?
Alternatively, is it feasible to make a heap dump when an OOM or memory pressure signal happens, cut the HPROF file, and send it to the server for analysis? Since an OutOfMemoryError on Android does not necessarily indicate the exact cause of a memory issue,
we believe that capturing a heap dump is necessary to determine which logic led to the OOM.
I would greatly appreciate any guidance, best practices, or references you could provide regarding memory profiling and attribution in production for Chromium on Android.
Thank you very much for your time and support.
Regards,
Ke