Skip to content

Commit 432b59f

Browse files
committed
Use libunwind for jemalloc memory profiling stack traces
1 parent ec6dcd1 commit 432b59f

4 files changed

Lines changed: 15 additions & 11 deletions

File tree

Cargo.lock

Lines changed: 4 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ test-log = { version = "0.2.15", default-features = false, features = [
257257
test-strategy = "0.3.1"
258258
thiserror = "1.0.65"
259259
thiserror-context = "0.1.1"
260-
tikv-jemallocator = "0.6.0"
260+
tikv-jemallocator = { git = "https://github.com/linera-io/jemallocator.git", rev = "16f3e75fb145e12f5ae15ed232d1368d4539fc14" }
261261
tokio = "1.36.0"
262262
tokio-stream = "0.1.14"
263263
tokio-test = "0.4.3"
@@ -409,3 +409,7 @@ ref_option_ref = "deny"
409409
str_split_at_newline = "deny"
410410
unnecessary_wraps = "deny"
411411
used_underscore_binding = "deny"
412+
413+
[patch.crates-io]
414+
tikv-jemallocator = { git = "https://github.com/linera-io/jemallocator.git", rev = "16f3e75fb145e12f5ae15ed232d1368d4539fc14" }
415+
tikv-jemalloc-sys = { git = "https://github.com/linera-io/jemallocator.git", rev = "16f3e75fb145e12f5ae15ed232d1368d4539fc14" }

docker/Dockerfile

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ ARG copy=${binaries:+_copy}
1717
ARG build_flag=--release
1818
ARG build_folder=release
1919
ARG build_features=scylladb,metrics,jemalloc
20-
ARG rustflags="-C force-frame-pointers=yes"
20+
ARG rustflags="-C force-frame-pointers=yes -L /usr/lib/x86_64-linux-gnu"
2121

2222
FROM rust:1.86-slim-bookworm AS builder
2323
ARG git_commit
@@ -30,7 +30,8 @@ RUN apt-get update && apt-get install -y \
3030
pkg-config \
3131
protobuf-compiler \
3232
clang \
33-
make
33+
make \
34+
libunwind-dev
3435

3536
COPY examples examples
3637
COPY linera-base linera-base
@@ -99,7 +100,8 @@ LABEL build_date=$build_date
99100

100101
RUN apt-get update && apt-get install -y \
101102
ca-certificates \
102-
openssl
103+
openssl \
104+
libunwind8
103105
RUN update-ca-certificates
104106

105107
COPY --from=binaries \

linera-service/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ metrics = [
5454
]
5555
jemalloc = [
5656
"tikv-jemallocator",
57-
"tikv-jemallocator/profiling",
57+
"tikv-jemallocator/profiling_libunwind",
5858
"linera-metrics/jemalloc",
5959
]
6060
storage-service = ["linera-storage-service"]

0 commit comments

Comments
 (0)