Now the workload will end after 1 second. Just run it with perf instead
of waiting for the background process.
Cc: Thomas Richter <tmricht@linux.ibm.com>
Cc: Leo Yan <leo.yan@arm.com>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
---
tools/perf/tests/shell/test_data_symbol.sh | 15 ++-------------
1 file changed, 2 insertions(+), 13 deletions(-)
diff --git a/tools/perf/tests/shell/test_data_symbol.sh b/tools/perf/tests/shell/test_data_symbol.sh
index c86da02350596b35..1792b7ad4066f8cd 100755
--- a/tools/perf/tests/shell/test_data_symbol.sh
+++ b/tools/perf/tests/shell/test_data_symbol.sh
@@ -5,8 +5,6 @@
# Leo Yan <leo.yan@linaro.org>, 2022
shelldir=$(dirname "$0")
-# shellcheck source=lib/waiting.sh
-. "${shelldir}"/lib/waiting.sh
# shellcheck source=lib/perf_has_symbol.sh
. "${shelldir}"/lib/perf_has_symbol.sh
@@ -60,19 +58,10 @@ echo "Recording workload..."
# specific CPU and test in per-CPU mode.
is_amd=$(grep -E -c 'vendor_id.*AuthenticAMD' /proc/cpuinfo)
if (($is_amd >= 1)); then
- perf mem record -vvv -o ${PERF_DATA} -C 0 -- taskset -c 0 $TEST_PROGRAM 2>"${ERR_FILE}" &
+ perf mem record -vvv -o ${PERF_DATA} -C 0 -- taskset -c 0 $TEST_PROGRAM 2>"${ERR_FILE}"
else
- perf mem record -vvv --all-user -o ${PERF_DATA} -- $TEST_PROGRAM 2>"${ERR_FILE}" &
+ perf mem record -vvv --all-user -o ${PERF_DATA} -- $TEST_PROGRAM 2>"${ERR_FILE}"
fi
-PERFPID=$!
-
-wait_for_perf_to_start ${PERFPID} "${ERR_FILE}"
-
-sleep 1
-
-kill $PERFPID
-wait $PERFPID
-
check_result
exit $?
--
2.48.1.711.g2feabab25a-goog
On Mon, Mar 03, 2025 at 06:28:37PM -0800, Namhyung Kim wrote:
> Now the workload will end after 1 second. Just run it with perf instead
> of waiting for the background process.
>
> Cc: Thomas Richter <tmricht@linux.ibm.com>
> Cc: Leo Yan <leo.yan@arm.com>
> Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Reviewed-by: Leo Yan <leo.yan@arm.com>
> ---
> tools/perf/tests/shell/test_data_symbol.sh | 15 ++-------------
> 1 file changed, 2 insertions(+), 13 deletions(-)
>
> diff --git a/tools/perf/tests/shell/test_data_symbol.sh b/tools/perf/tests/shell/test_data_symbol.sh
> index c86da02350596b35..1792b7ad4066f8cd 100755
> --- a/tools/perf/tests/shell/test_data_symbol.sh
> +++ b/tools/perf/tests/shell/test_data_symbol.sh
> @@ -5,8 +5,6 @@
> # Leo Yan <leo.yan@linaro.org>, 2022
>
> shelldir=$(dirname "$0")
> -# shellcheck source=lib/waiting.sh
> -. "${shelldir}"/lib/waiting.sh
>
> # shellcheck source=lib/perf_has_symbol.sh
> . "${shelldir}"/lib/perf_has_symbol.sh
> @@ -60,19 +58,10 @@ echo "Recording workload..."
> # specific CPU and test in per-CPU mode.
> is_amd=$(grep -E -c 'vendor_id.*AuthenticAMD' /proc/cpuinfo)
> if (($is_amd >= 1)); then
> - perf mem record -vvv -o ${PERF_DATA} -C 0 -- taskset -c 0 $TEST_PROGRAM 2>"${ERR_FILE}" &
> + perf mem record -vvv -o ${PERF_DATA} -C 0 -- taskset -c 0 $TEST_PROGRAM 2>"${ERR_FILE}"
> else
> - perf mem record -vvv --all-user -o ${PERF_DATA} -- $TEST_PROGRAM 2>"${ERR_FILE}" &
> + perf mem record -vvv --all-user -o ${PERF_DATA} -- $TEST_PROGRAM 2>"${ERR_FILE}"
> fi
>
> -PERFPID=$!
> -
> -wait_for_perf_to_start ${PERFPID} "${ERR_FILE}"
> -
> -sleep 1
> -
> -kill $PERFPID
> -wait $PERFPID
> -
> check_result
> exit $?
> --
> 2.48.1.711.g2feabab25a-goog
>
On 3/4/25 03:28, Namhyung Kim wrote:
> Now the workload will end after 1 second. Just run it with perf instead
> of waiting for the background process.
>
> Cc: Thomas Richter <tmricht@linux.ibm.com>
> Cc: Leo Yan <leo.yan@arm.com>
> Signed-off-by: Namhyung Kim <namhyung@kernel.org>
> ---
> tools/perf/tests/shell/test_data_symbol.sh | 15 ++-------------
> 1 file changed, 2 insertions(+), 13 deletions(-)
>
> diff --git a/tools/perf/tests/shell/test_data_symbol.sh b/tools/perf/tests/shell/test_data_symbol.sh
> index c86da02350596b35..1792b7ad4066f8cd 100755
> --- a/tools/perf/tests/shell/test_data_symbol.sh
> +++ b/tools/perf/tests/shell/test_data_symbol.sh
> @@ -5,8 +5,6 @@
> # Leo Yan <leo.yan@linaro.org>, 2022
>
> shelldir=$(dirname "$0")
> -# shellcheck source=lib/waiting.sh
> -. "${shelldir}"/lib/waiting.sh
>
> # shellcheck source=lib/perf_has_symbol.sh
> . "${shelldir}"/lib/perf_has_symbol.sh
> @@ -60,19 +58,10 @@ echo "Recording workload..."
> # specific CPU and test in per-CPU mode.
> is_amd=$(grep -E -c 'vendor_id.*AuthenticAMD' /proc/cpuinfo)
> if (($is_amd >= 1)); then
> - perf mem record -vvv -o ${PERF_DATA} -C 0 -- taskset -c 0 $TEST_PROGRAM 2>"${ERR_FILE}" &
> + perf mem record -vvv -o ${PERF_DATA} -C 0 -- taskset -c 0 $TEST_PROGRAM 2>"${ERR_FILE}"
> else
> - perf mem record -vvv --all-user -o ${PERF_DATA} -- $TEST_PROGRAM 2>"${ERR_FILE}" &
> + perf mem record -vvv --all-user -o ${PERF_DATA} -- $TEST_PROGRAM 2>"${ERR_FILE}"
> fi
>
> -PERFPID=$!
> -
> -wait_for_perf_to_start ${PERFPID} "${ERR_FILE}"
> -
> -sleep 1
> -
> -kill $PERFPID
> -wait $PERFPID
> -
> check_result
> exit $?
Tested-by: Thomas Richter <tmricht@linux.ibm.com>
--
Thomas Richter, Dept 3303, IBM s390 Linux Development, Boeblingen, Germany
--
IBM Deutschland Research & Development GmbH
Vorsitzender des Aufsichtsrats: Wolfgang Wendt
Geschäftsführung: David Faller
Sitz der Gesellschaft: Böblingen / Registergericht: Amtsgericht Stuttgart, HRB 243294
© 2016 - 2026 Red Hat, Inc.