From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3550 invoked by alias); 8 Apr 2011 15:51:07 -0000 Received: (qmail 3538 invoked by uid 22791); 8 Apr 2011 15:51:05 -0000 X-SWARE-Spam-Status: No, hits=-6.0 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 08 Apr 2011 15:51:01 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p38FoxX8019761 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 8 Apr 2011 11:51:00 -0400 Received: from [10.11.231.155] (dhcp231-155.rdu.redhat.com [10.11.231.155]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p38FoxBT012301; Fri, 8 Apr 2011 11:50:59 -0400 Message-ID: <4D9F2EE3.3020505@redhat.com> Date: Fri, 08 Apr 2011 15:51:00 -0000 From: William Cohen User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.15) Gecko/20110318 Red Hat/3.1.9-3.el6_0 Thunderbird/3.1.9 MIME-Version: 1.0 To: voyager1983 CC: systemtap@sourceware.org Subject: Re: Can kernel.statement access the function argument? References: <31348406.post@talk.nabble.com> In-Reply-To: <31348406.post@talk.nabble.com> Content-Type: text/plain; charset=ISO-8859-1 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: 2011-q2/txt/msg00059.txt.bz2 On 04/07/2011 11:52 PM, voyager1983 wrote: > > Hi, All > > I am trying to access the argument of kernel function in kernel.statement > probe point. But I get the error message: > > semantic error: not accessible at this address (0xc01a82e0): identifier > '$irq' at question.stp:2:38 > source: printf("irq number is %d\n", $irq) > ^ > Pass 2: analysis failed. Try again with another '--vp 01' option. > > The question.stp file is as below: > > probe kernel.statement("handle_IRQ_event@kernel/irq/handle.c:376"){ > printf("irq number is %d\n", $irq) > } > > I am using SystemTap 1.3 on Ubuntu10.10 to trace the kernel 2.6.35.9. > > Are we allowed to access the function argument in kernel.statement probe > point? If not, is there any walk around solution? > > Thanks! > Joey > > > Hi Joey, SystemTap's ability to obtain target variables depends on whether the argument is available at that location and whether the compiler has include debuginfo that describe where to get the value. To see what target variables systemtap can find at that location you could do: stap -L 'kernel.statement("handle_IRQ_event@kernel/irq/handle.c:376")' Is the place you probing the same as like 376 in: http://lxr.linux.no/#linux+v2.6.35.9/kernel/irq/handle.c#L376 Could you use the following probe point? kernel.trace("irq_handler_exit") $irq:int $action:struct irqaction* $ret:int -Will