From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 77786 invoked by alias); 21 Nov 2015 12:55:32 -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 77775 invoked by uid 89); 21 Nov 2015 12:55:31 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.8 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; Sat, 21 Nov 2015 12:55:30 +0000 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (Postfix) with ESMTPS id 5EA95461E2; Sat, 21 Nov 2015 12:55:29 +0000 (UTC) Received: from fche.csb (vpn-60-176.rdu2.redhat.com [10.10.60.176]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id tALCtT7D025596; Sat, 21 Nov 2015 07:55:29 -0500 Received: by fche.csb (Postfix, from userid 2569) id 9CC8158496; Sat, 21 Nov 2015 07:55:27 -0500 (EST) Date: Sat, 21 Nov 2015 12:55:00 -0000 From: "Frank Ch. Eigler" To: Nan Xiao Cc: systemtap@sourceware.org Subject: Re: How does stap execute probe aliases? Message-ID: <20151121125527.GB8832@redhat.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.2i X-SW-Source: 2015-q4/txt/msg00164.txt.bz2 Hi - > [...] > But executing it outputs the following error: > > # ./page_fault.stp > semantic error: unable to find local 'write_access', [man > error::dwarf] [...] > semantic error: failed to retrieve location attribute for 'address' > [man error::dwarf] (dieoffset: 0xe3b744): identifier '$address' at > :8:13 > [...] It means those context variables are not available for this version/build of your kernel. > Checking the probes: > # stap -L 'kernel.function("__handle_mm_fault@mm/memory.c")' > kernel.function("__handle_mm_fault@../mm/memory.c:3752") > # stap -L 'kernel.function("handle_mm_fault@mm/memory.c")' > kernel.function("handle_mm_fault@../mm/memory.c:3832") $mm:struct > mm_struct* $vma:struct vm_area_struct* $address:long unsigned int > $flags:unsigned int > > It seems the probes all exist and OK. Yes. > Could you give some clues about this error? Thanks in advance! The error messages give the clue [man error::dwarf] means to run % man error::dwarf to see a man page about the issue. The basic difficulty is that writing portable, long-lived script code is difficult when it closely targets a rapidly moving target. This is mainly why the systemtap tapset exists. The community does the work of providing a higher level, more fixed interface (aliases, functions, etc.) that embody the porting logic. The part of the documentation you were looking at were related to learning how to write such portable tapsets. They are not meant for verbatim copying by end-users. If you wish to trace page faults, search through the functional examples first: https://sourceware.org/systemtap/examples/ - for example https://sourceware.org/systemtap/examples/#memory/pfaults.stp - FChE