mirror of
https://github.com/apache/nuttx.git
synced 2026-08-27 12:20:46 +00:00
fs/inode: add optional manual FD backtrace control via task group flag
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>
This commit is contained in:
parent
62b71c3b30
commit
786b315947
4 changed files with 32 additions and 6 deletions
|
|
@ -117,6 +117,7 @@
|
|||
#define GROUP_FLAG_PRIVILEGED (1 << 1) /* Bit 1: Group is privileged */
|
||||
#define GROUP_FLAG_DELETED (1 << 2) /* Bit 2: Group has been deleted but not yet freed */
|
||||
#define GROUP_FLAG_EXITING (1 << 3) /* Bit 3: Group exit is in progress */
|
||||
#define GROUP_FLAG_FD_BACKTRACE (1 << 4) /* Bit 4: Enable FD backtrace for the group */
|
||||
/* Bits 3-7: Available */
|
||||
|
||||
/* Values for struct child_status_s ch_flags */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue