<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/scripts/gdb/linux/vmalloc.py, branch v6.6.132</title>
<subtitle>Clone of https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git</subtitle>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/'/>
<entry>
<title>scripts/gdb/vmalloc: disable on no-MMU</title>
<updated>2023-11-28T17:20:05+00:00</updated>
<author>
<name>Ben Wolsieffer</name>
<email>ben.wolsieffer@hefring.com</email>
</author>
<published>2023-10-31T20:22:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=08c52a25fa57eb48f53647217036357ecda42e62'/>
<id>08c52a25fa57eb48f53647217036357ecda42e62</id>
<content type='text'>
commit 6620999f0d41e4fd6f047727936a964c3399d249 upstream.

vmap_area does not exist on no-MMU, therefore the GDB scripts fail to
load:

Traceback (most recent call last):
  File "&lt;...&gt;/vmlinux-gdb.py", line 51, in &lt;module&gt;
    import linux.vmalloc
  File "&lt;...&gt;/scripts/gdb/linux/vmalloc.py", line 14, in &lt;module&gt;
    vmap_area_ptr_type = vmap_area_type.get_type().pointer()
                         ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "&lt;...&gt;/scripts/gdb/linux/utils.py", line 28, in get_type
    self._type = gdb.lookup_type(self._name)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
gdb.error: No struct type named vmap_area.

To fix this, disable the command and add an informative error message if
CONFIG_MMU is not defined, following the example of lx-slabinfo.

Link: https://lkml.kernel.org/r/20231031202235.2655333-2-ben.wolsieffer@hefring.com
Fixes: 852622bf3616 ("scripts/gdb/vmalloc: add vmallocinfo support")
Signed-off-by: Ben Wolsieffer &lt;ben.wolsieffer@hefring.com&gt;
Cc: Jan Kiszka &lt;jan.kiszka@siemens.com&gt;
Cc: Kieran Bingham &lt;kbingham@kernel.org&gt;
Cc: Kuan-Ying Lee &lt;Kuan-Ying.Lee@mediatek.com&gt;
Cc: &lt;stable@vger.kernel.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 6620999f0d41e4fd6f047727936a964c3399d249 upstream.

vmap_area does not exist on no-MMU, therefore the GDB scripts fail to
load:

Traceback (most recent call last):
  File "&lt;...&gt;/vmlinux-gdb.py", line 51, in &lt;module&gt;
    import linux.vmalloc
  File "&lt;...&gt;/scripts/gdb/linux/vmalloc.py", line 14, in &lt;module&gt;
    vmap_area_ptr_type = vmap_area_type.get_type().pointer()
                         ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "&lt;...&gt;/scripts/gdb/linux/utils.py", line 28, in get_type
    self._type = gdb.lookup_type(self._name)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
gdb.error: No struct type named vmap_area.

To fix this, disable the command and add an informative error message if
CONFIG_MMU is not defined, following the example of lx-slabinfo.

Link: https://lkml.kernel.org/r/20231031202235.2655333-2-ben.wolsieffer@hefring.com
Fixes: 852622bf3616 ("scripts/gdb/vmalloc: add vmallocinfo support")
Signed-off-by: Ben Wolsieffer &lt;ben.wolsieffer@hefring.com&gt;
Cc: Jan Kiszka &lt;jan.kiszka@siemens.com&gt;
Cc: Kieran Bingham &lt;kbingham@kernel.org&gt;
Cc: Kuan-Ying Lee &lt;Kuan-Ying.Lee@mediatek.com&gt;
Cc: &lt;stable@vger.kernel.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>scripts/gdb/vmalloc: add vmallocinfo support</title>
<updated>2023-08-21T20:46:23+00:00</updated>
<author>
<name>Kuan-Ying Lee</name>
<email>Kuan-Ying.Lee@mediatek.com</email>
</author>
<published>2023-08-08T08:30:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=852622bf3616034e11e20955aa2d8d40c200138e'/>
<id>852622bf3616034e11e20955aa2d8d40c200138e</id>
<content type='text'>
This GDB script shows the vmallocinfo for user to
analyze the vmalloc memory usage.

Example output:
0xffff800008000000-0xffff800008009000      36864 &lt;start_kernel+372&gt; pages=8 vmalloc
0xffff800008009000-0xffff80000800b000       8192 &lt;gicv2m_init_one+400&gt; phys=0x8020000 ioremap
0xffff80000800b000-0xffff80000800d000       8192 &lt;bpf_prog_alloc_no_stats+72&gt; pages=1 vmalloc
0xffff80000800d000-0xffff80000800f000       8192 &lt;bpf_jit_alloc_exec+16&gt; pages=1 vmalloc
0xffff800008010000-0xffff80000ad30000   47316992 &lt;paging_init+452&gt; phys=0x40210000 vmap
0xffff80000ad30000-0xffff80000c1c0000   21561344 &lt;paging_init+556&gt; phys=0x42f30000 vmap
0xffff80000c1c0000-0xffff80000c370000    1769472 &lt;paging_init+592&gt; phys=0x443c0000 vmap
0xffff80000c370000-0xffff80000de90000   28442624 &lt;paging_init+692&gt; phys=0x44570000 vmap
0xffff80000de90000-0xffff80000f4c1000   23269376 &lt;paging_init+788&gt; phys=0x46090000 vmap
0xffff80000f4c1000-0xffff80000f4c3000       8192 &lt;gen_pool_add_owner+112&gt; pages=1 vmalloc
0xffff80000f4c3000-0xffff80000f4c5000       8192 &lt;gen_pool_add_owner+112&gt; pages=1 vmalloc
0xffff80000f4c5000-0xffff80000f4c7000       8192 &lt;gen_pool_add_owner+112&gt; pages=1 vmalloc

Link: https://lkml.kernel.org/r/20230808083020.22254-9-Kuan-Ying.Lee@mediatek.com
Signed-off-by: Kuan-Ying Lee &lt;Kuan-Ying.Lee@mediatek.com&gt;
Cc: AngeloGioacchino Del Regno &lt;angelogioacchino.delregno@collabora.com&gt;
Cc: Chinwen Chang &lt;chinwen.chang@mediatek.com&gt;
Cc: Matthias Brugger &lt;matthias.bgg@gmail.com&gt;
Cc: Qun-Wei Lin &lt;qun-wei.lin@mediatek.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This GDB script shows the vmallocinfo for user to
analyze the vmalloc memory usage.

Example output:
0xffff800008000000-0xffff800008009000      36864 &lt;start_kernel+372&gt; pages=8 vmalloc
0xffff800008009000-0xffff80000800b000       8192 &lt;gicv2m_init_one+400&gt; phys=0x8020000 ioremap
0xffff80000800b000-0xffff80000800d000       8192 &lt;bpf_prog_alloc_no_stats+72&gt; pages=1 vmalloc
0xffff80000800d000-0xffff80000800f000       8192 &lt;bpf_jit_alloc_exec+16&gt; pages=1 vmalloc
0xffff800008010000-0xffff80000ad30000   47316992 &lt;paging_init+452&gt; phys=0x40210000 vmap
0xffff80000ad30000-0xffff80000c1c0000   21561344 &lt;paging_init+556&gt; phys=0x42f30000 vmap
0xffff80000c1c0000-0xffff80000c370000    1769472 &lt;paging_init+592&gt; phys=0x443c0000 vmap
0xffff80000c370000-0xffff80000de90000   28442624 &lt;paging_init+692&gt; phys=0x44570000 vmap
0xffff80000de90000-0xffff80000f4c1000   23269376 &lt;paging_init+788&gt; phys=0x46090000 vmap
0xffff80000f4c1000-0xffff80000f4c3000       8192 &lt;gen_pool_add_owner+112&gt; pages=1 vmalloc
0xffff80000f4c3000-0xffff80000f4c5000       8192 &lt;gen_pool_add_owner+112&gt; pages=1 vmalloc
0xffff80000f4c5000-0xffff80000f4c7000       8192 &lt;gen_pool_add_owner+112&gt; pages=1 vmalloc

Link: https://lkml.kernel.org/r/20230808083020.22254-9-Kuan-Ying.Lee@mediatek.com
Signed-off-by: Kuan-Ying Lee &lt;Kuan-Ying.Lee@mediatek.com&gt;
Cc: AngeloGioacchino Del Regno &lt;angelogioacchino.delregno@collabora.com&gt;
Cc: Chinwen Chang &lt;chinwen.chang@mediatek.com&gt;
Cc: Matthias Brugger &lt;matthias.bgg@gmail.com&gt;
Cc: Qun-Wei Lin &lt;qun-wei.lin@mediatek.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
