Files
sdk/runtime
Slava Egorov 199a68ee7e [vm] Make sure to Profiler::Init if needed.
Profiler is included in PRODUCT builds if DART_INCLUDE_PROFILER is
defined - this means we have to call Profiler::Init on startup and
Profiler::Cleanup on shutdown. Otherwise trying to start or stop
profiler will segfault as these methods expect Profiler::monitor_ 
to be initialized.

This was broken by commit 0fee95455c but
not caught because we do not have PRODUCT mode tests covering this.
This CL adds an appropriate test.

TEST=pkg/perf_witness/test/recorder_server_test

Change-Id: Ia765a345f96357e42d5e1a268ac633f96a6a6964
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/474642
Commit-Queue: Slava Egorov <vegorov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2026-01-22 00:28:02 -08:00
..
2026-01-08 08:43:09 -08:00