From owner-freebsd-current@FreeBSD.ORG Fri Feb 1 22:47:10 2008 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F02B716A419 for ; Fri, 1 Feb 2008 22:47:10 +0000 (UTC) (envelope-from marduk@portaone.com) Received: from bugor.portaone.com (bugor.portaone.com [65.61.203.147]) by mx1.freebsd.org (Postfix) with ESMTP id DB06813C459 for ; Fri, 1 Feb 2008 22:47:10 +0000 (UTC) (envelope-from marduk@portaone.com) Received: from antagonismness.toot.volia.net ([77.123.135.210] helo=[192.168.178.18]) by bugor.portaone.com (8.11.3/8.11.3) with ESMTP id 1JL4Qo-000BmK-Qd; Fri, 01 Feb 2008 14:32:23 -0800 Message-ID: <47A39E01.9070202@portaone.com> Date: Sat, 02 Feb 2008 00:32:33 +0200 From: Andrew Pogrebennyk User-Agent: Thunderbird 2.0.0.6 (X11/20071022) MIME-Version: 1.0 To: freebsd-current@freebsd.org References: <20080201093538.GA83169@what-creek.com> <18339.35979.765504.132672@grasshopper.cs.duke.edu> <47A3920B.4010504@portaone.com> <18339.38866.485161.843117@grasshopper.cs.duke.edu> In-Reply-To: <18339.38866.485161.843117@grasshopper.cs.duke.edu> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Andrew Gallatin Subject: Re: DTrace/FreeBSD source snapshot X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Feb 2008 22:47:11 -0000 Andrew Gallatin wrote: > Andrew Pogrebennyk writes: > > In function 'dtrace_ioctl': > > /usr/src/sys/modules/dtrace/dtrace/../../../cddl/dev/dtrace/dtrace_ioctl.c:294: > > warning: format '%zd' expects type 'signed size_t', but argument 4 has > > type 'uint64_t' > > *** Error code 1 > > I'm on amd64, so I did not see these warnings :) > > BTW, if you forget options KTDTRACE_HOOKS, and try to > preload dtraceall, things explode rather spectacularly: > > [...] > > > > > I then rebuilt with KDTRACE_HOOKS. This time, I had > another missing symbol (syscallnames). I'm about out of time > for today.. > > Drew OK, thanks for interesting info. However I got stuck with kernel module compilation. There were two minor discrepancies between /usr/src/sys/cddl/dev/dtrace/i386/dtrace_subr.c and /usr/src/sys/sys/dtrace_bsd.h (different types if declaration and definition of dtrace_trap() function and missing declaration of dtrace_sync_func()). I solved that and now it complains on the word "type" in dtrace_trap(): /usr/src/sys/modules/dtrace/dtrace/../../../cddl/dev/dtrace/i386/dtrace_subr.c: In function 'dtrace_trap': /usr/src/sys/modules/dtrace/dtrace/../../../cddl/dev/dtrace/i386/dtrace_subr.c:438: error: 'type' undeclared (first use in this function) Indeed, where it should be taken from? /* Function to handle DTrace traps during probes. See i386/i386/trap.c */ int dtrace_trap(struct trapframe *frame) { /* * A trap can occur while DTrace executes a probe. Before * executing the probe, DTrace blocks re-scheduling and sets * a flag in it's per-cpu flags to indicate that it doesn't * want to fault. On returning from the the probe, the no-fault * flag is cleared and finally re-scheduling is enabled. * * Check if DTrace has enabled 'no-fault' mode: * */ if ((cpu_core[curcpu].cpuc_dtrace_flags & CPU_DTRACE_NOFAULT) != 0) { /* * There are only a couple of trap types that are expected. * All the rest will be handled in the usual way. */ switch (type) { /* General protection fault. */ case T_PROTFLT: /* Flag an illegal operation. */ [...] -- Sincerely, Andrew Pogrebennyk