Skip to content

Commit 3cf1a03

Browse files
committed
Use libunwind for jemalloc memory profiling stack traces
1 parent 23c683e commit 3cf1a03

4 files changed

Lines changed: 14 additions & 9 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 = "f84df98b7ec552c31c26f334beabbdab4982d1cb" }
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 = "f84df98b7ec552c31c26f334beabbdab4982d1cb" }
415+
tikv-jemalloc-sys = { git = "https://github.com/linera-io/jemallocator.git", rev = "f84df98b7ec552c31c26f334beabbdab4982d1cb" }

docker/Dockerfile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -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 & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ metrics = [
5555
jemalloc = [
5656
"tikv-jemallocator",
5757
"tikv-jemallocator/profiling",
58+
"tikv-jemallocator/profiling_libunwind",
5859
"linera-metrics/jemalloc",
5960
]
6061
storage-service = ["linera-storage-service"]

0 commit comments

Comments
 (0)