Skip to content

Conversation

cvinayak
Copy link
Contributor

@cvinayak cvinayak commented May 3, 2019

Added implementation to log the ISR, Main and System work
queue stack usages when CONFIG_INIT_STACKS is enabled.

Signed-off-by: Vinayak Kariappa Chettimada vich@nordicsemi.no

Added implementation to log the ISR, Main and System work
queue stack usages when CONFIG_INIT_STACKS is enabled.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
@cvinayak cvinayak added Enhancement Changes/Updates/Additions to existing features area: Bluetooth Trivial Changes that can be reviewed by anyone, i.e. doc changes, minor build system tweaks, etc. labels May 3, 2019
@cvinayak cvinayak requested review from jhedberg and carlescufi May 3, 2019 09:23
@aescolar aescolar requested a review from thoh-ot May 3, 2019 09:55
Copy link
Member

@jhedberg jhedberg left a comment

Choose a reason for hiding this comment

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

Approving, though I really think it'd be better if there was a system-wide helper for this, so that not every place has to go through this declaration of extern variables (which is quite error prone and will break if the definition of the original declaration changes)

@cvinayak
Copy link
Contributor Author

cvinayak commented May 3, 2019

@jhedberg on second thought, I agree with you, the log should come from some kernel file, not from bluetooth files. Should I close/cancel this PR?

@cvinayak
Copy link
Contributor Author

cvinayak commented May 3, 2019

Closing. The log should come from some kernel file/thread, not from Bluetooth threads.

@cvinayak cvinayak closed this May 3, 2019
@carlescufi
Copy link
Member

I don't think we should close this @cvinayak. This is a reasonable short-term solution and it will be useful. I myself have added this code locally several times. I would merge this.

@jhedberg
Copy link
Member

jhedberg commented May 3, 2019

@jhedberg on second thought, I agree with you, the log should come from some kernel file, not from bluetooth files.

@cvinayak I'll leave the decision on this PR to you and @carlescufi . As for the system-wide API, I think the ideal would be one which dumps all threads in the system using k_thread_foreach(), similar to what the "kernel stacks" shell command does (see cmd_kernel_stacks() in subsys/shell/modules/kernel_service.c). That'd then also include printing the name of the thread provided that CONFIG_THREAD_NAME=y.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Bluetooth Enhancement Changes/Updates/Additions to existing features Trivial Changes that can be reviewed by anyone, i.e. doc changes, minor build system tweaks, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants