Skip to content
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

test_utils/print_stack_usage: use thread.h API #19226

Merged
merged 1 commit into from
Jan 31, 2023

Conversation

kaspar030
Copy link
Contributor

Contribution description

There's now an API for getting a thread's name, stack size and stack start value. So, use it.

Testing procedure

CI should suffice. Here's some native output with this PR:

riot/tests/fmt_print on  print_stack_usage_use_api                                                                                                
❯ /home/kaspar/src/riot/tests/fmt_print/bin/native/tests_fmt_print.elf                                                                             
RIOT native interrupts/signals initialized.                                                                                                        
RIOT native board initialized.                                                                                                                     
RIOT native hardware initialization complete.                                                                                                      
                                                                                                                                                   
Help: Press s to start test, r to print it is ready                                                                                                
s                                                                                                                                                  
START                                                                                                                                              
main(): This is RIOT! (Version: 2023.04-devel-227-gfcf63c-print_stack_usage_use_api)
If you can read this:                                                    
4294967295 
-2147483648                                                                                                                                        
FA                                                                       
-2147483648                                                              
12345678                                                                                                                                           
123456789ABCDEF0                                                         
18446744073709551615
-9223372036854775808               
1.23450         
30313233343536373839                                                     
Test successful.           
{ "threads": [{ "name": "idle, "stack_size": 8192, "stack_used": 436}]}
{ "threads": [{ "name": "main, "stack_size": 12288, "stack_used": 2608}]} 

Issues/PRs references

Without this, RIOT-rs doesn't compile, as the direct member access isn't available there.

@kaspar030 kaspar030 added Type: cleanup The issue proposes a clean-up / The PR cleans-up parts of the codebase / documentation CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR labels Jan 31, 2023
@github-actions github-actions bot added the Area: sys Area: System label Jan 31, 2023
Copy link
Member

@bergzand bergzand left a comment

Choose a reason for hiding this comment

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

Nice cleanup

bors merge

@bors
Copy link
Contributor

bors bot commented Jan 31, 2023

🕐 Waiting for PR status (GitHub check) to be set, probably by CI. Bors will automatically try to run when all required PR statuses are set.

@riot-ci
Copy link

riot-ci commented Jan 31, 2023

Murdock results

✔️ PASSED

2a960f9 test_utils/print_stack_usage: use thread.h API

Success Failures Total Runtime
6796 0 6796 08m:42s

Artifacts

@kaspar030
Copy link
Contributor Author

bors merge

@bors
Copy link
Contributor

bors bot commented Jan 31, 2023

Build succeeded:

@bors bors bot merged commit a27231f into RIOT-OS:master Jan 31, 2023
@kaspar030 kaspar030 deleted the print_stack_usage_use_api branch February 6, 2023 09:04
@MrKevinWeiss MrKevinWeiss added this to the Release 2023.04 milestone Apr 25, 2023
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 Type: cleanup The issue proposes a clean-up / The PR cleans-up parts of the codebase / documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants