[kernel] Switch logger from bip to ring buffer

A bip-buffer is good for producer/consumer systems, but ideally logs
will stay in the buffer until they're ousted because they need to be
overwritten. Now they're a regular ring buffer and every entry has an
incremental id. Consumers pass in the last id they've seen, and will get
the next log in the sequence.
This commit is contained in:
Justin C. Miller
2023-02-07 20:19:02 -08:00
parent 0a097ec7d3
commit 393db1e792
5 changed files with 77 additions and 51 deletions

View File

@@ -10,9 +10,10 @@ object system : object {
change_iopl
]
# Get a log line from the kernel log
# Get the next log line from the kernel log
method get_log [cap:get_log] {
param buffer buffer [out zero_ok] # Buffer for the log message data structure
param seen uint64 # Last seen log id
param buffer buffer [out zero_ok] # Buffer for the log message data structure
}
# Ask the kernel to send this process messages whenever