From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 54429 invoked by alias); 30 Oct 2019 22:15:23 -0000 Mailing-List: contact systemtap-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: systemtap-owner@sourceware.org Received: (qmail 51053 invoked by uid 89); 30 Oct 2019 22:15:19 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-2.7 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.1 spammy=$path, $PATH, naming X-HELO: us-smtp-delivery-1.mimecast.com Received: from us-smtp-2.mimecast.com (HELO us-smtp-delivery-1.mimecast.com) (205.139.110.61) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 30 Oct 2019 22:15:17 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1572473708; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=7DGtEWKV35GlnO22BOTuYHj/bMulhhMr6TOGHiAf7Kg=; b=YkNYxwyo4kXSvrD+Crd3VprGPCE7cULHKLh3TAkJ0MB4Io7D6/TUgsT9pd+fBqVcQySxo1 1HJ2l8y7cP1OOO4lSocll0CXEmxM4x1lgdj94TEpx9uWGFTVNYOP41QNKDwkVcIUf8RVnU lxHzCNaNCIPpt+5+nSGeDpLVk9xdN0s= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-156-O356Qb88McOkH64iamvWIA-1; Wed, 30 Oct 2019 18:15:04 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id A2F071800D67; Wed, 30 Oct 2019 22:15:03 +0000 (UTC) Received: from redhat.com (ovpn-116-53.phx2.redhat.com [10.3.116.53]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 8246C5D6D6; Wed, 30 Oct 2019 22:15:03 +0000 (UTC) Received: from [127.0.0.1] (helo=vm-rhel7) by redhat.com with esmtp (Exim 4.92) (envelope-from ) id 1iPwF3-0004cm-Vd; Wed, 30 Oct 2019 18:15:02 -0400 From: fche@redhat.com (Frank Ch. Eigler) To: Craig Ringer Cc: systemtap@sourceware.org Subject: Re: Path resolution inconsistency between process("binary") and @var("var@cu","module") References: Date: Wed, 30 Oct 2019 22:15:00 -0000 In-Reply-To: (Craig Ringer's message of "Mon, 28 Oct 2019 13:52:47 +0800") Message-ID: <8736f9g9sq.fsf@redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=WINDOWS-1252 Content-Transfer-Encoding: quoted-printable X-SW-Source: 2019-q4/txt/msg00019.txt.bz2 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 k= ernel 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