Re: [PATCH 7/9] liblockdep: Support using LD_PRELOAD

2013-05-08 Thread Sasha Levin
Peter, Thanks for your comments! I'll address them and re-send the patch series. On 05/08/2013 06:22 AM, Peter Zijlstra wrote: >> +/* >> > + * Some programs attempt to initialize and use locks in their >> > + * allocation path. This means that a call to malloc() would >> > + * result in

Re: [PATCH 7/9] liblockdep: Support using LD_PRELOAD

2013-05-08 Thread Peter Zijlstra
On Tue, Apr 30, 2013 at 02:54:38PM -0400, Sasha Levin wrote: > + > +static struct rb_node **__get_lock_node(void *lock, struct rb_node **parent) > +{ > +} > + > +/** > + * __get_lock - find or create a lock instance > + * @lock: pointer to a pthread lock function > + * > + * Try to find an existin

[PATCH 7/9] liblockdep: Support using LD_PRELOAD

2013-04-30 Thread Sasha Levin
This allows lockdep to be used without being compiled in the original program. Usage is quite simple: LD_PRELOAD=/path/to/liblockdep.so /path/to/my/program And magically, you'll have lockdep checking in your program! Signed-off-by: Sasha Levin --- tools/lib/lockdep/preload.c | 386 +++