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]]

From: Julian Elischer <julian_at_freebsd.org>
Date: Tue, 08 Nov 2011 16:08:09 -0800
On 11/8/11 10:49 AM, Arnaud Lacombe wrote:
> Hi,
> 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:
>
> https://github.com/lacombar/freebsd/tree/master/topic/kern-lock-debug
>
> It convert a bunch of debug interface to use the caller instruction
> pointer, as well as a proof-of-concept teaching printf(9) to convert
> IP to symbol_name+offset.
>
> It translates in a direct saving of about +250kB on i386's GENERIC,
> just in kernel text size. Even the worst case, ie LOCK_DEBUG == 0,
> translates to a save of +80kB.
>
> Please note that this is still WIP code.

A couple of comments.
Firstly, the idea of a printf method to print the IP as symbol+offset 
is an interesting idea
that should be followed up in its own right.

However, (comment 2)  I would much rather file+line in this case.
I don't want to have the tools to decode the offset into a location in 
sources.

We have both systems in operation art work and I far prefer the latter.
Received on Tue Nov 08 2011 - 23:08:26 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:20 UTC