[DTrace-devel] [PATCH] translators: support 5.16
Eugene Loh
eugene.loh at oracle.com
Tue Dec 14 21:04:20 UTC 2021
Reviewed-by: Eugene Loh <eugene.loh at oracle.com>
but if someone who actually understands these kernel structures and M4
syntax wants to review this, I won't be insulted.
On 12/14/21 2:16 PM, Nick Alcock via DTrace-devel wrote:
> The cpu member has moved back out of task_struct
> to signal_struct (which it moved from in 4.9).
Might this be clearer as, perhaps:
The cpu member moved in 4.9 from signal_struct to task_struct,
but returns in 5.16.
Hmm. I'm not convinced that's any clearer.
> Signed-off-by: Nick Alcock <nick.alcock at oracle.com>
> ---
> libdtrace/procfs.d.in | 10 ++++++----
> 1 file changed, 6 insertions(+), 4 deletions(-)
>
> diff --git a/libdtrace/procfs.d.in b/libdtrace/procfs.d.in
> @@ -283,10 +283,12 @@ translator lwpsinfo_t < struct task_struct *T > {
Is there a comment higher up (at the top of this translator) that also
needs updating?
> pr_pri = T->prio;
> pr_name = T->comm;
> -define_for_kernel([[on_cpu]], [[(m4_kver(4,9,0),
> -[[if_arch([[x86]],[[T->cpu]])]] m4_dnl
> -[[if_arch([[arm64]],[[T->cpu]])]] m4_dnl
> -[[if_arch([[sparc]],[[((struct thread_info *)T->stack)->cpu]])]])]],
> +define_for_kernel([[on_cpu]], [[(m4_kver(5,16,0), m4_dnl
> + [[((struct thread_info *)T->stack)->cpu]]), m4_dnl
> +(m4_kver(4,9,0), m4_dnl
> + [[if_arch([[x86]],[[T->cpu]])]] m4_dnl
> + [[if_arch([[arm64]],[[T->cpu]])]] m4_dnl
> + [[if_arch([[sparc]],[[((struct thread_info *)T->stack)->cpu]])]])]], m4_dnl
> [[((struct thread_info *)T->stack)->cpu]])m4_dnl
> pr_onpro = on_cpu;
> };
More information about the DTrace-devel
mailing list