idle: remove heap & stack check in idle thread
Signed-off-by: ligd <liguiding1@xiaomi.com>
This commit is contained in:
parent
b316611ef0
commit
d8c2610157
14
Kconfig
14
Kconfig
@ -1873,20 +1873,6 @@ config STACK_COLORATION
|
||||
|
||||
Only supported by a few architectures.
|
||||
|
||||
config STACK_USAGE_SAFE_PERCENT
|
||||
int "Stack usage safe percent"
|
||||
default 0
|
||||
range 0 100
|
||||
depends on STACK_COLORATION
|
||||
---help---
|
||||
Stack usage percent = up_check_tcbstack() * 100 / tcb->adj_stack_size,
|
||||
this should be lower than STACK_USAGE_SAFE_PERCENT.
|
||||
|
||||
Idle thread will periodically check stack usage when this macro
|
||||
value > 0.
|
||||
|
||||
N.B. This feature should not be used in production code.
|
||||
|
||||
config STACK_CANARIES
|
||||
bool "Compiler stack canaries"
|
||||
depends on ARCH_HAVE_STACKCHECK
|
||||
|
@ -787,39 +787,6 @@ void nx_start(void)
|
||||
sinfo("CPU0: Beginning Idle Loop\n");
|
||||
for (; ; )
|
||||
{
|
||||
#if defined(CONFIG_STACK_COLORATION) && CONFIG_STACK_USAGE_SAFE_PERCENT > 0
|
||||
|
||||
/* Check stack in idle thread */
|
||||
|
||||
for (i = 0; i < g_npidhash; i++)
|
||||
{
|
||||
FAR struct tcb_s *tcb;
|
||||
irqstate_t flags;
|
||||
|
||||
flags = enter_critical_section();
|
||||
|
||||
tcb = g_pidhash[i];
|
||||
if (tcb && (up_check_tcbstack(tcb) * 100 / tcb->adj_stack_size
|
||||
> CONFIG_STACK_USAGE_SAFE_PERCENT))
|
||||
{
|
||||
#if CONFIG_TASK_NAME_SIZE > 0
|
||||
_alert("Stack check failed, pid %d, name %s\n",
|
||||
tcb->pid, tcb->name);
|
||||
#else
|
||||
_alert("Stack check failed, pid %d\n", tcb->pid);
|
||||
#endif
|
||||
PANIC();
|
||||
}
|
||||
|
||||
leave_critical_section(flags);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
/* Check heap in idle thread */
|
||||
|
||||
kmm_checkcorruption();
|
||||
|
||||
/* Perform any processor-specific idle state operations */
|
||||
|
||||
up_idle();
|
||||
|
Loading…
Reference in New Issue
Block a user