v1
2026-09-22
MAP 分配标签选择性追踪 · v1
在 alloc_hooks_tag 快路径加入 alloc_tag_hit、mem_alloced、mem_freed 跟踪点,并新增 IOCTL 按 tag 选择性启用追踪。
原始补丁链接
子 Patch(4)
1/4
alloc_tag: Add trace events for tracing allocations
The memory allocation profiling framework intercepts allocations across the core subsystems, but currently lacks runtime tracing hooks for standard observability tools to dynamically track the context
2/4
alloc_tag: Introduce IOCTLs to toggle allocation tracepoints
Introduce a new IOCTL (ALLOCINFO_IOC_TOGGLE_TRACE) to selectively toggle tracing on exact allocation call sites. Userspace tools can use the existing filtering mechanism to specify the set of tags t
3/4
alloc_tag: extend allocinfo_filter to support tracing queries
Extend the allocinfo filtering mechanism to allow users to filter tags based on their trace state. Signed-off-by: Abhishek Bapat abhishekbapat@google.com — include/uapi/linux/alloc_tag.h | 8 +++
4/4
alloc_tag: add a test for trace state toggle and filtering
Following the introduction of the ALLOCINFO_IOC_TOGGLE_TRACE IOCTL and ALLOCINFO_FILTER_MASK_TRACE_ON filters for selective memory allocation tracing, update the kselftests to validate this behaviour.