summaryrefslogtreecommitdiff
path: root/tools/perf/python/event_analyzing_sample.py
diff options
context:
space:
mode:
authorIan Rogers <irogers@google.com>2026-09-25 23:19:47 -0700
committerArnaldo Carvalho de Melo <acme@redhat.com>2026-09-26 20:49:28 +0200
commite1e4bd6f8b6bddeafd3d1b5d3f756981b4b3dde2 (patch)
tree157e13b88c07c192b11afa22288a339306940d24 /tools/perf/python/event_analyzing_sample.py
parenteb08738a7f65fbb629f7acf499a742f1a708f1ad (diff)
downloadlinux-next-e1e4bd6f8b6bddeafd3d1b5d3f756981b4b3dde2.tar.gz
linux-next-e1e4bd6f8b6bddeafd3d1b5d3f756981b4b3dde2.zip
perf python: Port gecko to perf module
Port gecko.py to a standalone script in tools/perf/python/ that uses the perf module directly to convert perf.data profiles into Firefox Gecko profile format. Improvements compared to the legacy script: - Encapsulate profiler state in GeckoCLI and CategoryData classes with full type annotations, removing global variables. - Harden the local HTTP server in _write_and_launch(): write the temporary profile to an isolated tempfile.TemporaryDirectory() with a randomized UUID filename instead of the current working directory, bind HTTPServer exclusively to 127.0.0.1 on an OS-assigned ephemeral port (0), restrict CORS Access-Control-Allow-Origin to 'https://profiler.firefox.com' instead of '*', and restrict HTTP GET requests exclusively to the randomized profile filename (returning HTTP 403 for directory listings and any other path). - Add -i/--input and -e/--event CLI options via argparse. Add a shell test (test_gecko_python.sh) to verify the standalone script. Assisted-by: Antigravity:gemini-3.1-pro Signed-off-by: Ian Rogers <irogers@google.com> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/python/event_analyzing_sample.py')
0 files changed, 0 insertions, 0 deletions