Hi Eugene, On Fri, 2007-07-20 at 11:08 +0800, Eugene Teo wrote: > Is it possible to extend Frysk to trace user-space lockings? I am trying to > write a tool that basically outputs the lock used and the backtrace showing > who is holding on to it. I don't really have an example output that I can show, > but if you have an idea to share, do let me know! I am afraid I know too little about user space locking or even know how various user space locking mechanisms are implemented to give a real answer. Lets assume you are interested in pthread mutexes. Then what you can do at this point with frysk is get a simple stack trace of all threads of a process using ftrace this should include things like pthread_cond_wait() calls. This at least gives you info on whether or not threads are contending. We could build on that by extracting the mutex argument from that call and then get the owner from that (although I am not sure how standardized all this is and whether or not you are supposed to be able to get at the owner field). But that needs some creative hacking on the frysk sources to make your own specialized ftrace-pthread-mutex variant and possibly you will need the debug info for the program you are examining to munch through the stack frame, function call argument list and mutex fields. Hope some of the above rambling makes sense. Cheers, Mark