Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Register
  • Sign in
  • L linux
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • Deployments
    • Deployments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • Kirill Smelkov
  • linux
  • Repository
You need to sign in or sign up before continuing.
  • linux
  • scripts
  • module.lds.S
Find file BlameHistoryPermalink
  • Suren Baghdasaryan's avatar
    lib: add allocation tagging support for memory allocation profiling · 22d407b1
    Suren Baghdasaryan authored Mar 21, 2024
    Introduce CONFIG_MEM_ALLOC_PROFILING which provides definitions to easily
    instrument memory allocators.  It registers an "alloc_tags" codetag type
    with /proc/allocinfo interface to output allocation tag information when
    the feature is enabled.
    
    CONFIG_MEM_ALLOC_PROFILING_DEBUG is provided for debugging the memory
    allocation profiling instrumentation.
    
    Memory allocation profiling can be enabled or disabled at runtime using
    /proc/sys/vm/mem_profiling sysctl when CONFIG_MEM_ALLOC_PROFILING_DEBUG=n.
    CONFIG_MEM_ALLOC_PROFILING_ENABLED_BY_DEFAULT enables memory allocation
    profiling by default.
    
    [surenb@google.com: Documentation/filesystems/proc.rst: fix allocinfo title]
      Link: https://lkml.kernel.org/r/20240326073813.727090-1-surenb@google.com
    [surenb@google.com: do limited memory accounting for modules with ARCH_NEEDS_WEAK_PER_CPU]
      Link: https://lkml.kernel.org/r/20240402180933.1663992-2-surenb@google.com
    [klarasmodin@gmail.com: explicitly include irqflags.h in alloc_tag.h]
      Link: https://lkml.kernel.org/r/20240407133252.173636-1-klarasmodin@gmail.com
    [surenb@google.com: fix alloc_tag_init() to prevent passing NULL to PTR_ERR()]
      Link: https://lkml.kernel.org/r/20240417003349.2520094-1-surenb@google.com
    Link: https://lkml.kernel.org/r/20240321163705.3067592-14-surenb@google.com
    
    
    Signed-off-by: default avatarSuren Baghdasaryan <surenb@google.com>
    Co-developed-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
    Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
    Signed-off-by: default avatarKlara Modin <klarasmodin@gmail.com>
    Tested-by: default avatarKees Cook <keescook@chromium.org>
    Cc: Alexander Viro <viro@zeniv.linux.org.uk>
    Cc: Alex Gaynor <alex.gaynor@gmail.com>
    Cc: Alice Ryhl <aliceryhl@google.com>
    Cc: Andreas Hindborg <a.hindborg@samsung.com>
    Cc: Benno Lossin <benno.lossin@proton.me>
    Cc: "Björn Roy Baron" <bjorn3_gh@protonmail.com>
    Cc: Boqun Feng <boqun.feng@gmail.com>
    Cc: Christoph Lameter <cl@linux.com>
    Cc: Dennis Zhou <dennis@kernel.org>
    Cc: Gary Guo <gary@garyguo.net>
    Cc: Miguel Ojeda <ojeda@kernel.org>
    Cc: Pasha Tatashin <pasha.tatashin@soleen.com>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Cc: Tejun Heo <tj@kernel.org>
    Cc: Vlastimil Babka <vbabka@suse.cz>
    Cc: Wedson Almeida Filho <wedsonaf@gmail.com>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    22d407b1
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7