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
12 changes: 6 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-24.04
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy,rustfmt
Expand All @@ -38,7 +38,7 @@ jobs:
container:
image: ${{ matrix.image }}
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
- name: Install native build tools
run: >-
apt-get update && apt-get install -y --no-install-recommends
Expand All @@ -62,7 +62,7 @@ jobs:
if readelf -d build/cuda/cupti/libxprobe-cupti.so | grep -E '\((RPATH|RUNPATH)\)'; then
exit 1
fi
- uses: actions/upload-artifact@v4
- uses: actions/upload-artifact@v7
with:
name: xprobe-cupti-cuda${{ matrix.cuda_major }}-linux-x86_64
path: build/cuda/cupti/libxprobe-cupti.so
Expand All @@ -75,7 +75,7 @@ jobs:
runs-on: ubuntu-22.04
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
- name: Install build tools
run: |
sudo apt-get update
Expand All @@ -86,11 +86,11 @@ jobs:
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal --default-toolchain stable
echo "$HOME/.cargo/bin" >> "$GITHUB_PATH"
- uses: actions/download-artifact@v4
- uses: actions/download-artifact@v8
with:
name: xprobe-cupti-cuda12-linux-x86_64
path: build/cuda12/cupti
- uses: actions/download-artifact@v4
- uses: actions/download-artifact@v8
with:
name: xprobe-cupti-cuda13-linux-x86_64
path: build/cuda13/cupti
Expand Down
28 changes: 27 additions & 1 deletion .github/workflows/hardware.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,25 @@ permissions:
jobs:
gpu-and-bpf:
runs-on: [self-hosted, linux, x64, nvidia]
timeout-minutes: 120
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy,rustfmt
- uses: taiki-e/install-action@just
- name: Verify CPU profiler prerequisites
run: |
command -v perf
command -v py-spy
sudo -n true
/usr/bin/python3 -X perf -c \
"import sys; assert sys._xoptions.get('perf') is True"
- run: just test-bpf-live
- name: Test CPU and Python sampling
run: >-
sudo --preserve-env=PATH,CARGO_HOME,RUSTUP_HOME
"$(command -v just)" test-cpu-live
- run: just test-cupti-live-cuda12
- run: just test-nvtx-live-cuda12
- run: just test-cupti-live-cuda12-min
Expand All @@ -31,3 +43,17 @@ jobs:
- run: just benchmark-aggregate
- run: just benchmark-multiprocess
- run: just benchmark-pytorch
- name: Benchmark CPU inventory
run: >-
sudo --preserve-env=PATH
/usr/bin/python3 benchmarks/cpu-inventory/run.py
--xprobe "$PWD/target/debug/xprobe"
--python /usr/bin/python3
--perf "$(command -v perf)"
--py-spy "$(command -v py-spy)"
| tee cpu-inventory-benchmark.json
- uses: actions/upload-artifact@v7
with:
name: cpu-inventory-benchmark
path: cpu-inventory-benchmark.json
if-no-files-found: error
36 changes: 29 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,32 @@ on:
- "v*"

permissions:
actions: read
contents: write

jobs:
hardware-gate:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v6
- name: Require successful hardware validation for this commit
env:
GH_TOKEN: ${{ github.token }}
run: |
commit=$(git rev-parse HEAD)
runs=$(gh api --method GET \
"repos/${GITHUB_REPOSITORY}/actions/workflows/hardware.yml/runs" \
-f head_sha="$commit" \
-f status=success \
-f per_page=100 \
--jq '.total_count')
if [ "$runs" -lt 1 ]; then
echo "No successful Hardware Integration run exists for $commit" >&2
exit 1
fi

cupti-agent:
needs: hardware-gate
runs-on: ubuntu-24.04
strategy:
fail-fast: false
Expand All @@ -22,7 +44,7 @@ jobs:
container:
image: ${{ matrix.image }}
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
- name: Install build tools
env:
DEBIAN_FRONTEND: noninteractive
Expand All @@ -45,7 +67,7 @@ jobs:
grep -E '\((RPATH|RUNPATH)\)'; then
exit 1
fi
- uses: actions/upload-artifact@v4
- uses: actions/upload-artifact@v7
with:
name: xprobe-cupti-cuda${{ matrix.cuda_major }}-linux-x86_64
path: build/cuda/cupti/libxprobe-cupti.so
Expand All @@ -55,7 +77,7 @@ jobs:
needs: cupti-agent
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
- name: Install build tools
run: |
sudo apt-get update
Expand All @@ -66,23 +88,23 @@ jobs:
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal --default-toolchain stable
echo "$HOME/.cargo/bin" >> "$GITHUB_PATH"
- uses: actions/download-artifact@v4
- uses: actions/download-artifact@v8
with:
name: xprobe-cupti-cuda12-linux-x86_64
path: build/cuda12/cupti
- uses: actions/download-artifact@v4
- uses: actions/download-artifact@v8
with:
name: xprobe-cupti-cuda13-linux-x86_64
path: build/cuda13/cupti
- name: Build release archive
run: scripts/package-release.sh
- name: Verify release installation
run: tests/install/test_install.sh dist/xprobe-*-linux-x86_64.tar.gz
- uses: actions/upload-artifact@v4
- uses: actions/upload-artifact@v7
with:
name: xprobe-linux-x86_64
path: dist/*.tar.gz*
- uses: softprops/action-gh-release@v2
- uses: softprops/action-gh-release@v3
with:
files: dist/*.tar.gz*
generate_release_notes: true
Expand Down
6 changes: 6 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@
- Resolve architecture-specific syscall names in core. In BPF, filter process
identity and syscall number before reading scalar registers or reserving a
record. Arm multi-link collectors only after every link is attached.
- Resolve runtime probes from mapped binary capabilities, not process names.
libbpf USDT attachment requires its support maps even when xprobe does not
read marker arguments.

## Failures and safety

Expand All @@ -43,6 +46,9 @@
default. Named tracepoints retain identity and timestamps unless a versioned
scalar payload is explicitly designed. Never describe temporal correlation
as exact causality.
- Treat sampled hotspot proportions as estimates. Preserve sample loss, stack
truncation, thread coverage, symbol coverage, and native fallback when Python
semantic symbols are unavailable.

## Agent workflow

Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.20)

project(xprobe VERSION 0.4.1 LANGUAGES C)
project(xprobe VERSION 0.5.0 LANGUAGES C)

include(CTest)

Expand Down
Loading