Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: Use jemalloc on all platforms #2517

Closed
wants to merge 2 commits into from
Closed
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
1 change: 1 addition & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
- .github/workflows/release.yml
- justfile
- Cargo.toml # For release build settings
- linkerd2-proxy/* # For top-level binary changes
push:
tags:
- "release/*"
Expand Down
42 changes: 21 additions & 21 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -794,26 +794,6 @@ version = "1.0.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "453ad9f582a441959e5f0d088b02ce04cfe8d51a8eaf077f12ac6d3e94164ca6"

[[package]]
name = "jemalloc-sys"
version = "0.5.3+5.3.0-patched"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f9bd5d616ea7ed58b571b2e209a65759664d7fb021a0819d7a790afc67e47ca1"
dependencies = [
"cc",
"libc",
]

[[package]]
name = "jemallocator"
version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "16c2514137880c52b0b4822b563fadd38257c1f380858addb74a400889696ea6"
dependencies = [
"jemalloc-sys",
"libc",
]

[[package]]
name = "jobserver"
version = "0.1.26"
Expand Down Expand Up @@ -1943,11 +1923,11 @@ name = "linkerd2-proxy"
version = "0.1.0"
dependencies = [
"futures",
"jemallocator",
"linkerd-app",
"linkerd-meshtls",
"linkerd-signal",
"num_cpus",
"tikv-jemallocator",
"tokio",
"tracing",
]
Expand Down Expand Up @@ -2727,6 +2707,26 @@ dependencies = [
"once_cell",
]

[[package]]
name = "tikv-jemalloc-sys"
version = "0.5.4+5.3.0-patched"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9402443cb8fd499b6f327e40565234ff34dbda27460c5b47db0db77443dd85d1"
dependencies = [
"cc",
"libc",
]

[[package]]
name = "tikv-jemallocator"
version = "0.5.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "965fe0c26be5c56c94e38ba547249074803efd52adfb66de62107d95aab3eaca"
dependencies = [
"libc",
"tikv-jemalloc-sys",
]

[[package]]
name = "time"
version = "0.3.30"
Expand Down
4 changes: 2 additions & 2 deletions linkerd2-proxy/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@ linkerd-signal = { path = "../linkerd/signal" }
tokio = { version = "1", features = ["rt", "time", "net"] }
tracing = "0.1"

[target.x86_64-unknown-linux-gnu.dependencies]
jemallocator = { version = "0.5" }
[target.'cfg(not(target_env = "msvc"))'.dependencies]
tikv-jemallocator = "0.5"
4 changes: 2 additions & 2 deletions linkerd2-proxy/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ use linkerd_signal as signal;
use tokio::{sync::mpsc, time};
pub use tracing::{debug, error, info, warn};

#[cfg(all(target_os = "linux", target_arch = "x86_64", target_env = "gnu"))]
#[cfg(not(target_env = "msvc"))]
#[global_allocator]
static GLOBAL: jemallocator::Jemalloc = jemallocator::Jemalloc;
static GLOBAL: tikv_jemallocator::Jemalloc = tikv_jemallocator::Jemalloc;

mod rt;

Expand Down
Loading