From owner-freebsd-dtrace@FreeBSD.ORG Mon Nov 4 04:35:23 2013 Return-Path: Delivered-To: freebsd-dtrace@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 05D9FFF8 for ; Mon, 4 Nov 2013 04:35:23 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-ie0-x230.google.com (mail-ie0-x230.google.com [IPv6:2607:f8b0:4001:c03::230]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C88BC2705 for ; Mon, 4 Nov 2013 04:35:22 +0000 (UTC) Received: by mail-ie0-f176.google.com with SMTP id u16so11772992iet.35 for ; Sun, 03 Nov 2013 20:35:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=sYn+xsQ9sxV1T3465y/vTvWA+KVAD2RsjHGbcqZCyBY=; b=bFgt3lXKvfWuQwZ46SsXokkY6WoNSuUBlmZ3t9pU91vNoMNwaMWr9ffFKhbyGCFZg3 6nyPyXUBwpMEB+7mMdQ5tcVS3ndM9NPtAlfR6y1je7Nchxq8wYsQvasx5olOD+H2itwv hx+LnFHJ6Nyd/nwQtgbpd/UT+7jujfrl1JCR14VByBAdcwvgfqBmNhDkY942V11RgDYS 3uckSCjsTPHD9PXj4ah9zhglR1v0w5ZGpsP3lV/2VUPjTkcaurrLGdkDklIqQnkMuXcg BIwA/WWVqsFpQUxllsAf9NuvBR36W48u5y6K5bTitfShMTE7aYjnZPunG2PTHtD8c+ts 3lQQ== X-Received: by 10.51.16.35 with SMTP id ft3mr10308172igd.46.1383539722346; Sun, 03 Nov 2013 20:35:22 -0800 (PST) Received: from raichu (24-212-218-13.cable.teksavvy.com. [24.212.218.13]) by mx.google.com with ESMTPSA id ft2sm20271501igb.5.2013.11.03.20.35.21 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 03 Nov 2013 20:35:21 -0800 (PST) Sender: Mark Johnston Date: Sun, 3 Nov 2013 23:35:19 -0500 From: Mark Johnston To: John Luk Subject: Re: dtrace showed matched probes but nothing in output on FreeBSD 9.1-RELEASE Message-ID: <20131104043519.GB8007@raichu> References: <20131103235936.GB15661@raichu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Cc: freebsd-dtrace@freebsd.org X-BeenThere: freebsd-dtrace@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "A discussion list for developers working on DTrace in FreeBSD." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Nov 2013 04:35:23 -0000 On Mon, Nov 04, 2013 at 12:11:55PM +0800, John Luk wrote: > Thanks, Mark. But I still got nothing :( > The line number of your patch wasn't match with mine, I patched it > on hand. Was it because I was on an older version of src? The head > of proc_sym.c shows: > > $FreeBSD: release/9.1.0/lib/libproc/proc_sym.c 211184 2010-08-11 > 17:33:26Z rpaulo > > And the patch of mine is include below, is it correct? Sorry, I missed that you were on 9.1. The patch you pasted had a mistake in it; can you instead try applying the patch here: http://people.freebsd.org/~markj/patches/libproc_sym_lookup-9.1.diff I created it against the 9.1 tree, so it should apply cleanly. I built and installed the patched 9.1 libproc on a machine running head, and got the expected behaviour: mark@raichu: ~/src/dtrace/ufunc $ sudo dtrace -s ufunc.d -c ./test test dtrace: script 'ufunc.d' matched 9 probes dtrace: pid 11555 has exited __do_global_dtors_aux 1 foo 1 foo1 1 inet_makeaddr 1 main 1 mark@raichu: ~/src/dtrace/ufunc $ I don't think that this will be the final patch; checking for ET_EXEC to determine whether to add a relocation offset seems a bit dubious; I'm pretty sure it won't work for position-independent executables. Thanks, -Mark > > [...] >