1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

ps: provide ISR stackusage information

This commit is contained in:
MohmadAyman 2016-06-01 20:40:08 +02:00
parent 53df3e8b57
commit 8da1eb9f7a
2 changed files with 11 additions and 1 deletions

View File

@ -13,7 +13,7 @@
* @author Martine Lenders <mlenders@inf.fu-berlin.de>
*/
#include "thread_arch.h"
#include "arch/thread_arch.h"
/* This function calculates the ISR_usage */
int thread_arch_isr_stack_usage(void)

View File

@ -71,6 +71,16 @@ void ps(void)
#endif
"state");
#ifdef DEVELHELP
int isr_usage = thread_arch_isr_stack_usage(); /* ISR stack usage */
printf("\t - | isr_stack | - - |"
" - | %5i (%5i) | -\n", ISR_STACKSIZE, isr_usage);
overall_stacksz += ISR_STACKSIZE;
if (isr_usage > 0) {
overall_used += isr_usage;
}
#endif
for (kernel_pid_t i = KERNEL_PID_FIRST; i <= KERNEL_PID_LAST; i++) {
thread_t *p = (thread_t *)sched_threads[i];