From: Craig Ringer <craig@2ndquadrant.com>
To: "Frank Ch. Eigler" <fche@redhat.com>
Cc: systemtap@sourceware.org
Subject: Re: Path resolution inconsistency between process("binary") and @var("var@cu","module")
Date: Thu, 31 Oct 2019 05:01:00 -0000 [thread overview]
Message-ID: <CAMsr+YHL5ZX6jPQ9vf9BPVXR9uNjohJSXJ_zAuRkVVNhZLFEYQ@mail.gmail.com> (raw)
In-Reply-To: <8736f9g9sq.fsf@redhat.com>
On Thu, Oct 31, 2019, 06:15 Frank Ch. Eigler <fche@redhat.com> wrote:
>
> craig wrote:
>
> > [...]
> > The working cases are, for some probe on a function/statement in a
> > userspace executable:
> >
> > - @var("sym@CU") directly in a probe; doesn't require module argument
> at all
> > - @var("sym@CU", "/full/path/to/executable") in a function() called by
> > a probe: finds var
> >
> > The failing cases are, all when in a function() called by a probe of a
> > userspace executable:
> >
> > - @var("sym@CU") in the function: reports missing symbol, tries to
> > resolve in "kernel"
> > - @var("sym@CU","executable") in the function: also tries to resolve in
> kernel
>
> The reason for this is that a function does NOT have a probe context
> relative to which it can do dwarf symbol resolution. It does not
> operate on some sort of auto-inherited context from its caller probe
> handler(s) and/or function(s). So, disambiguation of kernel-space
> (including module names!) vs. user-space (executables) is left up to a
> simple naming convention in the function you found. Having a $PATH
> based search would improve convenience at the cost of reintroducing
> ambiguity. Not sure whether that's worth it, are you sure it is?
>
Makes sense.
Pretty critically reduces the utility of functions though.
@uvar(...) and @ucast(...) like the convention elsewhere would make sense
for user vs kernel ambiguity. Or an extra optional argument specifying
resolution.
PATH resolution should be stable within a tap run so there isn't much
concern about differing resolutions in differing places.
I reckon I could implement that.
prev parent reply other threads:[~2019-10-31 5:01 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-28 5:53 Craig Ringer
2019-10-28 9:11 ` Craig Ringer
2019-10-30 22:15 ` Frank Ch. Eigler
2019-10-31 5:01 ` Craig Ringer [this message]
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=CAMsr+YHL5ZX6jPQ9vf9BPVXR9uNjohJSXJ_zAuRkVVNhZLFEYQ@mail.gmail.com \
--to=craig@2ndquadrant.com \
--cc=fche@redhat.com \
--cc=systemtap@sourceware.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).