<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/scripts/gdb/linux/slab.py, branch v6.12.80</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: remove exception handling and refine print format</title>
<updated>2023-12-11T01:21:49+00:00</updated>
<author>
<name>Kuan-Ying Lee</name>
<email>Kuan-Ying.Lee@mediatek.com</email>
</author>
<published>2023-11-27T07:04:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=e52ec6a2db2e01e6a8cdfbe4fee1f89f57cdf723'/>
<id>e52ec6a2db2e01e6a8cdfbe4fee1f89f57cdf723</id>
<content type='text'>
1. When we crash on a page, we want to check what happened on this
   page instead of skipping this page by try-except block.  Thus, removing
   the try-except block.

2. Remove redundant comma and print the task name properly.

Link: https://lkml.kernel.org/r/20231127070404.4192-4-Kuan-Ying.Lee@mediatek.com
Signed-off-by: Kuan-Ying Lee &lt;Kuan-Ying.Lee@mediatek.com&gt;
Cc: Andrey Konovalov &lt;andreyknvl@google.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: Oleg Nesterov &lt;oleg@redhat.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>
1. When we crash on a page, we want to check what happened on this
   page instead of skipping this page by try-except block.  Thus, removing
   the try-except block.

2. Remove redundant comma and print the task name properly.

Link: https://lkml.kernel.org/r/20231127070404.4192-4-Kuan-Ying.Lee@mediatek.com
Signed-off-by: Kuan-Ying Lee &lt;Kuan-Ying.Lee@mediatek.com&gt;
Cc: Andrey Konovalov &lt;andreyknvl@google.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: Oleg Nesterov &lt;oleg@redhat.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>
<entry>
<title>scripts/gdb/slab: add slab 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:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=79939c4a79bc643d399bd3fdd0f87100ea6b4362'/>
<id>79939c4a79bc643d399bd3fdd0f87100ea6b4362</id>
<content type='text'>
Add 'lx-slabinfo' and 'lx-slabtrace' support.

This GDB scripts print slabinfo and slabtrace for user
to analyze slab memory usage.

Example output like below:
(gdb) lx-slabinfo
     Pointer       |         name         | active_objs  |   num_objs   | objsize  | objperslab  | pagesperslab
------------------ | -------------------- | ------------ | ------------ | -------- | ----------- | -------------
0xffff0000c59df480 | p9_req_t             | 0            | 0            | 280      | 29          | 2
0xffff0000c59df280 | isp1760_qh           | 0            | 0            | 160      | 25          | 1
0xffff0000c59df080 | isp1760_qtd          | 0            | 0            | 184      | 22          | 1
0xffff0000c59dee80 | isp1760_urb_listite  | 0            | 0            | 136      | 30          | 1
0xffff0000c59dec80 | asd_sas_event        | 0            | 0            | 256      | 32          | 2
0xffff0000c59dea80 | sas_task             | 0            | 0            | 448      | 36          | 4
0xffff0000c59de880 | bio-120              | 18           | 21           | 384      | 21          | 2
0xffff0000c59de680 | io_kiocb             | 0            | 0            | 448      | 36          | 4
0xffff0000c59de480 | bfq_io_cq            | 0            | 0            | 1504     | 21          | 8
0xffff0000c59de280 | bfq_queue            | 0            | 0            | 720      | 22          | 4
0xffff0000c59de080 | mqueue_inode_cache   | 1            | 28           | 1152     | 28          | 8
0xffff0000c59dde80 | v9fs_inode_cache     | 0            | 0            | 832      | 39          | 8
...

(gdb) lx-slabtrace --cache_name kmalloc-1k
63 &lt;tty_register_device_attr+508&gt; waste=16632/264 age=46856/46871/46888 pid=1 cpus=6,
   0xffff800008720240 &lt;__kmem_cache_alloc_node+236&gt;:    mov     x22, x0
   0xffff80000862a4fc &lt;kmalloc_trace+64&gt;:       mov     x21, x0
   0xffff8000095d086c &lt;tty_register_device_attr+508&gt;:   mov     x19, x0
   0xffff8000095d0f98 &lt;tty_register_driver+704&gt;:        cmn     x0, #0x1, lsl #12
   0xffff80000c2677e8 &lt;vty_init+620&gt;:   Cannot access memory at address 0xffff80000c2677e8
   0xffff80000c265a10 &lt;tty_init+276&gt;:   Cannot access memory at address 0xffff80000c265a10
   0xffff80000c26d3c4 &lt;chr_dev_init+204&gt;:       Cannot access memory at address 0xffff80000c26d3c4
   0xffff8000080161d4 &lt;do_one_initcall+176&gt;:    mov     w21, w0
   0xffff80000c1c1b58 &lt;kernel_init_freeable+956&gt;:       Cannot access memory at address 0xffff80000c1c1b58
   0xffff80000acf1334 &lt;kernel_init+36&gt;: bl      0xffff8000081ac040 &lt;async_synchronize_full&gt;
   0xffff800008018d00 &lt;ret_from_fork+16&gt;:       mrs     x28, sp_el0

(gdb) lx-slabtrace --cache_name kmalloc-1k --free
428 &lt;not-available&gt; age=4294958600 pid=0 cpus=0,

Link: https://lkml.kernel.org/r/20230808083020.22254-8-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>
Add 'lx-slabinfo' and 'lx-slabtrace' support.

This GDB scripts print slabinfo and slabtrace for user
to analyze slab memory usage.

Example output like below:
(gdb) lx-slabinfo
     Pointer       |         name         | active_objs  |   num_objs   | objsize  | objperslab  | pagesperslab
------------------ | -------------------- | ------------ | ------------ | -------- | ----------- | -------------
0xffff0000c59df480 | p9_req_t             | 0            | 0            | 280      | 29          | 2
0xffff0000c59df280 | isp1760_qh           | 0            | 0            | 160      | 25          | 1
0xffff0000c59df080 | isp1760_qtd          | 0            | 0            | 184      | 22          | 1
0xffff0000c59dee80 | isp1760_urb_listite  | 0            | 0            | 136      | 30          | 1
0xffff0000c59dec80 | asd_sas_event        | 0            | 0            | 256      | 32          | 2
0xffff0000c59dea80 | sas_task             | 0            | 0            | 448      | 36          | 4
0xffff0000c59de880 | bio-120              | 18           | 21           | 384      | 21          | 2
0xffff0000c59de680 | io_kiocb             | 0            | 0            | 448      | 36          | 4
0xffff0000c59de480 | bfq_io_cq            | 0            | 0            | 1504     | 21          | 8
0xffff0000c59de280 | bfq_queue            | 0            | 0            | 720      | 22          | 4
0xffff0000c59de080 | mqueue_inode_cache   | 1            | 28           | 1152     | 28          | 8
0xffff0000c59dde80 | v9fs_inode_cache     | 0            | 0            | 832      | 39          | 8
...

(gdb) lx-slabtrace --cache_name kmalloc-1k
63 &lt;tty_register_device_attr+508&gt; waste=16632/264 age=46856/46871/46888 pid=1 cpus=6,
   0xffff800008720240 &lt;__kmem_cache_alloc_node+236&gt;:    mov     x22, x0
   0xffff80000862a4fc &lt;kmalloc_trace+64&gt;:       mov     x21, x0
   0xffff8000095d086c &lt;tty_register_device_attr+508&gt;:   mov     x19, x0
   0xffff8000095d0f98 &lt;tty_register_driver+704&gt;:        cmn     x0, #0x1, lsl #12
   0xffff80000c2677e8 &lt;vty_init+620&gt;:   Cannot access memory at address 0xffff80000c2677e8
   0xffff80000c265a10 &lt;tty_init+276&gt;:   Cannot access memory at address 0xffff80000c265a10
   0xffff80000c26d3c4 &lt;chr_dev_init+204&gt;:       Cannot access memory at address 0xffff80000c26d3c4
   0xffff8000080161d4 &lt;do_one_initcall+176&gt;:    mov     w21, w0
   0xffff80000c1c1b58 &lt;kernel_init_freeable+956&gt;:       Cannot access memory at address 0xffff80000c1c1b58
   0xffff80000acf1334 &lt;kernel_init+36&gt;: bl      0xffff8000081ac040 &lt;async_synchronize_full&gt;
   0xffff800008018d00 &lt;ret_from_fork+16&gt;:       mrs     x28, sp_el0

(gdb) lx-slabtrace --cache_name kmalloc-1k --free
428 &lt;not-available&gt; age=4294958600 pid=0 cpus=0,

Link: https://lkml.kernel.org/r/20230808083020.22254-8-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>
