Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,23 @@ permissions:
contents: read

jobs:
commit-messages:
# Commits not on master yet: a pull request's own commits, or a branch's.
if: github.event_name == 'pull_request' || (startsWith(github.ref, 'refs/heads/') && github.ref != 'refs/heads/master')
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- uses: actions/setup-python@v6
with:
python-version: "3.12"
- run: python -m pip install gitlint-core==0.19.1
- name: Lint commit messages
env:
RANGE: ${{ github.event_name == 'pull_request' && format('{0}..{1}', github.event.pull_request.base.sha, github.event.pull_request.head.sha) || 'origin/master..HEAD' }}
run: gitlint --commits "$RANGE"

build-and-test:
runs-on: ubuntu-24.04
timeout-minutes: 30
Expand Down Expand Up @@ -38,6 +55,12 @@ jobs:
image: ${{ matrix.image }}
steps:
- uses: actions/checkout@v6
# The CUDA images use Canonical's archive, which has had outages; the
# Azure mirror is what GitHub's runner hosts use.
- name: Use the Azure Ubuntu mirror
run: >-
sed -i -E 's#http://(archive|security)\.ubuntu\.com#http://azure.archive.ubuntu.com#'
/etc/apt/sources.list
- name: Install native build tools
run: >-
apt-get update && apt-get install -y --no-install-recommends
Expand Down
9 changes: 8 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ jobs:
image: ${{ matrix.image }}
steps:
- uses: actions/checkout@v6
# The CUDA images use Canonical's archive, which has had outages; the
# Azure mirror is what GitHub's runner hosts use.
- name: Use the Azure Ubuntu mirror
run: >-
sed -i -E 's#http://(archive|security)\.ubuntu\.com#http://azure.archive.ubuntu.com#'
/etc/apt/sources.list
- name: Install build tools
env:
DEBIAN_FRONTEND: noninteractive
Expand Down Expand Up @@ -157,12 +163,13 @@ jobs:
permissions:
id-token: write
steps:
# Check out first: checkout cleans the workspace, including dist/.
- uses: actions/checkout@v6
- uses: actions/download-artifact@v8
with:
name: xprobe-wheel
path: dist
- uses: pypa/gh-action-pypi-publish@release/v1
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
with:
python-version: "3.12"
Expand Down
15 changes: 14 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,17 @@ skills/xprobe-perf-profiling/scripts/analyze_trace.py rank0.jsonl rank1.jsonl ra

Because concurrent captures on one host share `CLOCK_MONOTONIC`, you can also join traces across different processes (for example, an API/scheduler process and its GPU workers) in a few lines of Python, or re-correlate saved Event JSONL offline with `xprobe measure --input`.

## 📊 Measured overhead

<p align="center">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="docs/assets/xprobe-bench-dark.svg">
<img alt="Measured xprobe profiling overhead across Python external sampling, CPU sampling, uprobes, CUPTI, perf, and py-spy" src="docs/assets/xprobe-bench-light.svg" width="880">
</picture>
</p>

<p align="center"><sub>2 s runs per case; lower is better (1.00x = zero overhead). See <a href="docs/benchmarks.md">Benchmarks</a> for full methodology, stress numbers, and reproducible recipes.</sub></p>

## 🛠️ Commands & runtime notes

| Command | Purpose |
Expand All @@ -121,8 +132,10 @@ Because concurrent captures on one host share `CLOCK_MONOTONIC`, you can also jo

## 📚 Documentation

Full documentation: [English](https://docs.itdevwu.com/en/xprobe) · [中文](https://docs.itdevwu.com/xprobe)

- [Installation](docs/installation.md)
- [CLI contract](docs/cli-contract.md)
- [CLI reference](docs/cli-reference.md)
- [Agent integration](docs/agent-integration.md)
- [Architecture](docs/architecture.md)
- [CUPTI agent and injection](docs/cupti-agent.md)
Expand Down
7 changes: 7 additions & 0 deletions docs/assets/xprobe-bench-dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions docs/assets/xprobe-bench-light.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions docs/benchmarks.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

## Sample measurements

<p align="center">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="assets/xprobe-bench-dark.svg">
<img alt="Measured xprobe profiling overhead across Python external sampling, CPU sampling, uprobes, CUPTI, perf, and py-spy" src="assets/xprobe-bench-light.svg" width="880">
</picture>
</p>

One run on WSL2 with an RTX 3060 Laptop GPU (xprobe 0.7), measured as the ratio of target throughput without vs. with profiling over 2 s per case (lower is better; `1.00` = zero overhead):

| Collector | Workload | Throughput ratio | Event / sample rate |
Expand Down
Loading