From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8438 invoked by alias); 10 Sep 2013 18:12:45 -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 8426 invoked by uid 89); 10 Sep 2013 18:12:44 -0000 Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 10 Sep 2013 18:12:44 +0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-4.6 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r8AICfBN002284 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 10 Sep 2013 14:12:41 -0400 Received: from t510.usersys.redhat.com (dhcp-10-15-1-11.hsv.redhat.com [10.15.1.11]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id r8AICeQA019072 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 10 Sep 2013 14:12:41 -0400 Message-ID: <522F6118.5090708@redhat.com> Date: Tue, 10 Sep 2013 18:12:00 -0000 From: David Smith User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130805 Thunderbird/17.0.8 MIME-Version: 1.0 To: "Paddie O'Brien" CC: systemtap@sourceware.org Subject: Re: Page faults References: <522E36EF.3080904@redhat.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2013-q3/txt/msg00293.txt.bz2 On 09/10/2013 11:14 AM, Paddie O'Brien wrote: > Thanks David. I tried your approach but I get the same result. > > The script sometimes crashes unless I include --skip-badvars. > > Could my problem be caused by a misconfigured systemtap installation? > > Thanks, > P Hmm, interesting. I tweaked the script a bit to use the 'target()' function, which returns the pid of the target (from either '-c command' or '-x pid'). ==== global handled probe kernel.function("filemap_fault") { if (pid() != target()) next; printf("%s: filemap_fault\n", execname()); printf("Page: %lu\n", $vmf->pgoff); handled[tid()] = 1 } probe kernel.function("filemap_fault").return { if (pid() != target()) next; delete handled[tid()] } probe kernel.function("find_get_page") { if (handled[tid()] != 1) next; printf("%s: find_get_page\n", execname()); printf("Page: %lu\n\n", $offset); } ==== When I run "stap -c page_faults.stp -c ls", all the page numbers match up. Since I didn't have to use '--skip-badvars', my next guess would be that you've got an older systemtap. I'm running HEAD systemtap (~2.3) on 3.11.0-0.rc5.git3.1.fc20.x86_64. What version of systemtap and what kernel are you running? -- David Smith dsmith@redhat.com Red Hat http://www.redhat.com 256.217.0141 (direct) 256.837.0057 (fax)