• Sergey Vojtovich's avatar
    MDEV-8030 - Apc_target::disable() locks mutex twice · 84568c29
    Sergey Vojtovich authored
    Moved Apc_target::destroy(), Apc_target::enable() and Apc_targe::disable()
    definitions to my_apc.h so that they can be inlined.
    
    Apc_targe::disable() now calls Apc_target::process_apc_requests() only if
    there're APC requests. This saves one pthread_mutex_lock() call.
    
    Overhead change:
    Apc_target::disable              0.04% -> out of radar
    Apc_target::enable               0.03% -> out of radar
    Apc_target::process_apc_requests 0.02% -> out of radar
    pthread_mutex_lock               0.43% -> 0.42%
    pthread_mutex_unlock             0.26% -> 0.25%
    84568c29
nesting.result 10.5 KB