nuttx/libs/libc
chenzhaoxiang 3fb1a40a4b libs/libc: add configurable skip count for mutex backtrace addresses
This commit introduces a new Kconfig option LIBC_MUTEX_BACKTRACE_SKIP tocontrol the
number of initial addresses skipped when generating mutex backtraces.

Key changes:
1. Add LIBC_MUTEX_BACKTRACE_SKIP Kconfig entry (depends on
LIBC_MUTEX_BACKTRACE > 0), defaulting to 2. This option lets users configure
how many leading addresses are omitted from the mutex backtrace output.

2. Modify the nxmutex_add_backtrace() function to pass the new config value
as the skip parameter to sched_backtrace(), replacing the hardcoded 0.

This enhancement improves the usability of mutex backtraces by allowing removalof uninformative
initial stack frames (e.g., backtrace helper functions ormutex acquisition wrappers), making the
relevant call stack entries more visiblefor debugging lock-related issues.

The default value (2) maintains sensibleout-of-the-box behavior while enabling customization for specific use cases.

Signed-off-by: chao an <anchao.archer@bytedance.com>
2026-02-27 19:54:37 +08:00
..
aio
assert
audio
builtin
ctype
dirent
dlfcn
elf
errno
eventfd
fdt
fixedmath
gdbstub
gnssutils
grp
hex2bin
inttypes
libgen
locale
lzf
machine
misc libs/libc: add configurable skip count for mutex backtrace addresses 2026-02-27 19:54:37 +08:00
net
netdb
obstack
pthread
pwd
queue
regex
sched
search
semaphore
signal
spawn
stdio
stdlib
stream
string
symtab
syslog
termios
time
tls
uio
unistd
userfs
uuid
wchar
wctype
wqueue
zoneinfo
.gitignore
CMakeLists.txt
Kconfig
libc.csv
libc.h
Makefile