From owner-freebsd-hackers@FreeBSD.ORG Fri Mar 25 13:50:58 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 80E65106564A; Fri, 25 Mar 2011 13:50:58 +0000 (UTC) (envelope-from alexander@leidinger.net) Received: from mail.ebusiness-leidinger.de (mail.ebusiness-leidinger.de [217.11.53.44]) by mx1.freebsd.org (Postfix) with ESMTP id 32F488FC17; Fri, 25 Mar 2011 13:50:57 +0000 (UTC) Received: from outgoing.leidinger.net (p5B1553A9.dip.t-dialin.net [91.21.83.169]) by mail.ebusiness-leidinger.de (Postfix) with ESMTPSA id D3822844017; Fri, 25 Mar 2011 14:50:52 +0100 (CET) Received: from webmail.leidinger.net (webmail.Leidinger.net [IPv6:fd73:10c7:2053:1::2:102]) by outgoing.leidinger.net (Postfix) with ESMTP id CA2E8147C; Fri, 25 Mar 2011 14:50:48 +0100 (CET) Received: (from www@localhost) by webmail.leidinger.net (8.14.4/8.13.8/Submit) id p2PDomXZ024202; Fri, 25 Mar 2011 14:50:48 +0100 (CET) (envelope-from Alexander@Leidinger.net) Received: from pslux.ec.europa.eu (pslux.ec.europa.eu [158.169.9.14]) by webmail.leidinger.net (Horde Framework) with HTTP; Fri, 25 Mar 2011 14:50:47 +0100 Message-ID: <20110325145047.13886kra3kep90w8@webmail.leidinger.net> Date: Fri, 25 Mar 2011 14:50:47 +0100 From: Alexander Leidinger To: Alexander Leidinger References: <20110325105213.53217afxpg1kj7s4@webmail.leidinger.net> <4D8C74F8.4010303@freebsd.org> <20110325141449.175625s5pqmtbrk0@webmail.leidinger.net> In-Reply-To: <20110325141449.175625s5pqmtbrk0@webmail.leidinger.net> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; DelSp="Yes"; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: 7bit User-Agent: Dynamic Internet Messaging Program (DIMP) H3 (1.1.6) X-EBL-MailScanner-Information: Please contact the ISP for more information X-EBL-MailScanner-ID: D3822844017.AC763 X-EBL-MailScanner: Found to be clean X-EBL-MailScanner-SpamCheck: not spam, spamhaus-ZEN, SpamAssassin (not cached, score=1.2, required 6, autolearn=disabled, J_CHICKENPOX_32 0.60, J_CHICKENPOX_52 0.60) X-EBL-MailScanner-SpamScore: s X-EBL-MailScanner-From: alexander@leidinger.net X-EBL-MailScanner-Watermark: 1301665854.21566@hhn4/ikeAERbTEcfwsQ2Ww X-EBL-Spam-Status: No X-Mailman-Approved-At: Fri, 25 Mar 2011 15:47:52 +0000 Cc: hackers@freebsd.org, Andriy Gapon 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 13:50:58 -0000 Quoting Alexander Leidinger (from Fri, 25 Mar 2011 14:14:49 +0100): > Quoting Andriy Gapon (from Fri, 25 Mar 2011 > 12:56:56 +0200): > >> 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. > > So if I load linux.ko before sdt.ko, or if I unload sdt.ko and > reload it, it should work? I'm going to try this after sending this > mail. Unloading sdt.ko was a bad idea... currently I'm waiting the machine recovers from this rude action. It seems there are some modunload checks missing to prevent a kernel panic by unloading sdt.ko when it is not safe. Do we have a place where we can document the current state of afairs, or shall I just add something to the wiki pages (the unload problem to the DTrace page and the load the module with SDT probes before the sdt.ko in the DTrace/HowToAddSDTProbes page)? Bye, Alexander. -- BOFH excuse #378: Operators killed by year 2000 bug bite http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID = B0063FE7 http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID = 72077137