Files
linux/tools/perf/util
Chun-Tse Shao 3c97e7b991 perf lock: Report owner stack in usermode
This patch parses `owner_lock_stat` into a RB tree, enabling ordered
reporting of owner lock statistics with stack traces. It also updates
the documentation for the `-o` option in contention mode, decouples `-o`
from `-t`, and issues a warning to inform users about the new behavior
of `-ov`.

Example output:
  $ sudo ~/linux/tools/perf/perf lock con -abvo -Y mutex-spin -E3 perf bench sched pipe
  ...
   contended   total wait     max wait     avg wait         type   caller

         171      1.55 ms     20.26 us      9.06 us        mutex   pipe_read+0x57
                          0xffffffffac6318e7  pipe_read+0x57
                          0xffffffffac623862  vfs_read+0x332
                          0xffffffffac62434b  ksys_read+0xbb
                          0xfffffffface604b2  do_syscall_64+0x82
                          0xffffffffad00012f  entry_SYSCALL_64_after_hwframe+0x76
          36    193.71 us     15.27 us      5.38 us        mutex   pipe_write+0x50
                          0xffffffffac631ee0  pipe_write+0x50
                          0xffffffffac6241db  vfs_write+0x3bb
                          0xffffffffac6244ab  ksys_write+0xbb
                          0xfffffffface604b2  do_syscall_64+0x82
                          0xffffffffad00012f  entry_SYSCALL_64_after_hwframe+0x76
           4     51.22 us     16.47 us     12.80 us        mutex   do_epoll_wait+0x24d
                          0xffffffffac691f0d  do_epoll_wait+0x24d
                          0xffffffffac69249b  do_epoll_pwait.part.0+0xb
                          0xffffffffac693ba5  __x64_sys_epoll_pwait+0x95
                          0xfffffffface604b2  do_syscall_64+0x82
                          0xffffffffad00012f  entry_SYSCALL_64_after_hwframe+0x76

  === owner stack trace ===

           3     31.24 us     15.27 us     10.41 us        mutex   pipe_read+0x348
                          0xffffffffac631bd8  pipe_read+0x348
                          0xffffffffac623862  vfs_read+0x332
                          0xffffffffac62434b  ksys_read+0xbb
                          0xfffffffface604b2  do_syscall_64+0x82
                          0xffffffffad00012f  entry_SYSCALL_64_after_hwframe+0x76
  ...

Signed-off-by: Chun-Tse Shao <ctshao@google.com>
Tested-by: Athira Rajeev <atrajeev@linux.ibm.com>
Link: https://lore.kernel.org/r/20250227003359.732948-5-ctshao@google.com
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
2025-02-28 10:09:02 -08:00
..
2024-12-18 16:24:32 -03:00
2022-06-28 12:05:25 -03:00
2023-03-14 08:29:46 -03:00
2025-01-31 14:45:19 -08:00
2021-04-29 10:30:58 -03:00
2024-03-21 10:41:28 -03:00
2021-08-11 09:35:44 -03:00
2024-08-19 14:52:13 -03:00
2024-08-19 14:52:13 -03:00
2024-08-19 14:52:13 -03:00
2024-08-19 14:52:13 -03:00
2025-02-18 14:04:32 -08:00
2024-11-07 10:51:56 -08:00
2024-11-07 10:51:56 -08:00
2023-01-23 10:00:47 -03:00
2024-08-12 18:05:14 -03:00
2024-08-19 14:51:46 -03:00
2025-02-17 22:00:50 -08:00
2024-02-12 12:35:41 -08:00
2025-02-10 11:46:02 -08:00
2025-02-10 11:46:02 -08:00
2023-04-06 21:40:28 -03:00
2023-09-12 17:47:00 -03:00
2025-02-26 16:23:47 -08:00
2024-11-09 08:28:03 -08:00
2025-01-14 14:57:19 -03:00
2025-02-18 14:04:32 -08:00
2025-02-18 14:04:32 -08:00
2024-12-12 15:53:36 -03:00
2025-02-18 14:04:32 -08:00
2025-02-18 14:04:32 -08:00
2023-04-10 19:20:53 -03:00
2024-09-27 15:38:52 -03:00