Skip to content

Commit a006f3b

Browse files
committed
Use libunwind for jemalloc memory profiling stack traces
1 parent 0ec146a commit a006f3b

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
@@ -250,7 +250,7 @@ test-log = { version = "0.2.15", default-features = false, features = [
250250
test-strategy = "0.3.1"
251251
thiserror = "1.0.65"
252252
thiserror-context = "0.1.1"
253-
tikv-jemallocator = "0.6.0"
253+
tikv-jemallocator = { git = "https://github.com/linera-io/jemallocator.git", rev = "f84df98b7ec552c31c26f334beabbdab4982d1cb" }
254254
tokio = "1.36.0"
255255
tokio-stream = "0.1.14"
256256
tokio-test = "0.4.3"
@@ -387,3 +387,7 @@ range_minus_one = "deny"
387387
range_plus_one = "deny"
388388
ref_option_ref = "deny"
389389
str_split_at_newline = "deny"
390+
391+
[patch.crates-io]
392+
tikv-jemallocator = { git = "https://github.com/linera-io/jemallocator.git", rev = "f84df98b7ec552c31c26f334beabbdab4982d1cb" }
393+
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
@@ -98,7 +99,8 @@ LABEL build_date=$build_date
9899

99100
RUN apt-get update && apt-get install -y \
100101
ca-certificates \
101-
openssl
102+
openssl \
103+
libunwind8
102104
RUN update-ca-certificates
103105

104106
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)