---
title: Userspace Structure
---
flowchart TD
    A(perf_event_open) --> B(starnix)
    B(starnix) --> C
    C(FIDL + Socket) --> D
    E(ffx) --> C
    D(cpu_profiler.cm) --> F
    F(FIDL) --> G(component_manager)
    D --> H
    H(zx_sampler_*) --> I(zircon vdso)
    D --> J
    J(Other Syscalls for Profiling) --> I
    K@{ shape: lin-rect, label: "Host" }
    L@{ shape: lin-rect, label: "API Boundary" }
    M@{ shape: lin-rect, label: "Fuchsia" }
    style A fill:#A3C4FF,color:#000
    style B fill:#F1B4AE,color:#000
    style C fill:#A3C4FF,color:#000
    style D fill:#F1B4AE,color:#000
    style E fill:#F1B4AE,color:#000
    style F fill:#A3C4FF,color:#000                                                                                                                                                                                                                                                                                               style G fill:#F1B4AE,color:#000
    style H fill:#A3C4FF,color:#000
    style I fill:#F1B4AE,color:#000
    style J fill:#A3C4FF,color:#000
    style E fill:#FFBE99,color:#000
    style K fill:#FFBE99,color:#000
    style L fill:#A3C4FF,color:#000
    style M fill:#F1B4AE,color:#000
    style G fill:#F1B4AE,color:#000