All of lore.kernel.org
 help / color / mirror / Atom feed
From: "David Hildenbrand (Arm)" <david@kernel.org>
To: Ye Liu <ye.liu@linux.dev>,
	Andrew Morton <akpm@linux-foundation.org>,
	Jonathan Corbet <corbet@lwn.net>
Cc: Ye Liu <liuye@kylinos.cn>, Lorenzo Stoakes <ljs@kernel.org>,
	"Liam R. Howlett" <liam@infradead.org>,
	Vlastimil Babka <vbabka@kernel.org>,
	Mike Rapoport <rppt@kernel.org>,
	Suren Baghdasaryan <surenb@google.com>,
	Michal Hocko <mhocko@suse.com>,
	Shuah Khan <skhan@linuxfoundation.org>,
	linux-mm@kvack.org, linux-doc@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 2/3] tools/mm/page_owner_sort: add module name sort/cull/filter support
Date: Mon, 3 Aug 2026 10:23:28 +0200	[thread overview]
Message-ID: <7b687665-765a-486c-8a30-3bdd4f28f902@kernel.org> (raw)
In-Reply-To: <20260803062056.1518070-3-ye.liu@linux.dev>

On 8/3/26 08:20, Ye Liu wrote:
> From: Ye Liu <liuye@kylinos.cn>
> 
> Page owner stack traces already contain kernel module names in the
> "function+0xNN/0xNN [module]" format produced by %pS, but page_owner_sort
> has no way to sort, cull, or filter by module.
> 
> Extract the first module name from each record's stack trace using an
> anchored regex that matches the stack trace frame format
> "+0x[0-9a-f]+/0x[0-9a-f]+\\s*\\[([a-zA-Z0-9_-]+)\\]".
> 
> The regex is anchored to the stack trace frame to avoid false matches on
> kernel thread comm names such as [khugepaged] that appear in the record
> header.  The character class includes '-' so modules with hyphens
> (e.g. aa-bb-cc) are correctly matched.
> 
> Records whose stack traces contain no module frames are assigned "vmlinux".
> 
> New options:
>   -M                  Sort by module name
>   --sort=mod          Sort by module name (supports +/- prefix)
>   --cull=mod          Cull (aggregate) by module name
>   --module <modlist>  Filter to records matching the given module(s)
> 
> The module field is also printed in cull output when relevant.
> 
> Signed-off-by: Ye Liu <liuye@kylinos.cn>
> ---

Nothing jumped at me when skimming over it.

-- 
Cheers,

David

  reply	other threads:[~2026-08-03  8:23 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-03  6:20 [PATCH v2 0/3] tools/mm/page_owner_sort: fix --sort, add module filter, improve usage Ye Liu
2026-08-03  6:20 ` [PATCH v2 1/3] tools/mm/page_owner_sort: fix --sort option being silently ignored Ye Liu
2026-08-03  8:17   ` David Hildenbrand (Arm)
2026-08-03  6:20 ` [PATCH v2 2/3] tools/mm/page_owner_sort: add module name sort/cull/filter support Ye Liu
2026-08-03  8:23   ` David Hildenbrand (Arm) [this message]
2026-08-03  6:20 ` [PATCH v2 3/3] tools/mm/page_owner_sort: show available sort keys in usage text Ye Liu
2026-08-03  8:24   ` David Hildenbrand (Arm)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7b687665-765a-486c-8a30-3bdd4f28f902@kernel.org \
    --to=david@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=corbet@lwn.net \
    --cc=liam@infradead.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=liuye@kylinos.cn \
    --cc=ljs@kernel.org \
    --cc=mhocko@suse.com \
    --cc=rppt@kernel.org \
    --cc=skhan@linuxfoundation.org \
    --cc=surenb@google.com \
    --cc=vbabka@kernel.org \
    --cc=ye.liu@linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.