tracing: Read user data from futex system call trace event
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v3 Latest3 patches 7 repliesIn review
- v23 patches 4 repliesSuperseded
- v12 patches 3 repliesSuperseded
Patches in v3 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | tracing: Have futex syscall trace event show specific user datainclude/ kernel/ kernel/ | +245 | 2 replies | |
| 2/3 | tracing: Update futex syscall trace event to show more commandsinclude/ kernel/ kernel/ | +164 | 0 replies | |
| 3/3 | tracing: Show TID and flags for PI futex system call trace eventkernel/ | +24 | 0 replies |
Reviews trailers per patch
2 of 3 patches have a Reviewed-by or Acked-by.
| Patch | Masami Hiramatsu (Google) |
|---|---|
| 1/3 | |
| 2/3 | R-b |
| 3/3 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v3 0/3] tracing: Read user data from futex system call trace event
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 v2: https://lore.kernel.org/all/[email protected]/
- Removed unused "buf" variable (kernel test robot)
- Iterate __futex_cmds[] make the print statement. Note this required exposing __futex_cmds[] to trace_syscall.c (Masami Hiramatsu)
- Added back val statement (with the move to futex/syscall.c the third parameter was dropped).
git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace.git
futex/core
Head SHA1: 79b0609ad15b24d0bbfb1790e17902a6c210ae69
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 | 39 ++++++- kernel/futex/syscalls.c | 137 +++++++++++++++++++++--- kernel/trace/trace_syscalls.c | 237 +++++++++++++++++++++++++++++++++++++++++- 3 files changed, 396 insertions(+), 17 deletions(-)