@@ -202,42 +202,45 @@ pub(crate) unsafe fn profiling_enabled() -> bool {
202
202
/// This function must only be called after config has been initialized in
203
203
/// rinit, and before it is uninitialized in mshutdown.
204
204
pub ( crate ) unsafe fn profiling_experimental_features_enabled ( ) -> bool {
205
- get_bool ( ProfilingExperimentalFeaturesEnabled , false )
205
+ profiling_enabled ( ) && get_bool ( ProfilingExperimentalFeaturesEnabled , false )
206
206
}
207
207
208
208
/// # Safety
209
209
/// This function must only be called after config has been initialized in
210
210
/// rinit, and before it is uninitialized in mshutdown.
211
211
pub ( crate ) unsafe fn profiling_endpoint_collection_enabled ( ) -> bool {
212
- get_bool ( ProfilingEndpointCollectionEnabled , true )
212
+ profiling_enabled ( ) && get_bool ( ProfilingEndpointCollectionEnabled , true )
213
213
}
214
214
215
215
/// # Safety
216
216
/// This function must only be called after config has been initialized in
217
217
/// rinit, and before it is uninitialized in mshutdown.
218
218
pub ( crate ) unsafe fn profiling_experimental_cpu_time_enabled ( ) -> bool {
219
- get_bool ( ProfilingExperimentalCpuTimeEnabled , true )
219
+ profiling_experimental_features_enabled ( )
220
+ || profiling_enabled ( ) && get_bool ( ProfilingExperimentalCpuTimeEnabled , true )
220
221
}
221
222
222
223
/// # Safety
223
224
/// This function must only be called after config has been initialized in
224
225
/// rinit, and before it is uninitialized in mshutdown.
225
226
pub ( crate ) unsafe fn profiling_allocation_enabled ( ) -> bool {
226
- get_bool ( ProfilingAllocationEnabled , true )
227
+ profiling_enabled ( ) && get_bool ( ProfilingAllocationEnabled , true )
227
228
}
228
229
229
230
/// # Safety
230
231
/// This function must only be called after config has been initialized in
231
232
/// rinit, and before it is uninitialized in mshutdown.
232
233
pub ( crate ) unsafe fn profiling_experimental_timeline_enabled ( ) -> bool {
233
- get_bool ( ProfilingExperimentalTimelineEnabled , false )
234
+ profiling_experimental_features_enabled ( )
235
+ || profiling_enabled ( ) && get_bool ( ProfilingExperimentalTimelineEnabled , false )
234
236
}
235
237
236
238
/// # Safety
237
239
/// This function must only be called after config has been initialized in
238
240
/// rinit, and before it is uninitialized in mshutdown.
239
241
pub ( crate ) unsafe fn profiling_exception_enabled ( ) -> bool {
240
- get_bool ( ProfilingExceptionEnabled , true )
242
+ profiling_experimental_features_enabled ( )
243
+ || profiling_enabled ( ) && get_bool ( ProfilingExceptionEnabled , true )
241
244
}
242
245
243
246
/// # Safety
0 commit comments