ui: add ability to open traces via POST /_open_trace/xxxx

This change makes it possible to open traces by simply doing
a HTTP POST operation on https://ui.perfetto.dev/_open_trace/
via a <form>. This allows:
1. Easier integration from other dashboards, even in presence
   of cross-origin isolation (which applies to fetch, but not
   <form>) without requiring popups.
2. Allows in future to solve the teardown problem and open a
   2nd trace in the UI by replacing the current window with a
   fresh UI state (a follow up CL is required for this).

The main downside is that this works only after the serviceworker
has been registered. In other words, this works only after the
user has visited ui.perfetto.dev once.
I think this is easily solvable by adding an error page to
handle /_open_trace on ui.perfetto.dev that explains what's
happening.

Bug: 337296884
Change-Id: I543b76481c400cfb4e9947252ce89964655e247e
7 files changed
tree: 25840cfe82a6141c8891f2ebafc3367a43cff007
  1. .github/
  2. bazel/
  3. build_overrides/
  4. buildtools/
  5. debian/
  6. docs/
  7. examples/
  8. gn/
  9. include/
  10. infra/
  11. protos/
  12. python/
  13. src/
  14. test/
  15. third_party/
  16. tools/
  17. ui/
  18. .clang-format
  19. .clang-tidy
  20. .git-blame-ignore-revs
  21. .gitattributes
  22. .gitignore
  23. .gn
  24. .style.yapf
  25. Android.bp
  26. Android.bp.extras
  27. BUILD
  28. BUILD.extras
  29. BUILD.gn
  30. CHANGELOG
  31. codereview.settings
  32. DIR_METADATA
  33. heapprofd.rc
  34. LICENSE
  35. meson.build
  36. METADATA
  37. MODULE_LICENSE_APACHE2
  38. OWNERS
  39. perfetto.rc
  40. PerfettoIntegrationTests.xml
  41. persistent_cfg.pbtxt
  42. PRESUBMIT.py
  43. README.chromium
  44. README.md
  45. TEST_MAPPING
  46. traced_perf.rc
  47. WATCHLISTS
  48. WORKSPACE
README.md

Perfetto - System profiling, app tracing and trace analysis

Perfetto is a production-grade open-source stack for performance instrumentation and trace analysis. It offers services and libraries and for recording system-level and app-level traces, native + java heap profiling, a library for analyzing traces using SQL and a web-based UI to visualize and explore multi-GB traces.

See https://perfetto.dev/docs or the /docs/ directory for documentation.