From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19640 invoked by alias); 21 Oct 2010 17:34:49 -0000 Received: (qmail 19509 invoked by uid 22791); 21 Oct 2010 17:34:48 -0000 X-SWARE-Spam-Status: No, hits=-6.1 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; Thu, 21 Oct 2010 17:34:42 +0000 Received: from int-mx03.intmail.prod.int.phx2.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o9LHYfuK028365 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 21 Oct 2010 13:34:41 -0400 Received: from [10.3.113.41] (ovpn-113-41.phx2.redhat.com [10.3.113.41]) by int-mx03.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o9LHYdmL014487; Thu, 21 Oct 2010 13:34:40 -0400 Subject: Re: Userspace probes on library functions ? From: Mark Wielaard To: "Daniel P. Berrange" Cc: systemtap@sourceware.org In-Reply-To: <20101021162038.GU27578@redhat.com> References: <20101021162038.GU27578@redhat.com> Content-Type: text/plain; charset="UTF-8" Date: Thu, 21 Oct 2010 17:34:00 -0000 Message-ID: <1287682479.2599.53.camel@springer.wildebeest.org> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit 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: 2010-q4/txt/msg00080.txt.bz2 On Thu, 2010-10-21 at 17:20 +0100, Daniel P. Berrange wrote: > I'm trying to use userspace probes to trace public API calls into the > libvirt.so library. While I can trace functions in the virsh executable > without trouble, eg > > probe process("/usr/bin/virsh").function("vshInit") { > printf("init %p", $ctl) > } > > I'm unable to trace functions that are defined in the libvirt.so > > probe process("/usr/bin/virsh").function("virConnectOpen") { > printf("Open %p", $name) > } > > semantic error: no match while resolving probe point process("/usr/bin/virsh").function("virConnectOpen") You can use the slightly non-intuitive: probe process("/usr/lib64/libvirt.so.0").function("virConnectOpen") { printf("Open %p\n", $name) } > Nor do I seem to be able to use function() matches in combination > with a library() statement > > probe process("/usr/bin/virsh").library("libvirt.so").function("virConnectOpen") { > printf("Open %s", $name) > } > > semantic error: probe point mismatch at position 2 (alternatives: > mark(string) provider(string)): keyword at demo.stp:9:55 while > resolving probe point process("/usr/bin/virsh").library("libvirt.so").function("virConnectOpen") > source: probe process("/usr/bin/virsh").library("libvirt.so").function("virConnectOpen") { > Apparently process().library() probes only work for static markers in the current translator. Would be nice to extend it to function and statement too. Cheers, Mark