All of lore.kernel.org
 help / color / mirror / Atom feed
From: George Dunlap <george.dunlap@eu.citrix.com>
To: Jan Beulich <JBeulich@suse.com>,
	Andrew Cooper <andrew.cooper3@citrix.com>
Cc: Juergen Gross <juergen.gross@ts.fujitsu.com>,
	Dietmar Hahn <dietmar.hahn@ts.fujitsu.com>,
	"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>
Subject: Re: Hidden symbol when debugging hypervisor
Date: Wed, 30 Apr 2014 15:57:13 +0100	[thread overview]
Message-ID: <53610F49.9050704@eu.citrix.com> (raw)
In-Reply-To: <5361298A020000780000DDC0@mail.emea.novell.com>

On 04/30/2014 03:49 PM, Jan Beulich wrote:
>>>> On 30.04.14 at 16:32, <andrew.cooper3@citrix.com> wrote:
>> On 30/04/14 15:16, Jan Beulich wrote:
>>>>>> On 30.04.14 at 16:08, <andrew.cooper3@citrix.com> wrote:
>>>> Furthermore, it needs to fit in a 64MB crash region with the crash
>>>> kernel and initrd as well (although this is more flexible).
>>> Why would the symbol table need to be in the crash region?
>> It wouldn't (necessarily), but is certainly less overhead to have the
>> text symbol table in memory than all of the debugging symbols.
> I never talked about debug info, but just about the ELF/COFF
> symbol table. I'm not sure that's much larger than the nm output,
> especially when first tidied of useless (e.g. machine generated)
> symbols.
>
>>>> Currently, finding "csched_schedule()" in a stack trace still means that
>>>> I have to work out which scheduler is actually in use.  With a cpupool
>>>> using credit1 and a cpupool using credit2, this can be very difficult
>>>> after-the-fact.
>>> How would "common/sched_credit.c:schedule" (with the pointless
>>> prefix already dropped) be ambiguous?
>> That wouldn't, but would we really want full paths in stack traces?
> I'm feeling confused - first you ask for names to be distinguishable,
> and then you ask whether we would want this? Rather than having
> every contributor take care for local symbols to be unique across the
> tree, we _should_ leverage information that is available to achieve
> the same goal without impact on source size and readability.
>
> And no, I definitely don't want full paths, I want relative (to
> $(BASEDIR)) ones.

I think "relative to $(BASEDIR)" is what Andrew meant.  In any case, 
you're adding typically a minimum of 10 characters, worst case a lot 
more, to *every single* line in the stack trace, just so that you can 
disambiguate a handful of cases where there may be a name collision.  
Doestn't it make more sense for the programmers to detect when there's a 
name collision and add a sensibly small prefix to the symbol?

It would certainly be nice to be able to remove all the "csched_" 
prefixes from the credit and credit2 codebases; but we do a lot more 
debugging than we do coding, so that has to take priority.

  -George

  reply	other threads:[~2014-04-30 14:57 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-30  9:02 Hidden symbol when debugging hypervisor Dietmar Hahn
2014-04-30  9:26 ` George Dunlap
2014-04-30  9:39   ` Juergen Gross
2014-04-30 10:07     ` George Dunlap
2014-04-30 10:21       ` Jan Beulich
2014-04-30 11:28         ` Andrew Cooper
2014-04-30 13:16           ` Jan Beulich
2014-04-30 14:08             ` Andrew Cooper
2014-04-30 14:16               ` Jan Beulich
2014-04-30 14:32                 ` Andrew Cooper
2014-04-30 14:49                   ` Jan Beulich
2014-04-30 14:57                     ` George Dunlap [this message]
2014-04-30 15:23                       ` Jan Beulich
2014-04-30 14:58                     ` Andrew Cooper
2014-04-30 10:10     ` Jan Beulich

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=53610F49.9050704@eu.citrix.com \
    --to=george.dunlap@eu.citrix.com \
    --cc=JBeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=dietmar.hahn@ts.fujitsu.com \
    --cc=juergen.gross@ts.fujitsu.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.