Re: [PATCH] scripts/gdb: lx-dmesg: read records individually

From: Petr Mladek
Date: Thu Dec 16 2021 - 09:56:27 EST


On Wed 2021-12-15 16:16:22, John Ogness wrote:
> For the gdb command lx-dmesg, the entire descriptor, info, and text
> data regions are read into memory before printing any records. For
> large kernel log buffers, this not only causes a huge delay before
> seeing any records, but it may also lead to python errors of too
> much memory allocation.
>
> Rather than reading in all these regions in advance, read them as
> needed and only read the regions for the particular record that is
> being printed.
>
> The gdb macro "dmesg" in Documentation/admin-guide/kdump/gdbmacros.txt
> already prints out the kernel log buffer like this.
>
> Signed-off-by: John Ogness <john.ogness@xxxxxxxxxxxxx>

Looks good to me.

The patch has been committed into printk/linux.git, branch for-5.17.

Best Regards,
Petr