2025-06-23 10:00:12 +01:00
|
|
|
|
2022-09-23 17:42:21 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-08-21 09:38:18 -07:00
|
|
|
|
2022-09-23 17:42:21 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-08-21 09:38:18 -07:00
|
|
|
|
2025-11-13 16:01:24 +00:00
|
|
|
|
2022-09-23 17:42:21 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-11-13 16:01:24 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-08-21 09:38:18 -07:00
|
|
|
|
2022-09-23 17:42:21 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-11-13 16:01:24 +00:00
|
|
|
|
2022-09-23 17:42:21 -07:00
|
|
|
|
|
|
|
|
|
2023-07-09 23:57:38 +05:30
|
|
|
|
2022-09-23 17:42:21 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-10-15 23:56:54 -07:00
|
|
|
|
2022-09-23 17:42:21 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-09-19 17:02:43 +02:00
|
|
|
|
2023-10-13 13:00:19 +05:30
|
|
|
|
2023-09-19 17:02:43 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-09-23 17:42:21 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-07-25 19:08:01 +02:00
|
|
|
|
2022-09-23 17:42:21 -07:00
|
|
|
|
|
|
|
|
|
2023-06-13 22:11:39 +05:30
|
|
|
|
|
|
|
|
|
2022-09-23 17:42:21 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-11-03 22:14:40 -07:00
|
|
|
|
2022-09-23 17:42:21 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-07-25 19:08:01 +02:00
|
|
|
|
2023-06-13 22:11:39 +05:30
|
|
|
|
|
|
|
|
|
2022-09-23 17:42:21 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-11-03 22:14:40 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-08-21 09:38:18 -07:00
|
|
|
|
2022-11-03 22:14:40 -07:00
|
|
|
|
2023-06-13 22:11:39 +05:30
|
|
|
|
|
|
|
|
|
2025-08-21 09:38:18 -07:00
|
|
|
|
|
|
|
|
|
2022-11-03 22:14:40 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-12-09 11:07:27 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-06-13 22:11:39 +05:30
|
|
|
|
|
|
|
|
|
2022-12-09 11:07:27 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-07-25 19:08:01 +02:00
|
|
|
|
2023-06-13 22:11:39 +05:30
|
|
|
|
|
|
|
|
|
2022-12-09 11:07:27 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-06-13 22:11:39 +05:30
|
|
|
|
|
|
|
|
|
2022-12-09 11:07:27 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-07-25 19:08:01 +02:00
|
|
|
|
2023-06-13 22:11:39 +05:30
|
|
|
|
|
|
|
|
|
2022-12-09 11:07:27 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-09-06 10:49:03 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-11-13 16:01:24 +00:00
|
|
|
|
2023-09-06 10:49:03 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-12-19 12:17:32 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-06-13 22:11:39 +05:30
|
|
|
|
|
|
|
|
|
2022-12-19 12:17:32 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-07-25 19:08:01 +02:00
|
|
|
|
2023-06-13 22:11:39 +05:30
|
|
|
|
|
|
|
|
|
2022-12-19 12:17:32 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-06-13 22:11:39 +05:30
|
|
|
|
2022-12-19 12:17:32 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-07-09 23:57:38 +05:30
|
|
|
|
2022-12-19 12:17:32 -08:00
|
|
|
|
2023-07-09 23:57:38 +05:30
|
|
|
|
|
|
|
|
|
2022-12-19 12:17:32 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-07-25 19:08:01 +02:00
|
|
|
|
2023-07-09 23:57:38 +05:30
|
|
|
|
|
|
|
|
|
2023-02-01 21:04:55 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-06-13 22:11:39 +05:30
|
|
|
|
2023-02-01 21:04:55 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-06-13 22:11:39 +05:30
|
|
|
|
|
|
|
|
|
2023-02-01 21:04:55 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-07-25 19:08:01 +02:00
|
|
|
|
2023-06-13 22:11:39 +05:30
|
|
|
|
|
|
|
|
|
2023-02-01 21:04:55 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-06-13 22:11:39 +05:30
|
|
|
|
2023-02-01 21:04:55 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-06-13 22:11:39 +05:30
|
|
|
|
|
|
|
|
|
2023-02-01 21:04:55 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-07-25 19:08:01 +02:00
|
|
|
|
2023-06-13 22:11:39 +05:30
|
|
|
|
|
|
|
|
|
2022-12-19 12:17:32 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-09-06 10:49:03 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-11-13 16:01:24 +00:00
|
|
|
|
2023-09-06 10:49:03 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-11-13 16:01:24 +00:00
|
|
|
|
2023-09-06 10:49:03 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-12-19 12:17:32 -08:00
|
|
|
|
perf test: Test perf lock contention CSV output
To verify CSV output, just check the number of separators (",") using
the tr and wc commands like this.
grep -v "^#" ${result} | tr -d -c | wc -c
Now it expects 6 columns (and 5 separators) in the output, but it may
be changed later so count the field in the header first and compare it
to the actual output lines.
$ cat ${result}
# output: contended, total wait, max wait, avg wait, type, caller
1, 28787, 28787, 28787, spinlock, raw_spin_rq_lock_nested+0x1b
The test looks like below now:
$ sudo ./perf test -v contention
86: kernel lock contention analysis test :
--- start ---
test child forked, pid 2705822
Testing perf lock record and perf lock contention
Testing perf lock contention --use-bpf
Testing perf lock record and perf lock contention at the same time
Testing perf lock contention --threads
Testing perf lock contention --lock-addr
Testing perf lock contention --type-filter (w/ spinlock)
Testing perf lock contention --lock-filter (w/ tasklist_lock)
Testing perf lock contention --callstack-filter (w/ unix_stream)
Testing perf lock contention --callstack-filter with task aggregation
Testing perf lock contention CSV output
test child finished with 0
---- end ----
kernel lock contention analysis test: Ok
Acked-by: Ian Rogers <irogers@google.com>
Cc: Hao Luo <haoluo@google.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Song Liu <song@kernel.org>
Link: https://lore.kernel.org/r/20230628200141.2739587-5-namhyung@kernel.org
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
2023-06-28 13:01:41 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-07-25 19:08:01 +02:00
|
|
|
|
perf test: Test perf lock contention CSV output
To verify CSV output, just check the number of separators (",") using
the tr and wc commands like this.
grep -v "^#" ${result} | tr -d -c | wc -c
Now it expects 6 columns (and 5 separators) in the output, but it may
be changed later so count the field in the header first and compare it
to the actual output lines.
$ cat ${result}
# output: contended, total wait, max wait, avg wait, type, caller
1, 28787, 28787, 28787, spinlock, raw_spin_rq_lock_nested+0x1b
The test looks like below now:
$ sudo ./perf test -v contention
86: kernel lock contention analysis test :
--- start ---
test child forked, pid 2705822
Testing perf lock record and perf lock contention
Testing perf lock contention --use-bpf
Testing perf lock record and perf lock contention at the same time
Testing perf lock contention --threads
Testing perf lock contention --lock-addr
Testing perf lock contention --type-filter (w/ spinlock)
Testing perf lock contention --lock-filter (w/ tasklist_lock)
Testing perf lock contention --callstack-filter (w/ unix_stream)
Testing perf lock contention --callstack-filter with task aggregation
Testing perf lock contention CSV output
test child finished with 0
---- end ----
kernel lock contention analysis test: Ok
Acked-by: Ian Rogers <irogers@google.com>
Cc: Hao Luo <haoluo@google.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Song Liu <song@kernel.org>
Link: https://lore.kernel.org/r/20230628200141.2739587-5-namhyung@kernel.org
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
2023-06-28 13:01:41 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-09-23 17:42:21 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-11-03 22:14:40 -07:00
|
|
|
|
2022-12-09 11:07:27 -08:00
|
|
|
|
|
|
|
|
|
2023-09-06 10:49:03 -07:00
|
|
|
|
2022-12-19 12:17:32 -08:00
|
|
|
|
|
|
|
|
|
2023-02-01 21:04:55 -08:00
|
|
|
|
|
|
|
|
|
2023-09-06 10:49:03 -07:00
|
|
|
|
perf test: Test perf lock contention CSV output
To verify CSV output, just check the number of separators (",") using
the tr and wc commands like this.
grep -v "^#" ${result} | tr -d -c | wc -c
Now it expects 6 columns (and 5 separators) in the output, but it may
be changed later so count the field in the header first and compare it
to the actual output lines.
$ cat ${result}
# output: contended, total wait, max wait, avg wait, type, caller
1, 28787, 28787, 28787, spinlock, raw_spin_rq_lock_nested+0x1b
The test looks like below now:
$ sudo ./perf test -v contention
86: kernel lock contention analysis test :
--- start ---
test child forked, pid 2705822
Testing perf lock record and perf lock contention
Testing perf lock contention --use-bpf
Testing perf lock record and perf lock contention at the same time
Testing perf lock contention --threads
Testing perf lock contention --lock-addr
Testing perf lock contention --type-filter (w/ spinlock)
Testing perf lock contention --lock-filter (w/ tasklist_lock)
Testing perf lock contention --callstack-filter (w/ unix_stream)
Testing perf lock contention --callstack-filter with task aggregation
Testing perf lock contention CSV output
test child finished with 0
---- end ----
kernel lock contention analysis test: Ok
Acked-by: Ian Rogers <irogers@google.com>
Cc: Hao Luo <haoluo@google.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Song Liu <song@kernel.org>
Link: https://lore.kernel.org/r/20230628200141.2739587-5-namhyung@kernel.org
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
2023-06-28 13:01:41 -07:00
|
|
|
|
2022-09-23 17:42:21 -07:00
|
|
|
|
2025-11-13 16:01:24 +00:00
|
|
|
|
2022-09-23 17:42:21 -07:00
|
|
|
|