mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/4] alloc_tag: Introduce selective tracing for MAP
@ 2026-09-21 21:26 Abhishek Bapat
  2026-09-21 21:26 ` [PATCH 1/4] alloc_tag: Add trace events for tracing allocations Abhishek Bapat
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Abhishek Bapat @ 2026-09-21 21:26 UTC (permalink / raw)
  To: Suren Baghdasaryan, Hao Ge, Andrew Morton
  Cc: Steven Rostedt, Masami Hiramatsu, Mathieu Desnoyers,
	linux-kernel, linux-mm, linux-trace-kernel, Shuah Khan,
	Abhishek Bapat

The existing memory allocation profiling (MAP) tool accurately maintains
aggregate counters for overall memory accounting. However, relying
purely on aggregated counters restrics the visibility needed for
targeted debugging.

This patch series integrates three new tracepoints (alloc_tag_hit,
alloc_tag_mem_alloced and alloc_tag_mem_freed) directly into the
alloc_hooks_tag fast path.

Enabling trace events globally for all allocations introduces a severe
baseline overhead. To limit the performance overhead, we let the admin
select specific allocations to be traced.

A new IOCTL is introduced to allow privileged users to determine which
allocation tags need tracing enabled. The IOCTL utilizes the
pre-existing filtering mechanism to specify the allocation tags to
enable tracing on.

Abhishek Bapat (4):
  alloc_tag: Add trace events for tracing allocations
  alloc_tag: Introduce IOCTLs to toggle allocation tracepoints
  alloc_tag: extend allocinfo_filter to support tracing queries
  alloc_tag: add a test for trace state toggle and filtering

 MAINTAINERS                                   |   1 +
 include/linux/alloc_tag.h                     |  94 +++++++++---
 include/linux/codetag.h                       |   5 +-
 include/trace/events/alloc_tag.h              | 122 +++++++++++++++
 include/uapi/linux/alloc_tag.h                |  17 ++-
 mm/alloc_tag.c                                | 142 +++++++++++++++++-
 .../alloc_tag/allocinfo_ioctl_test.c          | 111 +++++++++++++-
 7 files changed, 462 insertions(+), 30 deletions(-)
 create mode 100644 include/trace/events/alloc_tag.h


base-commit: 8d61431ed2607386b427752505379536eb634ce8
-- 
2.55.0.1082.g2b9226bbc0-goog


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-09-21 21:26 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-21 21:26 [PATCH 0/4] alloc_tag: Introduce selective tracing for MAP Abhishek Bapat
2026-09-21 21:26 ` [PATCH 1/4] alloc_tag: Add trace events for tracing allocations Abhishek Bapat
2026-09-21 21:26 ` [PATCH 2/4] alloc_tag: Introduce IOCTLs to toggle allocation tracepoints Abhishek Bapat
2026-09-21 21:26 ` [PATCH 3/4] alloc_tag: extend allocinfo_filter to support tracing queries Abhishek Bapat
2026-09-21 21:26 ` [PATCH 4/4] alloc_tag: add a test for trace state toggle and filtering Abhishek Bapat

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®