Trait kernel::process::ProcessStandardDebug

source ·
pub trait ProcessStandardDebug: Default {
Show 23 methods // Required methods fn set_fixed_address_flash(&self, address: u32); fn get_fixed_address_flash(&self) -> Option<u32>; fn set_fixed_address_ram(&self, address: u32); fn get_fixed_address_ram(&self) -> Option<u32>; fn set_app_heap_start_pointer(&self, ptr: *const u8); fn get_app_heap_start_pointer(&self) -> Option<*const u8>; fn set_app_stack_start_pointer(&self, ptr: *const u8); fn get_app_stack_start_pointer(&self) -> Option<*const u8>; fn set_app_stack_min_pointer(&self, ptr: *const u8); fn get_app_stack_min_pointer(&self) -> Option<*const u8>; fn set_new_app_stack_min_pointer(&self, ptr: *const u8); fn set_last_syscall(&self, syscall: Syscall); fn get_last_syscall(&self) -> Option<Syscall>; fn reset_last_syscall(&self); fn increment_syscall_count(&self); fn get_syscall_count(&self) -> usize; fn reset_syscall_count(&self); fn increment_dropped_upcall_count(&self); fn get_dropped_upcall_count(&self) -> usize; fn reset_dropped_upcall_count(&self); fn increment_timeslice_expiration_count(&self); fn get_timeslice_expiration_count(&self) -> usize; fn reset_timeslice_expiration_count(&self);
}
Expand description

Interface supported by ProcessStandard for recording debug information.

This trait provides flexibility to users of ProcessStandard to determine how debugging information should be recorded, or if debugging information should be recorded at all.

Platforms that want to only maintain certain debugging information can implement only part of this trait.

Tock provides a default implementation of this trait on the () type. Kernels that wish to use ProcessStandard but do not need process-level debugging information can use () as the ProcessStandardDebug type.

Required Methods§

source

fn set_fixed_address_flash(&self, address: u32)

Record the address in flash the process expects to start at.

source

fn get_fixed_address_flash(&self) -> Option<u32>

Get the address in flash the process expects to start at, if it was recorded.

source

fn set_fixed_address_ram(&self, address: u32)

Record the address in RAM the process expects to start at.

source

fn get_fixed_address_ram(&self) -> Option<u32>

Get the address in RAM the process expects to start at, if it was recorded.

source

fn set_app_heap_start_pointer(&self, ptr: *const u8)

Record the address where the process placed its heap.

source

fn get_app_heap_start_pointer(&self) -> Option<*const u8>

Get the address where the process placed its heap, if it was recorded.

source

fn set_app_stack_start_pointer(&self, ptr: *const u8)

Record the address where the process placed its stack.

source

fn get_app_stack_start_pointer(&self) -> Option<*const u8>

Get the address where the process placed its stack, if it was recorded.

source

fn set_app_stack_min_pointer(&self, ptr: *const u8)

Update the lowest address that the process’s stack has reached.

source

fn get_app_stack_min_pointer(&self) -> Option<*const u8>

Get the lowest address of the process’s stack , if it was recorded.

source

fn set_new_app_stack_min_pointer(&self, ptr: *const u8)

Provide the current address of the bottom of the stack and record the address if it is the lowest address that the process’s stack has reached.

source

fn set_last_syscall(&self, syscall: Syscall)

Record the most recent system call the process called.

source

fn get_last_syscall(&self) -> Option<Syscall>

Get the most recent system call the process called, if it was recorded.

source

fn reset_last_syscall(&self)

Clear any record of the most recent system call the process called.

source

fn increment_syscall_count(&self)

Increase the recorded count of the number of system calls the process has called.

source

fn get_syscall_count(&self) -> usize

Get the recorded count of the number of system calls the process has called.

This should return 0 if ProcessStandardDebug::increment_syscall_count() is never called.

source

fn reset_syscall_count(&self)

Reset the recorded count of the number of system calls called by the app to 0.

source

fn increment_dropped_upcall_count(&self)

Increase the recorded count of the number of upcalls that have been dropped for the process.

source

fn get_dropped_upcall_count(&self) -> usize

Get the recorded count of the number of upcalls that have been dropped for the process.

This should return 0 if ProcessStandardDebug::increment_dropped_upcall_count() is never called.

source

fn reset_dropped_upcall_count(&self)

Reset the recorded count of the number of upcalls that have been dropped for the process to 0.

source

fn increment_timeslice_expiration_count(&self)

Increase the recorded count of the number of times the process has exceeded its timeslice.

source

fn get_timeslice_expiration_count(&self) -> usize

Get the recorded count of the number times the process has exceeded its timeslice.

This should return 0 if ProcessStandardDebug::increment_timeslice_expiration_count() is never called.

source

fn reset_timeslice_expiration_count(&self)

Reset the recorded count of the number of the process has exceeded its timeslice to 0.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl ProcessStandardDebug for ()

Implementors§