diff --git a/fuzzers/FRET/src/systemstate/stg.rs b/fuzzers/FRET/src/systemstate/stg.rs index 898b3d3684..92692a8052 100644 --- a/fuzzers/FRET/src/systemstate/stg.rs +++ b/fuzzers/FRET/src/systemstate/stg.rs @@ -390,6 +390,8 @@ where #[cfg(feature = "feed_stg")] const INTEREST_EDGE : bool = true; #[cfg(feature = "feed_stg")] +const INTEREST_EDGE_WEIGHT : bool = true; +#[cfg(feature = "feed_stg")] const INTEREST_NODE : bool = true; #[cfg(feature = "feed_stg_pathhash")] const INTEREST_PATH : bool = true; @@ -401,6 +403,8 @@ const INTEREST_AGGREGATE : bool = true; #[cfg(not(feature = "feed_stg"))] const INTEREST_EDGE : bool = false; #[cfg(not(feature = "feed_stg"))] +const INTEREST_EDGE_WEIGHT : bool = true; +#[cfg(not(feature = "feed_stg"))] const INTEREST_NODE : bool = false; #[cfg(not(feature = "feed_stg_pathhash"))] const INTEREST_PATH : bool = false; @@ -435,6 +439,8 @@ fn get_generic_hash(input: &H) -> u64 s.finish() } +/// Takes: trace of intervals +/// Returns: hashmap of abb instance id to (execution time, memory accesses) fn execinterval_to_abb_instances(trace: &Vec, read_trace: &Vec>) -> HashMap)>{ let mut instance_time: HashMap)> = HashMap::new(); for (_i,interval) in trace.iter().enumerate() { // Iterate intervals @@ -511,7 +517,10 @@ where let ref_ = &mut fbs.graph.edge_weight_mut(e_.id()).unwrap().worst; if ref_.is_some() { let w = ref_.as_mut().unwrap(); - if w.0 < *time {*w = (*time, accesses.clone())}; + if w.0 < *time { + *w = (*time, accesses.clone()); + interesting |= INTEREST_EDGE_WEIGHT; + }; } else { *ref_ = Some((*time, accesses.clone())); } @@ -533,10 +542,8 @@ where // every path terminates at the end if !fbs.graph.neighbors_directed(return_node_trace[return_node_trace.len()-1].0, Direction::Outgoing).any(|x| x == fbs.exitpoint) { let mut e__ = STGEdge { event: CaptureEvent::End, name: String::from("End"), worst: None }; - if e__.is_abb_end() { - if let Some((time, accesses)) = instance_time.get_mut(&trace[trace.len()-1].abb.as_ref().unwrap().instance_id) { - e__.worst = Some((*time, accesses.clone())); - } + if let Some((time, accesses)) = instance_time.get_mut(&trace[trace.len()-1].abb.as_ref().unwrap().instance_id) { + e__.worst = Some((*time, accesses.clone())); } let e_ = fbs.graph.add_edge(return_node_trace[return_node_trace.len()-1].0, fbs.exitpoint, e__); return_edge_trace.push((e_, trace[trace.len()-1].start_tick));