All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH v2 2/3] tracing: Update futex syscall trace event to show more commands
@ 2026-03-12 22:49 kernel test robot
  0 siblings, 0 replies; 3+ messages in thread
From: kernel test robot @ 2026-03-12 22:49 UTC (permalink / raw)
  To: oe-kbuild; +Cc: lkp, Dan Carpenter

BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
In-Reply-To: <20260310201036.713629966@kernel.org>
References: <20260310201036.713629966@kernel.org>
TO: Steven Rostedt <rostedt@goodmis.org>
TO: linux-kernel@vger.kernel.org
TO: linux-trace-kernel@vger.kernel.org
CC: Masami Hiramatsu <mhiramat@kernel.org>
CC: Mark Rutland <mark.rutland@arm.com>
CC: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
CC: Andrew Morton <akpm@linux-foundation.org>
CC: Linux Memory Management List <linux-mm@kvack.org>
CC: Thomas Gleixner <tglx@linutronix.de>
CC: Peter Zijlstra <peterz@infradead.org>
CC: Brian Geffon <bgeffon@google.com>
CC: John Stultz <jstultz@google.com>
CC: Ian Rogers <irogers@google.com>
CC: Suleiman Souhlal <suleiman@google.com>

Hi Steven,

kernel test robot noticed the following build warnings:

[auto build test WARNING on tip/locking/core]
[also build test WARNING on trace/for-next akpm-mm/mm-everything linus/master v7.0-rc3 next-20260311]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Steven-Rostedt/tracing-Have-futex-syscall-trace-event-show-specific-user-data/20260311-041422
base:   tip/locking/core
patch link:    https://lore.kernel.org/r/20260310201036.713629966%40kernel.org
patch subject: [PATCH v2 2/3] tracing: Update futex syscall trace event to show more commands
:::::: branch date: 2 days ago
:::::: commit date: 2 days ago
config: i386-randconfig-141-20260311 (https://download.01.org/0day-ci/archive/20260313/202603130608.WKdib8MH-lkp@intel.com/config)
compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
smatch: v0.5.0-9004-gb810ac53

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Reported-by: Dan Carpenter <error27@gmail.com>
| Closes: https://lore.kernel.org/r/202603130608.WKdib8MH-lkp@intel.com/

smatch warnings:
kernel/trace/trace_syscalls.c:650 futex_fields() warn: missing unwind goto?

vim +650 kernel/trace/trace_syscalls.c

50307a45f8515f Lai Jiangshan  2009-12-15  633  
15901aaefa1313 Steven Rostedt 2026-03-10  634  static int __init futex_fields(struct trace_event_call *call, int offset)
15901aaefa1313 Steven Rostedt 2026-03-10  635  {
15901aaefa1313 Steven Rostedt 2026-03-10  636  	char *arg;
15901aaefa1313 Steven Rostedt 2026-03-10  637  	int ret;
15901aaefa1313 Steven Rostedt 2026-03-10  638  
15901aaefa1313 Steven Rostedt 2026-03-10  639  	arg = kstrdup("__value", GFP_KERNEL);
15901aaefa1313 Steven Rostedt 2026-03-10  640  	if (WARN_ON_ONCE(!arg))
15901aaefa1313 Steven Rostedt 2026-03-10  641  		return -ENOMEM;
15901aaefa1313 Steven Rostedt 2026-03-10  642  	ret = trace_define_field(call, "u32", arg, offset, sizeof(int), 0,
15901aaefa1313 Steven Rostedt 2026-03-10  643  				 FILTER_OTHER);
15901aaefa1313 Steven Rostedt 2026-03-10  644  	if (ret)
f3ff4ed51edb59 Steven Rostedt 2026-03-10  645  		goto free;
f3ff4ed51edb59 Steven Rostedt 2026-03-10  646  	offset += sizeof(int);
f3ff4ed51edb59 Steven Rostedt 2026-03-10  647  
f3ff4ed51edb59 Steven Rostedt 2026-03-10  648  	arg = kstrdup("__value2", GFP_KERNEL);
f3ff4ed51edb59 Steven Rostedt 2026-03-10  649  	if (WARN_ON_ONCE(!arg))
f3ff4ed51edb59 Steven Rostedt 2026-03-10 @650  		return -ENOMEM;
f3ff4ed51edb59 Steven Rostedt 2026-03-10  651  	ret = trace_define_field(call, "u32", arg, offset, sizeof(int), 0,
f3ff4ed51edb59 Steven Rostedt 2026-03-10  652  				 FILTER_OTHER);
f3ff4ed51edb59 Steven Rostedt 2026-03-10  653  	if (ret)
f3ff4ed51edb59 Steven Rostedt 2026-03-10  654  		goto free;
f3ff4ed51edb59 Steven Rostedt 2026-03-10  655  	offset += sizeof(int);
f3ff4ed51edb59 Steven Rostedt 2026-03-10  656  
f3ff4ed51edb59 Steven Rostedt 2026-03-10  657  	arg = kstrdup("__ts1", GFP_KERNEL);
f3ff4ed51edb59 Steven Rostedt 2026-03-10  658  	if (WARN_ON_ONCE(!arg))
f3ff4ed51edb59 Steven Rostedt 2026-03-10  659  		return -ENOMEM;
f3ff4ed51edb59 Steven Rostedt 2026-03-10  660  	ret = trace_define_field(call, "unsigned long", arg, offset,
f3ff4ed51edb59 Steven Rostedt 2026-03-10  661  				 sizeof(unsigned long), 0, FILTER_OTHER);
f3ff4ed51edb59 Steven Rostedt 2026-03-10  662  	if (ret)
f3ff4ed51edb59 Steven Rostedt 2026-03-10  663  		goto free;
f3ff4ed51edb59 Steven Rostedt 2026-03-10  664  	offset += sizeof(long);
f3ff4ed51edb59 Steven Rostedt 2026-03-10  665  
f3ff4ed51edb59 Steven Rostedt 2026-03-10  666  	arg = kstrdup("__ts2", GFP_KERNEL);
f3ff4ed51edb59 Steven Rostedt 2026-03-10  667  	if (WARN_ON_ONCE(!arg))
f3ff4ed51edb59 Steven Rostedt 2026-03-10  668  		return -ENOMEM;
f3ff4ed51edb59 Steven Rostedt 2026-03-10  669  	ret = trace_define_field(call, "unsigned long", arg, offset,
f3ff4ed51edb59 Steven Rostedt 2026-03-10  670  				 sizeof(unsigned long), 0, FILTER_OTHER);
f3ff4ed51edb59 Steven Rostedt 2026-03-10  671  	if (ret)
f3ff4ed51edb59 Steven Rostedt 2026-03-10  672  		goto free;
f3ff4ed51edb59 Steven Rostedt 2026-03-10  673  
f3ff4ed51edb59 Steven Rostedt 2026-03-10  674  	return 0;
f3ff4ed51edb59 Steven Rostedt 2026-03-10  675  
f3ff4ed51edb59 Steven Rostedt 2026-03-10  676  free:
15901aaefa1313 Steven Rostedt 2026-03-10  677  	kfree(arg);
15901aaefa1313 Steven Rostedt 2026-03-10  678  	return ret;
15901aaefa1313 Steven Rostedt 2026-03-10  679  }
15901aaefa1313 Steven Rostedt 2026-03-10  680  

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] 3+ messages in thread
* [PATCH v2 0/3] tracing: Read user data from futex system call trace event
@ 2026-03-10 20:09 Steven Rostedt
  2026-03-10 20:09 ` [PATCH v2 2/3] tracing: Update futex syscall trace event to show more commands Steven Rostedt
  0 siblings, 1 reply; 3+ messages in thread
From: Steven Rostedt @ 2026-03-10 20:09 UTC (permalink / raw)
  To: linux-kernel, linux-trace-kernel
  Cc: Masami Hiramatsu, Mark Rutland, Mathieu Desnoyers, Andrew Morton,
	Thomas Gleixner, Peter Zijlstra, Brian Geffon, John Stultz,
	Ian Rogers, Suleiman Souhlal


We are looking at the performance of futexes and require a bit more
information when tracing them.

The two patches here extend the system call reading of user space to
create specific handling of the futex system call. It now reads the
user space relevant data (the addr, utime and addr2), as well as
parses the flags. This adds a little smarts to the trace event as
it only shows the parameters that are relevant, as well as parses
utime as either a timespec or as val2 depending on the futex_op.

Here's an example of the new output:

 sys_futex(uaddr: 0x56196292e830 (0), FUTEX_WAKE|FUTEX_PRIVATE_FLAG)
 sys_futex(uaddr: 0x56196292e834 (0x4a7) tid: 1191, FUTEX_UNLOCK_PI|FUTEX_PRIVATE_FLAG)
 sys_futex(uaddr: 0x56196292e834 (0) tid: 0, FUTEX_LOCK_PI|FUTEX_PRIVATE_FLAG)
 sys_futex(uaddr: 0x56196292e830 (0), FUTEX_WAIT|FUTEX_PRIVATE_FLAG)
 sys_futex(uaddr: 0x56196292e838 (0), FUTEX_WAIT_REQUEUE_PI|FUTEX_PRIVATE_FLAG, timespec: 0x7ffc1b91a9f0 (163.048528790), uaddr2: 0x56196292e834 (4aa), val3: 0)
 sys_futex(uaddr: 0x56196292e834 (0x4aa) tid: 1194, FUTEX_LOCK_PI|FUTEX_PRIVATE_FLAG)
 sys_futex(uaddr: 0x56196292e838 (0), FUTEX_WAIT_REQUEUE_PI|FUTEX_PRIVATE_FLAG, timespec: 0x7ffc1b91a9f0 (163.048528790), uaddr2: 0x56196292e834 (800004aa), val3: 0)
 sys_futex(uaddr: 0x7f7ed6b29990 (0x4ab), FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME)
 sys_futex(uaddr: 0x56196292e834 (0x800004aa) tid: 1194 (WAITERS), FUTEX_LOCK_PI|FUTEX_PRIVATE_FLAG)
 sys_futex(uaddr: 0x56196292e838 (0), FUTEX_WAIT_REQUEUE_PI|FUTEX_PRIVATE_FLAG, timespec: 0x7ffc1b91a9f0 (163.048528790), uaddr2: 0x56196292e834 (800004aa), val3: 0)
 sys_futex(uaddr: 0x56196292e834 (0x800004aa) tid: 1194 (WAITERS), FUTEX_LOCK_PI|FUTEX_PRIVATE_FLAG)


Changes since v1: https://lore.kernel.org/all/20260303214735.002154462@kernel.org/

- Moved the printing of the futex parameters to kernel/futex/syscall.c to
  keep it closer to the actual system call.

- Moved the always_inline functions: futex_cmd_has_timeout()
  and futex_cmd_has_addr2() into include/linux/futex.h so that they
  can be both used by the futex and tracing syscall code.


Steven Rostedt (3):
      tracing: Have futex syscall trace event show specific user data
      tracing: Update futex syscall trace event to show more commands
      tracing: Show TID and flags for PI futex system call trace event

----
 include/linux/futex.h         |  38 +++++-
 kernel/futex/syscalls.c       | 129 ++++++++++++++++++---
 kernel/trace/trace_syscalls.c | 261 +++++++++++++++++++++++++++++++++++++++++-
 3 files changed, 411 insertions(+), 17 deletions(-)


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-03-12 22:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-12 22:49 [PATCH v2 2/3] tracing: Update futex syscall trace event to show more commands kernel test robot
  -- strict thread matches above, loose matches on Subject: below --
2026-03-10 20:09 [PATCH v2 0/3] tracing: Read user data from futex system call trace event Steven Rostedt
2026-03-10 20:09 ` [PATCH v2 2/3] tracing: Update futex syscall trace event to show more commands Steven Rostedt
2026-03-12  5:34   ` Masami Hiramatsu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.