kernel::introspection

Struct KernelInfo

Source
pub struct KernelInfo { /* private fields */ }
Expand description

This struct provides the inspection functions.

Implementations§

Source§

impl KernelInfo

Source

pub fn new(kernel: &'static Kernel) -> KernelInfo

Source

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.

Source

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.

Source

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.

Source

pub fn process_name( &self, app: ProcessId, _capability: &dyn ProcessManagementCapability, ) -> &'static str

Get the name of the process.

Source

pub fn number_app_syscalls( &self, app: ProcessId, _capability: &dyn ProcessManagementCapability, ) -> usize

Returns the number of syscalls the app has called.

Source

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.

Source

pub fn number_app_restarts( &self, app: ProcessId, _capability: &dyn ProcessManagementCapability, ) -> usize

Returns the number of time this app has been restarted.

Source

pub fn number_app_timeslice_expirations( &self, app: ProcessId, _capability: &dyn ProcessManagementCapability, ) -> usize

Returns the number of time this app has exceeded its timeslice.

Source

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).

Source

pub fn timeslice_expirations( &self, _capability: &dyn ProcessManagementCapability, ) -> usize

Returns the total number of times all processes have exceeded their timeslices.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.