Skip to content

Commit

Permalink
translators: support 5.16
Browse files Browse the repository at this point in the history
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@oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees@oracle.com>
  • Loading branch information
nickalcock authored and kvanhees committed Feb 7, 2022
1 parent 266560f commit a89753c
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions libdtrace/procfs.d.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Oracle Linux DTrace.
* Copyright (c) 2012, 2021, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2022, Oracle and/or its affiliates. All rights reserved.
* Licensed under the Universal Permissive License v 1.0 as shown at
* http://oss.oracle.com/licenses/upl.
*/
Expand Down Expand Up @@ -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;
};
Expand Down

0 comments on commit a89753c

Please sign in to comment.