Skip to content

Commit 52b27b4

Browse files
committed
Disable profiling tests on windows
Profiling is not currently supported by jemalloc on windows, as it requires a profiling backend based on libraries available on Windows. As such, we disable the profiling-related tests when running on windows. Signed-off-by: roblabla <[email protected]>
1 parent b87e39f commit 52b27b4

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

jemalloc-ctl/src/macros.rs

+6
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,12 @@ macro_rules! r {
7070
"background_thread" |
7171
"max_background_threads"
7272
if cfg!(any(target_os = "macos", windows)) => return,
73+
"lg_prof_interval" |
74+
"lg_prof_sample" |
75+
"prof_final" |
76+
"prof_leak" |
77+
"prof"
78+
if cfg!(windows) => return,
7379
_ => (),
7480
}
7581

jemalloc-ctl/src/profiling.rs

+20
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,13 @@ option! {
2424
/// # static ALLOC: tikv_jemallocator::Jemalloc = tikv_jemallocator::Jemalloc;
2525
/// #
2626
/// # fn main() {
27+
/// # #[cfg(not(windows))] {
28+
/// #
2729
/// use tikv_jemalloc_ctl::profiling;
2830
/// let lg_prof_interval = profiling::lg_prof_interval::read().unwrap();
2931
/// println!("average interval between memory profile dumps: {}", lg_prof_interval);
32+
/// #
33+
/// # } // #[cfg(..)]
3034
/// # }
3135
/// ```
3236
mib_docs: /// See [`lg_prof_interval`].
@@ -49,9 +53,13 @@ option! {
4953
/// # static ALLOC: tikv_jemallocator::Jemalloc = tikv_jemallocator::Jemalloc;
5054
/// #
5155
/// # fn main() {
56+
/// # #[cfg(not(windows))] {
57+
/// #
5258
/// use tikv_jemalloc_ctl::profiling;
5359
/// let lg_prof_sample = profiling::lg_prof_sample::read().unwrap();
5460
/// println!("average interval between allocation samples: {}", lg_prof_sample);
61+
/// #
62+
/// # } // #[cfg(..)]
5563
/// # }
5664
/// ```
5765
mib_docs: /// See [`lg_prof_sample`].
@@ -79,9 +87,13 @@ option! {
7987
/// # static ALLOC: tikv_jemallocator::Jemalloc = tikv_jemallocator::Jemalloc;
8088
/// #
8189
/// # fn main() {
90+
/// # #[cfg(not(windows))] {
91+
/// #
8292
/// use tikv_jemalloc_ctl::profiling;
8393
/// let prof_final = profiling::prof_final::read().unwrap();
8494
/// println!("dump final memory usage to file: {}", prof_final);
95+
/// #
96+
/// # } // #[cfg(..)]
8597
/// # }
8698
/// ```
8799
mib_docs: /// See [`prof_final`].
@@ -116,9 +128,13 @@ option! {
116128
/// # static ALLOC: tikv_jemallocator::Jemalloc = tikv_jemallocator::Jemalloc;
117129
/// #
118130
/// # fn main() {
131+
/// # #[cfg(not(windows))] {
132+
/// #
119133
/// use tikv_jemalloc_ctl::profiling;
120134
/// let prof = profiling::prof::read().unwrap();
121135
/// println!("is memory profiling enabled: {}", prof);
136+
/// #
137+
/// # } // #[cfg(..)]
122138
/// # }
123139
/// ```
124140
mib_docs: /// See [`prof`].
@@ -146,9 +162,13 @@ option! {
146162
/// # static ALLOC: tikv_jemallocator::Jemalloc = tikv_jemallocator::Jemalloc;
147163
/// #
148164
/// # fn main() {
165+
/// # #[cfg(not(windows))] {
166+
/// #
149167
/// use tikv_jemalloc_ctl::profiling;
150168
/// let prof_leak = profiling::prof_leak::read().unwrap();
151169
/// println!("is leak reporting enabled: {}", prof_leak);
170+
/// #
171+
/// # } // #[cfg(..)]
152172
/// # }
153173
/// ```
154174
mib_docs: /// See [`prof_leak`].

0 commit comments

Comments
 (0)