From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8956 invoked by alias); 9 Apr 2011 00:37:40 -0000 Received: (qmail 8845 invoked by uid 22791); 9 Apr 2011 00:37:39 -0000 X-SWARE-Spam-Status: No, hits=-1.0 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED,T_RP_MATCHES_RCVD,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: sourceware.org Received: from sam.nabble.com (HELO sam.nabble.com) (216.139.236.26) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 09 Apr 2011 00:37:35 +0000 Received: from isper.nabble.com ([192.168.236.156]) by sam.nabble.com with esmtp (Exim 4.69) (envelope-from ) id 1Q8MBC-0002rX-Fz for systemtap@sourceware.org; Fri, 08 Apr 2011 17:37:34 -0700 Message-ID: <31356706.post@talk.nabble.com> Date: Sat, 09 Apr 2011 00:37:00 -0000 From: voyager1983 To: systemtap@sourceware.org Subject: Re: Can kernel.statement access the function argument? In-Reply-To: <4D9F2EE3.3020505@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit References: <31348406.post@talk.nabble.com> <4D9F2EE3.3020505@redhat.com> 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/msg00060.txt.bz2 Hi, William What I am about to probe is actually the statement ret = action->handler(irq, action->dev_id); located in http://lxr.linux.no/linux+v2.6.35.9/kernel/irq/handle.c#L375 I want to selective do the probe according to the value of argument irq (such as only probe interrupt issued by the keyboard). kernel.trace("irq_handler_exit") works for me. But how can I do in some other functions if the tracing line doesn't surrounded by the function like trace_irq_handler_entry and trace_irq_handler_exit. BTW, when I execute the command stap -L 'kernel.statement("handle_IRQ_event@kernel/irq/handle.c:376")' It returns nothing. Best regards, Joey William Cohen wrote: > > 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 > > -- View this message in context: http://old.nabble.com/Can-kernel.statement-access-the-function-argument--tp31348406p31356706.html Sent from the Sourceware - systemtap mailing list archive at Nabble.com.