How google/orbit works
Main components
• Frontend (UI)
• OrbitQt: Qt-based windows, dialogs, user workflows (SessionSetup, Symbols tab, Capture tab, Source/Disassembly views)
• OrbitGl: OpenGL renderer for time graphs, tracks, call-trees
• Backend services (gRPC)
• OrbitService (OrbitGrpcServer + OrbitServiceImpl): central gRPC server exposing CaptureControl, ProcessService, TracepointService, CrashManager, etc.
• CaptureService: standalone process on Linux or Windows that receives instrumentation events, schedules, and forwards to client
• ProducerSideService: injected server into target process to collect instrumented function entry/exit events
• Pipeline
• ProducerSideChannel: IPC between injected instrumentation and CaptureService
• CaptureEventProducer: lock-free buffer producers inside target (API, Vulkan, ETW on Windows, perf_event on Linux)
• CaptureEventProcessor: on service side, process raw events (GPU, memory, thread scheduling, callstack samples)
• Post-processing: ClientData/DataManager, Mizar/MizarData for combining sampling vs instrumentation, building metrics
• Data storage & transport
• CaptureFile module: serializes/deserializes complete capture to .orbit files
• ClientModel: sampling data serialization for UI
• Symbol resolution & code view
• SymbolProvider(s): local ELF/DWARF/PDB parsing, remote Microsoft Symbol Server via HTTP (HttpDownloadManager)
• ClientSymbols: persistent cache manager (QSettings-based)
• CodeReport, CodeViewer, SyntaxHighlighter: generate and display annotated source and disassembly
• Deployment & remote profiling
• OrbitSsh & OrbitSshQt: SSH session management, file copy, remote command execution
• SessionSetup / ServiceDeployManager: start OrbitService and remote CaptureService on Linux target (via ssh or Docker)
• Utilities & third-party
• Abseil, gRPC, protobuf, Capstone, LZMA, LZ4, Catch2, GoogleTest, imgui, Vulkan headers, PresentMon
Relationships and data flows
1. UI ↔ OrbitService (gRPC calls over in-process or TCP)
2. OrbitService ↔ CaptureService (gRPC over local loopback or remote)
3. CaptureService ↔ ProducerSideService (IPC channel for event stream)
4. ProducerSideService → in-target instrumentation APIs (OrbitApi via APILoader, Vulkan layer, ETW/Krabs)
5. CaptureService → ClientData/DataManager → OrbitService → UI (event batch, metrics updates)
6. UI → HttpDownloadManager → Microsoft symbol server
7. UI → OrbitSshQt / OrbitSsh → remote target for deployment
Architectural patterns
• Microservices via gRPC: each service has its own process and clearly defined protobuf interfaces
• Plugin layers / dynamic instrumentation: APILoader + Vulkan layer intercept calls in-process
• Lock-free producers and modular event processors for high-throughput tracing
• MVC in UI: OrbitQt controllers invoke models (ClientModel, CaptureFileInfo, ClientData) and render via OrbitGl
Technologies
• gRPC / protobuf for inter-service RPC
• Qt for UI, OpenGL for rendering
• absl::flat_hash_map, concurrentqueue, outcome for low-level utilities
• JSON config for Vulkan layer, LZMA for compression
• CMake + Conan for builds, Docker / SSH for remote deployment