8000 sys/event: add `event_loop_debug` pseudo-module by benpicco · Pull Request #20849 · RIOT-OS/RIOT · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

sys/event: add event_loop_debug pseudo-module #20849

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

Merged
merged 1 commit into from
Apr 3, 2025

Conversation

benpicco
Copy link
Contributor
@benpicco benpicco commented Sep 2, 2024

Contribution description

This adds a pseudo-module that prints execution times of event handlers.
This can be useful to find out which event handler is hogging the event thread.

Testing procedure

Enable the event_loop_debug module

2025-04-03 11:45:49,355 # main(): This is RIOT! (Version: 2024.10-devel-138-gf3a9392-event_loop_debug)
2025-04-03 11:45:49,361 # event: executing 0x8059dfc->0x804cc0a
2025-04-03 11:45:49,362 # event 0
2025-04-03 11:45:49,362 # event: 0x8059dfc took 6 µs
2025-04-03 11:45:49,864 # event: executing 0x8059e3c->0x804cc0a
2025-04-03 11:45:49,864 # event A
2025-04-03 11:45:49,865 # event: 0x8059e3c took 6 µs
2025-04-03 11:45:50,363 # event: executing 0x8059e7c->0x804cc0a
2025-04-03 11:45:50,364 # event B
2025-04-03 11:45:50,365 # event: 0x8059e7c took 5 µs
2025-04-03 11:45:50,366 # event: executing 0x8059e3c->0x804cc0a
2025-04-03 11:45:50,366 # event A
2025-04-03 11:45:50,367 # event: 0x8059e3c took 5 µs
2025-04-03 11:45:50,862 # event: executing 0x8059ebc->0x804cc0a
2025-04-03 11:45:50,862 # event C
2025-04-03 11:45:50,863 # event: 0x8059ebc took 6 µs
2025-04-03 11:45:50,868 # event: executing 0x8059e3c->0x804cc0a
2025-04-03 11:45:50,868 # event A
2025-04-03 11:45:50,869 # event: 0x8059e3c took 7 µs
2025-04-03 11:45:51,364 # event: executing 0x8059e7c->0x804cc0a
2025-04-03 11:45:51,365 # event B
2025-04-03 11:45:51,366 # event: 0x8059e7c took 6 µs
2025-04-03 11:45:51,369 # event: executing 0x8059e3c->0x804cc0a
2025-04-03 11:45:51,370 # event A
2025-04-03 11:45:51,371 # event: 0x8059e3c took 6 µs
2025-04-03 11:45:51,872 # event: executing 0x8059e3c->0x804cc0a
2025-04-03 11:45:51,872 # event A
2025-04-03 11:45:51,873 # event: 0x8059e3c took 5 µs
2025-04-03 11:45:52,362 # event: executing 0x8059ebc->0x804cc0a
2025-04-03 11:45:52,362 # event C
2025-04-03 11:45:52,363 # event: 0x8059ebc took 6 µs
2025-04-03 11:45:52,365 # event: executing 0x8059e7c->0x804cc0a
2025-04-03 11:45:52,365 # event B
2025-04-03 11:45:52,366 # event: 0x8059e7c took 6 µs
2025-04-03 11:45:52,374 # event: executing 0x8059e3c->0x804cc0a
2025-04-03 11:45:52,374 # event A
2025-04-03 11:45:52,375 # event: 0x8059e3c took 6 µs

Issues/PRs references

@github-actions github-actions bot added the Area: sys Area: System label Sep 2, 2024
@benpicco benpicco changed the title sys/event: add event_loop_debug pseudo-module sys/event: add event_loop_debug pseudo-module Apr 3, 2025
@benpicco benpicco marked this pull request as ready for review April 3, 2025 09:48
@benpicco benpicco requested review from maribu and Teufelchen1 April 3, 2025 09:48
@benpicco benpicco added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label Apr 3, 2025
@riot-ci
Copy link
riot-ci commented Apr 3, 2025

Murdock results

✔️ PASSED

bc86876 sys/event: add event_loop_debug pseudo-module

Success Failures Total Runtime
10279 0 10280 10m:23s

Artifacts

Copy link
Member
@maribu maribu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm. If the inline comment can be resolved, please do so before hitting merge. If it is not technically possible to do that at C level, it is fine as it is.

@maribu maribu enabled auto-merge April 3, 2025 14:05
@maribu maribu added this pull request to the merge queue Apr 3, 2025
Merged via the queue into RIOT-OS:master with commit c0cd66d Apr 3, 2025
26 checks passed
@benpicco benpicco deleted the event_loop_debug branch April 3, 2025 20:54
@mguetschow mguetschow added this to the Release 2025.04 milestone Apr 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: sys Area: System CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
0