Subject: Re: adding utrace(2) ?
To: Simon J. Gerraty <sjg@quick.com.au>
From: Jaromír Dolecek <dolecek@ics.muni.cz>
List: tech-kern
Date: 12/18/2000 13:22:42
Simon J. Gerraty wrote:
> >does it make sense to add that syscall ? This syscall is present
> >on FreeBSD and allows the caller to add entries to ktrace record. This is
> >sometimes handy for debugging. There are hooks for this in e.g.
>
> Ah, so I can put cookies in the trace to tell who's doing what to whom?
> Yes please very handy.
The problem is that the programmer needs to 'know' what the cookie
means and there is no simple way to distinguish between the entries
besides length of the record. I'd probably at least add a
'const char *caller' argument, so that caller can be clearly labeled.
I don't think these calls are more useful than inserting debug printfs.
Since the value is just cookie, you have to have the sources available
anyway to decode the meaning.
Obviously, I'd rather avoid adding useless stuff.
Jaromir
--
Jaromir Dolecek <jdolecek@NetBSD.org> http://www.ics.muni.cz/~dolecek/
@@@@ Wanna a real operating system ? Go and get NetBSD, dammit! @@@@