aboutsummaryrefslogtreecommitdiff
path: root/docs/embedder-guide.md
blob: fbe3be34a065f157f148746a6e9844ecfde73c34 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# Embedding Perfetto in another project

*** note
**This doc is WIP**, stay tuned
<!-- TODO(primiano): write embedder guide doc. -->
***


This doc should:
- Contain tech details of the Producer(Endpoint), Consumer(Endpoint) and Service
  interfaces.
- Explain how they are supposed to be wired up together, with or without
  using an IPC transport.
- Explain the basic embedder requirements (e.g. [`TaskRunner`](/include/perfetto/base/task_runner.h))
- Point out the relevant GN targets:
  `//src/tracing`, `//src/tracing:ipc`, `//src/ipc`.
- Explain the API surface:
  - [producer.h](/include/perfetto/tracing/core/producer.h)
  - [consumer.h](/include/perfetto/tracing/core/consumer.h)
  - [service.h](/include/perfetto/tracing/core/tracing_service.h)
- Explain the ABI surface:
  - [shared_memory_abi.h](/include/perfetto/tracing/core/shared_memory_abi.h)
  - IPC's [wire protocol](/protos/perfetto/ipc/wire_protocol.proto) (if used)
  - The input [config protos](/protos/perfetto/config)
  - The output [trace protos](/protos/perfetto/trace)

Other resources
---------------
* How we wrap our own IPC transport in Android: [/src/tracing/ipc](/src/tracing/ipc).