commit | 036d9d3d17286baed78499317059aeff97cee6aa | [log] [tgz] |
---|---|---|
author | Primiano Tucci <primiano@google.com> | Tue Jun 01 20:27:07 2021 +0100 |
committer | Primiano Tucci <primiano@google.com> | Tue Jun 01 20:27:07 2021 +0100 |
tree | 52b91cb7b720e3e17f68f33f4e967a4e8a22cb2c | |
parent | f1f79d741319ec182b72bd473078c3ba5e8bf777 [diff] |
UI: switch to new /rpc endpoint, simplify wasm_bridge This CL simplifies the way the TypeScript code interacts with TraceProcessor, reducing diverding code paths and mainteinance cost. Before this CL: Each TraceProcessor method required: - A function in TraceProcessor::Rpc to deal with {un,}marshalling - A REST endpoint for the --httpd mode - Corresponding REST code in http_rpc_engine.ts - A C exported function in wasm_bridge.cc - Corresponding Wasm glue layer code in wasm_engine_proxy.ts - Various abstractions layers in the TS code After the CL: There is only one communication endpoint, both for Wasm and RPC. That endpoint is a very simple byte pipe "here's some bytes for the request" / "here are some bytes for the response". The Engine implementation (Wasm or HTTP) is only required to deal with transporting bytes. It doesn't even need to guarantee that byte buffers boundaries are atomic (they can be coalesced or re-fragmented), it just needs to guarantee ordering and delivery. In essence the transport needs to give the same guarantees of a TCP stream. All the remaining logic, including the method {de,}multiplexing is now centralized. Bug: 159142289 Change-Id: I62da4aba145b20d1a2c44002024c1a0ddb5b3060
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.