Thread CPU utilization is now always recorded, even when periodic stack
sampling is disabled. Leaving it off only produced misleading profiles, where
idle threads appeared busy because we couldn't tell they were idle.
Remove the "cpu" (CPUUtilization) feature entirely from ProfilerState.h and
BaseProfilerState.h (renumbering the following features), the WebExtensions
geckoProfiler schema, and the default feature sets, and drop the conditionals
that only recorded CPU when the feature was enabled. Per-thread CPU recording
is still driven by the selected threads and the CPUAllThreads feature.
Since the sampler now always completes a sampling pass, the
SamplingState::NoStackSamplingCompleted state is unreachable; remove it (its
consumers already treated it identically to SamplingCompleted).
Update the gtests accordingly. Also update browser_test_feature_nostacksampling.js:
because CPU is now always gathered, the sampler still records samples while the
No Stack Sampling feature is on, but those samples carry no captured stack (only
the synthetic root frame). Assert on captured stack depth rather than sample
count.
Drop the now-removed "cpu" feature from the remaining test harnesses that still
requested it, which caused the previous backouts: the xpcshell harness'
default MOZ_PROFILER_STARTUP_FEATURES set (it made every launched binary print
an "Unrecognized feature" warning, breaking test_install_hash.js) and the wpt
webdriver bidi profiler start/stop tests (stop asserted every requested feature
is reflected in the saved profile).
Differential Revision: https://phabricator.services.mozilla.com/D306736