Skip to content

feat: add prepared trace bundles - #333

Open
swananan wants to merge 1 commit into
mainfrom
feature/prepared-trace-bundles
Open

swananan wants to merge 1 commit into
mainfrom
feature/prepared-trace-bundles

Conversation

@swananan

@swananan swananan commented Nov 4, 2026

Copy link
Copy Markdown
Owner

Repeated tracing currently repeats DWARF parsing and LLVM compilation. Add ghostscope prepare to compile a script as an ordinary user and save a versioned bundle, and ghostscope run-bundle to validate the target and attach the saved eBPF programs without DWARF parsing or recompilation.

The runtime verifies format, GhostScope version, architecture, target hash/module identity and executable mappings, retains the target file descriptor during attachment, and reuses normal CLI output and teardown. Preparation publishes bundles atomically without overwriting existing files. English and Chinese documentation describe usage and compatibility constraints.

Initial scope is a single module in a host process, with process-scoped multi-uprobe support (including worker threads). Backtraces, $input_pid, and container PID namespaces are not supported. Runtime must support the saved RingBuf/PerfEventArray and sleepable settings; there is no backend or compilation fallback.

Validation:

  • Formatting and CI-scope Clippy passed; the new e2e test target also passed Clippy.
  • 125 unit/integration tests passed.
  • Full standard host-to-host e2e: 426 passed; final focused rerun: 2 passed.
  • Coverage includes unprivileged preparation, removal of separate debug information, reuse across PIDs, worker-thread/process filtering, both event backends, and invalid bundle/target rejection.
  • On the small C fixture, three-run median readiness was 740/773 ms normally versus 61/30 ms with bundles (RingBuf/PerfEventArray); these are fixture measurements, not general performance guarantees.
  • Broader whole-e2e-crate Clippy was blocked by existing dead_code diagnostics in unchanged runner lifecycle/common code.
  • Container topology matrix intentionally omitted because this initial feature supports host targets only.

Refs #240.

@swananan
swananan force-pushed the feature/prepared-trace-bundles branch from fb20dfd to ea2751e Compare November 4, 2026 15:36

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant