From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23614 invoked by alias); 20 Oct 2006 22:34:43 -0000 Received: (qmail 23599 invoked by uid 22791); 20 Oct 2006 22:34:41 -0000 X-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL,BAYES_00,SPF_PASS X-Spam-Check-By: sourceware.org Received: from e1.ny.us.ibm.com (HELO e1.ny.us.ibm.com) (32.97.182.141) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 20 Oct 2006 22:34:38 +0000 Received: from d01relay04.pok.ibm.com (d01relay04.pok.ibm.com [9.56.227.236]) by e1.ny.us.ibm.com (8.13.8/8.12.11) with ESMTP id k9KMYaqT026302 for ; Fri, 20 Oct 2006 18:34:36 -0400 Received: from d01av02.pok.ibm.com (d01av02.pok.ibm.com [9.56.224.216]) by d01relay04.pok.ibm.com (8.13.6/8.13.6/NCO v8.1.1) with ESMTP id k9KMYaj5142396 for ; Fri, 20 Oct 2006 18:34:36 -0400 Received: from d01av02.pok.ibm.com (loopback [127.0.0.1]) by d01av02.pok.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id k9KMYavJ023572 for ; Fri, 20 Oct 2006 18:34:36 -0400 Received: from [127.0.0.1] (IBM-BE3QP6HK0F9.beaverton.ibm.com [9.47.16.64] (may be forged)) by d01av02.pok.ibm.com (8.12.11.20060308/8.12.11) with ESMTP id k9KMYZHN023513; Fri, 20 Oct 2006 18:34:35 -0400 Message-ID: <45394EF9.2000108@us.ibm.com> Date: Fri, 20 Oct 2006 22:34:00 -0000 From: Vara Prasad User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.2) Gecko/20040804 Netscape/7.2 (ax) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Benjamin Thery , SystemTAP Subject: Re: Systemtap References: <4536208E.1010109@bull.net> In-Reply-To: <4536208E.1010109@bull.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact systemtap-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Post: List-Help: , Sender: systemtap-owner@sourceware.org X-SW-Source: 2006-q4/txt/msg00227.txt.bz2 Benjamin Thery wrote: > [..] > I'm trying to use Systemtap to trace some network events in order to > find a bug. I have a very basic knowledge of stap and there is a > couple of points I'd like to clarify: Thanks for using SystemTap and we will try our best to help you. > > Placing a probe at the beginning of a given function always work, but > when I try to set the probe on the return statement of a function it > sometime fails. Stap says the probe can't be set. Just to be sure i understand correctly, you are putting probes on a return statement to find when the function is returning, is it possible you could use return probes for the same. Return probe guarantees you will be able to run the handler at the time function returns no matter which of the return paths it takes as long as it is not an inline function. Coming to not able to set probes on a return statement it could be related to compiler optimization. Was the function you are trying to do an inline function? > I also have a problem when I try to set a probe at a given line in a > source file: sometimes it seems the probe isn't where I supposed it > is. For example, I tried to test if the code executed enters a > particular if-statement: stap trace never displayed my probe, whereas > I had a printk() trace that suggested the opposite). It could be related to compiler optimization. > > Are these problems possibly due to the kernel being compiled with -O2 > flag? Is it a side effect of optimization (similarly to debugging an > optimized program with gdb)? > It could be. We know of cases where we are not able to place probes in the middle of functions due to compiler optimizations hence we are pursuing static markers to address this issue. > I'm wondering if it is advised to compile the kernel without > optimizations to be able to set probes wherever we want. > Certainly worth a try. > Thanks for your help. > > Regards, > Benjamin > Please let us know your results after trying without optimization. bye, Vara Prasad