[DTrace-devel] [PATCH] translators: support 5.16
Nick Alcock
nick.alcock at oracle.com
Tue Dec 14 19:16:14 UTC 2021
The cpu member has moved back out of task_struct
to signal_struct (which it moved from in 4.9).
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
index 394efd0830aa..a1139e904b0c 100644
--- a/libdtrace/procfs.d.in
+++ b/libdtrace/procfs.d.in
@@ -283,10 +283,12 @@ translator lwpsinfo_t < struct task_struct *T > {
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;
};
--
2.33.0
More information about the DTrace-devel
mailing list