android: stack.py: revert to copying input lines by default

In crrev.com/c/926227 copying of input lines to output was removed, as
it was confusing/slow for interactive use in the terminal. However, some
users appreciate this mode allowing them to pipe adb logcat through the
stack tool.

Inspecting further, the mode that omits irrelevant lines existed: it was
automatically used when FILE was provided (to not be stdin).

Add an option --pass-through (or -p) to control copying the non-trace lines.

Make --pass-through incompatible with reading from a non-stdin FILE because the
idea of the latter is to pre-filter the lines and run them through
multiprocessing.  Pre-filtering, passthrough and post-merging sounds too
complicated right now.

Bug: None
Change-Id: I547435db6d796b02ac7abbad0146fd1588374ff0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3436569
Reviewed-by: Andrew Grieve <agrieve@chromium.org>
Commit-Queue: Egor Pasko <pasko@chromium.org>
Cr-Commit-Position: refs/heads/main@{#967373}
NOKEYCHECK=True
GitOrigin-RevId: a0e06cf4221365fbbab9b1a0316e786b19eb8bbf
2 files changed
tree: 095ae3760025c29db44a4a82ba0594c58c6396b8
  1. development/
  2. DIR_METADATA
  3. LICENSE
  4. OWNERS
  5. README.chromium