Is there a good open-source linux tool to measure C++ std::mutex lock contention?
-
-
Replying to @halvarflake
Do you know which ones you want to profile? Or you want to do it across the program to figure out which ones are contended?
1 reply 0 retweets 0 likes -
Replying to @CopperheadOS @halvarflake
There's http://git.0pointer.net/mutrace.git/ . Not sure if it still works properly. Only used it once a couple years ago and it worked well.
2 replies 0 retweets 0 likes -
Replying to @CopperheadOS
So I only have a few in the program, the list of suspects is short ;) Would love data how much time threads wait on mutex...
1 reply 0 retweets 0 likes -
Replying to @halvarflake @CopperheadOS
the really old (and maybe a bit skewed) way to do that is "strace -f -c <program>"
1 reply 0 retweets 0 likes -
if you want a very low-perf-impact, fancy way, you could also use PERF_EVENT_IOC_SET_BPF with two kprobe perf fds
1 reply 0 retweets 1 like -
then use eBPF with an eBPF map to count in-kernel, and let userspace grab those statistics in the end
1 reply 0 retweets 1 like
(but that's not so different anymore from actually using a custom kernel module - needs root, needs (byte)code)
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.