base: Port subprocess to Windows

Introduces a functionally-equivalent implementation of
base::Subprocess for Windows. Unlike POSIX, the windows
implementation is based on using blocking I/O and spawning two
threads (one for draining stdout/err, one for pumping stdin).
Using OVERLAPPED I/O on Windows is too complex (and also
internally seems to use a thread pool anyways) and isn't
worth the risk, given Subprocess is used only by tools/.
The only changes introduced on Linux/Android/Mac are:
- Changing the MovableState to be a unique_ptr. This make it safe to use
from other threads across std::move.
- Removing the kKilledBySignal state and folding it into
  kRunning.
- Adding an explicit bool timed_out() operator.

Test: perfetto_unittests.exe --gtest_filter=Subprocess*
Bug: 174454879
Change-Id: Ifa6ace5c58cf043861f474fff98e798f7764fb69
11 files changed
tree: 0128f78d3420e2f150aaf0af0d8c95570eb9a6c1
  1. .github/
  2. bazel/
  3. build_overrides/
  4. buildtools/
  5. debian/
  6. docs/
  7. examples/
  8. gn/
  9. include/
  10. infra/
  11. protos/
  12. src/
  13. test/
  14. tools/
  15. ui/
  16. .clang-format
  17. .clang-tidy
  18. .gitignore
  19. .gn
  20. .style.yapf
  21. Android.bp
  22. Android.bp.extras
  23. BUILD
  24. BUILD.extras
  25. BUILD.gn
  26. CHANGELOG
  27. codereview.settings
  28. heapprofd.rc
  29. LICENSE
  30. METADATA
  31. MODULE_LICENSE_APACHE2
  32. OWNERS
  33. perfetto.rc
  34. PRESUBMIT.py
  35. README.chromium
  36. README.md
  37. TEST_MAPPING
  38. traced_perf.rc
  39. WORKSPACE
README.md

Perfetto - System profiling, app tracing and trace analysis

Perfetto is a production-grade open-source stack for performance instrumentation and trace analysis. It offers services and libraries and for recording system-level and app-level traces, native + java heap profiling, a library for analyzing traces using SQL and a web-based UI to visualize and explore multi-GB traces.

See https://perfetto.dev/docs or the /docs/ directory for documentation.