From owner-freebsd-dtrace@FreeBSD.ORG Mon Nov 4 08:56:45 2013 Return-Path: Delivered-To: freebsd-dtrace@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 18502E22; Mon, 4 Nov 2013 08:56:45 +0000 (UTC) (envelope-from john.37@gmail.com) Received: from mail-oa0-x234.google.com (mail-oa0-x234.google.com [IPv6:2607:f8b0:4003:c02::234]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id CAF05256A; Mon, 4 Nov 2013 08:56:44 +0000 (UTC) Received: by mail-oa0-f52.google.com with SMTP id j1so6745773oag.25 for ; Mon, 04 Nov 2013 00:56:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=VtknrrksCNaFip/BKlAlzg6g3UWuECo3AylTsxhMyKU=; b=KgGv4M74S8UpEYQczasFDJ/nIjH5cxUEXaNzh4R0WZ5+vBVIbfLs2p5sPEUdEGmSHo VHB9z6Uj2gZK7Iaj8XI0fN9qFnD2s30B+dlRTySK3LMQTxK2KfByOZcGHTunygGbcrzy ItRhhqegmCRv+ZBkdjBcsRb5k0dYwa/G0VaBxyBUaHO+39nF3yBMrYTH4lzTek9aDRCN w8PO/qTPtbFG0HbwpoiC6VLC8ypAOL7a/4mzNBurcDY5AfhoCHr/qmm2AqWhYvvp0tKm QYrkBIwbrKg0Q4o+nX6VsXN9dclqJ3aVFgpK8qjnM4/ua222MFSfWignLGvHyIz+OKYV wpmg== MIME-Version: 1.0 X-Received: by 10.182.129.201 with SMTP id ny9mr13537142obb.0.1383555403684; Mon, 04 Nov 2013 00:56:43 -0800 (PST) Received: by 10.60.35.74 with HTTP; Mon, 4 Nov 2013 00:56:43 -0800 (PST) In-Reply-To: References: <20131103235936.GB15661@raichu> <20131104043519.GB8007@raichu> Date: Mon, 4 Nov 2013 16:56:43 +0800 Message-ID: Subject: Re: dtrace showed matched probes but nothing in output on FreeBSD 9.1-RELEASE From: John Luk To: Mark Johnston , freebsd-dtrace@freebsd.org Content-Type: text/plain; charset=UTF-8 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 08:56:45 -0000 EDIT:Apologies for miss-sent mail. Great! Seems that we're on the right way, I got the output below: # dtrace -s ufunc.d -c ./a.out a.out dtrace: script 'ufunc.d' matched 5 probes ^C foo 1 foo1 1 main 1 through the inet_makeaddr was missing. I applied the patch with: patch < libproc_sym_lookup-9.1.diff Thanks again for your patch, Mark :) Cheers, spin6lock 2013/11/4 John Luk : > Great! Seems that we're on the right way, I got the output below: > > # dtrace -s ufunc.d -c ./a.out a.out > dtrace: script 'ufunc.d' matched 5 probes > ^C > > foo 1 > foo1 1 > main 1 > > through the inet_makeaddr was missing. I applied the patch with: > > patch < libproc_sym_lookup-9.1.diff > > Thanks again for your patch, Mark :) > > Cheers, > spin6lock > > > 2013/11/4 Mark Johnston : >> 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 >> >>> >>> [...] >>>