]> git.ipfire.org Git - thirdparty/openssl.git/commit
crypto/threads_lock_contention: factor out obtaining the stack traces data pointer
authorEugene Syromiatnikov <esyr@openssl.org>
Mon, 7 Jul 2025 13:28:11 +0000 (15:28 +0200)
committerNeil Horman <nhorman@openssl.org>
Thu, 7 Aug 2025 15:02:51 +0000 (11:02 -0400)
commitc47c16ee400f3b4e6900274760e968c145d2f0f0
tree7c868f65306b40f0d03f397c5cf53621da7ff6fb
parent1178184e96b4748f552a7904682ae1b7804e3edc
crypto/threads_lock_contention: factor out obtaining the stack traces data pointer

It also drops the premature initalisation of it in
ossl_init_rwlock_contention_data(), deferring it to on-demand one
in ossl_rwlock_{rd,wr}lock(), which seems to shave some of the incurred
overhead:

    [Before]
    ~/dev/perftools/source$ ./evp_fetch 100
    Average time per fetch call: 16.944004us
    ~/dev/perftools/source$ ./evp_fetch 200
    Average time per fetch call: 26.325767us

    [After]
    ~/dev/perftools/source$ ./evp_fetch 100
    Average time per fetch call: 13.079795us
    ~/dev/perftools/source$ ./evp_fetch 200
    Average time per fetch call: 23.420235us

Signed-off-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/27983)
crypto/threads_pthread.c