• Home
Name Date Size #Lines LOC

..--

consumer_api_deprecated/03-May-2024-676509

core/03-May-2024-17,61312,068

internal/03-May-2024-3,4612,377

ipc/03-May-2024-3,7792,628

test/03-May-2024-7,4785,531

BUILD.gnD03-May-20246.6 KiB224209

OWNERSD03-May-2024169 86

README.mdD03-May-20242.4 KiB5745

api_benchmark.ccD03-May-20244.1 KiB13395

console_interceptor.ccD03-May-202415.7 KiB469371

data_source.ccD03-May-2024954 288

debug_annotation.ccD03-May-2024982 319

event_context.ccD03-May-20242.3 KiB6533

interceptor.ccD03-May-20241.3 KiB3815

platform.ccD03-May-20241.1 KiB3612

platform_fake.ccD03-May-2024912 306

platform_posix.ccD03-May-20243.7 KiB12073

platform_windows.ccD03-May-20245.3 KiB17694

trace_writer_base.ccD03-May-20241 KiB294

traced_proto_unittest.ccD03-May-202416.2 KiB449353

traced_value.ccD03-May-20245.8 KiB180126

traced_value_unittest.ccD03-May-202425.2 KiB744605

tracing.ccD03-May-20244.8 KiB171123

tracing_policy.ccD03-May-2024758 244

track.ccD03-May-20247.3 KiB216153

track_event_category_registry.ccD03-May-20242.1 KiB6638

track_event_legacy.ccD03-May-20242.3 KiB7746

track_event_state_tracker.ccD03-May-202410.6 KiB285234

virtual_destructors.ccD03-May-20242.1 KiB5212

README.md

1How to use this library
2-----------------------
3There are three options to use this library:
4
5## Option 1) Fully in-process
6In this mode Producer, Consumers and the Service are hosted in the same process.
7This is not too interesting other than tests and particular cases of nesting
8tracing instances coming from different libraries within the same process
9(concrete example v8, skia and webrtc in Chrome).
10In this configuration, the client is expected to at least:
11- Create a TracingService instance via TracingService::CreateInstance
12  (see `core/tracing_service.h`)
13- Subclass Producer (`core/producer.h`) and connect it to the service.
14- Provide a TaskRunner implementation (see `test/test_task_runner.h`)
15- Provide a trivial SharedMemory implementation (`core/shared_memory.h`) which
16  is simply backed by a malloc() buffer.
17
18## Option 2) Using the provided UNIX RPC transport
19The `include/unix_rpc` provides the building blocks necessary to implement a RPC
20mechanism that allows Producer(s), Consumer(s) and Service to be hosted on
21different processes on the same machine and talk over a UNIX domain socket.
22- Producer(s) are expected to get a service proxy via
23`UnixServiceConnection::ConnectAsProducer()`.
24- The `Service` must be instantiated via `UnixServiceHost::CreateInstance()`. The
25returned instance encapsulates the `Service` and exposes two UNIX sockets (one
26for Producer(s), one for Consumer(s)) on the current process.
27
28## Option 3) Providing a custom RPC transport
29Similar to Option 2, but the client creates its own transport mechanism,
30defining how methods are proxies between instances and providing a SharedMemory
31implementation that can be transferred through RPC. Concrete example of this is
32Chrome implementing this library over a Mojo transport.
33
34
35Directory layout
36----------------
37
38`include/`
39Is the public API that clients of this library are allowed to depend on.
40Headers inside include/ cannot depend on anything else.
41
42`src/`
43Is the actual implementation that clients can link but not expected to access
44at a source-code level.
45
46
47**Both have the following sub-structure**:
48
49`{include,src}/core/`
50"Core" is the pure c++11 tracing machinery that deals with bookkeeping,
51ring-buffering, partitioning and multiplexing but knows nothing about
52platform-specific things like implementation of shared memory and RPC mechanism.
53
54`{include,src}/unix_rpc/`
55A concrete implementation of the transport layer based on UNIX domain sockets
56and posix shared memory.
57