linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jamie Iles <jamie.iles@oracle.com>
To: Sasha Levin <sasha.levin@oracle.com>
Cc: mingo@kernel.org, peterz@infradead.org, jamie.iles@oracle.com,
	penberg@kernel.org, acme@ghostprotocols.net, paulus@samba.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 09/11] liblockdep: support using LD_PRELOAD
Date: Thu, 7 Feb 2013 10:28:43 +0000	[thread overview]
Message-ID: <20130207102843.GG17781@cedar> (raw)
In-Reply-To: <1360188694-25077-10-git-send-email-sasha.levin@oracle.com>

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@oracle.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

  reply	other threads:[~2013-02-07 10:29 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-06 22:11 [PATCH 00/11] lockdep: LD_PRELOAD support Sasha Levin
2013-02-06 22:11 ` [PATCH 01/11] liblockdep: remove the need for liblockdep_init Sasha Levin
2013-02-06 22:11 ` [PATCH 02/11] liblockdep: remove the need for liblockdep_set_thread Sasha Levin
2013-02-06 22:11 ` [PATCH 03/11] perf: stop using liblockdep_init and liblockdep_set_thread Sasha Levin
2013-02-06 22:11 ` [PATCH 04/11] liblockdep: fix AA test Sasha Levin
2013-02-06 22:11 ` [PATCH 05/11] liblockdep: correct the ABCDBCDA test Sasha Levin
2013-02-06 22:11 ` [PATCH 06/11] liblockdep: rbtree support Sasha Levin
2013-02-06 22:11 ` [PATCH 07/11] liblockdep: prevent multiple declarations of CALLER_ADDR0 Sasha Levin
2013-02-06 22:11 ` [PATCH 08/11] liblockdep: keep headers declarations even if lib is disabled Sasha Levin
2013-02-06 22:11 ` [PATCH 09/11] liblockdep: support using LD_PRELOAD Sasha Levin
2013-02-07 10:28   ` Jamie Iles [this message]
2013-02-07 14:31     ` Sasha Levin
2013-02-08 10:43       ` Jamie Iles
2013-02-08 23:55         ` Sasha Levin
2013-02-06 22:11 ` [PATCH 10/11] liblockdep: add tests for the LD_PRELOAD feature Sasha Levin
2013-02-06 22:11 ` [PATCH 11/11] liblockdep: preload helper Sasha Levin
2013-02-07  6:19   ` Namhyung Kim
2013-02-07  6:55   ` Namhyung Kim
2013-02-07 14:29     ` Sasha Levin
2013-02-07  7:07 ` [PATCH 00/11] lockdep: LD_PRELOAD support Pekka Enberg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130207102843.GG17781@cedar \
    --to=jamie.iles@oracle.com \
    --cc=acme@ghostprotocols.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=paulus@samba.org \
    --cc=penberg@kernel.org \
    --cc=peterz@infradead.org \
    --cc=sasha.levin@oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).