mirror of
https://github.com/torvalds/linux.git
synced 2026-09-14 16:10:02 +02:00
The `perf trace record and replay` test fails intermittently on slow or
virtualized hosts because the default recording workload (`sleep 1`)
occasionally completes without scheduling the target `nanosleep` or
`clock_nanosleep` system calls inside the recorded sample window,
resulting in the error: `Failed: cannot find *nanosleep syscall`.
Generalize the `perf_record_with_retry` helper in
`tests/shell/lib/perf_record.sh` to support a custom record command prefix
via the `PERF_RECORD_CMD` environment variable (defaulting to "perf
record").
Update `trace_record_replay.sh` to use this robust retry loop running with
`PERF_RECORD_CMD="perf trace record"` and a base workload of `sleep`. The
test will automatically retry with scaled sleep durations (from 0.01s up
to 2.0s) until the required `nanosleep` event is successfully captured.
Fixes:
|
||
|---|---|---|
| .. | ||
| attr.py | ||
| perf_has_symbol.sh | ||
| perf_json_output_lint.py | ||
| perf_metric_validation_rules.json | ||
| perf_metric_validation.py | ||
| perf_record.sh | ||
| probe_vfs_getname.sh | ||
| probe.sh | ||
| setup_python.sh | ||
| stat_output.sh | ||
| waiting.sh | ||