diff options
author | Anup Sharma <anupnewsmail@gmail.com> | 2023-08-13 03:06:27 +0530 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2023-08-24 14:39:43 -0300 |
commit | 43803cb16f997794a256483f29beb68abef2fa9e (patch) | |
tree | f219cea14cc27821ef02ce16859077d2a7aaa98f /tools/perf/scripts | |
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 <anupnewsmail@gmail.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: https://lore.kernel.org/r/ZNf7W+EIrrCSHZN0@yoga
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/scripts')
-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 |