Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 8 Nov 2011 20:09:49 -0500
From:      Arnaud Lacombe <lacombar@gmail.com>
To:        Andriy Gapon <avg@freebsd.org>
Cc:        Attilio Rao <attilio@freebsd.org>, freebsd-current@freebsd.org
Subject:   Re: Using Instruction Pointer address in debug interfaces [Was: Re: vm_page_t related KBI [Was: Re: panic at vm_page_wire with FreeBSD 9.0 Beta 3]]
Message-ID:  <CACqU3MWKYCX3o3jC7N1tA=0QSP8RNTKT2qZnFGuTNbavDuihYg@mail.gmail.com>
In-Reply-To: <4EB9975F.4090601@FreeBSD.org>
References:  <CACqU3MU_Bk%2BcObCiUa2XtM7fLkSpSDzOZqoZ=khNOR-_6ptYYQ@mail.gmail.com> <CAJ-FndDOWpotphH4pmn0S6QqJybx74A2Kt4a8aiT96x0f2cRZA@mail.gmail.com> <4EB9975F.4090601@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi,

On Tue, Nov 8, 2011 at 3:55 PM, Andriy Gapon <avg@freebsd.org> wrote:
>
> [cc list trimmed]
>
> on 08/11/2011 22:34 Attilio Rao said the following:
>> 2011/11/8 Arnaud Lacombe <lacombar@gmail.com>:
>>> To avoid future complaints about the fact that I would be only "talk"
>>> without "action", I did implement what I suggested above. As it is
>>> quite a large patch-set, I will not post it directly here, however, it
>>> is available on github:
>>
>> I really think that this is way too dependent by the good health of
>> your tool, thus that is highly fragile.
>>
>> However, you may have more luck by just the core of your kernel
>> changes here, for comment and leave alone all the (ptr ->
>> LOCK_FILE/LOCK_LINE conversion).
>>
>> Said that, I think this logic is too fragile and likely won't be as
>> effective as __FILE__/__LINE__ in many cases.
>
> I agree.
> If we were able to somehow automatically, magically, easily and correctly
> determine an instruction pointer of a caller, then it would make sense to ditch
> explicit passing of __FILE__/__LINE__ arguments in favor of doing instruction
> pointer decoding.
>
again, no need for magic, this already exists, as the form of gcc[0]'s
__builtin_return_address(0).

> But if we are just replacing explicit passing of (well-known) macros
> __FILE__/__LINE__ with explicit passing of THIS_IP, then I don't see a point.
>
make sense too, but you need to be sure stuff between the caller and
callee is fully inlined.

> Apologies if I missed the rationale for this change.
>
mostly getting rid of all the __FILE__ and __LINE__ bloat.

 - Arnaud

[0]: check about LLVM support is left to the reader.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CACqU3MWKYCX3o3jC7N1tA=0QSP8RNTKT2qZnFGuTNbavDuihYg>