From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14632 invoked by alias); 17 May 2007 00:09:28 -0000 Received: (qmail 14612 invoked by uid 22791); 17 May 2007 00:09:24 -0000 X-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00,DK_POLICY_SIGNSOME,DNS_FROM_RFC_ABUSE,SPF_PASS X-Spam-Check-By: sourceware.org Received: from e5.ny.us.ibm.com (HELO e5.ny.us.ibm.com) (32.97.182.145) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 17 May 2007 00:09:20 +0000 Received: from d01relay02.pok.ibm.com (d01relay02.pok.ibm.com [9.56.227.234]) by e5.ny.us.ibm.com (8.13.8/8.13.8) with ESMTP id l4H09EbG022707 for ; Wed, 16 May 2007 20:09:14 -0400 Received: from d01av04.pok.ibm.com (d01av04.pok.ibm.com [9.56.224.64]) by d01relay02.pok.ibm.com (8.13.8/8.13.8/NCO v8.3) with ESMTP id l4H09Buw513892 for ; Wed, 16 May 2007 20:09:14 -0400 Received: from d01av04.pok.ibm.com (loopback [127.0.0.1]) by d01av04.pok.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id l4H09BPv027973 for ; Wed, 16 May 2007 20:09:11 -0400 Received: from [127.0.0.1] (IBM-5A3C6334CF9.beaverton.ibm.com [9.47.16.89]) by d01av04.pok.ibm.com (8.12.11.20060308/8.12.11) with ESMTP id l4H095XI027899; Wed, 16 May 2007 20:09:11 -0400 Message-ID: <464B9D1C.7070007@us.ibm.com> Date: Thu, 17 May 2007 00:09:00 -0000 From: Mike Mason User-Agent: Thunderbird 2.0.0.0 (Windows/20070326) MIME-Version: 1.0 To: David Smith CC: "Frank Ch. Eigler" , systemtap@sources.redhat.com Subject: Re: Listing probe alias resolution failures References: <20070515141427.d90m5pfzj4w0owok@webmail.pdx.edu> <464A2714.6040108@redhat.com> <20070515152054.po84o8zlx5yos8sw@webmail.pdx.edu> <464B1122.9090907@redhat.com> <20070516095817.4iq72cr8lpz448oo@webmail.pdx.edu> <464B3DFC.60506@redhat.com> <464B66F3.3020707@redhat.com> <20070516202959.GA2520@redhat.com> <464B759E.1030606@redhat.com> In-Reply-To: <464B759E.1030606@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes 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 X-SW-Source: 2007-q2/txt/msg00327.txt.bz2 David Smith wrote: > Frank Ch. Eigler wrote: >> Hi - >> >> On Wed, May 16, 2007 at 03:17:55PM -0500, David Smith wrote: >>> [...] >>> Nope, I'm suggesting that: >>> probe kernel.function("something_that_does_not_exist") ? { >>> local1 = $arg1 >>> local2 = $arg2 >>> printf("%d %d\n", local1, local2) >>> } >>> be accepted. >> >> But it is already. >> >> >>> In other words, if we know a probe point doesn't exist, it shouldn't >>> matter what arguments it references. [...] >> >> It doesn't. > > Hmm, I see what you mean. The following doesn't give an error for > accessing $arg (although it does rightly complain that "no probes found"). > > # stap -p2 -e 'probe kernel.function("fche") ? { $arg1++ }' > > > Ah, I see something I missed before with the following: > > # stap -p2 -e 'probe vm.mmap ? { printf("%p %d\n", address, length) }' > > Here's the definition from tapset/memory.stp: > > probe vm.mmap = kernel.function("do_mmap"), kernel.function("do_mmap2")? { > address = $addr > length = $len > } > > I missed the fact that the first one isn't optional. But, shouldn't > making 'vm.mmap' optional basically make 'kernel.function("do_mmap")' > optional? > That's how it's documented to work. From stapprobes(5): "Optionalness passes down through all levels of alias/wildcard expansion." As for certain variables being inaccessible, isn't this just the on-going problem that symbols are sometimes unpredictably optimized away. As I've said before, I think the test suite should check for this (i.e., -u tests), but it currently doesn't. Mike