Skip to content

Commit 70e2e74

Browse files
pyroscope-io: Add version 1.2.5 (#2618)
* pyroscope-io: Add version 1.2.5 Signed-off-by: riseproject-dev[bot] <330740410+riseproject-dev[bot]@users.noreply.github.com> * pyroscope-io: carry forward riscv64 patches to 1.2.5 Nightly version bump omitted the patches/pyroscope-io/<version> directory for 1.2.5, so the build's unconditional `git apply .../*.patch` step failed with "No such file or directory" before any build/test ran. Copied forward the same patch set from 1.2.4 (unchanged since then). * pyroscope-io: regenerate 1.2.5 cargo patch for the new py-spy pin pyroscope-python 1.2.5 moved its py-spy git dependency from rev d6fe739 to e9858c0, so the Cargo.lock hunk of 0001 (which drops the py-spy source line) no longer matched and git apply failed at rust/Cargo.lock:1180. Regenerated by checking out python-1.2.5, cloning py-spy at e9858c0 with 0002 applied, adding the same [patch] section to rust/Cargo.toml and letting cargo rewrite Cargo.lock. Cargo again only drops the py-spy source line; cargo metadata/fetch/tree --locked accept the result. 0002 applies unchanged to e9858c0. --------- Signed-off-by: riseproject-dev[bot] <330740410+riseproject-dev[bot]@users.noreply.github.com> Co-authored-by: riseproject-dev[bot] <330740410+riseproject-dev[bot]@users.noreply.github.com> Co-authored-by: Ludovic Henry <git@ludovic.dev>
1 parent 1d147ad commit 70e2e74

3 files changed

Lines changed: 89 additions & 0 deletions

File tree

‎docs/packages/pyroscope-io.yaml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,3 +54,4 @@ versions:
5454
- filename: pyroscope_io-1.2.4-cp314-cp314-manylinux_2_38_riscv64.manylinux_2_39_riscv64.whl
5555
sha256: 019c654ea03a7731bf56ee3b9c31f1fd38088547f861f2da095aa8cb5aeb11b6
5656
requires-python: '>=3.10'
57+
- version: 1.2.5
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
2+
From: Ludovic Henry <git@ludovic.dev>
3+
Date: Sat, 10 Oct 2026 07:57:26 +0000
4+
Subject: [PATCH] cargo: build py-spy from a locally patched checkout
5+
6+
py-spy does not compile for riscv64: pyruntime::get_tstate_current_offset
7+
is defined once per architecture and riscv64 matches none of the arms, so
8+
the build fails with
9+
10+
error[E0425]: cannot find function `get_tstate_current_offset` in module `pyruntime`
11+
12+
py-spy is pulled in as a git dependency pinned to a revision, so the fix
13+
cannot be applied in place. Redirect the git source to a checkout of that
14+
same revision carrying the one-line riscv64 addition, see
15+
0002-python_bindings-return-no-tstate_current-offset-on-riscv64.patch.
16+
17+
Only the source line of the py-spy entry changes in Cargo.lock, so every
18+
other dependency stays pinned exactly as upstream released it and the
19+
build keeps running with --locked.
20+
21+
Upstream-Status: Inappropriate [redirects a pinned dependency to a local checkout; the fix itself belongs in py-spy]
22+
23+
Signed-off-by: Ludovic Henry <git@ludovic.dev>
24+
---
25+
rust/Cargo.lock | 1 -
26+
rust/Cargo.toml | 3 +++
27+
2 files changed, 3 insertions(+), 1 deletion(-)
28+
29+
diff --git a/rust/Cargo.lock b/rust/Cargo.lock
30+
index 8dcb907..2d7c807 100644
31+
--- a/rust/Cargo.lock
32+
+++ b/rust/Cargo.lock
33+
@@ -1180,7 +1180,6 @@ dependencies = [
34+
[[package]]
35+
name = "py-spy"
36+
version = "0.4.2"
37+
-source = "git+https://github.com/grafana/pyroscope-py-spy?rev=e9858c0#e9858c037e796327391708f43d454ec611594ecc"
38+
dependencies = [
39+
"anyhow",
40+
"chrono",
41+
diff --git a/rust/Cargo.toml b/rust/Cargo.toml
42+
index ae938fd..c107f29 100644
43+
--- a/rust/Cargo.toml
44+
+++ b/rust/Cargo.toml
45+
@@ -32,3 +32,6 @@ cmake = "0.1"
46+
[features]
47+
default = []
48+
memory = []
49+
+
50+
+[patch."https://github.com/grafana/pyroscope-py-spy"]
51+
+py-spy = { path = "../py-spy" }
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
2+
From: Ludovic Henry <git@ludovic.dev>
3+
Date: Thu, 27 Aug 2026 00:00:00 +0000
4+
Subject: [PATCH] python_bindings: return no tstate_current offset on riscv64
5+
6+
Applied to the py-spy checkout that pyroscope-python pins as a git
7+
dependency.
8+
9+
pyruntime::get_tstate_current_offset has one definition per architecture
10+
and riscv64 matches none of them, so any riscv64 build of py-spy fails to
11+
compile:
12+
13+
error[E0425]: cannot find function `get_tstate_current_offset` in module `pyruntime`
14+
15+
Add riscv64 to the arm that returns None, the same answer powerpc, powerpc64
16+
and mips give. The offset is only consulted for CPython 3.7 to 3.11, where
17+
the caller already handles None by reporting an unknown offset; 3.12 and
18+
later read the GIL through a struct offset instead.
19+
20+
Upstream-Status: To upstream [targets the py-spy dependency rather than pyroscope-python; not yet submitted to benfred/py-spy]
21+
22+
Signed-off-by: Ludovic Henry <git@ludovic.dev>
23+
---
24+
diff --git a/src/python_bindings/mod.rs b/src/python_bindings/mod.rs
25+
index 772e4de..df9e4cb 100644
26+
--- a/src/python_bindings/mod.rs
27+
+++ b/src/python_bindings/mod.rs
28+
@@ -195,7 +195,8 @@ pub mod pyruntime {
29+
any(
30+
target_arch = "powerpc64",
31+
target_arch = "powerpc",
32+
- target_arch = "mips"
33+
+ target_arch = "mips",
34+
+ target_arch = "riscv64"
35+
)
36+
))]
37+
pub fn get_tstate_current_offset(version: &Version) -> Option<usize> {

0 commit comments

Comments
 (0)