From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 64710 invoked by alias); 18 Nov 2015 19:38:47 -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 64701 invoked by uid 89); 18 Nov 2015 19:38:46 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.5 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; Wed, 18 Nov 2015 19:38:45 +0000 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (Postfix) with ESMTPS id 7E2BA552E6; Wed, 18 Nov 2015 19:38:44 +0000 (UTC) Received: from t540p.usersys.redhat.com (vpn-54-90.rdu2.redhat.com [10.10.54.90]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id tAIJcg8j020095 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 18 Nov 2015 14:38:43 -0500 Subject: Re: How to track the functions in self-written module using SystemTap? To: Nan Xiao References: <564B5A4C.1080302@redhat.com> Cc: systemtap@sourceware.org From: David Smith Message-ID: <564CD3C1.2090900@redhat.com> Date: Wed, 18 Nov 2015 19:38:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2015-q4/txt/msg00149.txt.bz2 On 11/17/2015 09:38 PM, Nan Xiao wrote: > Hi David, > > Yes, the "FULL_PATH_TO_KEX" works: > > ~/Downloads/kernel/105.ops # stap -l > 'module("/root/Downloads/kernel/105.ops/kex.ko").function("*")' > module("/root/Downloads/kernel/105.ops/kex.ko").function("_open@/root/Downloads/kernel/105.ops/kex.c:21") > module("/root/Downloads/kernel/105.ops/kex.ko").function("_read@/root/Downloads/kernel/105.ops/kex.c:45") > module("/root/Downloads/kernel/105.ops/kex.ko").function("_release@/root/Downloads/kernel/105.ops/kex.c:33") > module("/root/Downloads/kernel/105.ops/kex.ko").function("copy_to_user@/usr/src/linux-3.12.49-3/arch/x86/include/asm/uaccess_64.h:72") > module("/root/Downloads/kernel/105.ops/kex.ko").function("kex_cleanup@/root/Downloads/kernel/105.ops/kex.c:90") > module("/root/Downloads/kernel/105.ops/kex.ko").function("kex_init@/root/Downloads/kernel/105.ops/kex.c:61") > > But the "RELATIVE_PATH_TO_KEX" doesn't work: > ~/Downloads/kernel/105.ops # stap -l 'module("./kex.ko").function("*")' > ~/Downloads/kernel/105.ops # > > Is it the expected behavior of SystemTap? Thanks! Good question. You are correct, using relative paths doesn't seem to work. I've filed PR19265 on this issue. Feel free to add yourself to the CC list on that bug. If you have the time, also feel free to look into this more. -- David Smith dsmith@redhat.com Red Hat http://www.redhat.com 256.217.0141 (direct) 256.837.0057 (fax)