From 43803cb16f997794a256483f29beb68abef2fa9e Mon Sep 17 00:00:00 2001 From: Anup Sharma Date: Sun, 13 Aug 2023 03:06:27 +0530 Subject: [PATCH] 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 --- tools/perf/scripts/python/bin/gecko-report | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) mode change 100644 => 100755 tools/perf/scripts/python/bin/gecko-report 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 -- 2.7.4