]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
common/Mutex: avoid trylock on lock if instrumentation is not enabled 5640/head
authorSage Weil <sage@redhat.com>
Sun, 23 Aug 2015 18:02:59 +0000 (14:02 -0400)
committerSage Weil <sage@redhat.com>
Sun, 23 Aug 2015 18:02:59 +0000 (14:02 -0400)
commit151c0511050c196003d0737858e0bf3ea9b665a4
treeb71005e131502a39fa853ac01b7374dd8bd8968c
parent2d92f4cba5834b8f26311296243400fb88253e9a
common/Mutex: avoid trylock on lock if instrumentation is not enabled

Benchmarks have shown that the trylock in the lock path has a high
latency cost.  Only pay the penalty if instrumentation is actually
enabled.

While we are at it, avoid the duplicate conditional check so that
the fast path is faster.

Signed-off-by: Sage Weil <sage@redhat.com>
src/common/Mutex.cc