diff options
author | Anup Sharma <[email protected]> | 2023-08-13 03:06:27 +0530 |
---|---|---|
committer | Arnaldo Carvalho de Melo <[email protected]> | 2023-08-24 14:39:43 -0300 |
commit | 43803cb16f997794a256483f29beb68abef2fa9e (patch) | |
tree | f219cea14cc27821ef02ce16859077d2a7aaa98f | |
parent | f85d120c46e7e31e0516b15a9a11f6721150eb3b (diff) |
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 <[email protected]>
Cc: Adrian Hunter <[email protected]>
Cc: Alexander Shishkin <[email protected]>
Cc: Ian Rogers <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Mark Rutland <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Link: https://lore.kernel.org/r/ZNf7W+EIrrCSHZN0@yoga
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
-rwxr-xr-x[-rw-r--r--] | tools/perf/scripts/python/bin/gecko-report | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/perf/scripts/python/bin/gecko-report b/tools/perf/scripts/python/bin/gecko-report index 0c12cc08f3ab..1867ec8d9757 100644..100755 --- 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 |