probe.sh 341 B

12345678910111213
  1. #!/bin/bash
  2. # SPDX-License-Identifier: GPL-2.0
  3. # Arnaldo Carvalho de Melo <acme@kernel.org>, 2017
  4. skip_if_no_perf_probe() {
  5. perf probe 2>&1 | grep -q 'is not a perf-command' && return 2
  6. return 0
  7. }
  8. skip_if_no_perf_trace() {
  9. perf trace -h 2>&1 | grep -q -e 'is not a perf-command' -e 'trace command not available' && return 2
  10. return 0
  11. }