History

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.

Anup Sharma committed 3 years ago

Commit 43803cb1 parent f85d1201 file · +5 −1Browse files

Showing the changes to tools/perf/scripts/python (1 of 1 file). Show all

Unified · Split

tools/perf/scripts/python/bin/gecko-report+5−1
@@ -1,3 +1,7 @@
11 #!/bin/bash
22 # description: create firefox gecko profile json format from perf.data
3−perf script "$@" -s "$PERF_EXEC_PATH"/scripts/python/gecko.py
3+if [ "$*" = "-i -" ]; then
4+perf script -s "$PERF_EXEC_PATH"/scripts/python/gecko.py
5+else
6+perf script -s "$PERF_EXEC_PATH"/scripts/python/gecko.py -- "$@"
7+fi