StackSamplingProfiler: collect partial bursts if the profiler is stopped early

Changes the profiler behavior to retain collected samples when the
profiler is stopped in the middle of collecting a burst of samples. This
behavior is desirable for janky task collection, where we would like to
collect up to the point the task completes, but don't know beforehand
how long it will take. It's also mildly beneficial for startup profiling
in that it allows collection of profiles if Chrome is shut down shortly
after being started.

BUG=464929

Review URL: https://codereview.chromium.org/1316153002

Cr-Commit-Position: refs/heads/master@{#346558}


CrOS-Libchrome-Original-Commit: 0716a8fedf45c6ecff8b249da926034c34a8ea02
3 files changed
tree: bf30d0427a748cc0fe8b1b783c661a02399a4246
  1. base/
  2. build/
  3. components/
  4. dbus/
  5. device/
  6. ipc/
  7. mojo/
  8. testing/
  9. third_party/
  10. ui/