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
kernel: process: add get_addrs(), get_sizes() #2822
Conversation
These two functions provide all debugging sizes and addresses in structs rather than individual getters.
Because these methods are part of the process trait, adding this adds 175 bytes to the kernel even if the methods are not called. That is not a ton, so I don't feel super strongly about it, but wanted to provide the data point. Given progress on |
Did you remove all or most of the redundant member functions? And ProcessPrinter works for the memory map (#2826), and we decided that the trait based version was better than hardcoding it in process_standard.rs. |
Nope, I just looked at the benchmarks on this PR as-is, so you're right the overhead is probably less. Ok, that makes sense. |
Should we remove the redundant member functions before merging this, or should that be done as part of #2826 ? |
I have a start here: https://github.com/tock/tock/compare/process-remove-dup-addr-fns?expand=1 The kernel crate compiles, but the capsules does not because of the process console usage. However, I think many of those will go away with #2826. So maybe the linked branch can serve as a down payment, and we can handle the rest after the process printer changes settle. |
SGTM |
On hail, I'm seeing a 112 byte reduction after removing the redundant process getters. |
Marking last-call |
bors r+ |
2862: kernel: process: remove duplicate address functions r=ppannuto a=bradjc ### Pull Request Overview No longer need individual functions since `get_addresses()` provides them all. This is on top of #2826 and #2822. ### Testing Strategy travis ### TODO or Help Wanted n/a ### Documentation Updated - [x] Updated the relevant files in `/docs`, or no updates are required. ### Formatting - [x] Ran `make prepush`. Co-authored-by: Brad Campbell <bradjc5@gmail.com>
2885: Stored state r=hudson-ayers a=granaghan ### Pull Request Overview This pull request adds/changes/fixes... Adds the ability to to serialize StoredState. Along with PR #2822, this enables crash information to be exported and fetched on a later boot. ### Testing Strategy This pull request was tested by... Tested export, import, and print of RISC-V StoredState. ### TODO or Help Wanted This pull request still needs... ### Documentation Updated - [x] Updated the relevant files in `/docs`, or no updates are required. N/A? ### Formatting - [x] Ran `make prepush`. Co-authored-by: Brian Granaghan <granaghan@google.com>
Pull Request Overview
It seems like we might want to separate process printing from the actual process implementation. One challenge in doing that is getting the internal state of the process necessary to display information about the process. This provides a consolidated way to get insight about how memory is used by the process.
Rather than having individual getters for each item, this starts by grouping the values into "addresses" and "sizes". This approach seems more scalable than having individual functions, as any new values can be added to the relevant struct.
This is part of a larger effort to create a "process printer" trait and implementation separate from ProcessStandard. However, it is a standalone change, and can be discussed independently.
Testing Strategy
todo
TODO or Help Wanted
Comments?
We may want to remove the duplicated getters as part of this PR, or we may not. I wasn't sure, so I left them for now.
Documentation Updated
/docs
, or no updates are required.Formatting
make prepush
.