From owner-svn-src-all@FreeBSD.ORG Wed Aug 14 13:57:25 2013 Return-Path: Delivered-To: svn-src-all@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 1D717D19; Wed, 14 Aug 2013 13:57:25 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E72A52CA2; Wed, 14 Aug 2013 13:57:24 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 0AC3DB91C; Wed, 14 Aug 2013 09:57:23 -0400 (EDT) From: John Baldwin To: Mark Johnston Subject: Re: svn commit: r254309 - in head: share/man/man9 sys/cddl/contrib/opensolaris/uts/common/dtrace sys/cddl/dev/dtrace sys/cddl/dev/sdt sys/kern sys/sys Date: Wed, 14 Aug 2013 08:19:13 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p28; KDE/4.5.5; amd64; ; ) References: <201308140042.r7E0gMtf054550@svn.freebsd.org> In-Reply-To: <201308140042.r7E0gMtf054550@svn.freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201308140819.13854.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Wed, 14 Aug 2013 09:57:23 -0400 (EDT) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Aug 2013 13:57:25 -0000 On Tuesday, August 13, 2013 8:42:22 pm Mark Johnston wrote: > Author: markj > Date: Wed Aug 14 00:42:21 2013 > New Revision: 254309 > URL: http://svnweb.freebsd.org/changeset/base/254309 > > Log: > Use kld_{load,unload} instead of mod_{load,unload} for the linker file load > and unload event handlers added in r254266. > > Reported by: jhb > X-MFC with: r254266 Thanks! BTW, it would be really nice to replace HWPMC_HOOKS in kern_linker.c with EVENTHANDLER calls. I think kld_load would just work (though you might need to downgrade the lock before you run it). For kld_unload it seems you want two events, a kld_unload_try for your newly added event (since it can reject a kld_unload), and perhaps kld_unload at the end where the current HWPMC_HOOK is. Just an idea if someone is looking for something to do. I know there are other modules that need to hook into linker events like this, and making HWPMC_HOOKS more generic would be a big help. -- John Baldwin