From owner-freebsd-hackers@FreeBSD.ORG Fri Apr 22 16:51:50 2011 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C77D31065675; Fri, 22 Apr 2011 16:51:50 +0000 (UTC) (envelope-from ctuffli@gmail.com) Received: from mail-pz0-f54.google.com (mail-pz0-f54.google.com [209.85.210.54]) by mx1.freebsd.org (Postfix) with ESMTP id 7FBFC8FC08; Fri, 22 Apr 2011 16:51:50 +0000 (UTC) Received: by pzk27 with SMTP id 27so492844pzk.13 for ; Fri, 22 Apr 2011 09:51:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=x1Jhw5HlJadOCQ6AP/OEdPs08l3mKODVM64KtWjry8U=; b=gTiEJUnylPbqETdNL8BQ6f9m+wId3fPS2opKwsr8uL20igg1l6fUjzk+621s4Wxl6X qlqWXOj961zCJ6gqVDhShPmaoSUmqgBxOGTYlHu1byleWw+oYWRIFbR+HKBRMejO+qHX pGUL+eUX2VWd0Jfo+Jee3alZQ0YoCARS8Us+U= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=qb1/1yYUdgU0rfHDfYI5H5Ww74fB8/TG0YOatmtG/1a+1TlrH9uoE8xY0qynE2nLW+ 3aXMkFsMPJKtjH60CYjQBbU1yHFsbkquN/oH1C4EvSxvRq2BbuCyioZAAkPQE9SuPL8k /OqQEsPgpMuLIBCby10ePz9eH/q18iAX+fvvg= MIME-Version: 1.0 Received: by 10.68.20.129 with SMTP id n1mr1997979pbe.155.1303491110070; Fri, 22 Apr 2011 09:51:50 -0700 (PDT) Received: by 10.68.49.72 with HTTP; Fri, 22 Apr 2011 09:51:50 -0700 (PDT) In-Reply-To: <4DB1AFA0.7030401@FreeBSD.org> References: <20110421221611.7f52ca98@kan.dnsalias.net> <20110422112444.0e423a80@kan.dnsalias.net> <4DB1A25F.8040700@FreeBSD.org> <4DB1AFA0.7030401@FreeBSD.org> Date: Fri, 22 Apr 2011 09:51:50 -0700 Message-ID: From: Chuck Tuffli To: Andriy Gapon Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers@freebsd.org Subject: Re: no KLD symbols in dtrace? 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, 22 Apr 2011 16:51:50 -0000 On Fri, Apr 22, 2011 at 9:41 AM, Andriy Gapon wrote: > on 22/04/2011 18:56 Chuck Tuffli said the following: >> On Fri, Apr 22, 2011 at 8:44 AM, Andriy Gapon wrote: >>> Also, dtrace process needs to access the module file for address-to-nam= e translation. >> >> Hmm ... I'm building this module out of tree. Where does dtrace look >> for modules? > > I think that exactly at the place from which a module is loaded. > You can double-check with kldstat -v, e.g.: > =A02 =A0 =A01 0xffffffff80c6c000 217f20 =A0 zfs.ko (/boot/kernel/zfs.ko) Ah-ha! I was loading the module with a relative path (i.e. kldload ./ocs.ko), but when I switched this to use the full path (i.e. kldload /home/ctuffli/ocs.ko) everything worked. 2 33759 bus_release_resource:entry ocs.ko`ocs_release_bus+0x2e ocs.ko`ocs_pci_detach+0x31 kernel`device_detach+0x84 kernel`driver_module_handler+0x37c kernel`module_unload+0x49 kernel`linker_file_unload+0x178 kernel`kern_kldunload+0x117 kernel`syscallenter+0x23d kernel`syscall+0x4b kernel`0xffffffff808c5572 Thanks for the patch and all your help! ---chuck