tony.wasserka@freenet.de wrote:
A suggestion for how to realize this system would be to
- add a variable that counts how much right a debug output should be
- modify the debug macros TRACE, FIXME, etc... in such a way that they recognize this variable
- replace all TRACE("(%p): relayn", This) calls, which are usually at the beginning of a function, with a new macro, let's say NEWTRACE, which does exactly the same but also increments our tab (or space) counter by one.
- make sure that there's also an ENDTRACE macro at the end of each function that decrements the counter again.
Have you looked at tools/examine-relay script? What you proposing will add unnecessary processing everywhere the debugging output is called. While it would only be useful for relay, which is already horribly slow just because it outputs so much.
Vitaliy.