From owner-freebsd-hackers@FreeBSD.ORG Fri Mar 25 11:09:04 2011 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 05DBF1065672 for ; Fri, 25 Mar 2011 11:09:04 +0000 (UTC) (envelope-from avg@freebsd.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 463BD8FC1A for ; Fri, 25 Mar 2011 11:09:02 +0000 (UTC) Received: from porto.topspin.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id MAA12365; Fri, 25 Mar 2011 12:56:57 +0200 (EET) (envelope-from avg@freebsd.org) Received: from localhost.topspin.kiev.ua ([127.0.0.1]) by porto.topspin.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1Q34hN-000Kul-IV; Fri, 25 Mar 2011 12:56:57 +0200 Message-ID: <4D8C74F8.4010303@freebsd.org> Date: Fri, 25 Mar 2011 12:56:56 +0200 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.15) Gecko/20110308 Lightning/1.0b2 Thunderbird/3.1.9 MIME-Version: 1.0 To: Alexander Leidinger References: <20110325105213.53217afxpg1kj7s4@webmail.leidinger.net> In-Reply-To: <20110325105213.53217afxpg1kj7s4@webmail.leidinger.net> X-Enigmail-Version: 1.1.2 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: hackers@freebsd.org Subject: Re: dtrace sdt problem: my fault or a generic problem (SYSINIT not working as expected for modules)? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Mar 2011 11:09:04 -0000 on 25/03/2011 11:52 Alexander Leidinger said the following: > As I read it, it looks a little bit like the SYSINIT of the SDT probes didn't > work as expected for my new probes (does this work in modules? fxr.watson.org > AFAICS only lists SDT probes in kernel-code, not in module-code), a hit with the > clue-bat is welcome. My reading of the code is that all modules with SDT proivders/probes should be loaded before sdt module itself. SYSINIT in your module(s) works as expect, but dtrace_register() is not called on your SDT provider. See sys/cddl/dev/sdt/sdt.c for details: sdt_modevent -> sdt_load -> sdt_provider_listall(sdt_provider_reg_callback) -> dtrace_register. I am not saying that this behavior is correct/desired, just that this is what we have now. -- Andriy Gapon