From: Anup Sharma Date: Sat, 12 Aug 2023 21:36:27 +0000 (+0530) Subject: perf scripts python: Add support for input args in gecko script X-Git-Tag: v6.6.17~3940^2~34 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=43803cb16f997794a256483f29beb68abef2fa9e;p=platform%2Fkernel%2Flinux-rpi.git perf scripts python: Add support for input args in gecko script Refines the argument handling mechanism in the "gecko-report" script to enable better compatibility and improved user experience. The script now differentiates between scenarios where arguments are provided for record and report cases where gecko.py arguments are passed. Signed-off-by: Anup Sharma Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: https://lore.kernel.org/r/ZNf7W+EIrrCSHZN0@yoga Signed-off-by: Arnaldo Carvalho de Melo --- diff --git a/tools/perf/scripts/python/bin/gecko-report b/tools/perf/scripts/python/bin/gecko-report old mode 100644 new mode 100755 index 0c12cc0..1867ec8 --- a/tools/perf/scripts/python/bin/gecko-report +++ b/tools/perf/scripts/python/bin/gecko-report @@ -1,3 +1,7 @@ #!/bin/bash # description: create firefox gecko profile json format from perf.data -perf script "$@" -s "$PERF_EXEC_PATH"/scripts/python/gecko.py +if [ "$*" = "-i -" ]; then +perf script -s "$PERF_EXEC_PATH"/scripts/python/gecko.py +else +perf script -s "$PERF_EXEC_PATH"/scripts/python/gecko.py -- "$@" +fi