add executer tracing for debug
This commit is contained in:
Generated
+1
@@ -368,6 +368,7 @@ dependencies = [
|
|||||||
"esp-bootloader-esp-idf",
|
"esp-bootloader-esp-idf",
|
||||||
"esp-hal",
|
"esp-hal",
|
||||||
"esp-hal-wifimanager",
|
"esp-hal-wifimanager",
|
||||||
|
"esp-nvs",
|
||||||
"esp-println",
|
"esp-println",
|
||||||
"esp-rtos",
|
"esp-rtos",
|
||||||
"esp-storage",
|
"esp-storage",
|
||||||
|
|||||||
+2
-1
@@ -28,7 +28,7 @@ log = "0.4.27"
|
|||||||
|
|
||||||
critical-section = "1.2.0"
|
critical-section = "1.2.0"
|
||||||
embedded-io = "0.7.1"
|
embedded-io = "0.7.1"
|
||||||
embassy-executor = { version = "0.10.0", features = [] }
|
embassy-executor = { version = "0.10.0", features = ["trace", "metadata-name"] }
|
||||||
embassy-time = { version = "0.5.1", default-features = false }
|
embassy-time = { version = "0.5.1", default-features = false }
|
||||||
embassy-futures = "0.1.2"
|
embassy-futures = "0.1.2"
|
||||||
esp-alloc = "0.10.0"
|
esp-alloc = "0.10.0"
|
||||||
@@ -55,6 +55,7 @@ embedded-storage = "0.3.1"
|
|||||||
binary_serde = "1.0.25"
|
binary_serde = "1.0.25"
|
||||||
static_assertions = { version = "1.1.0", default-features = false }
|
static_assertions = { version = "1.1.0", default-features = false }
|
||||||
embedded-text = "0.7.3"
|
embedded-text = "0.7.3"
|
||||||
|
esp-nvs = { version = "0.5.0", features = ["esp32s3"] }
|
||||||
|
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
log = "0.4.27"
|
log = "0.4.27"
|
||||||
|
|||||||
+66
@@ -12,3 +12,69 @@ pub mod navigation;
|
|||||||
pub mod network;
|
pub mod network;
|
||||||
pub mod peripherals;
|
pub mod peripherals;
|
||||||
pub mod views;
|
pub mod views;
|
||||||
|
|
||||||
|
#[unsafe(no_mangle)]
|
||||||
|
pub extern "Rust" fn _embassy_trace_poll_start(executor_id: u32) {}
|
||||||
|
|
||||||
|
/// This callback is called AFTER a task is initialized/allocated, and BEFORE
|
||||||
|
/// it is enqueued to run for the first time. If the task ends (and does not
|
||||||
|
/// loop "forever"), there will be a matching call to `_embassy_trace_task_end`.
|
||||||
|
///
|
||||||
|
/// Tasks start life in the SPAWNED state.
|
||||||
|
#[unsafe(no_mangle)]
|
||||||
|
pub extern "Rust" fn _embassy_trace_task_new(executor_id: u32, task_id: u32) {
|
||||||
|
log::debug!("Started new task on executer 0x{executor_id:x} with id 0x{task_id:x}")
|
||||||
|
}
|
||||||
|
|
||||||
|
/// This callback is called AFTER a task is destructed/freed. This will always
|
||||||
|
/// have a prior matching call to `_embassy_trace_task_new`.
|
||||||
|
#[unsafe(no_mangle)]
|
||||||
|
pub extern "Rust" fn _embassy_trace_task_end(executor_id: u32, task_id: u32) {
|
||||||
|
log::debug!("Ended task on executer 0x{executor_id:x} with id 0x{task_id:x}")
|
||||||
|
}
|
||||||
|
|
||||||
|
/// This callback is called AFTER a task has been dequeued from the runqueue,
|
||||||
|
/// and BEFORE the task is polled. There will always be a matching call to
|
||||||
|
/// `_embassy_trace_task_exec_end`.
|
||||||
|
///
|
||||||
|
/// This marks the TASK state transition from WAITING -> RUNNING
|
||||||
|
/// This marks the EXECUTOR state transition from SCHEDULING -> POLLING
|
||||||
|
#[unsafe(no_mangle)]
|
||||||
|
pub extern "Rust" fn _embassy_trace_task_exec_begin(executor_id: u32, task_id: u32) {}
|
||||||
|
|
||||||
|
/// This callback is called AFTER a task has completed polling. There will
|
||||||
|
/// always be a matching call to `_embassy_trace_task_exec_begin`.
|
||||||
|
///
|
||||||
|
/// This marks the TASK state transition from either:
|
||||||
|
/// * RUNNING -> IDLE - if there were no `_embassy_trace_task_ready_begin` events
|
||||||
|
/// for this task since the last `_embassy_trace_task_exec_begin` for THIS task
|
||||||
|
/// * RUNNING -> WAITING - if there WAS a `_embassy_trace_task_ready_begin` event
|
||||||
|
/// for this task since the last `_embassy_trace_task_exec_begin` for THIS task
|
||||||
|
///
|
||||||
|
/// This marks the EXECUTOR state transition from POLLING -> SCHEDULING
|
||||||
|
#[unsafe(no_mangle)]
|
||||||
|
pub extern "Rust" fn _embassy_trace_task_exec_end(excutor_id: u32, task_id: u32) {}
|
||||||
|
|
||||||
|
/// This callback is called AFTER the waker for a task is awoken, and BEFORE it
|
||||||
|
/// is added to the run queue.
|
||||||
|
///
|
||||||
|
/// If the given task is currently RUNNING, this marks no state change, BUT the
|
||||||
|
/// RUNNING task will then move to the WAITING stage when polling is complete.
|
||||||
|
///
|
||||||
|
/// If the given task is currently IDLE, this marks the TASK state transition
|
||||||
|
/// from IDLE -> WAITING.
|
||||||
|
///
|
||||||
|
/// NOTE: This may be called from an interrupt, outside the contpub ext of the current
|
||||||
|
/// task or executor.
|
||||||
|
#[unsafe(no_mangle)]
|
||||||
|
pub extern "Rust" fn _embassy_trace_task_ready_begin(executor_id: u32, task_id: u32) {}
|
||||||
|
|
||||||
|
/// This callback is called AFTER all dequeued tasks in a single call to poll
|
||||||
|
/// have been processed. This will always be paired with a call to
|
||||||
|
/// `_embassy_trace_executor_idle`.
|
||||||
|
///
|
||||||
|
///
|
||||||
|
/// This marks the EXECUTOR state transition from SCHEDULING -> IDLE
|
||||||
|
///
|
||||||
|
#[unsafe(no_mangle)]
|
||||||
|
pub extern "Rust" fn _embassy_trace_executor_idle(executor_id: u32) {}
|
||||||
|
|||||||
Reference in New Issue
Block a user