From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: Xen-devel <xen-devel@lists.xen.org>
Subject: Re: [PATCH 5/6] xen/x86: Avoid using local labels for UNLIKELY() regions
Date: Wed, 4 Nov 2015 15:07:10 +0000 [thread overview]
Message-ID: <563A1F1E.4070603@citrix.com> (raw)
In-Reply-To: <563A281E02000078000B1C09@prv-mh.provo.novell.com>
On 04/11/15 14:45, Jan Beulich wrote:
>>>> On 30.10.15 at 20:59, <andrew.cooper3@citrix.com> wrote:
>> Using local labels causes the stack trace to use the last non-local
>> label emitted by the compiler in the translation unit, which is almost
>> always unrelated.
>>
>> e.g. A (contrived debug) example switches from:
>>
>> (XEN) ----[ Xen-4.7-unstable x86_64 debug=y Not tainted ]----
>> (XEN) CPU: 0
>> (XEN) RIP: e008:[<ffff82d0801961e2>]
>> asm_domain_crash_synchronous+0x44/0x4c
>> ...
>> (XEN) Xen call trace:
>> (XEN) [<ffff82d0801961e2>] asm_domain_crash_synchronous+0x44/0x4c
>> (XEN) [<ffff82d080114bdf>] handle_keypress+0xa4/0xd9
>>
>> to:
>>
>> (XEN) ----[ Xen-4.7-unstable x86_64 debug=y Not tainted ]----
>> (XEN) CPU: 0
>> (XEN) RIP: e008:[<ffff82d0801961e2>] unlikely.vmptrld.921+0/0x8
>> ...
>> (XEN) Xen call trace:
>> (XEN) [<ffff82d0801961e2>] unlikely.vmptrld.921+0/0x8
>> (XEN) [<ffff82d080114bdf>] handle_keypress+0xa4/0xd9
>>
>> which is far more relevant when identifying %eip.
> I disagree; I specifically used local labels here to avoid cluttering the
> symbol table.
Needless cluttering is indeed bad. However, the effect here is a
misleading stack trace.
As the entire point of the symbol table is to generate usable
information in situations like this, I don't see this as an issue.
> If anything I'd agree to adding a label to the start of
> subsection 1 (or .fixup),
How is this suggestion any different to what I have presented? Each
unlikely section still gets a non-local label.
> but it's not clear how emitting such labels
> could be avoided when that section is empty (such labels would clash
> with whatever label is first in the next compilation unit).
All UNLIKELY() sections have content, as they are manually created. Or
have I missed something?
> Maybe we
> could discard them in the symbols processing tool if their address
> matches another symbol.
>
>> Additionally, correct the inclusion of the tag parameter in the C UNLIKELY
>> blocks, to use the passed tag, rather than a literal ".tag".
> This part I agree with of course, and would therefore like to as for this
> to be split off.
I will see about this, after we have agreed on the other bits.
~Andrew
next prev parent reply other threads:[~2015-11-04 15:07 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-30 19:59 [PATCH 0/6] Remove unqalified ud2 instructions Andrew Cooper
2015-10-30 19:59 ` [PATCH 1/6] x86/vmx: Improvements to vmentry failure handling Andrew Cooper
2015-10-30 19:59 ` [PATCH v2 2/6] xen/x86: Replace unqualified ud2 instructions with BUG frames Andrew Cooper
2015-11-03 7:02 ` Tian, Kevin
2015-10-30 19:59 ` [PATCH 3/6] x86/bug: Break out the internals of BUG_FRAME() Andrew Cooper
2015-10-30 19:59 ` [PATCH 4/6] x86/vmx: Replace unqualified ud2 instructions with BUG frames Andrew Cooper
2015-11-03 7:03 ` Tian, Kevin
2015-10-30 19:59 ` [PATCH 5/6] xen/x86: Avoid using local labels for UNLIKELY() regions Andrew Cooper
2015-11-04 14:45 ` Jan Beulich
2015-11-04 15:07 ` Andrew Cooper [this message]
2015-11-04 15:16 ` Jan Beulich
2015-10-30 19:59 ` [PATCH 6/6] EXAMPLE TEST CODE Andrew Cooper
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=563A1F1E.4070603@citrix.com \
--to=andrew.cooper3@citrix.com \
--cc=JBeulich@suse.com \
--cc=xen-devel@lists.xen.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.