-
Notifications
You must be signed in to change notification settings - Fork 13.7k
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
px4iofirmware: add PX4IO_PERF define to completely disable perf counters #14128
Conversation
I'm not even sure when perf counters last worked here as perf_alloc requires pthread_mutex_lock, which isn't even available in the px4_io-v2 build. I suppose it's fine to leave it like this for now and someone can fix it in the future if actually needed. |
We should also take a pass to resize the stacks.
Update: let's review that next. #14129 |
/* latency histogram */ | ||
const uint16_t latency_bucket_count = LATENCY_BUCKET_COUNT; | ||
const uint16_t latency_buckets[LATENCY_BUCKET_COUNT] = { 1, 2, 5, 10, 20, 50, 100, 1000 }; | ||
__EXPORT uint32_t latency_counters[LATENCY_BUCKET_COUNT + 1]; |
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.
Why + 1?
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.
Can confirm that this PR makes enough room on the IO for the convergence mixer. 40 bytes free. Thanks @dagar !
This saves a paltry 64 bytes of ram, but it seems to be enough to get us out of the immediate bind (#14116).
On the upside it does save a good chunk of flash (nearly 1 kB).