I've often missed turning on tracing on the gc only. As it is now, one can get tracing from the gc on trace level 1, but that at the same time turns on tracing on a multitude of other things which makes it mostly useless.
This can either be fixed by adding a separate trace flag for the gc and some accompanying gc_trace() function, or by increasing all the current trace levels to make room for a new trace level 1 that only traces the gc. I think it'd be more consistent with the current trace system to do the latter. What do you say?
I think that raising the levels is a good idea. One could even put in some gaps to prepare for future additions as well (BASIC flashback). It might however be good to have a mapping(int:string) in the Debug module that very breifly describes the levels.
/ Martin Nilsson (Åskblod)
Previous text:
2003-01-10 19:28: Subject: Trace levels and the garbage collector
I've often missed turning on tracing on the gc only. As it is now, one can get tracing from the gc on trace level 1, but that at the same time turns on tracing on a multitude of other things which makes it mostly useless.
This can either be fixed by adding a separate trace flag for the gc and some accompanying gc_trace() function, or by increasing all the current trace levels to make room for a new trace level 1 that only traces the gc. I think it'd be more consistent with the current trace system to do the latter. What do you say?
/ Martin Stjernholm, Roxen IS
Gaps sounds ugly to me. In that case it's better to make the levels symbolic and have some enum constants for them (both on the C and Pike levels).
/ Martin Stjernholm, Roxen IS
Previous text:
2003-01-10 20:15: Subject: Trace levels and the garbage collector
I think that raising the levels is a good idea. One could even put in some gaps to prepare for future additions as well (BASIC flashback). It might however be good to have a mapping(int:string) in the Debug module that very breifly describes the levels.
/ Martin Nilsson (Åskblod)
But what would you call them? NONE, TINY, SMALL, MEDIUM, LARGE, GIGANTIC, HUMONGOUS, OH_MY_HOW_VERBOSE, MUCH_DATA_BUT_LITTLE_INFO
/ Martin Nilsson (Åskblod)
Previous text:
2003-01-10 20:22: Subject: Trace levels and the garbage collector
Gaps sounds ugly to me. In that case it's better to make the levels symbolic and have some enum constants for them (both on the C and Pike levels).
/ Martin Stjernholm, Roxen IS
Something like NONE, GC, FUNCTION_CALLS, OPCODES..., I guess. I don't know in detail what they all do, but it's probably not a bad idea to investigate that and restructure them to a sane hierarchy at the same time.
The same could be done to the debug levels too, btw. It has become a bit of a bad habit to introduce all new debug checks on level 1 or perhaps 2 since noone wants the additional overhead in other code that is added on the higher levels.
/ Martin Stjernholm, Roxen IS
Previous text:
2003-01-10 20:29: Subject: Trace levels and the garbage collector
But what would you call them? NONE, TINY, SMALL, MEDIUM, LARGE, GIGANTIC, HUMONGOUS, OH_MY_HOW_VERBOSE, MUCH_DATA_BUT_LITTLE_INFO
/ Martin Nilsson (Åskblod)
Ah. Bad then it would make sense to have them as flags instead.
/ Martin Nilsson (Åskblod)
Previous text:
2003-01-10 20:38: Subject: Trace levels and the garbage collector
Something like NONE, GC, FUNCTION_CALLS, OPCODES..., I guess. I don't know in detail what they all do, but it's probably not a bad idea to investigate that and restructure them to a sane hierarchy at the same time.
The same could be done to the debug levels too, btw. It has become a bit of a bad habit to introduce all new debug checks on level 1 or perhaps 2 since noone wants the additional overhead in other code that is added on the higher levels.
/ Martin Stjernholm, Roxen IS
Sometimes but not always. It's a feature that it's easy to enable a bunch of different traces/debug checks easily. In the trace case it's typically much more noise on the higher levels that the extra messages from the lower ones don't do much difference. In the debug case it could be useful to enable the more expensive checks as individual flags, though.
/ Martin Stjernholm, Roxen IS
Previous text:
2003-01-10 20:40: Subject: Trace levels and the garbage collector
Ah. Bad then it would make sense to have them as flags instead.
/ Martin Nilsson (Åskblod)
levels can be mapped to flags in the sense that each level defines which flags for that level are to be turned on (higher level -> more flags) then you get both, and it is easy to move some flags from one level to another, should that be necessary.
pike-devel@lists.lysator.liu.se