From: Willy Tarreau Date: Mon, 5 May 2025 16:10:57 +0000 (+0200) Subject: DEBUG: threads: don't keep lock label "OTHER" in the per-thread history X-Git-Tag: v3.2-dev15~30 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=743dce95d28c885bf0f7eca34583014bbb7aebf1;p=thirdparty%2Fhaproxy.git DEBUG: threads: don't keep lock label "OTHER" in the per-thread history Most threads are filled with "R:OTHER U:OTHER" in their history. Since anything non-important can use other it's not observable but it pollutes the history. Let's just drop OTHER entirely during the recording. --- diff --git a/include/haproxy/thread.h b/include/haproxy/thread.h index 92bf6a647..d5c27cf9b 100644 --- a/include/haproxy/thread.h +++ b/include/haproxy/thread.h @@ -338,11 +338,12 @@ static inline unsigned long thread_isolated() #define _lock_wait(_LK_, lbl, expr) do { \ (void)(expr); \ - th_ctx->lock_history = (th_ctx->lock_history << 8) + ((lbl + 1) << 2) + _LK_; \ + if (lbl != OTHER_LOCK) \ + th_ctx->lock_history = (th_ctx->lock_history << 8) + ((lbl + 1) << 2) + _LK_; \ } while (0) #define _lock_cond(_LK_, lbl, expr) ({ \ typeof(expr) _expr = (expr); \ - if (!_expr) \ + if (lbl != OTHER_LOCK && !_expr) \ th_ctx->lock_history = (th_ctx->lock_history << 8) + ((lbl + 1) << 2) + _LK_; \ _expr; \ })