[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130207102843.GG17781@cedar>
Date: Thu, 7 Feb 2013 10:28:43 +0000
From: Jamie Iles <jamie.iles@...cle.com>
To: Sasha Levin <sasha.levin@...cle.com>
Cc: mingo@...nel.org, peterz@...radead.org, jamie.iles@...cle.com,
penberg@...nel.org, acme@...stprotocols.net, paulus@...ba.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 09/11] liblockdep: support using LD_PRELOAD
Hi Sasha,
On Wed, Feb 06, 2013 at 05:11:32PM -0500, Sasha Levin wrote:
> 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 in your program!
>
> Signed-off-by: Sasha Levin <sasha.levin@...cle.com>
> ---
> diff --git a/tools/lib/lockdep/preload.c b/tools/lib/lockdep/preload.c
> new file mode 100644
> index 0000000..0f71c23
> --- /dev/null
> +++ b/tools/lib/lockdep/preload.c
...
> +int pthread_rwlock_init(pthread_rwlock_t *rwlock,
> + const pthread_rwlockattr_t *attr)
> +{
> + if (ll_pthread_rwlock_init == NULL)
> + init_preload();
Why is this one special, doesn't init_preload being a constructor make
this redundant?
Jamie
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists