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:
parent
53df3e8b57
commit
8da1eb9f7a
@ -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)
|
||||
|
10
sys/ps/ps.c
10
sys/ps/ps.c
@ -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];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user