-
Notifications
You must be signed in to change notification settings - Fork 2k
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
core/thread: always use THREAD_CREATE_STACKTEST when DEVELHELP is enabled #20450
core/thread: always use THREAD_CREATE_STACKTEST when DEVELHELP is enabled #20450
Conversation
I think @nmeum had a similar PR open. Maybe it makes sense to revisit that and why that has not been merged? |
seems like something about short lived threads -- i am not sure how common they are |
ff8eaec
to
8f974b8
Compare
For that special case I could add a new |
👍 But please keep the old flag to explicitly create the stack test defined as (I could see myself explicitly adding the no-op create stack test flag if for some reason the code would rely on that as alternative to lamenting in a comment why the code can safely rely on the stack test being created.) |
992dfe5
to
b23d3f5
Compare
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.
Looks good, thanks! What's the reason not to deprecate the flag and removing it in, e.g., a year from now?
b23d3f5
to
0fbc10f
Compare
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.
Thanks!
Contribution description
We already create every thread with
THREAD_CREATE_STACKTEST
.If someone creates a thread without it,
ps
output is weird (all stack is marked as used) and the overhead is only at thread creation and only whenDEVELHELP
is set.Remove the flag (but keep the define to not break apps) since in all those years, not a single use-case has been found for creating a thread without
THREAD_CREATE_STACKTEST
.Testing procedure
ps
still uses the stack usage withDEVELHELP=1
, even whenTHREAD_CREATE_STACKTEST
is not set:Issues/PRs references