DragonFly BSD
DragonFly commits List (threaded) for 2005-06
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: cvs commit: src/sys/conf options src/sys/kern lwkt_token.c


From: Joerg Sonnenberger <joerg@xxxxxxxxxxxxxxxxx>
Date: Mon, 20 Jun 2005 16:55:49 +0200
Mail-followup-to: commits@crater.dragonflybsd.org

On Mon, Jun 20, 2005 at 07:46:42AM -0700, Matthew Dillon wrote:
> 
> :>   Log:
> :>   Add a DEBUG_TOKENS option which causes token operations to be logged to
> :>   a static array, suitable for post-morten investigation.
> :
> :ktr(4) ?
> :
> :Joerg
> 
>     Yup, I'll probably convert it.  I need to modify it somewhat to support
>     a better abstraction, though.  A management pointer needs to be passed
>     instead of 'mask and format' so each tracepoint can be properly
>     identified.

Keep in mind that KTR is supposed to provide zero overhead if not the
trace point is not wanted. That's what the code achieves by allowing
compile-time elimination based on the choosen mask.

>     A 'caller' also needs to be recorded, going up the frame
>     pointer chain, and the 'argument' abstraction needs a lot of help.  That
>     probably should be abstracted to a var-args pass-by-value structure
>     instead of six discrete arguments.

You can't / don't want to allocate memory from KTR and the fixed size
simplifies the code a lot by allowing it to utilise fixed records.
It also makes the code more robust e.g. for post-mortem analysis. The
main reason I haven't modified it yet to record the caller chain is
simply that it is very expensive to do correctly. I'd like to store
at most the upper two stack pointers, which can be obtained easily without
having to deal with the side cases I think.

Joerg



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]