History log of /openbmc/linux/tools/perf/tests/shell/lock_contention.sh (Results 1 – 8 of 8)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: v6.6.25, v6.6.24, v6.6.23, v6.6.16, v6.6.15, v6.6.14, v6.6.13, v6.6.12, v6.6.11, v6.6.10, v6.6.9, v6.6.8, v6.6.7, v6.6.6, v6.6.5, v6.6.4, v6.6.3, v6.6.2, v6.5.11, v6.6.1, v6.5.10, v6.6, v6.5.9, v6.5.8, v6.5.7, v6.5.6, v6.5.5, v6.5.4, v6.5.3, v6.5.2, v6.1.51, v6.5.1, v6.1.50, v6.5, v6.1.49, v6.1.48, v6.1.46, v6.1.45, v6.1.44, v6.1.43, v6.1.42, v6.1.41, v6.1.40, v6.1.39
# edf197cb 09-Jul-2023 Kajol Jain <kjain@linux.ibm.com>

perf tests lock_contention: Fix shellcheck issue about quoting to avoid word splitting

Running shellcheck on lock_contention.sh generates below warning:

In tests/shell/lock_contention.sh line 24:

perf tests lock_contention: Fix shellcheck issue about quoting to avoid word splitting

Running shellcheck on lock_contention.sh generates below warning:

In tests/shell/lock_contention.sh line 24:
if [ `id -u` != 0 ]; then
^-----^ SC2046 (warning): Quote this to prevent word splitting.

In tests/shell/lock_contention.sh line 160:
local type=$(head -1 "${result}" | awk '{ print $8 }' | sed -e 's/:.*//')
^--------^ SC3043 (warning): In POSIX sh, 'local' is undefined.
^--^ SC2155 (warning): Declare and assign separately to avoid masking return values.
^-- SC2046 (warning): Quote this to prevent word splitting.

Fixed above warnings by:

- Adding quotes to avoid word splitting.
- Fixing shellcheck warnings for local usage, by prefixing
function name to the variable.

Signed-off-by: Kajol Jain <kjain@linux.ibm.com>
Acked-by: Ian Rogers <irogers@google.com>
Cc: Disha Goel <disgoel@linux.vnet.ibm.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Madhavan Srinivasan <maddy@linux.ibm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: linuxppc-dev@lists.ozlabs.org
Link: https://lore.kernel.org/r/20230709182800.53002-5-atrajeev@linux.vnet.ibm.com
Signed-off-by: Athira Rajeev <atrajeev@linux.vnet.ibm.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

show more ...


Revision tags: v6.1.38, v6.1.37
# 2aefb4cc 28-Jun-2023 Namhyung Kim <namhyung@kernel.org>

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

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>

show more ...


Revision tags: v6.1.36, v6.4, v6.1.35, v6.1.34
# fa33cbe2 13-Jun-2023 Abhirup Deb <abhirupdeb@linux.vnet.ibm.com>

perf tests lock_contention: Fix shellscript errors

Use quotes around variables to prevent POSIX word expansion, use
uppercase for signals(INT, TERM, EXIT) to avoid mixed/lower case naming
of signals

perf tests lock_contention: Fix shellscript errors

Use quotes around variables to prevent POSIX word expansion, use
uppercase for signals(INT, TERM, EXIT) to avoid mixed/lower case naming
of signals and replace "==" with "=" as "==" is not supported by POSIX
shell.

Signed-off-by: Abhirup Deb <abhirupdeb@linux.vnet.ibm.com>
Cc: Disha Goel <disgoel@linux.vnet.ibm.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: John Garry <john.g.garry@oracle.com>
Cc: Madhavan Srinivasan <maddy@linux.ibm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Ravi Bangoria <ravi.bangoria@amd.com>
Cc: linuxppc-dev@lists.ozlabs.org
Link: https://lore.kernel.org/r/20230613164145.50488-12-atrajeev@linux.vnet.ibm.com
Signed-off-by: Anushree Mathur <anushree.mathur2@ibm.com>
Signed-off-by: Athira Rajeev <atrajeev@linux.vnet.ibm.com>
Signed-off-by: Kajol Jain <kjain@linux.ibm.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

show more ...


Revision tags: v6.1.33, v6.1.32, v6.1.31, v6.1.30, v6.1.29, v6.1.28, v6.1.27, v6.1.26, v6.3, v6.1.25, v6.1.24, v6.1.23, v6.1.22, v6.1.21, v6.1.20, v6.1.19, v6.1.18, v6.1.17, v6.1.16, v6.1.15, v6.1.14, v6.1.13, v6.2, v6.1.12, v6.1.11, v6.1.10
# 79b7ca78 01-Feb-2023 Namhyung Kim <namhyung@kernel.org>

perf test: Add more test cases for perf lock contention

Check callstack filter with two different aggregation mode.

$ sudo ./perf test -v contention
88: kernel lock contention analysis test

perf test: Add more test cases for perf lock contention

Check callstack filter with two different aggregation mode.

$ sudo ./perf test -v contention
88: kernel lock contention analysis test :
--- start ---
test child forked, pid 83416
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
test child finished with 0
---- end ----
kernel lock contention analysis test: Ok

Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Hao Luo <haoluo@google.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Song Liu <song@kernel.org>
Cc: bpf@vger.kernel.org
Link: https://lore.kernel.org/r/20230202050455.2187592-5-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

show more ...


Revision tags: v6.1.9, v6.1.8, v6.1.7, v6.1.6, v6.1.5, v6.0.19, v6.0.18, v6.1.4, v6.1.3, v6.0.17, v6.1.2, v6.0.16, v6.1.1, v6.0.15
# cb459c89 19-Dec-2022 Namhyung Kim <namhyung@kernel.org>

perf test: Update 'perf lock contention' test

Add more tests for the new filters.

$ sudo perf test contention -v
87: kernel lock contention analysis test :
--- sta

perf test: Update 'perf lock contention' test

Add more tests for the new filters.

$ sudo perf test contention -v
87: kernel lock contention analysis test :
--- start ---
test child forked, pid 412379
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
Testing perf lock contention --lock-filter
test child finished with 0
---- end ----
kernel lock contention analysis test: Ok

Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Blake Jones <blakejones@google.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Song Liu <song@kernel.org>
Cc: bpf@vger.kernel.org
Link: https://lore.kernel.org/r/20221219201732.460111-7-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

show more ...


Revision tags: v6.0.14, v6.0.13, v6.1
# 22ddcb6b 09-Dec-2022 Namhyung Kim <namhyung@kernel.org>

perf test: Update perf lock contention test

Add test cases for the task and addr aggregation modes.

$ sudo ./perf test -v contention
86: kernel lock contention analysis test

perf test: Update perf lock contention test

Add test cases for the task and addr aggregation modes.

$ sudo ./perf test -v contention
86: kernel lock contention analysis test :
--- start ---
test child forked, pid 680006
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
test child finished with 0
---- end ----
kernel lock contention analysis test: Ok

Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Blake Jones <blakejones@google.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Song Liu <song@kernel.org>
Cc: bpf@vger.kernel.org
Link: https://lore.kernel.org/r/20221209190727.759804-5-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

show more ...


Revision tags: v6.0.12, v6.0.11, v6.0.10, v5.15.80, v6.0.9, v5.15.79, v6.0.8, v5.15.78
# 30b331d2 04-Nov-2022 Namhyung Kim <namhyung@kernel.org>

perf lock: Allow concurrent record and report

To support live monitoring of kernel lock contention without BPF,
it should support something like below:

# perf lock record -a -o- sleep 1 | perf lo

perf lock: Allow concurrent record and report

To support live monitoring of kernel lock contention without BPF,
it should support something like below:

# perf lock record -a -o- sleep 1 | perf lock contention -i-
contended total wait max wait avg wait type caller

2 10.27 us 6.17 us 5.13 us spinlock load_balance+0xc03
1 5.29 us 5.29 us 5.29 us rwlock:W ep_scan_ready_list+0x54
1 4.12 us 4.12 us 4.12 us spinlock smpboot_thread_fn+0x116
1 3.28 us 3.28 us 3.28 us mutex pipe_read+0x50

To do that, it needs to handle HEAD_ATTR, HEADER_EVENT_UPDATE and
HEADER_TRACING_DATA which are generated only for the pipe mode.
And setting event handler also should be delayed until it gets the
event information.

Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Acked-by: Ian Rogers <irogers@google.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: https://lore.kernel.org/r/20221104051440.220989-1-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

show more ...


Revision tags: v6.0.7, v5.15.77, v5.15.76, v6.0.6, v6.0.5, v5.15.75, v6.0.4, v6.0.3, v6.0.2, v5.15.74, v5.15.73, v6.0.1, v5.15.72, v6.0, v5.15.71
# ec685de2 23-Sep-2022 Namhyung Kim <namhyung@kernel.org>

perf test: Add kernel lock contention test

Add a new shell test to check if both normal 'perf lock record' +
contention and BPF (with -b) option are working.

Use 'perf bench sched messaging' as a w

perf test: Add kernel lock contention test

Add a new shell test to check if both normal 'perf lock record' +
contention and BPF (with -b) option are working.

Use 'perf bench sched messaging' as a workload since it creates some
contention for sending and receiving messages.

Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Acked-by: Ian Rogers <irogers@google.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: https://lore.kernel.org/r/20220924004221.841024-3-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

show more ...