On 2025/11/13 19:20, lijiang wrote:
> On Thu, Nov 13, 2025 at 11:10 AM <devel-request@lists.crash-utility.osci.io <mailto:devel-request@lists.crash-utility.osci.io>> wrote:
>
> Date: Thu, 13 Nov 2025 01:35:47 +0000
> From: HAGIO KAZUHITO(萩尾 一仁) <k-hagio-ab@nec.com <mailto:k-hagio-ab@nec.com>>
> Subject: [Crash-utility] Bug report: "timer -r" option fails on
> 6.18-rc kernels
> To: "devel@lists.crash-utility.osci.io <mailto:devel@lists.crash-utility.osci.io>"
> <devel@lists.crash-utility.osci.io <mailto:devel@lists.crash-utility.osci.io>>
> Message-ID: <011ccc03-c0ca-4a26-8ffe-97081e2d2dd6@nec.com <mailto:011ccc03-c0ca-4a26-8ffe-97081e2d2dd6@nec.com>>
> Content-Type: text/plain; charset="utf-8"
>
> Hi Lianbo, Tao,
>
> The following error is observed on 6.18-rc kernels.
>
> crash> timer -r
>
> timer: invalid structure member offset: hrtimer_clock_base_get_time
> FILE: kernel.c LINE: 7953 FUNCTION: dump_hrtimer_clock_base()
> ...
>
> This is due to [1].
>
> [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=009eb5da29a9 <https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=009eb5da29a9>
>
>
> Thank you for reporting the current issue, Kazu.
>
>
> The "timer -r" option displays the base->get_time function, but now kernel
> switches the function by base->clockid, which are CLOCK_* macro values.
> We can copy the function names and macro values from the kernel, but if
> they are modified, crash cannot follow the changes automatically.
>
> How should we fix this? or in the first place, maybe we can change what
> the "timer -r" displays there, instead of .get_time function name.
> For example, if we show enum hrtimer_base_type values by base->index:
>
> crash> timer -r
> CPU: 0 HRTIMER_CPU_BASE: ffff8b7aefc20640
> CLOCK: 0 HRTIMER_CLOCK_BASE: ffff8b7aefc20680 [HRTIMER_BASE_MONOTONIC]
> ...
> CLOCK: 1 HRTIMER_CLOCK_BASE: ffff8b7aefc206c0 [HRTIMER_BASE_REALTIME]
> ...
>
> What do you think?
>
>
> I agree with you to display the clock type name there, this looks reasonable.
ok, thank you for the comment.
> But I haven't investigated the details, can you show your code(if any)?
I don't have a patch yet, I just edited an output as an example above.
I think probably we can use dump_enumerator_list() to convert base->index
to the enum name, I'll try it.
Thanks,
Kazu