pub struct KernelInfo { /* private fields */ }
Expand description
This struct provides the inspection functions.
Implementations§
Source§impl KernelInfo
impl KernelInfo
pub fn new(kernel: &'static Kernel) -> KernelInfo
Sourcepub fn number_loaded_processes(
&self,
_capability: &dyn ProcessManagementCapability,
) -> usize
pub fn number_loaded_processes( &self, _capability: &dyn ProcessManagementCapability, ) -> usize
Returns how many processes have been loaded on this platform. This is functionally equivalent to how many of the process slots have been used on the board. This does not consider what state the process is in, as long as it has been loaded.
Sourcepub fn number_active_processes(
&self,
_capability: &dyn ProcessManagementCapability,
) -> usize
pub fn number_active_processes( &self, _capability: &dyn ProcessManagementCapability, ) -> usize
Returns how many processes are considered to be active. This includes
processes in the Running
and Yield
states. This does not include
processes which have faulted, or processes which the kernel is no longer
scheduling because they have faulted too frequently or for some other
reason.
Sourcepub fn number_inactive_processes(
&self,
_capability: &dyn ProcessManagementCapability,
) -> usize
pub fn number_inactive_processes( &self, _capability: &dyn ProcessManagementCapability, ) -> usize
Returns how many processes are considered to be inactive. This includes
processes in the Fault
state and processes which the kernel is not
scheduling for any reason.
Sourcepub fn process_name(
&self,
app: ProcessId,
_capability: &dyn ProcessManagementCapability,
) -> &'static str
pub fn process_name( &self, app: ProcessId, _capability: &dyn ProcessManagementCapability, ) -> &'static str
Get the name of the process.
Sourcepub fn number_app_syscalls(
&self,
app: ProcessId,
_capability: &dyn ProcessManagementCapability,
) -> usize
pub fn number_app_syscalls( &self, app: ProcessId, _capability: &dyn ProcessManagementCapability, ) -> usize
Returns the number of syscalls the app has called.
Sourcepub fn number_app_dropped_upcalls(
&self,
app: ProcessId,
_capability: &dyn ProcessManagementCapability,
) -> usize
pub fn number_app_dropped_upcalls( &self, app: ProcessId, _capability: &dyn ProcessManagementCapability, ) -> usize
Returns the number of dropped upcalls the app has experience. Upcalls can be dropped if the queue for the app is full when a capsule tries to schedule a upcall.
Sourcepub fn number_app_restarts(
&self,
app: ProcessId,
_capability: &dyn ProcessManagementCapability,
) -> usize
pub fn number_app_restarts( &self, app: ProcessId, _capability: &dyn ProcessManagementCapability, ) -> usize
Returns the number of time this app has been restarted.
Sourcepub fn number_app_timeslice_expirations(
&self,
app: ProcessId,
_capability: &dyn ProcessManagementCapability,
) -> usize
pub fn number_app_timeslice_expirations( &self, app: ProcessId, _capability: &dyn ProcessManagementCapability, ) -> usize
Returns the number of time this app has exceeded its timeslice.
Sourcepub fn number_app_grant_uses(
&self,
app: ProcessId,
_capability: &dyn ProcessManagementCapability,
) -> (usize, usize)
pub fn number_app_grant_uses( &self, app: ProcessId, _capability: &dyn ProcessManagementCapability, ) -> (usize, usize)
Returns a tuple of the (the number of grants in the grant region this app has allocated, total number of grants that exist in the system).
Sourcepub fn timeslice_expirations(
&self,
_capability: &dyn ProcessManagementCapability,
) -> usize
pub fn timeslice_expirations( &self, _capability: &dyn ProcessManagementCapability, ) -> usize
Returns the total number of times all processes have exceeded their timeslices.