On 10/14/2011 12:36 AM, Roland Dreier wrote: > Anyway, suppose I have a multithreaded userspace app that uses a bunch of > pthread_mutexes, and I want to figure out which locks are hot and/or heavily > contended. What's the best way to do that? Is perf the right, or is there > something better? (This seems like such an obvious thing to want that there > must be some good way to get this data, I hope)
You can capture futex entry and exit with: perf trace -e syscalls:sys_enter_futex -e syscalls:sys_exit_futex add -g to get the callchains. From there perf-script will dump the events. David -- To unsubscribe from this list: send the line "unsubscribe linux-perf-users" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
