From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 102511 invoked by alias); 13 Nov 2015 14:00:03 -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 102472 invoked by uid 89); 13 Nov 2015 14:00:02 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.7 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Fri, 13 Nov 2015 14:00:00 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (Postfix) with ESMTPS id 94C9C14CFE5; Fri, 13 Nov 2015 13:59:59 +0000 (UTC) Received: from fche.csb (vpn-60-209.rdu2.redhat.com [10.10.60.209]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id tADDxxag020920; Fri, 13 Nov 2015 08:59:59 -0500 Received: by fche.csb (Postfix, from userid 2569) id A314D586AB; Fri, 13 Nov 2015 08:59:59 -0500 (EST) To: Nan Xiao Cc: systemtap@sourceware.org Subject: Re: How to understand "?" in probe alias? References: From: fche@redhat.com (Frank Ch. Eigler) Date: Fri, 13 Nov 2015 14:00:00 -0000 In-Reply-To: (Nan Xiao's message of "Fri, 13 Nov 2015 15:14:02 +0800") Message-ID: User-Agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.4 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2015-q4/txt/msg00130.txt.bz2 Nan Xiao writes: > [...] > probe vm.pagefault = kernel.function("__handle_mm_fault@mm/memory.c") ?, > kernel.function("handle_mm_fault@mm/memory.c") ? > [...] How to understand "?" in probe alias? After checking Language > reference [...] I can't find the explanations of it. You're right; that particular book doesn't seem to mention it. But [man stap] refers to [man stapprobes], which includes: However, a probe point may be followed by a "?" character, to indicate that it is optional, and that no error should result if it fails to resolve. Optionalness passes down through all levels of alias/wildcard expansion. Alternately, a probe point may be followed by a "!" character, to indicate that it is both optional and sufficient. (Think vaguely of the Prolog cut operator.) If it does resolve, then no further probe points in the same comma-separated list will be resolved. Therefore, the "!" sufficiency mark only makes sense in a list of probe point alternatives. - FChE