Hi,
Merged the two patches.
https://github.com/crash-utility/crash/compare/bf57c44...71e159c
John, thank you very much for taking care of the userspace tools!
Kazu
-----Original Message-----
-----Original Message-----
> 在 2020年11月20日 13:56, HAGIO KAZUHITO(萩尾 一仁) 写道:
> > From: John Ogness <john.ogness(a)linutronix.de>
> >
> > Linux 5.10 introduces a new lockless ringbuffer. The new ringbuffer
> > is structured completely different to the previous iterations.
> > Add support for dumping the ringbuffer with the "log" command.
> > The new ringbuffer is detected based on the availability of
> > the "prb" symbol.
> >
> > Signed-off-by: John Ogness <john.ogness(a)linutronix.de>
> > Signed-off-by: Kazuhito Hagio <k-hagio-ab(a)nec.com>
> > ---
> > I've updated John's RFC crash patch to match 5.10-rc4 kernel.
> > Changes from the RFC patch:
> > - followed the following kernel commits
> > cfe2790b163a ("printk: move printk_info into separate array")
> > 74caba7f2a06 ("printk: move dictionary keys to dev_printk_info")
> > f35efc78add6 ("printk: remove dict ring")
> > - moved the added members in offset_table and size_table to the end
> > of them
> > - print offsets and sizes with "help -o" option
> > - support "log -T" option
> >
>
> Thanks for the patch, Kazu and John.
>
> This patch looks good. Acked-by: Lianbo Jiang <lijiang(a)redhat.com>
OK, thanks.
One thing, I found that caller_id can be raw_smp_processor_id() (see
printk_caller_id()), so will modify a bit as follows when merging.
--- a/printk.c
+++ b/printk.c
@@ -132,7 +132,8 @@ dump_record(struct prb_map *m, unsigned long id, int msg_flags)
seq = ULONGLONG(info + OFFSET(printk_info_seq));
caller_id = UINT(info + OFFSET(printk_info_caller_id));
if (CRASHDEBUG(1))
- fprintf(fp, "seq: %llu caller_id: %u\n", seq, caller_id);
+ fprintf(fp, "seq: %llu caller_id: %x (%s: %u)\n", seq,
caller_id,
+ caller_id & 0x80000000 ? "cpu" : "pid",
caller_id & ~0x80000000);
text_len = USHORT(info + OFFSET(printk_info_text_len));
Thanks,
Kazu