how to measure total time spent in waiting for mutex without cswitch ?

Mason slash.tmp@free.fr
Mon Feb 29 10:51:00 GMT 2016


On 29/02/2016 11:30, Navin Parakkal wrote:

>  Is there any way of measuring total wait time per mutex according to
> wall clock per cpu ?
>  If the platform is linux can we do any better ?

I'm not sure that gcc is the best tool for such a task.

Here a few random suggestions:

http://0pointer.de/blog/projects/mutrace.html
https://stackoverflow.com/questions/1249711/how-to-measure-mutex-contention
https://lwn.net/Articles/608497/
https://lttng.org/features/
https://sourceware.org/systemtap/wiki
https://sourceware.org/systemtap/wiki/SystemtapDtraceComparison
http://www.brendangregg.com/blog/2015-07-08/choosing-a-linux-tracer.html
http://www.brendangregg.com/linuxperf.html

Regards.



More information about the Gcc-help mailing list