linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/8] Add GDB memory helper commands
@ 2023-08-08  8:30 Kuan-Ying Lee
  2023-08-08  8:30 ` [PATCH v2 1/8] scripts/gdb/symbols: add specific ko module load command Kuan-Ying Lee
                   ` (7 more replies)
  0 siblings, 8 replies; 11+ messages in thread
From: Kuan-Ying Lee @ 2023-08-08  8:30 UTC (permalink / raw)
  To: Matthias Brugger, AngeloGioacchino Del Regno
  Cc: chinwen.chang, qun-wei.lin, linux-mm, linux-modules, casper.li,
	akpm, linux-arm-kernel, Kuan-Ying Lee, linux-kernel,
	linux-mediatek

Hi all,

I've created some GDB commands I think useful when I debug
some memory issues and kernel module issue.

For memory issue, we would like to get slabinfo, slabtrace,
page_owner and vmallocinfo to debug the memory issues.

For module issue, we would like to query kernel module name
when we get a module text address and load module
symbol by specific path.

Patch 1-2:
 - Add kernel module related command.
Patch 3-5:
 - Prepares for the memory-related command.
Patch 6-8:
 - Add memory-related commands.

V1->V2:
 - Fix s390 build error with defconfig (Stephen)
 - Use freeptr_t structure for dereference freepointer
   in slab
 - Add CONFIG_STACKDEPOT statement to handle stackdepot
   is disable
 - Add CONFIG_PAGE_OWNER statement to handle page owner
   is disable
 - Rebase to linux-next/next-20230808

Kuan-Ying Lee (8):
  scripts/gdb/symbols: add specific ko module load command
  scripts/gdb/modules: add get module text support
  scripts/gdb/utils: add common type usage
  scripts/gdb/aarch64: add aarch64 page operation helper commands and
    configs
  scripts/gdb/stackdepot: Add stackdepot support
  scripts/gdb/page_owner: add page owner support
  scripts/gdb/slab: Add slab support
  scripts/gdb/vmalloc: add vmallocinfo support

 scripts/gdb/linux/constants.py.in |  52 +++
 scripts/gdb/linux/mm.py           | 582 +++++++++++++++++++-----------
 scripts/gdb/linux/modules.py      |  32 +-
 scripts/gdb/linux/page_owner.py   | 190 ++++++++++
 scripts/gdb/linux/pgtable.py      | 222 ++++++++++++
 scripts/gdb/linux/slab.py         | 326 +++++++++++++++++
 scripts/gdb/linux/stackdepot.py   |  55 +++
 scripts/gdb/linux/symbols.py      |  23 +-
 scripts/gdb/linux/utils.py        |  20 +
 scripts/gdb/linux/vmalloc.py      |  56 +++
 scripts/gdb/vmlinux-gdb.py        |   7 +-
 11 files changed, 1358 insertions(+), 207 deletions(-)
 create mode 100644 scripts/gdb/linux/page_owner.py
 create mode 100644 scripts/gdb/linux/pgtable.py
 create mode 100644 scripts/gdb/linux/slab.py
 create mode 100644 scripts/gdb/linux/stackdepot.py
 create mode 100644 scripts/gdb/linux/vmalloc.py

-- 
2.18.0



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

end of thread, other threads:[~2023-09-12 16:23 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-08  8:30 [PATCH v2 0/8] Add GDB memory helper commands Kuan-Ying Lee
2023-08-08  8:30 ` [PATCH v2 1/8] scripts/gdb/symbols: add specific ko module load command Kuan-Ying Lee
2023-09-12  9:41   ` Johannes Berg
2023-09-12 16:23     ` Andrew Morton
2023-08-08  8:30 ` [PATCH v2 2/8] scripts/gdb/modules: add get module text support Kuan-Ying Lee
2023-08-08  8:30 ` [PATCH v2 3/8] scripts/gdb/utils: add common type usage Kuan-Ying Lee
2023-08-08  8:30 ` [PATCH v2 4/8] scripts/gdb/aarch64: add aarch64 page operation helper commands and configs Kuan-Ying Lee
2023-08-08  8:30 ` [PATCH v2 5/8] scripts/gdb/stackdepot: Add stackdepot support Kuan-Ying Lee
2023-08-08  8:30 ` [PATCH v2 6/8] scripts/gdb/page_owner: add page owner support Kuan-Ying Lee
2023-08-08  8:30 ` [PATCH v2 7/8] scripts/gdb/slab: Add slab support Kuan-Ying Lee
2023-08-08  8:30 ` [PATCH v2 8/8] scripts/gdb/vmalloc: add vmallocinfo support Kuan-Ying Lee

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