Skip to content

Commit f260a80

Browse files
authored
*: bump 0.6.0 (#95)
Signed-off-by: Jay Lee <[email protected]>
1 parent 2fde3d8 commit f260a80

File tree

10 files changed

+106
-72
lines changed

10 files changed

+106
-72
lines changed

.github/workflows/main.yml

+10-6
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,6 @@ jobs:
1616
strategy:
1717
matrix:
1818
include:
19-
- name: aarch64-unknown-linux-gnu
20-
target: aarch64-unknown-linux-gnu
21-
nobgt: 0
22-
no_tests: 1
23-
tag: arm64
2419
- name: x86_64-apple-darwin
2520
target: x86_64-apple-darwin
2621
nobgt: 0
@@ -48,6 +43,12 @@ jobs:
4843
nobgt: 0
4944
no_tests: 1
5045
tag: macos-latest
46+
- name: x86_64-unknown-linux-gnu (msrv)
47+
target: x86_64-unknown-linux-gnu
48+
nobgt: 0
49+
no_tests: 0
50+
rust: msrv
51+
tag: ubuntu-latest
5152
runs-on: ${{ matrix.tag }}
5253
env:
5354
TARGET: ${{ matrix.target }}
@@ -62,6 +63,9 @@ jobs:
6263
if [[ "${{ matrix.rust }}" == "nightly" ]]; then
6364
rustup default nightly
6465
fi
66+
if [[ "${{ matrix.rust }}" == "msrv" ]]; then
67+
rustup default `grep rust-version jemalloc-sys/Cargo.toml | cut -d '"' -f 2`
68+
fi
6569
rustup target add ${{ matrix.target }}
6670
if [[ "$TARGET" == "x86_64-unknown-linux-musl" ]]; then
6771
sudo apt install -y musl-tools
@@ -90,5 +94,5 @@ jobs:
9094
- run: cargo clippy -p tikv-jemallocator -- -D clippy::all
9195
- run: cargo clippy -p tikv-jemallocator-global -- -D clippy::all
9296
- run: cargo clippy -p tikv-jemalloc-ctl -- -D clippy::all
93-
- run: env RUSTDOCFLAGS="--cfg jemallocator_docs" cargo doc
97+
- run: env RUSTDOCFLAGS="--cfg jemallocator_docs" cargo doc --features stats,profiling,use_std
9498
- run: shellcheck ci/*.sh

CHANGELOG.md

+17
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
# 0.6.0 - 2024-07-14
2+
3+
- Fix build on riscv64gc-unknown-linux-musl (#67) (#75)
4+
- Allow jemalloc-sys to be the default allocator on musl linux (#70)
5+
- Add Chimera Linux to gmake targets (#73)
6+
- Add profiling options to jemalloc-ctl (#74)
7+
- Fix jemalloc version not shown in API (#77)
8+
- Fix jemalloc stats is still enabled when stats feature is disabled (#82)
9+
- Fix duplicated symbol when build and link on aarch64-linux-android (#83)
10+
- Revise CI runner platform on macOS (#86)
11+
- Allow setting per-target env (#91)
12+
- Remove outdated clippy allows (#94)
13+
- Set MSRV to 1.71.0 (#95)
14+
15+
Note since 0.6.0, if you want to use jemalloc stats, you have to enable the
16+
feature explicitly.
17+
118
# 0.5.4 - 2023-07-22
219

320
- Add disable_initial_exec_tls feature for jemalloc-ctl (#59)

jemalloc-ctl/Cargo.toml

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "tikv-jemalloc-ctl"
3-
version = "0.5.4"
3+
version = "0.6.0"
44
authors = [
55
"Steven Fackler <[email protected]>",
66
"Gonzalo Brito Gadeschi <[email protected]>",
@@ -26,18 +26,20 @@ is-it-maintained-open-issues = { repository = "tikv/jemallocator" }
2626
maintenance = { status = "actively-developed" }
2727

2828
[dependencies]
29-
tikv-jemalloc-sys = { path = "../jemalloc-sys", version = "0.5.0" }
29+
tikv-jemalloc-sys = { path = "../jemalloc-sys", version = "0.6.0" }
3030
libc = { version = "0.2", default-features = false }
3131
paste = "1"
3232

3333
[dev-dependencies]
34-
tikv-jemallocator = { path = "../jemallocator", version = "0.5.0" }
34+
tikv-jemallocator = { path = "../jemallocator", version = "0.6.0" }
3535

3636
[features]
3737
default = []
38+
stats = ["tikv-jemalloc-sys/stats"]
3839
profiling = ["tikv-jemalloc-sys/profiling"]
3940
use_std = [ "libc/use_std" ]
4041
disable_initial_exec_tls = ["tikv-jemalloc-sys/disable_initial_exec_tls"]
4142

4243
[package.metadata.docs.rs]
4344
rustdoc-args = [ "--cfg", "jemallocator_docs" ]
45+
features = ["stats", "profiling", "use_std"]

jemalloc-ctl/src/lib.rs

+57-51
Original file line numberDiff line numberDiff line change
@@ -13,57 +13,62 @@
1313
//! `$op::{read(), write(x), update(x)}` on the type calls `mallctl` with the
1414
//! string-based API. If the operation will be repeatedly performed, a MIB for
1515
//! the operation can be obtained using `$op.mib()`.
16-
//!
17-
//! # Examples
18-
//!
19-
//! Repeatedly printing allocation statistics:
20-
//!
21-
//! ```no_run
22-
//! use std::thread;
23-
//! use std::time::Duration;
24-
//! use tikv_jemalloc_ctl::{stats, epoch};
25-
//!
26-
//! #[global_allocator]
27-
//! static ALLOC: tikv_jemallocator::Jemalloc = tikv_jemallocator::Jemalloc;
28-
//!
29-
//! fn main() {
30-
//! loop {
31-
//! // many statistics are cached and only updated when the epoch is advanced.
32-
//! epoch::advance().unwrap();
33-
//!
34-
//! let allocated = stats::allocated::read().unwrap();
35-
//! let resident = stats::resident::read().unwrap();
36-
//! println!("{} bytes allocated/{} bytes resident", allocated, resident);
37-
//! thread::sleep(Duration::from_secs(10));
38-
//! }
39-
//! }
40-
//! ```
41-
//!
42-
//! Doing the same with the MIB-based API:
43-
//!
44-
//! ```no_run
45-
//! use std::thread;
46-
//! use std::time::Duration;
47-
//! use tikv_jemalloc_ctl::{stats, epoch};
48-
//!
49-
//! #[global_allocator]
50-
//! static ALLOC: tikv_jemallocator::Jemalloc = tikv_jemallocator::Jemalloc;
51-
//!
52-
//! fn main() {
53-
//! let e = epoch::mib().unwrap();
54-
//! let allocated = stats::allocated::mib().unwrap();
55-
//! let resident = stats::resident::mib().unwrap();
56-
//! loop {
57-
//! // many statistics are cached and only updated when the epoch is advanced.
58-
//! e.advance().unwrap();
59-
//!
60-
//! let allocated = allocated.read().unwrap();
61-
//! let resident = resident.read().unwrap();
62-
//! println!("{} bytes allocated/{} bytes resident", allocated, resident);
63-
//! thread::sleep(Duration::from_secs(10));
64-
//! }
65-
//! }
66-
//! ```
16+
#![cfg_attr(
17+
feature = "stats",
18+
doc = r##"
19+
20+
# Examples
21+
22+
Repeatedly printing allocation statistics:
23+
24+
```no_run
25+
use std::thread;
26+
use std::time::Duration;
27+
use tikv_jemalloc_ctl::{stats, epoch};
28+
29+
#[global_allocator]
30+
static ALLOC: tikv_jemallocator::Jemalloc = tikv_jemallocator::Jemalloc;
31+
32+
fn main() {
33+
loop {
34+
// many statistics are cached and only updated when the epoch is advanced.
35+
epoch::advance().unwrap();
36+
37+
let allocated = stats::allocated::read().unwrap();
38+
let resident = stats::resident::read().unwrap();
39+
println!("{} bytes allocated/{} bytes resident", allocated, resident);
40+
thread::sleep(Duration::from_secs(10));
41+
}
42+
}
43+
```
44+
45+
Doing the same with the MIB-based API:
46+
47+
```no_run
48+
use std::thread;
49+
use std::time::Duration;
50+
use tikv_jemalloc_ctl::{stats, epoch};
51+
52+
#[global_allocator]
53+
static ALLOC: tikv_jemallocator::Jemalloc = tikv_jemallocator::Jemalloc;
54+
55+
fn main() {
56+
let e = epoch::mib().unwrap();
57+
let allocated = stats::allocated::mib().unwrap();
58+
let resident = stats::resident::mib().unwrap();
59+
loop {
60+
// many statistics are cached and only updated when the epoch is advanced.
61+
e.advance().unwrap();
62+
63+
let allocated = allocated.read().unwrap();
64+
let resident = resident.read().unwrap();
65+
println!("{} bytes allocated/{} bytes resident", allocated, resident);
66+
thread::sleep(Duration::from_secs(10));
67+
}
68+
}
69+
```
70+
"##
71+
)]
6772
// TODO: rename the following lint on next minor bump
6873
#![allow(renamed_and_removed_lints)]
6974
#![deny(missing_docs, broken_intra_doc_links)]
@@ -90,6 +95,7 @@ pub mod opt;
9095
#[cfg(feature = "profiling")]
9196
pub mod profiling;
9297
pub mod raw;
98+
#[cfg(feature = "stats")]
9399
pub mod stats;
94100
#[cfg(feature = "use_std")]
95101
pub mod stats_print;

jemalloc-sys/Cargo.toml

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "tikv-jemalloc-sys"
3-
version = "0.5.4+5.3.0-1-ge13ca993e8ccb9ba9847cc330696e02839f328f7"
3+
version = "0.6.0+5.3.0-1-ge13ca993e8ccb9ba9847cc330696e02839f328f7"
44
authors = [
55
"Alex Crichton <[email protected]>",
66
"Gonzalo Brito Gadeschi <[email protected]>",
@@ -18,6 +18,7 @@ description = """
1818
Rust FFI bindings to jemalloc
1919
"""
2020
edition = "2018"
21+
rust-version = "1.71.0"
2122

2223
[badges]
2324
codecov = { repository = "tikv/jemallocator" }
@@ -32,7 +33,7 @@ libc = { version = "^0.2.8", default-features = false }
3233
cc = "^1.0.13"
3334

3435
[features]
35-
default = ["stats", "background_threads_runtime_support"]
36+
default = ["background_threads_runtime_support"]
3637
profiling = []
3738
debug = []
3839
background_threads_runtime_support = []

jemallocator-global/Cargo.toml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "tikv-jemallocator-global"
33
# Make sure to update the version in the readme as well:
4-
version = "0.5.0"
4+
version = "0.6.0"
55
authors = [
66
"Gonzalo Brito Gadeschi <[email protected]>",
77
"The TiKV Project Developers",
@@ -26,7 +26,7 @@ is-it-maintained-open-issues = { repository = "tikv/jemallocator" }
2626
maintenance = { status = "actively-developed" }
2727

2828
[dependencies]
29-
tikv-jemallocator = { version = "0.5.0", path = "../jemallocator", optional = true }
29+
tikv-jemallocator = { version = "0.6.0", path = "../jemallocator", optional = true }
3030
cfg-if = "0.1"
3131

3232
[features]
@@ -38,7 +38,7 @@ force_global_jemalloc = [ "tikv-jemallocator" ]
3838
# for a particular target, white-list the target explicitly here:
3939

4040
[target.'cfg(any(target_os = "linux", target_os = "macos", target_os = "freebsd", target_os = "netbsd", target_os = "openbsd"))'.dependencies]
41-
tikv-jemallocator = { version = "0.5.0", path = "../jemallocator", optional = false }
41+
tikv-jemallocator = { version = "0.6.0", path = "../jemallocator", optional = false }
4242

4343
# FIXME: https://github.com/gnzlbg/jemallocator/issues/91
4444
# [target.'cfg(target_os = "windows")'.dependencies]

jemallocator-global/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Add it as a dependency:
1111
```toml
1212
# Cargo.toml
1313
[dependencies]
14-
tikv-jemallocator-global = "0.5.0"
14+
tikv-jemallocator-global = "0.6.0"
1515
```
1616

1717
and `jemalloc` will be used as the `#[global_allocator]` on targets that support

jemallocator-global/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
//! ```toml
66
//! # Cargo.toml
77
//! [dependencies]
8-
//! jemallocator-global = "0.5.0"
8+
//! jemallocator-global = "0.6.0"
99
//! ```
1010
//!
1111
//! and `jemalloc` will be used as the `#[global_allocator]` on targets that

jemallocator/Cargo.toml

+8-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "tikv-jemallocator"
33
# Make sure to update the version in the README as well:
4-
version = "0.5.4"
4+
version = "0.6.0"
55
authors = [
66
"Alex Crichton <[email protected]>",
77
"Gonzalo Brito Gadeschi <[email protected]>",
@@ -32,16 +32,20 @@ maintenance = { status = "actively-developed" }
3232
test = false
3333
bench = false
3434

35+
[[test]]
36+
name = "ffi"
37+
required-features = ["stats"]
38+
3539
[dependencies]
36-
tikv-jemalloc-sys = { path = "../jemalloc-sys", version = "0.5.0", default-features = false }
40+
tikv-jemalloc-sys = { path = "../jemalloc-sys", version = "0.6.0", default-features = false }
3741
libc = { version = "^0.2.8", default-features = false }
3842

3943
[dev-dependencies]
4044
paste = "1"
41-
tikv-jemalloc-ctl = { path = "../jemalloc-ctl", version = "0.5.0" }
45+
tikv-jemalloc-ctl = { path = "../jemalloc-ctl", version = "0.6.0" }
4246

4347
[features]
44-
default = ["stats", "background_threads_runtime_support"]
48+
default = ["background_threads_runtime_support"]
4549
alloc_trait = []
4650
profiling = ["tikv-jemalloc-sys/profiling"]
4751
debug = ["tikv-jemalloc-sys/debug"]

jemallocator/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ To use `tikv-jemallocator` add it as a dependency:
3030
[dependencies]
3131

3232
[target.'cfg(not(target_env = "msvc"))'.dependencies]
33-
tikv-jemallocator = "0.5"
33+
tikv-jemallocator = "0.6"
3434
```
3535

3636
To set `tikv_jemallocator::Jemalloc` as the global allocator add this to your project:

0 commit comments

Comments
 (0)