-
Notifications
You must be signed in to change notification settings - Fork 174
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
net: Use counters
for event counters, count errors
#1637
Conversation
These essentially just represent "hey, here's the state of some hw register", so it's not super useful to generate counters for them --- we can save a bunch of bytes by just counting error variants.
counters
for event counters, count errors
Depends on #1637 Now that the `vsc-err` types have `Count` implementations (as of #1637), I thought it might be worthwhile to add counters to the `monorail-server` ring bufs. This is especially nice because the one in `main` only has two entries, and it seems worthwhile to be able to get a total count of errors that have been observed.
@@ -25,7 +25,7 @@ request_reset = ["hiffy"] | |||
name = "drv-stm32xx-sys" | |||
features = ["h753"] | |||
priority = 1 | |||
max-sizes = {flash = 2048, ram = 1024} | |||
max-sizes = {flash = 2048, ram = 2048} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what happened here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suspect app-mgmt.toml
was broken, because it's not checked by CI
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We apparently don't actually build this task on CI, so it had, yet again, bitrotted. Since I had modified the Gimletlet net
tasks, I wanted to make sure I hadn't made the net
task too big for any of the Gimletlet apps, and had to fix this in order to verify that.
Happy to back out the change, because it is, admittedly, unrelated to the diff.
Depends on #1637 Now that the `vsc-err` types have `Count` implementations (as of #1637), I thought it might be worthwhile to add counters to the `monorail-server` ring bufs. This is especially nice because the one in `main` only has two entries, and it seems worthwhile to be able to get a total count of errors that have been observed.
Currently, the `net` task has some hand-implemented event counters. Although these are simple and efficient, they don't match the format that `humility counters` will look for when finding counters in a dump, so they can't be queried using that command. Instead, they have to be inspected using a series of `humility readvar` commands. This branch, therefore, replaces the hand-written counters with the `counters` crate, allowing the `net` task's event counters to be understood by `humility counters`. Additionally, I've added counters to the ringbufs in some of the BSP modules (currently, only Gimletlet actually has ringbufs). For these, we skip counting the various status and control register ringbuf entries because they don't really seem to represent a countable event, just the state of a register, and skipping all of them lets us avoid several words of counters. Instead, we just count the number of error event variants.
Depends on #1637 Now that the `vsc-err` types have `Count` implementations (as of #1637), I thought it might be worthwhile to add counters to the `monorail-server` ring bufs. This is especially nice because the one in `main` only has two entries, and it seems worthwhile to be able to get a total count of errors that have been observed.
Currently, the
net
task has some hand-implemented event counters.Although these are simple and efficient, they don't match the format
that
humility counters
will look for when finding counters in a dump,so they can't be queried using that command. Instead, they have to be
inspected using a series of
humility readvar
commands. This branch,therefore, replaces the hand-written counters with the
counters
crate,allowing the
net
task's event counters to be understood byhumility counters
.Additionally, I've added counters to the ringbufs in some of the BSP
modules (currently, only Gimletlet actually has ringbufs). For these, we
skip counting the various status and control register ringbuf entries
because they don't really seem to represent a countable event, just the
state of a register, and skipping all of them lets us avoid several
words of counters. Instead, we just count the number of error event
variants.