Re: [PATCH 7/8] tracing: Show module names and addresses of last boot

From: Google
Date: Thu Feb 06 2025 - 21:25:31 EST


On Thu, 6 Feb 2025 21:02:47 -0500
Steven Rostedt <rostedt@xxxxxxxxxxx> wrote:

> On Fri, 7 Feb 2025 10:51:11 +0900
> Masami Hiramatsu (Google) <mhiramat@xxxxxxxxxx> wrote:
>
> > > # cat instances/boot_mapped/last_boot_info
> > > Offset: 10c00000
> > > ffffffffc00ca000 usb_serial_simple
> > > ffffffffc00ae000 usbserial
> > > ffffffffc008b000 bfq
> >
> > This is just a suggestion, what about using the same format for all
> > lines? For example,
> >
> > # cat instances/boot_mapped/last_boot_info
> > 10c00000 [kernel]
> > ffffffffc00ca000 usb_serial_simple
> > ffffffffc00ae000 usbserial
> > ffffffffc008b000 bfq
>
> This can be confusing because the first is an offset, and the others are
> addresses.

I think both are the offset from the viewpoint of `nm` results. :)

$ nm vmlinux | grep " t " | sort | head -n 5
ffffffff81000820 t __pfx_devkmsg_emit
ffffffff81000830 t devkmsg_emit
ffffffff81000a80 t __pfx_io_queue_deferred
ffffffff81000a90 t io_queue_deferred
ffffffff81000ca0 t __pfx_io_uring_drop_tctx_refs

$ nm samples/trace_events/trace-events-sample.ko | grep " t " | sort | head -n 5
0000000000000440 t __pfx_trace_event_raw_event_foo_bar
0000000000000450 t trace_event_raw_event_foo_bar
0000000000000780 t __pfx_perf_trace_foo_bar
0000000000000790 t perf_trace_foo_bar
0000000000000af0 t __pfx_trace_event_raw_event_foo_bar_with_cond

Thank you,

--
Masami Hiramatsu (Google) <mhiramat@xxxxxxxxxx>