You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As of now, there are many log statements that make screen dirty.
The proposal is to add "trace" argument to os.log or make a new function os.trace that will be similar to os.log but will have a "trace" argument. log/trace will then be used like this.
os.trace("range_alloc", "Allocated new range 0x{X} - -x{X}", .{range_start, range_end});
On startup, stivale2_main would parse cmdline to find all enabled traces. If trace is enabled, thing will be logged, otherwise it trace becomes a no-op.
The alternative is to define list of traces in compile-time config and checking if something should be printed at compile-time. This would remove all run-time overhead + stivale2 cmdline parser would not be needed. On the other hand, kernel would have to be recompiled every time we want to see output for some traces which is not really convinient in all cases. Additionally, we would need a stivale2 cmdline parser later on anyways
The text was updated successfully, but these errors were encountered:
Turns out that the standard library provides all functionality needed under namespace std.log.*, we just need to define a root log callback for logging functions to work.
As of now, there are many log statements that make screen dirty.
The proposal is to add "trace" argument to
os.log
or make a new functionos.trace
that will be similar toos.log
but will have a "trace" argument.log
/trace
will then be used like this.On startup,
stivale2_main
would parse cmdline to find all enabled traces. If trace is enabled, thing will be logged, otherwise ittrace
becomes a no-op.The alternative is to define list of traces in compile-time config and checking if something should be printed at compile-time. This would remove all run-time overhead + stivale2 cmdline parser would not be needed. On the other hand, kernel would have to be recompiled every time we want to see output for some traces which is not really convinient in all cases. Additionally, we would need a stivale2 cmdline parser later on anyways
The text was updated successfully, but these errors were encountered: