The tool mentioned in the article - Perfetto - does have heap allocation profiling capability.
It can be done in background/from CLI as well.