fix(capture): preserve native profiler and log process ownership
Summary
Keep native profiler stop and rollback tied to the capture that owns the process. Drain app-log output before releasing published markers and preserve write failures through finalization.
Before / after
- Android
perf trace stopchecks the executable and output argument before each signal using Android-compatible shell syntax. A zombie counts as stopped. An unconfirmed stop preserves the remote artifact. An Apple xctrace rollback without a process marker blocks device admission through the daemon’s temporary cleanup ledger. perf cpu profile report --kind simpleperfstages the saved session profile, reports a missing file asCOMMAND_FAILED, and publishes the report even if temporary-file removal fails.- Apple
logs stopreleases the process and sink after a child exit and reports lost writes. Marker-publication rollback can return while a sink write is pending.
Validation
API 36 Google APIs x86_64 emulator emulator-5554 (sdk_gphone64_x86_64) stopped Perfetto (9,362,323 bytes) and Simpleperf (306,023 bytes). Report generation failed on --stdio. PR head e06e4fc2a88bd03c11db2b2d44d89ca0762ff897, tested merge eb4ba9b6db1872e159e0f0ed7074d9d293fc7519. Android job log
Head 23cb0dfe2bf73c2a25c42be98dd78b225c60fffb removes --stdio and tests the supported arguments and report columns. Device CI must confirm a nonempty report. At merge SHA ba27e2f8, iOS 26.2 captured a Preferences entry and stopped.
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.