commit | 6aa3b752750bc5f58850fdf12eca10bc46ac2e63 | [log] [tgz] |
---|---|---|
author | Primiano Tucci <primiano@google.com> | Tue Jan 05 14:22:43 2021 +0100 |
committer | Primiano Tucci <primiano@google.com> | Tue Jan 05 14:22:43 2021 +0100 |
tree | 0128f78d3420e2f150aaf0af0d8c95570eb9a6c1 | |
parent | ee8ca5255488a8b559e22214d73e44b340aea756 [diff] |
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
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.