mirror of
https://github.com/apache/nuttx.git
synced 2026-05-09 23:12:17 +08:00
786b315947
When CONFIG_FS_BACKTRACE is enabled, collecting a stack trace for every new file descriptor adds overhead to fast path operations like open(), dup(), and socket(). This patch adds a new configuration option CONFIG_FS_BACKTRACE_DEFAULT. When enabled (default behavior), the GROUP_FLAG_FD_BACKTRACE flag is automatically set during group allocation, causing backtrace to be captured for all tasks globally, preserving the original diagnostic capability. When disabled, backtrace capture is zero-cost by default and must be explicitly enabled per task group using GROUP_FLAG_FD_BACKTRACE. Signed-off-by: zhanxiaoqi <zhanxiaoqi@bytedance.com>