Kuan-Ying Lee
79939c4a79
scripts/gdb/slab: add slab support
...
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 <tty_register_device_attr+508> waste=16632/264 age=46856/46871/46888 pid=1 cpus=6,
0xffff800008720240 <__kmem_cache_alloc_node+236>: mov x22, x0
0xffff80000862a4fc <kmalloc_trace+64>: mov x21, x0
0xffff8000095d086c <tty_register_device_attr+508>: mov x19, x0
0xffff8000095d0f98 <tty_register_driver+704>: cmn x0, #0x1, lsl #12
0xffff80000c2677e8 <vty_init+620>: Cannot access memory at address 0xffff80000c2677e8
0xffff80000c265a10 <tty_init+276>: Cannot access memory at address 0xffff80000c265a10
0xffff80000c26d3c4 <chr_dev_init+204>: Cannot access memory at address 0xffff80000c26d3c4
0xffff8000080161d4 <do_one_initcall+176>: mov w21, w0
0xffff80000c1c1b58 <kernel_init_freeable+956>: Cannot access memory at address 0xffff80000c1c1b58
0xffff80000acf1334 <kernel_init+36>: bl 0xffff8000081ac040 <async_synchronize_full>
0xffff800008018d00 <ret_from_fork+16>: mrs x28, sp_el0
(gdb) lx-slabtrace --cache_name kmalloc-1k --free
428 <not-available> 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 <Kuan-Ying.Lee@mediatek.com>
Cc: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Cc: Chinwen Chang <chinwen.chang@mediatek.com>
Cc: Matthias Brugger <matthias.bgg@gmail.com>
Cc: Qun-Wei Lin <qun-wei.lin@mediatek.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2023-08-21 13:46:23 -07:00
..
2023-06-16 16:46:30 +02:00
2023-06-22 21:21:06 +09:00
2023-07-23 22:36:07 +09:00
2023-07-29 11:05:31 -04:00
2023-03-27 22:45:22 +02:00
2022-08-21 02:47:48 +09:00
2023-02-02 18:43:28 +00:00
2023-08-21 13:46:23 -07:00
2022-05-24 16:33:20 +09:00
2023-07-12 23:46:57 +09:00
2023-07-01 09:24:31 -07:00
2023-06-27 08:31:27 +09:00
2022-09-20 14:12:25 -04:00
2023-02-18 14:34:09 -05:00
2023-03-16 22:46:12 +09:00
2023-01-26 12:41:38 +09:00
2023-04-21 08:58:00 -07:00
2023-02-02 22:50:03 -08:00
2023-04-11 17:45:57 +02:00
2023-04-24 10:18:32 -07:00
2021-09-08 11:50:28 -07:00
2023-03-16 22:46:12 +09:00
2023-05-23 21:43:26 -07:00
2021-08-10 09:13:25 +09:00
2023-01-26 12:43:33 +09:00
2023-08-21 13:46:21 -07:00
2023-03-23 10:02:02 +01:00
2023-03-23 17:18:32 -07:00
2021-08-05 20:55:39 +09:00
2023-02-25 20:11:06 +01:00
2023-02-08 13:33:29 +01:00
2022-09-28 09:01:40 +02:00
2023-02-21 16:53:54 -08:00
2023-01-26 12:43:33 +09:00
2021-10-26 09:42:29 -06:00
2022-08-29 13:58:47 +09:00
2022-11-16 10:42:10 +01:00
2022-05-08 01:33:07 -07:00
2023-04-07 00:53:34 +02:00
2022-09-28 09:02:45 +02:00
2022-04-24 10:38:44 +02:00
2022-06-30 12:22:17 -06:00
2022-04-29 14:38:00 -07:00
2023-06-19 13:19:32 -07:00
2023-06-15 14:04:19 +10:00
2023-08-18 10:18:50 -07:00
2022-05-11 21:45:53 +09:00
2023-04-19 19:28:49 +02:00
2023-01-16 20:15:20 +09:00
2023-07-12 15:39:34 -07:00
2023-01-22 23:43:33 +09:00
2023-01-26 12:41:38 +09:00
2023-07-06 22:15:38 -07:00
2023-03-29 06:52:08 -04:00
2023-04-30 11:32:53 -07:00
2023-03-16 22:46:12 +09:00
2022-11-22 23:40:02 +09:00
2023-07-24 03:15:31 +09:00
2023-07-01 09:24:31 -07:00
2023-06-25 23:12:20 +09:00
2023-07-01 09:24:31 -07:00
2022-11-21 10:18:39 +09:00
2023-02-13 20:18:28 +01:00
2023-06-21 07:51:08 -06:00
2022-12-11 17:28:32 +09:00
2022-08-16 12:25:53 -07:00
2023-07-24 03:15:31 +09:00
2023-04-18 16:29:43 -07:00
2021-12-09 16:42:27 -08:00
2022-10-03 14:03:19 -07:00
2023-05-22 10:34:37 +09:00
2023-06-25 23:12:20 +09:00
2023-02-23 14:05:08 -08:00
2023-06-22 21:21:06 +09:00
2023-04-30 11:32:53 -07:00
2022-05-08 01:33:07 -07:00
2023-05-16 13:57:14 -07:00
2023-06-25 23:12:20 +09:00
2022-10-03 03:52:58 +09:00
2023-07-03 18:56:03 +02:00
2023-01-22 23:43:33 +09:00
2022-09-29 04:40:15 +09:00
2023-06-27 08:35:43 +09:00
2022-11-09 18:06:35 +00:00
2022-12-14 15:42:40 +09:00
2022-06-08 20:14:13 +09:00
2022-06-05 06:20:57 +09:00
2023-04-14 16:08:28 +02:00
2023-06-16 17:17:42 +02:00
2023-05-12 11:47:05 -07:00
2022-02-02 11:19:33 +01:00
2022-05-11 21:46:38 +09:00
2023-04-25 21:10:20 -04:00
2022-03-07 13:54:59 +01:00
2023-04-19 07:46:31 -07:00
2023-06-22 21:21:06 +09:00
2022-09-28 09:02:06 +02:00
2022-09-28 09:02:06 +02:00
2023-03-16 22:46:12 +09:00
2022-08-03 23:56:20 +03:00
2022-12-14 08:36:11 +08:00
2023-03-23 23:18:58 +01:00
2022-06-01 09:32:45 -06:00
2022-05-18 15:34:33 +02:00
2022-05-18 15:35:42 +02:00
2023-07-27 13:07:04 -07:00
2022-10-13 11:14:43 -06:00
2022-06-03 20:09:27 +08:00
2021-08-10 09:13:25 +09:00
2023-07-03 12:46:47 -07:00
2022-02-13 16:50:06 -08:00
2023-04-17 11:23:06 +09:00
2021-08-10 09:13:25 +09:00