fuchsia.kernel

PROTOCOLS

Counter

Defined in fuchsia.kernel/kernel-counter.fidl

Protocol for retrieving kcounter information.

GetInspectVmo

Retrives a VMO containining summarized kcounter data. The vmo returned in |buffer| is in "inspect-vmo" format, documented elsewhere.

Request

NameType

Response

NameType
status zx/status
buffer fuchsia.mem/Buffer

UpdateInspectVmo

Request that the previously-returned VMO buffer's data be updated. The data may not be updated if it was already recently updated (updates are limited to an unspecified rate, but approximately every few seconds).

Request

NameType

Response

NameType
status zx/status

DebugBroker

Defined in fuchsia.kernel/kernel-debug.fidl

Acts on behalf of the caller to interact with privileged debug system calls.

SendDebugCommand

Pass debug command through to the kernel shell. Look at zx_debug_send_command syscall handling to find valid values.

Request

NameType
command string[1024]

Response

NameType
status zx/status

SetTracingEnabled

Sets whether kernel tracing (ktrace) is enabled or disabled.

Request

NameType
enabled bool

Response

NameType
status zx/status

MexecBroker

Defined in fuchsia.kernel/kernel-mexec.fidl

Acts on behalf of the caller to interact with privileged mexec system call.

PerformMexec

Perform an mexec with the given kernel and bootdata. See ZX-2069 for the thoughts on deprecating mexec.

Request

NameType
kernel handle<vmo>
bootdata handle<vmo>

Stats

Defined in fuchsia.kernel/kernel-stats.fidl

Protocol for providing kernel stats. This is roughly a wrapper around zx_object_get_info for the ZX_INFO_KMEM_STATS and ZX_INFO_CPU_STATS topics, which today require the very powerful 'Root Resource' capability to obtain. Instead of vending out that capability, programs that just want stats should use this service instead. If for some reason the protocol fails to retrieve stats, which will be an un-recoverable error, it will close the channel.

GetMemoryStats

Request

NameType

Response

NameType
stats MemoryStats

GetCpuStats

Request

NameType

Response

NameType
stats CpuStats

STRUCTS

CpuStats

Defined in fuchsia.kernel/kernel-stats.fidl

NameTypeDescriptionDefault
actual_num_cpus uint64 No default
per_cpu_stats vector<PerCpuStats>[512]? No default

TABLES

MemoryStats

Defined in fuchsia.kernel/kernel-stats.fidl

OrdinalNameTypeDescription
1 total_bytes uint64
2 free_bytes uint64
3 wired_bytes uint64
4 total_heap_bytes uint64
5 free_heap_bytes uint64
6 vmo_bytes uint64
7 mmu_overhead_bytes uint64
8 ipc_bytes uint64
9 other_bytes uint64

PerCpuStats

Defined in fuchsia.kernel/kernel-stats.fidl

OrdinalNameTypeDescription
1 cpu_number uint32
2 flags uint32
3 idle_time zx/duration
4 reschedules uint64
5 context_switches uint64
6 irq_preempts uint64
7 yields uint64
8 ints uint64
9 timer_ints uint64
10 timers uint64
11 page_faults uint64
12 exceptions uint64
13 syscalls uint64
14 reschedule_ipis uint64
15 generic_ipis uint64

CONSTANTS

NameValueTypeDescription
DEBUG_COMMAND_MAX 1024 uint32

Maximum number of bytes in a command string