better handling for indices

This commit is contained in:
Alwin Berger 2025-02-25 13:53:53 +01:00
parent cb20424cec
commit 56c046ecf6
2 changed files with 2 additions and 2 deletions

View File

@ -718,7 +718,7 @@ where
let counts = count_occurrences_sorted(&_tmp);
let mut top_indices = Vec::new();
if last_runtime >= feedbackstate.wort {
top_indices.push(0xFFFF_FFFF_FFFF_FFFF); // pseudo trace to keep worts
top_indices.push(u64::MAX); // pseudo trace to keep worts
}
for (k,c) in counts {
if let Some(reference) = feedbackstate.worst_abb_exec_count.get_mut(k) {

View File

@ -495,7 +495,7 @@ impl SystemTraceData for FreeRTOSTraceMetadata
type State = FreeRTOSSystemState;
fn states(&self) -> Vec<&Self::State> {
self.indices.iter().map(|x| self.trace_map.get(&(*x as u64)).unwrap()).collect()
self.indices.iter().filter_map(|x| self.trace_map.get(&(*x as u64))).collect()
}
fn intervals(&self) -> &Vec<ExecInterval> {