From mboxrd@z Thu Jan 1 00:00:00 1970 From: peterz@infradead.org (Peter Zijlstra) Date: Fri, 05 Dec 2008 16:58:12 +0100 Subject: [ltt-dev] trace a futex In-Reply-To: <20081205122822.GA25816@Krystal> References: <8d94e9280812021142j2eb5ca72td730410e97ccd9a1@mail.gmail.com> <20081202195015.GA25792@Krystal> <8d94e9280812021215m6a63d6c2l4e64acd26274953d@mail.gmail.com> <20081202215519.GA734@Krystal> <4935B25F.7010701@web.de> <20081203052640.GA13701@Krystal> <20081203180131.GA2904@in.ibm.com> <1228380784.5092.18.camel@twins> <20081205122822.GA25816@Krystal> Message-ID: <1228492692.20520.3.camel@twins> On Fri, 2008-12-05 at 07:28 -0500, Mathieu Desnoyers wrote: > * Peter Zijlstra (peterz at infradead.org) wrote: > > > > FWIW, the ftrace infrastructure has on many an occasion (even before it > > was called ftrace and specific to -rt) helped in debugging and fixing > > futex races. > > > > Hrm, I'm not sure futex races is the key aspect of interest here. > Knowing which amount of pthread mutex lock calls ends up calling the > scheduler looks a bit more like the topic brought by this particular > use-case. Therefore, correlating the information from the nptl with the > kernel information would be useful. We already have the scheduler instrucmentation, so correlating that to known futex calls (from userspace) shouldn't be too hard. > Is lockdep called when a futex is taken ? lockdep only does kernel-internal locks - so no. > Should we add instrumentation > (tracepoints) to futex.c ? If yes, was there specific instrumentation > you used with ftrace that should be added ? Not sure we should, Thomas did the bulk of that ftrace debugging, Thomas do you think it would be worthwhile to add some tracepoints in there?