On Mon, Mar 03, 2014 at 08:11:12AM -0800, Junjie Qian wrote: > Hi, > > Really appreciate your help on this issue! > 1. using root solve my problem with "perf lock", thank you very much! > 2. about the discussion on locks in user-space. I discussed this with my > advisor, and found that lock contention does not mean waiting time or idle > cpu-cycles sometime, for example, spin-lock in user-space that all > threads/cores are still running but useless work and this cannot be detected > as either system lock or idle-cpu-cycles.
Yeah, with mutexes usually there is some spinning before waiting for the lock. > The way, I am trying to do this, now is insert the counter into the > application layer once the lock happens start the counting and I prepare to > monitor the threads in queue to detect the lock. clock_gettime() with some clocks is implemented as a VDSO, so it should be pretty light to get that info if you need it. And thread local variables can be very useful too probably :) > I will let you know if I have any updates on this. Great :) Thanks a lot, Rodrigo -- To unsubscribe from this list: send the line "unsubscribe linux-perf-users" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html