Date: Sat, 02 Feb 2008 00:32:33 +0200 From: Andrew Pogrebennyk <marduk@portaone.com> To: freebsd-current@freebsd.org Cc: Andrew Gallatin <gallatin@cs.duke.edu> Subject: Re: DTrace/FreeBSD source snapshot Message-ID: <47A39E01.9070202@portaone.com> In-Reply-To: <18339.38866.485161.843117@grasshopper.cs.duke.edu> 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>
next in thread | previous in thread | raw e-mail | index | archive | help
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: > > [...] > > <repeating traps forever> > > > 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?47A39E01.9070202>