perf test: Use a test program in 'perf record' tests
authorNamhyung Kim <namhyung@kernel.org>
Thu, 20 Oct 2022 17:26:38 +0000 (10:26 -0700)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Thu, 27 Oct 2022 19:37:26 +0000 (16:37 -0300)
commit4321ad4ee98b7325d6133e1d5b7fa25bcbdeb57e
tree026b68d0db78e4d76a8b814a3edcac11af0bd98e
parent9e455f4f29e3aeab29b6c1f7d086ddc43fc1a502
perf test: Use a test program in 'perf record' tests

If the system has cc it could build a test program with two threads
and then use it for more detailed testing.  Also it accepts an option
to run a thread forever to ensure multi-thread runs.

If cc is not found, it falls back to use the default value 'true'.

Reviewed-by: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
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/20221020172643.3458767-4-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/tests/shell/record.sh