public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
From: fche@redhat.com (Frank Ch. Eigler)
To: Craig Ringer <craig@2ndquadrant.com>
Cc: systemtap@sourceware.org
Subject: Re: Path resolution inconsistency between process("binary") and @var("var@cu","module")
Date: Wed, 30 Oct 2019 22:15:00 -0000	[thread overview]
Message-ID: <8736f9g9sq.fsf@redhat.com> (raw)
In-Reply-To: <CAMsr+YE3uEzFJZX-YgNFfwYoKRgHZNWCLbAb2SDqW6S6OSnuyw@mail.gmail.com>	(Craig Ringer's message of "Mon, 28 Oct 2019 13:52:47 +0800")


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?


- FChE

  parent reply	other threads:[~2019-10-30 22:15 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 [this message]
2019-10-31  5:01   ` Craig Ringer

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=8736f9g9sq.fsf@redhat.com \
    --to=fche@redhat.com \
    --cc=craig@2ndquadrant.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).