coverage: Use a tracing span to group the parts of a sum-up expression
This commit is contained in:
parent
2f1be08473
commit
10c4734c79
1 changed files with 4 additions and 1 deletions
|
@ -374,8 +374,9 @@ impl<'a> MakeBcbCounters<'a> {
|
||||||
// counters and/or expressions of its incoming edges. This will recursively get or create
|
// counters and/or expressions of its incoming edges. This will recursively get or create
|
||||||
// counters for those incoming edges first, then call `make_expression()` to sum them up,
|
// counters for those incoming edges first, then call `make_expression()` to sum them up,
|
||||||
// with additional intermediate expressions as needed.
|
// with additional intermediate expressions as needed.
|
||||||
|
let _sumup_debug_span = debug_span!("(preparing sum-up expression)").entered();
|
||||||
|
|
||||||
let mut predecessors = self.bcb_predecessors(bcb).to_owned().into_iter();
|
let mut predecessors = self.bcb_predecessors(bcb).to_owned().into_iter();
|
||||||
debug!("{bcb:?} has multiple incoming edges and will need a sum-up expression");
|
|
||||||
let first_edge_counter_operand =
|
let first_edge_counter_operand =
|
||||||
self.get_or_make_edge_counter_operand(predecessors.next().unwrap(), bcb)?;
|
self.get_or_make_edge_counter_operand(predecessors.next().unwrap(), bcb)?;
|
||||||
let mut some_sumup_edge_counter_operand = None;
|
let mut some_sumup_edge_counter_operand = None;
|
||||||
|
@ -399,6 +400,8 @@ impl<'a> MakeBcbCounters<'a> {
|
||||||
Op::Add,
|
Op::Add,
|
||||||
some_sumup_edge_counter_operand.unwrap(),
|
some_sumup_edge_counter_operand.unwrap(),
|
||||||
);
|
);
|
||||||
|
drop(_sumup_debug_span);
|
||||||
|
|
||||||
debug!("{bcb:?} gets a new counter (sum of predecessor counters): {counter_kind:?}");
|
debug!("{bcb:?} gets a new counter (sum of predecessor counters): {counter_kind:?}");
|
||||||
self.coverage_counters.set_bcb_counter(bcb, counter_kind)
|
self.coverage_counters.set_bcb_counter(bcb, counter_kind)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue