[Core] Persist and reuse the memory-profiling result across boots (opt-in) (#47388)