[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v2 0/6] Remove dependency on __LINE__



On 03/09/2017 10:34 AM, Jan Beulich wrote:
On 08.03.17 at 18:46, <ross.lagerwall@xxxxxxxxxx> wrote:
Sorry for the long delay since the first version of this series
(previously called "Make building xSplice patches easier").  Here is a
set of changes that remove the use of __LINE__ when building with NDEBUG
and LivePatch enabled.  Tested to boot on x86.  Compile-tested on arm.

What I'm missing here is an evaluation of possible alternatives, as
converting from __LINE__ to code addresses implies an extra step
when wanting to look up the place where a problem occurred,
which I generally consider undesirable. For example, I had briefly
discussed with Andrew the addition of #line directives, but iirc he
had indicated some issue with that. Furthermore there is the
option (at least for some of the more simple patches) of squeezing
more than one statement on a single line, perhaps just for patch
creation. And I guess one can think of more.


Both of the options you suggested require extra work when building a live patch. This series is intended to remove that extra work as the process is already more difficult than I'd like.

I don't think using addr2line is much harder than looking up the line number directly, especially as it is something that needs to be done for many other crashes. On your suggestion, use of __LINE__ is disabled only when CONFIG_LIVEPATCH=y and NDEBUG which means that in a typical development scenario, you'd still get line numbers. They would be removed only for "release" builds in which it is likely that the source code & debuginfo is archived somewhere such that looking up a line number requires several steps anyway. I could suggest making it a separate config option but IIRC you prefer to limit the number of config options.

--
Ross Lagerwall

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.