Conversation
Signed-off-by: nokosaaan <nishimura.r.019@ms.saitama-u.ac.jp>
Signed-off-by: nokosaaan <nishimura.r.019@ms.saitama-u.ac.jp>
Signed-off-by: nokosaaan <nishimura.r.019@ms.saitama-u.ac.jp>
Signed-off-by: nokosaaan <nishimura.r.019@ms.saitama-u.ac.jp>
Signed-off-by: nokosaaan <nishimura.r.019@ms.saitama-u.ac.jp>
Signed-off-by: nokosaaan <nishimura.r.019@ms.saitama-u.ac.jp>
Signed-off-by: nokosaaan <nishimura.r.019@ms.saitama-u.ac.jp>
Signed-off-by: nokosaaan <nishimura.r.019@ms.saitama-u.ac.jp>
Signed-off-by: nokosaaan <nishimura.r.019@ms.saitama-u.ac.jp>
Signed-off-by: nokosaaan <nishimura.r.019@ms.saitama-u.ac.jp>
Signed-off-by: nokosaaan <nishimura.r.019@ms.saitama-u.ac.jp>
Signed-off-by: nokosaaan <nishimura.r.019@ms.saitama-u.ac.jp>
Signed-off-by: nokosaaan <nishimura.r.019@ms.saitama-u.ac.jp>
Signed-off-by: nokosaaan <nishimura.r.019@ms.saitama-u.ac.jp>
Signed-off-by: nokosaaan <nishimura.r.019@ms.saitama-u.ac.jp>
Signed-off-by: nokosaaan <nishimura.r.019@ms.saitama-u.ac.jp>
Signed-off-by: nokosaaan <nishimura.r.019@ms.saitama-u.ac.jp>
Signed-off-by: nokosaaan <nishimura.r.019@ms.saitama-u.ac.jp>
Signed-off-by: nokosaaan <nishimura.r.019@ms.saitama-u.ac.jp>
Signed-off-by: nokosaaan <nishimura.r.019@ms.saitama-u.ac.jp>
Signed-off-by: nokosaaan <nishimura.r.019@ms.saitama-u.ac.jp>
Signed-off-by: nokosaaan <nishimura.r.019@ms.saitama-u.ac.jp>
Signed-off-by: nokosaaan <nishimura.r.019@ms.saitama-u.ac.jp>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated 14 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| if recorder.timestamps[index][pub_id][node_id_usize] == 0 { | ||
| recorder.timestamps[index][pub_id][node_id_usize] = new_timestamp; | ||
| recorder.mark_used(index, pub_id, node_id_usize); | ||
| } |
There was a problem hiding this comment.
Because index is normalized with % MAX_LOGS, this “only record if current value is 0” logic will stop recording once a slot has been written the first time. After the period counter wraps, new publish timestamps for the same (index, pub_id, node_id) won’t be captured. Consider overwriting unconditionally or clearing the slot when a new cycle reuses the index.
There was a problem hiding this comment.
@copilot
Since changing the MAX_LOGS value is within the range where we can manually prevent a panic from occurring, it is not practical when considering the cost of making that change. I will fix this if it is pointed out in other reviews.
There was a problem hiding this comment.
Understood. We’ll keep the current MAX_LOGS/wrap behavior as-is in this PR and defer any structural logging changes unless a future review explicitly requires them. No UI changes in this backend-only scope.
Agent-Logs-Url: https://github.com/tier4/awkernel/sessions/5c1de7d3-233c-477e-b87f-e0362c9c9090 Co-authored-by: nokosaaan <106376734+nokosaaan@users.noreply.github.com>
|
Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Agent-Logs-Url: https://github.com/tier4/awkernel/sessions/0f0de978-4786-4b46-83e0-f647f3f1aa35 Co-authored-by: nokosaaan <106376734+nokosaaan@users.noreply.github.com>
|
Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
Signed-off-by: nokosaaan <nishimura.r.019@ms.saitama-u.ac.jp>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: nokosaaan <nishimura.r.019@ms.saitama-u.ac.jp>
| #[cfg(feature = "need-get-period")] | ||
| if last_print.elapsed().as_secs() >= 30 { | ||
| awkernel_async_lib::task::perf::print_timestamp_table(); | ||
| // awkernel_async_lib::task::perf::print_pubsub_table(); |
There was a problem hiding this comment.
Please delete this if it is unnecessary. If necessary, please leave a comment.
| spinlock = ["awkernel_lib/spinlock"] | ||
| clippy = [] | ||
| perf = [] | ||
| need-get-period = ["perf"] |
There was a problem hiding this comment.
While the name need-get-period suggests that we need to retrieve the duration, what is actually being sent and received is not the duration but the index.
Some more accurate name candidates might include:
- period-index-propagation
- cycle-tracing
- dag-latency-measure
I believe these would better reflect the actual functionality.
| "awkernel_drivers/uart_16550", | ||
| ] | ||
| rv32 = [ | ||
| "perf", |
There was a problem hiding this comment.
Is this a change intended to enable perf measurements on RISC-V targets, or is it unrelated to need-get-period and was simply added as a side note?
| /// ``` | ||
| /// | ||
| pub fn interval(period: Duration) -> Interval { | ||
| pub fn interval(period: Duration, dag_id: u32) -> Interval { |
There was a problem hiding this comment.
The argument name for interval() is not consistent with dag_id (without the underscore).
| fn normalize_log_index(index: usize) -> usize { | ||
| index % MAX_LOGS | ||
| } |
There was a problem hiding this comment.
fn to_ring_buffer_index(period_index: usize) -> usize {
period_index % MAX_LOGS
}
| } | ||
|
|
||
| pub fn update_pre_send_outer_timestamp_at(index: usize, new_timestamp: u64, dag_id: u32) { | ||
| let index = normalize_log_index(index); |
There was a problem hiding this comment.
let log_index = to_ring_buffer_index(period_index);
| write_volatile(&mut TASK_WCET[cpu_id], wcet.max(diff)); | ||
| }, | ||
| PerfState::Interrupt => unsafe { | ||
| // log::info!("PreemptionTime CPU:{} Diff:{}", cpu_id, diff); |
| write_volatile(&mut INTERRUPT_WCET[cpu_id], wcet.max(diff)); | ||
| }, | ||
| PerfState::ContextSwitch => unsafe { | ||
| // log::info!("ContextSwitchTime CPU:{} Diff:{}", cpu_id, diff); |
| write_volatile(&mut CONTEXT_SWITCH_WCET[cpu_id], wcet.max(diff)); | ||
| }, | ||
| PerfState::ContextSwitchMain => unsafe { | ||
| // log::info!("ContextSwitchMainTime CPU:{} Diff:{}", cpu_id, diff); |
Description
Since period information is required during evaluation, I have provided a feature to enable evaluation outside of the application.
need-get-periodis normally turned off, which is consistent with the behavior of the traditionalawkernel. To enable it, simply addneed-get-periodto thedefaultin the[features]section ofkernel/Cargo.toml.I have updated
pubsub.rsto allow cycle propagation without altering existing trait boundaries, APIs, or the test application. Please refer to the file attached to the PR test section for the execution results.Related links
sample code
How was this PR tested?
no_feature_compile.log
no_feature_execute.log
feature_compile.log
feature_execute.log
Notes for reviewers