Commit Graph

14 Commits

Author SHA1 Message Date
Xiang Xiao
dd942f0b04 sched/backtrace: Dump the complete stack regardless the depth
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-12-29 12:09:54 +08:00
Xiang Xiao
9eecd4c5e2 libc: Prefix the address with 0 to the specified width in sched_dumpstack
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-12-29 12:09:54 +08:00
chao.an
7f2c5be07a libs/dumpstack: add support for print symbol name
ap> mw -1
[ EMERG] arm_usagefault: PANIC!!! Usage Fault:
[ EMERG] arm_usagefault:       IRQ: 6 regs: 0x3c24fa48
[ EMERG] arm_usagefault:       BASEPRI: 000000e0 PRIMASK: 00000000 IPSR: 00000006 CONTROL: 00000004
[ EMERG] arm_usagefault:       CFSR: 01000000 HFSR: 00000000 DFSR: 00000000 BFAR: 40101000 AFSR: 00000000
[ EMERG] arm_usagefault: Usage Fault Reason:
[ EMERG] arm_usagefault:       Unaligned access
[ EMERG] up_assert: Assertion failed at file:armv8-m/arm_usagefault.c line: 113 task: init
[ EMERG] backtrace|10:  0x2c325bde 0x2c319b98 0x2c3261cc 0x2c316b20 0x2c32699c 0x2c303a50 0x2c326072 0x2c3206ea
[ EMERG] backtrace|10:  0x2c3428cc 0x2c33ed14 0x2c342e8e 0x2c34403a 0x2c344ac0 0x2c319b60 0x2c3080ba
[ EMERG]  [10][ 0] [<0x2c325bde>] up_backtrace+0xa/0x13c
[ EMERG]  [10][ 1] [<0x2c319b98>] sched_dumpstack+0x10/0xc0
[ EMERG]  [10][ 2] [<0x2c3261cc>] up_assert+0x48/0x414
[ EMERG]  [10][ 3] [<0x2c316b20>] _assert+0x4/0x10
[ EMERG]  [10][ 4] [<0x2c32699c>] arm_usagefault+0xa8/0x138
[ EMERG]  [10][ 5] [<0x2c303a50>] irq_dispatch+0x1c/0x40
[ EMERG]  [10][ 6] [<0x2c326072>] arm_doirq+0x1a/0x2c
[ EMERG]  [10][ 7] [<0x2c3206ea>] exception_common+0x4a/0xac
[ EMERG]  [10][ 8] [<0x2c3428cc>] cmd_mw+0xec/0x11c
[ EMERG]  [10][ 9] [<0x2c33ed14>] nsh_parse_command+0x684/0xcf0
[ EMERG]  [10][10] [<0x2c342e8e>] nsh_session+0x92/0x168
[ EMERG]  [10][11] [<0x2c34403a>] nsh_consolemain+0x1e/0x38
[ EMERG]  [10][12] [<0x2c344ac0>] nsh_main+0x30/0x50
[ EMERG]  [10][13] [<0x2c319b60>] nxtask_startup+0x40/0x68
[ EMERG]  [10][14] [<0x2c3080ba>] nxtask_start+0x46/0x60

Signed-off-by: chao.an <anchao@xiaomi.com>
2021-12-29 12:09:54 +08:00
chao.an
0161da4415 sched/dumpstack: raise the stack dump level to emergency
since sometimes dumpstack will be used in extreme situations(eg. assert)

Signed-off-by: chao.an <anchao@xiaomi.com>
2021-12-09 00:14:30 -06:00
Jukka Laitinen
c79d2067c7 Move timespec calculations from sched into libc/sched
Allow using these functions also outside sched, where systick
related calculations are performed

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2021-11-04 13:19:01 -05:00
Abdelatif Guettouche
0aa4f07e93 libc/sched/sched_backtrace.c: Include unistd.h to avoid warning about
getpid function.

Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2021-09-21 09:22:28 -03:00
chao.an
1060953567 sched/backtrace: add sched_backtrace support
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-08-19 01:30:50 -07:00
chao.an
83964231a5 libs/libc: move the backtrace implement to sched
1. move the backtrace implement to sched
2. rename CONFIG_UNWINDER to CONFIG_SCHED_BACKTRACE

Signed-off-by: chao.an <anchao@xiaomi.com>
2021-08-19 01:30:50 -07:00
Xiang Xiao
001e7c3e76 sched: Don't include nuttx/sched.h inside sched.h
But let nuttx/sched.h include sched.h instead to
avoid expose nuttx kernel API to userspace.

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-05-24 12:11:53 +09:00
Alin Jerpelea
b5d4a01821 libs: Author Gregory Nutt: update licenses to Apache
Gregory Nutt has submitted the SGA and we can migrate the licenses
 to Apache.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-03-03 18:52:53 -08:00
Xiang Xiao
8153e31753 sched: Call c++ global variables constructor inside nxtask_startup
to avoid the similar code spread around each application

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I8967d647eaf2ecae47f29f83e7fa322ef1b42a02
2020-07-01 07:55:33 -06:00
Xiang Xiao
e9c7df4769 sched: Rename task_startup to nxtask_startup
to follow the naming convention

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I3594d12a65e8cacea99bc295d622628304c3f9f8
2020-07-01 07:55:33 -06:00
Xiang Xiao
ac53600e44 sched: Rename sched_cpu_count to sched_cpucount 2020-02-09 07:33:59 -06:00
Gregory Nutt
cf99fb40c9 This commit moves all of the libraries under a common directory called libs/. This most certainly break libcxx and uClibc++ for now.
Squashed commit of the following:

    libs/libxx:  Fix some confusing in naming.  If the directory is called libxx, then the library must be libxx.a (unless perhaps LIBCXX is selected).
    libs/:  Fix paths in moved library directories.
    libs:  Brute force move of libc, libnx, and libxx to libs.  Cannot yet build it in that configuration.
2018-05-29 13:21:26 -06:00