Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 17 Jun 1996 00:30:38 GMT
From:      James Raynard <fcurrent@jraynard.demon.co.uk>
To:        bde@zeta.org.au
Cc:        freebsd-current@freebsd.org, j@uriah.heep.sax.de, nate@sri.MT.net
Subject:   Re: ktrace [Was: 2.2-960612-SNAP resolver problems]
Message-ID:  <199606170030.AAA10445@jraynard.demon.co.uk>
In-Reply-To: <199606160211.MAA00203@godzilla.zeta.org.au> (message from Bruce Evans on Sun, 16 Jun 1996 12:11:38 %2B1000)

next in thread | previous in thread | raw e-mail | index | archive | help
>>>>> Bruce Evans <bde@zeta.org.au> writes:
> 
> >> > Does anybody seriously object against putting it into GENERIC?
> >> 
> >> Yes.  It's un-necessary bloat that 95% of the users don't know how to
> >> use and the other 5% know how to add it.
> 
> >That's not true.  It's relatively easy to teach people about running
> >their program with a prepended `ktrace'.  It's much harder to demand
> >from them to first recompile a new kernel.  (And i can't answer their
> >questions then why it's not in the default kernel. :)  Many other
> >systems around ship with it enabled and ready to run by default,
> >including all SysV's (truss) and Linux (strace).
> 
> Strace seems to be more in the library.  Its output is much better.

Indeed. Apart from volume of output, is there any particular reason
why ktrace writes to a file which kdump reads in, as opposed to using
a pipe? Particularly as the first thing kdump does is 
freopen(tracefile, "r", stdin)!

The error message is not particularly informative, either:-

ktrace -f foobar ls   
ktrace: Ù¿ïÙ¿ï"Ù¿ï)Ù¿ï: Function not implemented.

but this at least can easily be fixed:-

--- ktrace.c.orig       Sun Jun 16 23:59:12 1996
+++ ktrace.c    Sun Jun 16 23:59:58 1996
@@ -174,7 +174,10 @@
 error(name)
        char *name;
 {
-       (void)fprintf(stderr, "ktrace: %s: %s.\n", name, strerror(errno));
+       if (errno == ENOSYS)
+               noktrace();
+       else
+               (void)fprintf(stderr, "ktrace: %s: %s.\n", name, strerror(errno));
        exit(1);
 }

Not to mention the mkioctls horrors which were discussed recently...

-- 
James Raynard, Edinburgh, Scotland
james@jraynard.demon.co.uk



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