devfs
[Top] [All Lists]

Re: [IDEA] Enhanced trace level system

To: Brad Chapman <kakadu_croc@xxxxxxxxx>
Subject: Re: [IDEA] Enhanced trace level system
From: Richard Gooch <rgooch@xxxxxxxxxxxxxxx>
Date: Wed, 5 Dec 2001 23:58:14 -0700
Cc: devfs@xxxxxxxxxxx
In-reply-to: <20010917111933.37053.qmail@web10903.mail.yahoo.com>
References: <200109162342.f8GNgg308823@mobilix.ras.ucalgary.ca> <20010917111933.37053.qmail@web10903.mail.yahoo.com>
Sender: owner-devfs@xxxxxxxxxxx
[Apologies for the late reply: I'm randomly going through my backlog]
Brad Chapman writes:
> Mr. Gooch,
> 
> --- Richard Gooch <rgooch@xxxxxxxxxxxxxxx> wrote:
> > Brad Chapman writes:
> > >   I just got an idea: why don't we implement a userspace trace level
> > > system for devfsd with macro'd levels like the following:
> > > 
> > > /* Basic trace levels */
> > > #define TRACE_LEVEL_ZERO          0 /* None */
> > > #define TRACE_LEVEL_SPECIFIED             1 /* Specified on the command 
> > > line */
> > > #define TRACE_LEVEL_SIGNALS               2 /* Trapped and caught signals 
> > > */
> > > #define TRACE_LEVEL_PROCESS_FORK  3 /* Process forks for MODLOAD and 
> > > EXECUTE */
> > > #define TRACE_LEVEL_SERVICE_LOOP  4 /* devfs event service loops */
> > > #define TRACE_LEVEL_CONFIG                5 /* devfsd configuration */
> > > #define TRACE_LEVEL_KERNEL                6 /* Kernel-passed information 
> > > */
> > > 
> > > /* Debugging trace levels */
> > > #define TRACE_LEVEL_DEBUGGING             7 /* Basic debugging */
> > > #define TRACE_LEVEL_KERNEL_DBG            8 /* Kernel-passed information 
> > > debugging */
> > > #define TRACE_LEVEL_CONFIG_DBG            9 /* Configuration debugging */
> > > #define TRACE_LEVEL_COMPAT_NAME_DBG       10 /* Compatiblity name 
> > > debugging */
> > > #define TRACE_LEVEL_EXPRESSION_DBG        11 /* Regular expression 
> > > debugging */
> > > 
> > >   Does anyone think this is a good idea?
> > 
> > It's not clear to me what some of these trace levels are, nor what is
> > to be done with them. What is it you are trying to do, anyway?
> 
>       I'm trying to create a sort of tracing system where you can
> specify a mask on the command line (or a simple integer) and get a
> vareity of traced information about what devfsd is doing. The stuff
> I printed above was just an example of an incremental trace level
> system.

It's making things more complex than I'm happy with. I don't want the
code riddled with more debugging output.

> > Also note that I'm not keen on adding code to the core of devfsd
> > unless necessary. So I'd look more favourably on an extension.
> 
>       Extension? What sort of extension? How would you extend
> devfsd's tracing subsystem without actually modifying the core code?
> IDGT.....

I was thinking that if you wanted to capture and log events, you could
call into a special extension which could pull apart the event
structure and show all the information you wanted. That would give you
a lot of tracing information. It wouldn't give you all the information
about the internal workings of devfsd, but:

- there a fair bit of that already
- I'm not happy with increasing it.

                                Regards,

                                        Richard....
Permanent: rgooch@xxxxxxxxxxxxx
Current:   rgooch@xxxxxxxxxxxxxxx

<Prev in Thread] Current Thread [Next in Thread>