sched: modify dump_stack log level

Keep the log level consistent with assert

Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
This commit is contained in:
yinshengkai 2024-04-22 18:04:14 +08:00 committed by Xiang Xiao
parent a72c9a41e1
commit 6e02f3a31d

View File

@ -28,7 +28,7 @@
#include <sys/types.h> #include <sys/types.h>
#include <stdio.h> #include <stdio.h>
#include <syslog.h> #include <debug.h>
/**************************************************************************** /****************************************************************************
* Pre-processor Definitions * Pre-processor Definitions
@ -79,20 +79,19 @@ void sched_dumpstack(pid_t tid)
format, DUMP_WIDTH, address[i]); format, DUMP_WIDTH, address[i]);
if (i == size - 1 || ret % DUMP_LINESZ == 0) if (i == size - 1 || ret % DUMP_LINESZ == 0)
{ {
syslog(LOG_EMERG, "backtrace|%2d:%s\n", tid, line); _alert("backtrace|%2d:%s\n", tid, line);
ret = 0; ret = 0;
} }
} }
#else #else
if (skip == 0) if (skip == 0)
{ {
syslog(LOG_EMERG, "backtrace:\n"); _alert("backtrace:\n");
} }
for (i = 0; i < size; i++) for (i = 0; i < size; i++)
{ {
syslog(LOG_EMERG, "[%2d] [<%p>] %pS\n", _alert("[%2d] [<%p>] %pS\n", tid, address[i], address[i]);
tid, address[i], address[i]);
} }
#endif #endif
} }