v2
2026-10-08
MAP 分配标签选择性追踪 · v2
v2 为 alloc_tag 增加分配追踪事件、IOCTL 开关、过滤查询及测试,实现 MAP 的选择性追踪。
原始补丁链接
子 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 allocation call sites. Userspace tools can use the existing filtering mechanism to specify the set of tags to togg
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.