v.24.6Improvement

Add async metric jemalloc.profile.active for sampling activation

Add an asynchronous metric jemalloc.profile.active to show whether sampling is currently active. This is an activation mechanism in addition to prof.active; both must be active for the calling thread to sample. #64842 (Unalian).
Added a new asynchronous metric jemalloc.profile.active to indicate whether jemalloc sampling is currently active, requiring both this metric and prof.active to be active for thread sampling.

Why it matters

This feature provides a more precise activation control for jemalloc sampling by introducing an additional activation metric. By requiring both jemalloc.profile.active and prof.active to be active, it ensures that sampling occurs only when intended, improving profiling accuracy and resource management.

How to use it

Users need to enable both jemalloc.profile.active and prof.active metrics for the calling thread to activate jemalloc sampling. This can be done by monitoring or configuring these metrics appropriately in the system to start sampling.