perf test: Add 'thloop' test workload
authorNamhyung Kim <namhyung@kernel.org>
Wed, 16 Nov 2022 23:38:45 +0000 (15:38 -0800)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Sun, 20 Nov 2022 14:32:23 +0000 (11:32 -0300)
commit69b352927885b17f03d3ee4ee38f580699af107a
treecc7f02a60c82b7879609c1fc62fec343f86fe34a
parent24e733b29f13284aac30c4d1fb9f19201951d770
perf test: Add 'thloop' test workload

The thloop is similar to noploop but runs in two threads.  This is
needed to verify perf record --per-thread to handle multi-threaded
programs properly.

  $ perf test -w thloop

It also takes an optional argument to specify runtime in seconds
(default: 1).

Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Athira Jajeev <atrajeev@linux.vnet.ibm.com>
Cc: German Gomez <german.gomez@arm.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: James Clark <james.clark@arm.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Leo Yan <leo.yan@linaro.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Zhengjun Xing <zhengjun.xing@linux.intel.com>
Link: https://lore.kernel.org/r/20221116233854.1596378-4-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/tests/builtin-test.c
tools/perf/tests/tests.h
tools/perf/tests/workloads/Build
tools/perf/tests/workloads/thloop.c [new file with mode: 0644]