-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement a log buffer to store log messages. #52
base: main
Are you sure you want to change the base?
Commits on Oct 18, 2024
-
utils: Add a StringRingBuffer implementation
The log buffer is implemented using a ring buffer that contains the characters within log entries. This patch introduces a generic StringRingBuffer that can be used for safely managing the contents of strings within a ring buffer that is suitable for use with the log buffer. This separates the ring buffer implementation from the log and allows implementation of ring buffer specific unit testing, which is included within this patch. Signed-off-by: Vasant Karasulli <[email protected]> Signed-off-by: Roy Hopkins <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for cda4523 - Browse repository at this point
Copy the full SHA cda4523View commit details -
Implement a log buffer which stores all log messages in memory
This log buffer is based on the string ring buffer in utils/StringRingBuffer. Signed-off-by: Vasant Karasulli <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 2eba737 - Browse repository at this point
Copy the full SHA 2eba737View commit details -
Implement a percpu line buffer to store the individual log messages
Each individual log message gets written into the global log buffer from the percpu line buffer. Signed-off-by: Vasant Karasulli <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for a99fbe2 - Browse repository at this point
Copy the full SHA a99fbe2View commit details -
Initialize log buffer and migrate it from stage2 to svsm kernel
Introduce a new struct MigrateInfo which contains the data to be migrated from stage2 to svsm kernel. Signed-off-by: Vasant Karasulli <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 64e6023 - Browse repository at this point
Copy the full SHA 64e6023View commit details -
Add a feature named enable-console-log
This feature can be used to enable printing log messages to console in addition to storing them in the log buffer. Use ENABLE_CONSOLE_LOG=1 to enable this feature. By default, this feature is disabled for release builds and enabled for debug builds. Signed-off-by: Vasant Karasulli <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 971a443 - Browse repository at this point
Copy the full SHA 971a443View commit details -
log_buffer: add unit tests to test the functionality
Test the log_buffer by calling methods like write_log() and read_log(). Signed-off-by: Vasant Karasulli <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 45c52f8 - Browse repository at this point
Copy the full SHA 45c52f8View commit details