Messages in this thread | | | Date | Wed, 16 Jan 2008 10:01:34 -0800 | From | Tim Bird <> | Subject | Re: [RFC PATCH 16/22 -v2] add get_monotonic_cycles |
| |
Steven Rostedt wrote: > grmble. Then how do you trace preempt_disable? As my tracer does that > (see the last patch in the series).
One way is to make a tracer_preempt_disable() and tracer_preempt_enable(), both of which would be 'notrace'. You could probably optimize them as well. The standard preempt_disable and preempt_enable don't look very efficient (e.g. what's up with converting an increment operation into an addition? - gak!)
Any lock you do is going to have a pretty bad effect.
In order to be able to trace as much as possible, for KFT, I implemented my own synchronization mechanism using cmpxchg, to avoid using any of the existing kernel locks (which change more often than you'd think, and have weird side effects).
============================= Tim Bird Architecture Group Chair, CE Linux Forum Senior Staff Engineer, Sony Corporation of America =============================
| |