aboutsummaryrefslogtreecommitdiff
path: root/tools/perf
diff options
context:
space:
mode:
authorAnup Sharma2023-08-13 03:06:27 +0530
committerArnaldo Carvalho de Melo2023-08-24 14:39:43 -0300
commit43803cb16f997794a256483f29beb68abef2fa9e (patch)
treef219cea14cc27821ef02ce16859077d2a7aaa98f /tools/perf
parentf85d120c46e7e31e0516b15a9a11f6721150eb3b (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')
-rwxr-xr-x[-rw-r--r--]tools/perf/scripts/python/bin/gecko-report6
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