Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 25 Mar 2011 12:56:56 +0200
From:      Andriy Gapon <avg@freebsd.org>
To:        Alexander Leidinger <Alexander@leidinger.net>
Cc:        hackers@freebsd.org
Subject:   Re: dtrace sdt problem: my fault or a generic problem (SYSINIT not working as expected for modules)?
Message-ID:  <4D8C74F8.4010303@freebsd.org>
In-Reply-To: <20110325105213.53217afxpg1kj7s4@webmail.leidinger.net>
References:  <20110325105213.53217afxpg1kj7s4@webmail.leidinger.net>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4D8C74F8.4010303>