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

Re: [Xen-devel] [PATCH v2 2/2] x86/traps: widen condition for logging top-of-stack


  • To: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • From: Jan Beulich <JBeulich@xxxxxxxx>
  • Date: Thu, 4 Jul 2019 09:09:02 +0000
  • Accept-language: en-US
  • Authentication-results: spf=none (sender IP is ) smtp.mailfrom=JBeulich@xxxxxxxx;
  • Cc: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>, WeiLiu <wl@xxxxxxx>, Roger Pau Monne <roger.pau@xxxxxxxxxx>
  • Delivery-date: Thu, 04 Jul 2019 09:12:51 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHVMYkwcjc8Dr6fl02oECpK/6oOhKa4ssEAgACafouAAN/oAA==
  • Thread-topic: [PATCH v2 2/2] x86/traps: widen condition for logging top-of-stack

On 03.07.2019 21:47, Andrew Cooper wrote:
> On 03/07/2019 11:34, Jan Beulich wrote:
>> On 03.07.2019 12:21, Andrew Cooper wrote:
>>> I'm still opposed to this.  The introduction of ? does more harm than
>>> good IMO, because it simply can't be trusted.
>>>
>>> Stack traces are not guaranteed-accurate, even with frame pointers
>>> enabled.  The only thing we can say for certain in any trace is where
>>> %rip points.
>> Yes, I realize you still don't like this. But similarly to the
>> other patch set - on the v1 discussion here I was lacking
>> feedback, and hence I eventually timed out and sent v2. The
>> question is - what is your alternative proposal to distinguish
>> the truly guessed entry logged here from the more reliable
>> ones? And then similarly how to distinguish the less reliable
>> ones produced by the !CONFIG_FRAME_POINTER variant of
>> _show_trace() from their more reliable counterparts?
> 
> A crazy idea I've just had.  Annotate all printed lines with a character
> identifying which source of information we used?
> 
> We could have [r] for register state, [f] for "from frame pointer", and
> [s] for "from stack rubble".

I'm fine with the fundamental idea, but I'm not overly happy with the
second pair of (square) brackets that would appear. Two variants of
what your proposal come to mind:

1) Use (like I did) '?' for "stack rubble" (as you call it), '*' for
frame pointer based entries, and '!' for register ones.

2) Instead of the extra brackets, prefix a character along of what
you've suggested (I'd use upper case ones though) immediately
inside the already present brackets, followed e.g. by a colon as
separator.

Jan
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

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