How to profile pthread mutex in linux?

前端 未结 5 1487
名媛妹妹
名媛妹妹 2021-02-01 19:20

I would like to know how to profile a pthread mutex to see if there are any locking contention points in my code. (who likes contentious code, right? :) I know how to do a more

5条回答
  •  春和景丽
    2021-02-01 19:49

    You might want to also give Intel VTune a try. It would report Wait Time and Wait Count for each sync primitive with call stacks too. Look through this document to see if this is what you're looking for http://software.intel.com/sites/products/documentation/hpc/amplifierxe/en-us/2011Update/lin/start/analyzing_locks_linux.pdf

提交回复
热议问题