On Wed, 4 Mar 2026 10:07:48 +0100 Peter Zijlstra <[email protected]> wrote:
> On Tue, Mar 03, 2026 at 04:47:36PM -0500, Steven Rostedt wrote: > > From: Steven Rostedt <[email protected]> > > > > Add specific reporting of the futex system call. This allows for debugging > > the futex code a bit easier. Instead of just showing the values passed > > into the futex system call, read the value of the user space memory > > pointed to by the addr parameter. > > > > Also make the op parameter more readable by parsing the values to show > > what the command is: > > > > futex_requeue_p-3251 [002] ..... 2101.068479: sys_futex(uaddr: > > 0x55e79a4da834 (0x80000cb1), FUTEX_LOCK_PI|FUTEX_PRIVATE_FLAG, val: 0) > > futex_requeue_p-3248 [001] ..... 2101.068970: sys_futex(uaddr: > > 0x7f859072f990 (0xcb2), FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME, val: 3250) > > futex_requeue_p-3252 [005] ..... 2101.069108: sys_futex(uaddr: > > 0x55e79a4da838 (0), FUTEX_WAIT_REQUEUE_PI|FUTEX_PRIVATE_FLAG, val: 0, > > timespec: 0x7ffe61076aa0, uaddr2: 0x55e79a4da834, uaddr2: 94453214586932, > > val3: 0) > > futex_requeue_p-3252 [005] ..... 2101.069410: sys_futex(uaddr: > > 0x55e79a4da834 (0x80000cb1), FUTEX_LOCK_PI|FUTEX_PRIVATE_FLAG, val: 0) > > > > Signed-off-by: Steven Rostedt (Google) <[email protected]> > > --- > > kernel/trace/trace_syscalls.c | 266 +++++++++++++++++++++++++++++++++- > > 1 file changed, 263 insertions(+), 3 deletions(-) > > Egads, I really dislike how all sorts of syscall crud is 'duplicated' in > this file, rather than near or in the actual syscall definition. Now I did copy the futex_cmd_has_timeout() which I could just use the futex one by exporting it. But the rest is due to printing the content. What exactly is "duplicated"? The code is mostly done to display the data, where as the futex syscall code is about implementing it. What do you suggest in reuse? Or just move some of theses functions into kernel/futex/syscall.c? -- Steve
