Rust coverage before splitting instrument_coverage.rs

This commit is contained in:
Rich Kadel 2020-10-05 16:36:10 -07:00
parent 9d78d1d027
commit c7747cc772
214 changed files with 9845 additions and 1267 deletions

View File

@ -129,7 +129,7 @@ impl CoverageMapGenerator {
let (filenames_index, _) = self.filenames.insert_full(c_filename);
virtual_file_mapping.push(filenames_index as u32);
}
debug!("Adding counter {:?} to map for {:?}", counter, region,);
debug!("Adding counter {:?} to map for {:?}", counter, region);
mapping_regions.push(CounterMappingRegion::code_region(
counter,
current_file_id,

View File

@ -12,7 +12,7 @@ use rustc_codegen_ssa::traits::{
use rustc_data_structures::fx::FxHashMap;
use rustc_llvm::RustString;
use rustc_middle::mir::coverage::{
CodeRegion, CounterValueReference, ExpressionOperandId, InjectedExpressionIndex, Op,
CodeRegion, CounterValueReference, ExpressionOperandId, InjectedExpressionId, Op,
};
use rustc_middle::ty::Instance;
@ -27,8 +27,8 @@ const COVMAP_VAR_ALIGN_BYTES: usize = 8;
/// A context object for maintaining all state needed by the coverageinfo module.
pub struct CrateCoverageContext<'tcx> {
// Coverage region data for each instrumented function identified by DefId.
pub(crate) function_coverage_map: RefCell<FxHashMap<Instance<'tcx>, FunctionCoverage>>,
// Coverage data for each instrumented function identified by DefId.
pub(crate) function_coverage_map: RefCell<FxHashMap<Instance<'tcx>, FunctionCoverage<'tcx>>>,
}
impl<'tcx> CrateCoverageContext<'tcx> {
@ -36,7 +36,7 @@ impl<'tcx> CrateCoverageContext<'tcx> {
Self { function_coverage_map: Default::default() }
}
pub fn take_function_coverage_map(&self) -> FxHashMap<Instance<'tcx>, FunctionCoverage> {
pub fn take_function_coverage_map(&self) -> FxHashMap<Instance<'tcx>, FunctionCoverage<'tcx>> {
self.function_coverage_map.replace(FxHashMap::default())
}
}
@ -58,7 +58,23 @@ impl CoverageInfoBuilderMethods<'tcx> for Builder<'a, 'll, 'tcx> {
unsafe { llvm::LLVMRustCoverageCreatePGOFuncNameVar(llfn, mangled_fn_name.as_ptr()) }
}
fn add_counter_region(
fn set_function_source_hash(&mut self, instance: Instance<'tcx>, function_source_hash: u64) -> bool {
if let Some(coverage_context) = self.coverage_context() {
debug!(
"ensuring function source hash is set for instance={:?}; function_source_hash={}",
instance, function_source_hash,
);
let mut coverage_map = coverage_context.function_coverage_map.borrow_mut();
coverage_map
.entry(instance)
.or_insert_with(|| FunctionCoverage::new(self.tcx, instance))
.set_function_source_hash(function_source_hash);
} else {
false
}
}
fn add_coverage_counter(
&mut self,
instance: Instance<'tcx>,
function_source_hash: u64,
@ -67,59 +83,53 @@ impl CoverageInfoBuilderMethods<'tcx> for Builder<'a, 'll, 'tcx> {
) -> bool {
if let Some(coverage_context) = self.coverage_context() {
debug!(
"adding counter to coverage_regions: instance={:?}, function_source_hash={}, id={:?}, \
"adding counter to coverage_map: instance={:?}, function_source_hash={}, id={:?}, \
at {:?}",
instance, function_source_hash, id, region,
);
let mut coverage_regions = coverage_context.function_coverage_map.borrow_mut();
coverage_regions
let mut coverage_map = coverage_context.function_coverage_map.borrow_mut();
coverage_map
.entry(instance)
.or_insert_with(|| FunctionCoverage::new(self.tcx, instance))
.add_counter(function_source_hash, id, region);
true
} else {
false
}
}
fn add_counter_expression_region(
fn add_coverage_counter_expression(
&mut self,
instance: Instance<'tcx>,
id: InjectedExpressionIndex,
id: InjectedExpressionId,
lhs: ExpressionOperandId,
op: Op,
rhs: ExpressionOperandId,
region: CodeRegion,
) -> bool {
if let Some(coverage_context) = self.coverage_context() {
region: Option<CodeRegion>,
) {
if let Some(coverage_context) = self.coverage_context() -> bool {
debug!(
"adding counter expression to coverage_regions: instance={:?}, id={:?}, {:?} {:?} {:?}, \
at {:?}",
"adding counter expression to coverage_map: instance={:?}, id={:?}, {:?} {:?} {:?}; \
region: {:?}",
instance, id, lhs, op, rhs, region,
);
let mut coverage_regions = coverage_context.function_coverage_map.borrow_mut();
coverage_regions
let mut coverage_map = coverage_context.function_coverage_map.borrow_mut();
coverage_map
.entry(instance)
.or_insert_with(|| FunctionCoverage::new(self.tcx, instance))
.add_counter_expression(id, lhs, op, rhs, region);
true
} else {
false
}
}
fn add_unreachable_region(&mut self, instance: Instance<'tcx>, region: CodeRegion) -> bool {
fn add_coverage_unreachable(&mut self, instance: Instance<'tcx>, region: CodeRegion) -> bool {
if let Some(coverage_context) = self.coverage_context() {
debug!(
"adding unreachable code to coverage_regions: instance={:?}, at {:?}",
instance, region,
);
let mut coverage_regions = coverage_context.function_coverage_map.borrow_mut();
coverage_regions
debug!("adding unreachable code to coverage_map: instance={:?}, at {:?}", instance, region,);
let mut coverage_map = coverage_context.function_coverage_map.borrow_mut();
coverage_map
.entry(instance)
.or_insert_with(|| FunctionCoverage::new(self.tcx, instance))
.add_unreachable_region(region);
true
} else {
false
}

View File

@ -3,7 +3,7 @@ use rustc_middle::mir::coverage::{CounterValueReference, MappedExpressionIndex};
/// Aligns with [llvm::coverage::Counter::CounterKind](https://github.com/rust-lang/llvm-project/blob/rustc/10.0-2020-05-05/llvm/include/llvm/ProfileData/Coverage/CoverageMapping.h#L91)
#[derive(Copy, Clone, Debug)]
#[repr(C)]
enum CounterKind {
pub enum CounterKind {
Zero = 0,
CounterValueReference = 1,
Expression = 2,
@ -23,8 +23,8 @@ enum CounterKind {
#[repr(C)]
pub struct Counter {
// Important: The layout (order and types of fields) must match its C++ counterpart.
kind: CounterKind,
id: u32,
pub kind: CounterKind,
pub id: u32,
}
impl Counter {
@ -55,9 +55,9 @@ pub enum ExprKind {
#[derive(Copy, Clone, Debug)]
#[repr(C)]
pub struct CounterExpression {
kind: ExprKind,
lhs: Counter,
rhs: Counter,
pub kind: ExprKind,
pub lhs: Counter,
pub rhs: Counter,
}
impl CounterExpression {

View File

@ -2,18 +2,18 @@ pub use super::ffi::*;
use rustc_index::vec::IndexVec;
use rustc_middle::mir::coverage::{
CodeRegion, CounterValueReference, ExpressionOperandId, InjectedExpressionIndex,
MappedExpressionIndex, Op,
CodeRegion, CounterValueReference, ExpressionOperandId, InjectedExpressionId,
InjectedExpressionIndex, MappedExpressionIndex, Op,
};
use rustc_middle::ty::Instance;
use rustc_middle::ty::TyCtxt;
#[derive(Clone, Debug)]
pub struct ExpressionRegion {
pub struct Expression {
lhs: ExpressionOperandId,
op: Op,
rhs: ExpressionOperandId,
region: CodeRegion,
region: Option<CodeRegion>,
}
/// Collects all of the coverage regions associated with (a) injected counters, (b) counter
@ -28,17 +28,23 @@ pub struct ExpressionRegion {
/// only whitespace or comments). According to LLVM Code Coverage Mapping documentation, "A count
/// for a gap area is only used as the line execution count if there are no other regions on a
/// line."
pub struct FunctionCoverage {
pub struct FunctionCoverage<'tcx> {
instance: Instance<'tcx>,
source_hash: u64,
counters: IndexVec<CounterValueReference, Option<CodeRegion>>,
expressions: IndexVec<InjectedExpressionIndex, Option<ExpressionRegion>>,
expressions: IndexVec<InjectedExpressionIndex, Option<Expression>>,
unreachable_regions: Vec<CodeRegion>,
}
impl FunctionCoverage {
pub fn new<'tcx>(tcx: TyCtxt<'tcx>, instance: Instance<'tcx>) -> Self {
impl<'tcx> FunctionCoverage<'tcx> {
pub fn new(tcx: TyCtxt<'tcx>, instance: Instance<'tcx>) -> Self {
let coverageinfo = tcx.coverageinfo(instance.def_id());
debug!(
"FunctionCoverage::new(instance={:?}) has coverageinfo={:?}",
instance, coverageinfo
);
Self {
instance,
source_hash: 0, // will be set with the first `add_counter()`
counters: IndexVec::from_elem_n(None, coverageinfo.num_counters as usize),
expressions: IndexVec::from_elem_n(None, coverageinfo.num_expressions as usize),
@ -46,6 +52,19 @@ impl FunctionCoverage {
}
}
/// Although every function should have at least one `Counter`, the `Counter` isn't required to
/// have a `CodeRegion`. (The `CodeRegion` may be associated only with `Expressions`.) This
/// method supports the ability to ensure the `function_source_hash` is set from `Counters` that
/// do not trigger the call to `add_counter()` because they don't have an associated
/// `CodeRegion` to add.
pub fn set_function_source_hash(&mut self, source_hash: u64) {
if self.source_hash == 0 {
self.source_hash = source_hash;
} else {
debug_assert_eq!(source_hash, self.source_hash);
}
}
/// Adds a code region to be counted by an injected counter intrinsic.
/// The source_hash (computed during coverage instrumentation) should also be provided, and
/// should be the same for all counters in a given function.
@ -74,15 +93,19 @@ impl FunctionCoverage {
/// counters and expressions have been added.
pub fn add_counter_expression(
&mut self,
expression_id: InjectedExpressionIndex,
expression_id: InjectedExpressionId,
lhs: ExpressionOperandId,
op: Op,
rhs: ExpressionOperandId,
region: CodeRegion,
region: Option<CodeRegion>,
) {
debug!(
"add_counter_expression({:?}, lhs={:?}, op={:?}, rhs={:?} at {:?}",
expression_id, lhs, op, rhs, region
);
let expression_index = self.expression_index(u32::from(expression_id));
self.expressions[expression_index]
.replace(ExpressionRegion { lhs, op, rhs, region })
.replace(Expression { lhs, op, rhs, region })
.expect_none("add_counter_expression called with duplicate `id_descending_from_max`");
}
@ -103,7 +126,11 @@ impl FunctionCoverage {
pub fn get_expressions_and_counter_regions<'a>(
&'a self,
) -> (Vec<CounterExpression>, impl Iterator<Item = (Counter, &'a CodeRegion)>) {
assert!(self.source_hash != 0);
assert!(
self.source_hash != 0,
"No counters provided the source_hash for function: {:?}",
self.instance
);
let counter_regions = self.counter_regions();
let (counter_expressions, expression_regions) = self.expressions_with_regions();
@ -129,54 +156,60 @@ impl FunctionCoverage {
) -> (Vec<CounterExpression>, impl Iterator<Item = (Counter, &'a CodeRegion)>) {
let mut counter_expressions = Vec::with_capacity(self.expressions.len());
let mut expression_regions = Vec::with_capacity(self.expressions.len());
let mut new_indexes =
IndexVec::from_elem_n(MappedExpressionIndex::from(u32::MAX), self.expressions.len());
// Note, the initial value shouldn't matter since every index in use in `self.expressions`
// will be set, and after that, `new_indexes` will only be accessed using those same
// indexes.
// Note that an `ExpressionRegion`s at any given index can include other expressions as
let mut new_indexes = IndexVec::from_elem_n(None, self.expressions.len());
// Note that an `Expression`s at any given index can include other expressions as
// operands, but expression operands can only come from the subset of expressions having
// `expression_index`s lower than the referencing `ExpressionRegion`. Therefore, it is
// `expression_index`s lower than the referencing `Expression`. Therefore, it is
// reasonable to look up the new index of an expression operand while the `new_indexes`
// vector is only complete up to the current `ExpressionIndex`.
let id_to_counter =
|new_indexes: &IndexVec<InjectedExpressionIndex, MappedExpressionIndex>,
|new_indexes: &IndexVec<InjectedExpressionIndex, Option<MappedExpressionIndex>>,
id: ExpressionOperandId| {
if id == ExpressionOperandId::ZERO {
Some(Counter::zero())
} else if id.index() < self.counters.len() {
// Note: Some codegen-injected Counters may be only referenced by `Expression`s,
// and may not have their own `CodeRegion`s,
let index = CounterValueReference::from(id.index());
self.counters
.get(index)
.unwrap() // pre-validated
.as_ref()
.map(|_| Counter::counter_value_reference(index))
Some(Counter::counter_value_reference(index))
} else {
let index = self.expression_index(u32::from(id));
self.expressions
.get(index)
.expect("expression id is out of range")
.as_ref()
.map(|_| Counter::expression(new_indexes[index]))
// If an expression was optimized out, assume it would have produced a count
// of zero. This ensures that expressions dependent on optimized-out
// expressions are still valid.
.map_or(Some(Counter::zero()), |_| {
new_indexes[index].map(|new_index| Counter::expression(new_index))
})
}
};
for (original_index, expression_region) in
for (original_index, expression) in
self.expressions.iter_enumerated().filter_map(|(original_index, entry)| {
// Option::map() will return None to filter out missing expressions. This may happen
// if, for example, a MIR-instrumented expression is removed during an optimization.
entry.as_ref().map(|region| (original_index, region))
entry.as_ref().map(|expression| (original_index, expression))
})
{
let region = &expression_region.region;
let ExpressionRegion { lhs, op, rhs, .. } = *expression_region;
let optional_region = &expression.region;
let Expression { lhs, op, rhs, .. } = *expression;
if let Some(Some((lhs_counter, rhs_counter))) =
id_to_counter(&new_indexes, lhs).map(|lhs_counter| {
id_to_counter(&new_indexes, rhs).map(|rhs_counter| (lhs_counter, rhs_counter))
})
{
debug_assert!(
(lhs_counter.id as usize)
< usize::max(self.counters.len(), self.expressions.len())
);
debug_assert!(
(rhs_counter.id as usize)
< usize::max(self.counters.len(), self.expressions.len())
);
// Both operands exist. `Expression` operands exist in `self.expressions` and have
// been assigned a `new_index`.
let mapped_expression_index =
@ -190,12 +223,20 @@ impl FunctionCoverage {
rhs_counter,
);
debug!(
"Adding expression {:?} = {:?} at {:?}",
mapped_expression_index, expression, region
"Adding expression {:?} = {:?}, region: {:?}",
mapped_expression_index, expression, optional_region
);
counter_expressions.push(expression);
new_indexes[original_index] = mapped_expression_index;
expression_regions.push((Counter::expression(mapped_expression_index), region));
new_indexes[original_index] = Some(mapped_expression_index);
if let Some(region) = optional_region {
expression_regions.push((Counter::expression(mapped_expression_index), region));
}
} else {
debug!(
"Ignoring expression with one or more missing operands: \
original_index={:?}, lhs={:?}, op={:?}, rhs={:?}, region={:?}",
original_index, lhs, op, rhs, optional_region,
)
}
}
(counter_expressions, expression_regions.into_iter())

View File

@ -10,7 +10,15 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
let Coverage { kind, code_region } = coverage;
match kind {
CoverageKind::Counter { function_source_hash, id } => {
if bx.add_counter_region(self.instance, function_source_hash, id, code_region) {
let covmap_updated = if let Some(code_region) = code_region {
// Note: Some counters do not have code regions, but may still be referenced from
// expressions.
bx.add_coverage_counter(self.instance, function_source_hash, id, code_region)
} else {
bx.set_function_source_hash(self.instance, function_source_hash)
};
if covmap_updated {
let coverageinfo = bx.tcx().coverageinfo(self.instance.def_id());
let fn_name = bx.create_pgo_func_name_var(self.instance);
@ -21,14 +29,17 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
"codegen intrinsic instrprof.increment(fn_name={:?}, hash={:?}, num_counters={:?}, index={:?})",
fn_name, hash, num_counters, id,
);
bx.instrprof_increment(fn_name, hash, num_counters, id);
bx.instrprof_increment(fn_name, hash, num_counters, index);
}
}
CoverageKind::Expression { id, lhs, op, rhs } => {
bx.add_counter_expression_region(self.instance, id, lhs, op, rhs, code_region);
bx.add_coverage_counter_expression(self.instance, id, lhs, op, rhs, code_region);
}
CoverageKind::Unreachable => {
bx.add_unreachable_region(self.instance, code_region);
bx.add_coverage_unreachable(
self.instance,
code_region.expect("unreachable regions always have code regions"),
);
}
}
}

View File

@ -9,9 +9,13 @@ pub trait CoverageInfoMethods: BackendTypes {
pub trait CoverageInfoBuilderMethods<'tcx>: BackendTypes {
fn create_pgo_func_name_var(&self, instance: Instance<'tcx>) -> Self::Value;
/// Returns true if the function source hash was added to the coverage map; false if
/// `-Z instrument-coverage` is not enabled (a coverage map is not being generated).
fn set_function_source_hash(&mut self, instance: Instance<'tcx>, function_source_hash: u64) -> bool;
/// Returns true if the counter was added to the coverage map; false if `-Z instrument-coverage`
/// is not enabled (a coverage map is not being generated).
fn add_counter_region(
fn add_coverage_counter(
&mut self,
instance: Instance<'tcx>,
function_source_hash: u64,
@ -21,17 +25,17 @@ pub trait CoverageInfoBuilderMethods<'tcx>: BackendTypes {
/// Returns true if the expression was added to the coverage map; false if
/// `-Z instrument-coverage` is not enabled (a coverage map is not being generated).
fn add_counter_expression_region(
fn add_coverage_counter_expression(
&mut self,
instance: Instance<'tcx>,
id: InjectedExpressionIndex,
id: InjectedExpressionId,
lhs: ExpressionOperandId,
op: Op,
rhs: ExpressionOperandId,
region: CodeRegion,
) -> bool;
region: Option<CodeRegion>,
);
/// Returns true if the region was added to the coverage map; false if `-Z instrument-coverage`
/// is not enabled (a coverage map is not being generated).
fn add_unreachable_region(&mut self, instance: Instance<'tcx>, region: CodeRegion) -> bool;
fn add_coverage_unreachable(&mut self, instance: Instance<'tcx>, region: CodeRegion) -> bool;
}

View File

@ -643,6 +643,7 @@ where
}
if options.contains(&RenderOption::DarkTheme) {
graph_attrs.push(r#"bgcolor="black""#);
graph_attrs.push(r#"fontcolor="white""#);
content_attrs.push(r#"color="white""#);
content_attrs.push(r#"fontcolor="white""#);
}

View File

@ -7,6 +7,10 @@ use std::cmp::Ord;
use std::fmt::{self, Debug, Formatter};
rustc_index::newtype_index! {
/// An ExpressionOperandId value is assigned directly from either a
/// CounterValueReference.as_u32() (which ascend from 1) or an ExpressionOperandId.as_u32()
/// (which _*descend*_ from u32::MAX). Id value `0` (zero) represents a virtual counter with a
/// constant value of `0`.
pub struct ExpressionOperandId {
derive [HashStable]
DEBUG_FORMAT = "ExpressionOperandId({})",
@ -42,6 +46,20 @@ impl CounterValueReference {
}
rustc_index::newtype_index! {
/// InjectedExpressionId.as_u32() converts to ExpressionOperandId.as_u32()
///
/// Values descend from u32::MAX.
pub struct InjectedExpressionId {
derive [HashStable]
DEBUG_FORMAT = "InjectedExpressionId({})",
MAX = 0xFFFF_FFFF,
}
}
rustc_index::newtype_index! {
/// InjectedExpressionIndex.as_u32() translates to u32::MAX - ExpressionOperandId.as_u32()
///
/// Values ascend from 0.
pub struct InjectedExpressionIndex {
derive [HashStable]
DEBUG_FORMAT = "InjectedExpressionIndex({})",
@ -50,6 +68,9 @@ rustc_index::newtype_index! {
}
rustc_index::newtype_index! {
/// MappedExpressionIndex values ascend from zero, and are recalculated indexes based on their
/// array position in the LLVM coverage map "Expressions" array, which is assembled during the
/// "mapgen" process. They cannot be computed algorithmically, from the other `newtype_index`s.
pub struct MappedExpressionIndex {
derive [HashStable]
DEBUG_FORMAT = "MappedExpressionIndex({})",
@ -64,21 +85,35 @@ impl From<CounterValueReference> for ExpressionOperandId {
}
}
impl From<InjectedExpressionIndex> for ExpressionOperandId {
impl From<&mut CounterValueReference> for ExpressionOperandId {
#[inline]
fn from(v: InjectedExpressionIndex) -> ExpressionOperandId {
fn from(v: &mut CounterValueReference) -> ExpressionOperandId {
ExpressionOperandId::from(v.as_u32())
}
}
#[derive(Clone, Debug, PartialEq, TyEncodable, TyDecodable, HashStable, TypeFoldable)]
impl From<InjectedExpressionId> for ExpressionOperandId {
#[inline]
fn from(v: InjectedExpressionId) -> ExpressionOperandId {
ExpressionOperandId::from(v.as_u32())
}
}
impl From<&mut InjectedExpressionId> for ExpressionOperandId {
#[inline]
fn from(v: &mut InjectedExpressionId) -> ExpressionOperandId {
ExpressionOperandId::from(v.as_u32())
}
}
#[derive(Clone, PartialEq, TyEncodable, TyDecodable, HashStable, TypeFoldable)]
pub enum CoverageKind {
Counter {
function_source_hash: u64,
id: CounterValueReference,
},
Expression {
id: InjectedExpressionIndex,
id: InjectedExpressionId,
lhs: ExpressionOperandId,
op: Op,
rhs: ExpressionOperandId,
@ -88,12 +123,47 @@ pub enum CoverageKind {
impl CoverageKind {
pub fn as_operand_id(&self) -> ExpressionOperandId {
use CoverageKind::*;
match *self {
CoverageKind::Counter { id, .. } => ExpressionOperandId::from(id),
CoverageKind::Expression { id, .. } => ExpressionOperandId::from(id),
CoverageKind::Unreachable => {
bug!("Unreachable coverage cannot be part of an expression")
}
Counter { id, .. } => ExpressionOperandId::from(id),
Expression { id, .. } => ExpressionOperandId::from(id),
Unreachable => bug!("Unreachable coverage cannot be part of an expression"),
}
}
pub fn is_counter(&self) -> bool {
match self {
Self::Counter { .. } => true,
_ => false,
}
}
pub fn is_expression(&self) -> bool {
match self {
Self::Expression { .. } => true,
_ => false,
}
}
pub fn is_unreachable(&self) -> bool {
*self == Self::Unreachable
}
}
impl Debug for CoverageKind {
fn fmt(&self, fmt: &mut Formatter<'_>) -> fmt::Result {
use CoverageKind::*;
match self {
Counter { id, .. } => write!(fmt, "Counter({:?})", id.index()),
Expression { id, lhs, op, rhs } => write!(
fmt,
"Expression({:?}) = {} {} {}",
id.index(),
lhs.index(),
if *op == Op::Add { "+" } else { "-" },
rhs.index(),
),
Unreachable => write!(fmt, "Unreachable"),
}
}
}

View File

@ -1585,21 +1585,10 @@ impl Debug for Statement<'_> {
write!(fmt, "AscribeUserType({:?}, {:?}, {:?})", place, variance, c_ty)
}
Coverage(box ref coverage) => {
let rgn = &coverage.code_region;
match coverage.kind {
CoverageKind::Counter { id, .. } => {
write!(fmt, "Coverage::Counter({:?}) for {:?}", id.index(), rgn)
}
CoverageKind::Expression { id, lhs, op, rhs } => write!(
fmt,
"Coverage::Expression({:?}) = {} {} {} for {:?}",
id.index(),
lhs.index(),
if op == coverage::Op::Add { "+" } else { "-" },
rhs.index(),
rgn
),
CoverageKind::Unreachable => write!(fmt, "Coverage::Unreachable for {:?}", rgn),
if let Some(rgn) = &coverage.code_region {
write!(fmt, "Coverage::{:?} for {:?}", coverage.kind, rgn)
} else {
write!(fmt, "Coverage::{:?}", coverage.kind)
}
}
Nop => write!(fmt, "nop"),
@ -1610,7 +1599,7 @@ impl Debug for Statement<'_> {
#[derive(Clone, Debug, PartialEq, TyEncodable, TyDecodable, HashStable, TypeFoldable)]
pub struct Coverage {
pub kind: CoverageKind,
pub code_region: CodeRegion,
pub code_region: Option<CodeRegion>,
}
///////////////////////////////////////////////////////////////////////////

View File

@ -300,6 +300,7 @@ CloneTypeFoldableAndLiftImpls! {
::rustc_target::spec::abi::Abi,
crate::mir::coverage::ExpressionOperandId,
crate::mir::coverage::CounterValueReference,
crate::mir::coverage::InjectedExpressionId,
crate::mir::coverage::InjectedExpressionIndex,
crate::mir::coverage::MappedExpressionIndex,
crate::mir::Local,

File diff suppressed because it is too large Load Diff

View File

@ -62,6 +62,7 @@ where
let dark_mode = tcx.sess.opts.debugging_opts.graphviz_dark_mode;
if dark_mode {
graph_attrs.push(r#"bgcolor="black""#);
graph_attrs.push(r#"fontcolor="white""#);
content_attrs.push(r#"color="white""#);
content_attrs.push(r#"fontcolor="white""#);
}
@ -112,7 +113,8 @@ where
// Basic block number at the top.
let (blk, bgcolor) = if data.is_cleanup {
(format!("{} (cleanup)", block.index()), "lightblue")
let color = if dark_mode { "royalblue" } else { "lightblue" };
(format!("{} (cleanup)", block.index()), color)
} else {
let color = if dark_mode { "dimgray" } else { "gray" };
(format!("{}", block.index()), color)

View File

@ -26,13 +26,15 @@
}
bb3: {
+ Coverage::Counter(2) for /the/src/instrument_coverage.rs:13:13 - 16:2; // scope 0 at /the/src/instrument_coverage.rs:12:9: 14:10
+ Coverage::Counter(2) for /the/src/instrument_coverage.rs:13:13 - 13:18; // scope 0 at /the/src/instrument_coverage.rs:12:9: 14:10
+ Coverage::Expression(4294967295) = 2 + 0 for /the/src/instrument_coverage.rs:16:1 - 16:2; // scope 0 at /the/src/instrument_coverage.rs:12:9: 14:10
falseEdge -> [real: bb5, imaginary: bb4]; // scope 0 at /the/src/instrument_coverage.rs:12:9: 14:10
}
bb4: {
_1 = const (); // scope 0 at /the/src/instrument_coverage.rs:12:9: 14:10
StorageDead(_2); // scope 0 at /the/src/instrument_coverage.rs:15:5: 15:6
+ Coverage::Counter(3) for /the/src/instrument_coverage.rs:15:6 - 15:7; // scope 0 at /the/src/instrument_coverage.rs:11:5: 15:6
goto -> bb0; // scope 0 at /the/src/instrument_coverage.rs:11:5: 15:6
}

View File

@ -1,10 +1,10 @@
// Test that the initial version of Rust coverage injects Coverage statements at the top of each
// function. The Coverage Counter statements are later converted into LLVM instrprof.increment
// intrinsics, during codegen.
// Test that `-Z instrument-coverage` injects Coverage statements. The Coverage Counter statements
// are later converted into LLVM instrprof.increment intrinsics, during codegen.
// needs-profiler-support
// ignore-windows
// compile-flags: -Zinstrument-coverage --remap-path-prefix={{src-base}}=/the/src
// compile-flags: -Z instrument-coverage --remap-path-prefix={{src-base}}=/the/src
// EMIT_MIR instrument_coverage.main.InstrumentCoverage.diff
// EMIT_MIR instrument_coverage.bar.InstrumentCoverage.diff
fn main() {

View File

@ -34,7 +34,7 @@ CHECK-SAME: section "llvm.metadata"
CHECK: [[DEFINE_INTERNAL]] { {{.*}} } @_R{{[a-zA-Z0-9_]+}}testprog14will_be_called() unnamed_addr #{{[0-9]+}} {
CHECK-NEXT: start:
CHECK-NOT: bb{{[0-9]+}}:
CHECK-NOT: [[DEFINE_INTERNAL]]
CHECK: %pgocount = load i64, i64* getelementptr inbounds
CHECK-SAME: * @__profc__R{{[a-zA-Z0-9_]+}}testprog14will_be_called,

View File

@ -21,6 +21,7 @@ clear_expected_if_blessed:
ifdef RUSTC_BLESS_TEST
rm -f expected_export_coverage.*.json
rm -f expected_show_coverage.*.txt
rm -f expected_show_coverage_counters.*.txt
endif
-include clear_expected_if_blessed
@ -54,14 +55,19 @@ endif
# when comparing the JSON `export`, the `show` output may be useful when
# debugging.
"$(LLVM_BIN_DIR)"/llvm-cov show \
--debug \
--Xdemangler="$(RUST_DEMANGLER)" \
--show-line-counts-or-regions \
--instr-profile="$(TMPDIR)"/$@.profdata \
$(call BIN,"$(TMPDIR)"/$@) \
> "$(TMPDIR)"/actual_show_coverage.$@.txt
> "$(TMPDIR)"/actual_show_coverage.$@.txt \
2> "$(TMPDIR)"/actual_show_coverage_counters.$@.txt
ifdef RUSTC_BLESS_TEST
cp "$(TMPDIR)"/actual_show_coverage.$@.txt expected_show_coverage.$@.txt
cp "$(TMPDIR)"/actual_show_coverage.$@.txt \
expected_show_coverage.$@.txt
cp "$(TMPDIR)"/actual_show_coverage_counters.$@.txt \
expected_show_coverage_counters.$@.txt
else
# Compare the show coverage output (`--bless` refreshes `typical` files)
# Note `llvm-cov show` output for some programs can vary, but can be ignored
@ -75,6 +81,14 @@ else
false \
)
$(DIFF) expected_show_coverage_counters.$@.txt "$(TMPDIR)"/actual_show_coverage_counters.$@.txt || \
( grep -q '^\/\/ ignore-llvm-cov-show-diffs' $(SOURCEDIR)/$@.rs && \
>&2 echo 'diff failed, but suppressed with `// ignore-llvm-cov-show-diffs` in $(SOURCEDIR)/$@.rs' \
) || \
( >&2 echo 'diff failed, and not suppressed without `// ignore-llvm-cov-show-diffs` in $(SOURCEDIR)/$@.rs'; \
false \
)
endif
# Generate a coverage report in JSON, using `llvm-cov export`, and fail if

View File

@ -17,14 +17,14 @@
},
"lines": {
"count": 91,
"covered": 75,
"percent": 82.41758241758241
"covered": 77,
"percent": 84.61538461538461
},
"regions": {
"count": 21,
"covered": 11,
"notcovered": 10,
"percent": 52.38095238095239
"count": 25,
"covered": 13,
"notcovered": 12,
"percent": 52
}
}
}
@ -42,14 +42,14 @@
},
"lines": {
"count": 91,
"covered": 75,
"percent": 82.41758241758241
"covered": 77,
"percent": 84.61538461538461
},
"regions": {
"count": 21,
"covered": 11,
"notcovered": 10,
"percent": 52.38095238095239
"count": 25,
"covered": 13,
"notcovered": 12,
"percent": 52
}
}
}

View File

@ -21,8 +21,8 @@
"percent": 100
},
"regions": {
"count": 5,
"covered": 5,
"count": 6,
"covered": 6,
"notcovered": 0,
"percent": 100
}
@ -46,8 +46,8 @@
"percent": 100
},
"regions": {
"count": 5,
"covered": 5,
"count": 6,
"covered": 6,
"notcovered": 0,
"percent": 100
}

View File

@ -21,8 +21,8 @@
"percent": 100
},
"regions": {
"count": 6,
"covered": 6,
"count": 7,
"covered": 7,
"notcovered": 0,
"percent": 100
}
@ -46,8 +46,8 @@
"percent": 100
},
"regions": {
"count": 6,
"covered": 6,
"count": 7,
"covered": 7,
"notcovered": 0,
"percent": 100
}

View File

@ -21,10 +21,10 @@
"percent": 100
},
"regions": {
"count": 4,
"count": 5,
"covered": 4,
"notcovered": 0,
"percent": 100
"notcovered": 1,
"percent": 80
}
}
}
@ -46,10 +46,10 @@
"percent": 100
},
"regions": {
"count": 4,
"count": 5,
"covered": 4,
"notcovered": 0,
"percent": 100
"notcovered": 1,
"percent": 80
}
}
}

View File

@ -16,15 +16,15 @@
"percent": 100
},
"lines": {
"count": 28,
"covered": 19,
"percent": 67.85714285714286
"count": 29,
"covered": 21,
"percent": 72.41379310344827
},
"regions": {
"count": 7,
"covered": 5,
"count": 9,
"covered": 7,
"notcovered": 2,
"percent": 71.42857142857143
"percent": 77.77777777777779
}
}
}
@ -41,15 +41,15 @@
"percent": 100
},
"lines": {
"count": 28,
"covered": 19,
"percent": 67.85714285714286
"count": 29,
"covered": 21,
"percent": 72.41379310344827
},
"regions": {
"count": 7,
"covered": 5,
"count": 9,
"covered": 7,
"notcovered": 2,
"percent": 71.42857142857143
"percent": 77.77777777777779
}
}
}

View File

@ -21,10 +21,10 @@
"percent": 100
},
"regions": {
"count": 13,
"count": 15,
"covered": 13,
"notcovered": 0,
"percent": 100
"notcovered": 2,
"percent": 86.66666666666667
}
}
}
@ -46,10 +46,10 @@
"percent": 100
},
"regions": {
"count": 13,
"count": 15,
"covered": 13,
"notcovered": 0,
"percent": 100
"notcovered": 2,
"percent": 86.66666666666667
}
}
}

View File

@ -16,15 +16,15 @@
"percent": 100
},
"lines": {
"count": 21,
"covered": 19,
"percent": 90.47619047619048
"count": 40,
"covered": 32,
"percent": 80
},
"regions": {
"count": 16,
"covered": 14,
"notcovered": 2,
"percent": 87.5
"count": 39,
"covered": 28,
"notcovered": 11,
"percent": 71.7948717948718
}
}
}
@ -41,15 +41,15 @@
"percent": 100
},
"lines": {
"count": 21,
"covered": 19,
"percent": 90.47619047619048
"count": 40,
"covered": 32,
"percent": 80
},
"regions": {
"count": 16,
"covered": 14,
"notcovered": 2,
"percent": 87.5
"count": 39,
"covered": 28,
"notcovered": 11,
"percent": 71.7948717948718
}
}
}

View File

@ -0,0 +1,59 @@
{
"data": [
{
"files": [
{
"filename": "../coverage/loops_and_branches.rs",
"summary": {
"functions": {
"count": 2,
"covered": 2,
"percent": 100
},
"instantiations": {
"count": 2,
"covered": 2,
"percent": 100
},
"lines": {
"count": 11,
"covered": 11,
"percent": 100
},
"regions": {
"count": 10,
"covered": 8,
"notcovered": 2,
"percent": 80
}
}
}
],
"totals": {
"functions": {
"count": 2,
"covered": 2,
"percent": 100
},
"instantiations": {
"count": 2,
"covered": 2,
"percent": 100
},
"lines": {
"count": 11,
"covered": 11,
"percent": 100
},
"regions": {
"count": 10,
"covered": 8,
"notcovered": 2,
"percent": 80
}
}
}
],
"type": "llvm.coverage.json.export",
"version": "2.0.1"
}

View File

@ -0,0 +1,59 @@
{
"data": [
{
"files": [
{
"filename": "../coverage/nested_loops.rs",
"summary": {
"functions": {
"count": 1,
"covered": 1,
"percent": 100
},
"instantiations": {
"count": 1,
"covered": 1,
"percent": 100
},
"lines": {
"count": 21,
"covered": 17,
"percent": 80.95238095238095
},
"regions": {
"count": 20,
"covered": 16,
"notcovered": 4,
"percent": 80
}
}
}
],
"totals": {
"functions": {
"count": 1,
"covered": 1,
"percent": 100
},
"instantiations": {
"count": 1,
"covered": 1,
"percent": 100
},
"lines": {
"count": 21,
"covered": 17,
"percent": 80.95238095238095
},
"regions": {
"count": 20,
"covered": 16,
"notcovered": 4,
"percent": 80
}
}
}
],
"type": "llvm.coverage.json.export",
"version": "2.0.1"
}

View File

@ -0,0 +1,59 @@
{
"data": [
{
"files": [
{
"filename": "../coverage/partial_eq_counter_without_region.rs",
"summary": {
"functions": {
"count": 5,
"covered": 5,
"percent": 100
},
"instantiations": {
"count": 5,
"covered": 5,
"percent": 100
},
"lines": {
"count": 15,
"covered": 15,
"percent": 100
},
"regions": {
"count": 6,
"covered": 6,
"notcovered": 0,
"percent": 100
}
}
}
],
"totals": {
"functions": {
"count": 5,
"covered": 5,
"percent": 100
},
"instantiations": {
"count": 5,
"covered": 5,
"percent": 100
},
"lines": {
"count": 15,
"covered": 15,
"percent": 100
},
"regions": {
"count": 6,
"covered": 6,
"notcovered": 0,
"percent": 100
}
}
}
],
"type": "llvm.coverage.json.export",
"version": "2.0.1"
}

View File

@ -16,15 +16,15 @@
"percent": 100
},
"lines": {
"count": 18,
"covered": 18,
"count": 19,
"covered": 19,
"percent": 100
},
"regions": {
"count": 7,
"covered": 7,
"notcovered": 0,
"percent": 100
"count": 9,
"covered": 8,
"notcovered": 1,
"percent": 88.88888888888889
}
}
}
@ -41,15 +41,15 @@
"percent": 100
},
"lines": {
"count": 18,
"covered": 18,
"count": 19,
"covered": 19,
"percent": 100
},
"regions": {
"count": 7,
"covered": 7,
"notcovered": 0,
"percent": 100
"count": 9,
"covered": 8,
"notcovered": 1,
"percent": 88.88888888888889
}
}
}

View File

@ -16,15 +16,15 @@
"percent": 100
},
"lines": {
"count": 26,
"covered": 26,
"count": 24,
"covered": 24,
"percent": 100
},
"regions": {
"count": 9,
"covered": 9,
"notcovered": 0,
"percent": 100
"count": 15,
"covered": 14,
"notcovered": 1,
"percent": 93.33333333333333
}
}
}
@ -41,15 +41,15 @@
"percent": 100
},
"lines": {
"count": 26,
"covered": 26,
"count": 24,
"covered": 24,
"percent": 100
},
"regions": {
"count": 9,
"covered": 9,
"notcovered": 0,
"percent": 100
"count": 15,
"covered": 14,
"notcovered": 1,
"percent": 93.33333333333333
}
}
}

View File

@ -0,0 +1,59 @@
{
"data": [
{
"files": [
{
"filename": "../coverage/tight_infinite_loop.rs",
"summary": {
"functions": {
"count": 1,
"covered": 1,
"percent": 100
},
"instantiations": {
"count": 1,
"covered": 1,
"percent": 100
},
"lines": {
"count": 2,
"covered": 2,
"percent": 100
},
"regions": {
"count": 2,
"covered": 2,
"notcovered": 0,
"percent": 100
}
}
}
],
"totals": {
"functions": {
"count": 1,
"covered": 1,
"percent": 100
},
"instantiations": {
"count": 1,
"covered": 1,
"percent": 100
},
"lines": {
"count": 2,
"covered": 2,
"percent": 100
},
"regions": {
"count": 2,
"covered": 2,
"notcovered": 0,
"percent": 100
}
}
}
],
"type": "llvm.coverage.json.export",
"version": "2.0.1"
}

View File

@ -16,15 +16,15 @@
"percent": 100
},
"lines": {
"count": 16,
"covered": 15,
"percent": 93.75
"count": 20,
"covered": 19,
"percent": 95
},
"regions": {
"count": 13,
"covered": 12,
"notcovered": 1,
"percent": 92.3076923076923
"count": 20,
"covered": 17,
"notcovered": 3,
"percent": 85
}
}
}
@ -41,15 +41,15 @@
"percent": 100
},
"lines": {
"count": 16,
"covered": 15,
"percent": 93.75
"count": 20,
"covered": 19,
"percent": 95
},
"regions": {
"count": 13,
"covered": 12,
"notcovered": 1,
"percent": 92.3076923076923
"count": 20,
"covered": 17,
"notcovered": 3,
"percent": 85
}
}
}

View File

@ -21,10 +21,10 @@
"percent": 46.93877551020408
},
"regions": {
"count": 51,
"count": 70,
"covered": 19,
"notcovered": 32,
"percent": 37.254901960784316
"notcovered": 51,
"percent": 27.142857142857142
}
}
}
@ -46,10 +46,10 @@
"percent": 46.93877551020408
},
"regions": {
"count": 51,
"count": 70,
"covered": 19,
"notcovered": 32,
"percent": 37.254901960784316
"notcovered": 51,
"percent": 27.142857142857142
}
}
}

View File

@ -0,0 +1,59 @@
{
"data": [
{
"files": [
{
"filename": "../coverage/while.rs",
"summary": {
"functions": {
"count": 1,
"covered": 1,
"percent": 100
},
"instantiations": {
"count": 1,
"covered": 1,
"percent": 100
},
"lines": {
"count": 4,
"covered": 3,
"percent": 75
},
"regions": {
"count": 5,
"covered": 3,
"notcovered": 2,
"percent": 60
}
}
}
],
"totals": {
"functions": {
"count": 1,
"covered": 1,
"percent": 100
},
"instantiations": {
"count": 1,
"covered": 1,
"percent": 100
},
"lines": {
"count": 4,
"covered": 3,
"percent": 75
},
"regions": {
"count": 5,
"covered": 3,
"notcovered": 2,
"percent": 60
}
}
}
],
"type": "llvm.coverage.json.export",
"version": "2.0.1"
}

View File

@ -17,14 +17,14 @@
},
"lines": {
"count": 18,
"covered": 16,
"percent": 88.88888888888889
"covered": 15,
"percent": 83.33333333333334
},
"regions": {
"count": 9,
"covered": 7,
"notcovered": 2,
"percent": 77.77777777777779
"count": 11,
"covered": 8,
"notcovered": 3,
"percent": 72.72727272727273
}
}
}
@ -42,14 +42,14 @@
},
"lines": {
"count": 18,
"covered": 16,
"percent": 88.88888888888889
"covered": 15,
"percent": 83.33333333333334
},
"regions": {
"count": 9,
"covered": 7,
"notcovered": 2,
"percent": 77.77777777777779
"count": 11,
"covered": 8,
"notcovered": 3,
"percent": 72.72727272727273
}
}
}

View File

@ -62,7 +62,7 @@
62| 1| let mut countdown = 0;
63| 1| if is_false {
64| 0| countdown = 10;
65| 0| }
65| 1| }
66| 1| "alt string 3".to_owned()
67| 1| }
68| 1| )
@ -77,7 +77,7 @@
77| 1| let mut countdown = 0;
78| 1| if is_false {
79| 0| countdown = 10;
80| 0| }
80| 1| }
81| 1| "alt string 4".to_owned()
82| 1| };
83| 1| println!(

View File

@ -24,7 +24,7 @@
24| | let _ = Firework { strength: 1000 };
25| |
26| | Ok(())
27| 1|}
27| 2|}
28| |
29| |// Expected program output:
30| |// Exiting with error...

View File

@ -57,7 +57,7 @@
35| | let _ = Firework { strength: 1000 };
36| |
37| | Ok(())
38| 1|}
38| 2|}
39| |
40| |// Expected program output:
41| |// Exiting with error...

View File

@ -25,5 +25,6 @@
25| 1| 10
26| 1| ;
27| 1| }
^0
28| 1|}

View File

@ -20,7 +20,7 @@
20| 0| countdown
21| 0| =
22| 0| 100
23| | }
23| 1| }
24| |
25| | if
26| 1| is_true
@ -36,6 +36,6 @@
36| 0| =
37| 0| 100
38| 0| ;
39| 0| }
39| 1| }
40| 1|}

View File

@ -10,6 +10,7 @@
10| 1| if is_true {
11| 1| countdown = 10;
12| 1| }
^0
13| |
14| | mod in_mod {
15| | const IN_MOD_CONST: u32 = 1000;
@ -48,6 +49,7 @@
48| 1| if is_true {
49| 1| in_func(countdown);
50| 1| }
^0
51| |
52| 1| let mut val = InStruct {
53| 1| in_struct_field: 101,

View File

@ -12,12 +12,14 @@
12| 1| b = 10;
13| 1| c = 100;
14| 1| }
^0
15| | let
16| 1| somebool
17| | =
18| 1| a < b
19| | ||
20| 0| b < c
20| 1| b < c
^0
21| | ;
22| | let
23| 1| somebool
@ -26,19 +28,38 @@
26| | ||
27| 1| b < c
28| | ;
29| | let
30| 1| somebool
31| | =
32| 1| a < b
33| | &&
34| 1| b < c
35| | ;
36| | let
37| 1| somebool
38| | =
39| 1| b < a
40| | &&
41| 0| b < c
42| | ;
43| 1|}
29| 1| let somebool = a < b && b < c;
30| 1| let somebool = b < a && b < c;
^0
31| |
32| | if
33| 1| !
34| 1| is_true
35| 0| {
36| 0| a = 2
37| 0| ;
38| 1| }
39| |
40| | if
41| 1| is_true
42| 1| {
43| 1| b = 30
44| 1| ;
45| 1| }
46| | else
47| 0| {
48| 0| c = 400
49| 0| ;
50| 1| }
51| |
52| 1| if !is_true {
53| 0| a = 2;
54| 1| }
55| |
56| 1| if is_true {
57| 1| b = 30;
58| 1| } else {
59| 0| c = 400;
60| 1| }
61| 1|}

View File

@ -0,0 +1,38 @@
1| |#![allow(unused_assignments)]
2| |
3| |// This test confirms an earlier problem was resolved, supporting the MIR graph generated by the
4| |// structure of this `fmt` function.
5| |
6| |struct DebugTest;
7| |
8| |impl std::fmt::Debug for DebugTest {
9| | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
10| 1| if true {
11| 1| if false {
12| | while true {
13| | }
14| 1| }
15| 1| write!(f, "error")?;
^0
16| | } else {
17| 1| }
18| 1| Ok(())
19| 1| }
20| |}
21| |
22| 1|fn main() {
23| 1| let debug_test = DebugTest;
24| 1| println!("{:?}", debug_test);
25| 1|}
26| |
27| |/*
28| |
29| |This is the error message generated, before the issue was fixed:
30| |
31| |error: internal compiler error: compiler/rustc_mir/src/transform/coverage/mod.rs:374:42:
32| |Error processing: DefId(0:6 ~ bug_incomplete_cov_graph_traversal_simplified[317d]::{impl#0}::fmt):
33| |Error { message: "`TraverseCoverageGraphWithLoops` missed some `BasicCoverageBlock`s:
34| |[bcb6, bcb7, bcb9]" }
35| |
36| |*/

View File

@ -0,0 +1,26 @@
1| |fn main() {
2| 1| let is_true = std::env::args().len() == 1;
3| 1| let mut countdown = 10;
4| |
5| 1| 'outer: while countdown > 0 {
6| 1| let mut a = 100;
7| 1| let mut b = 100;
8| 3| for _ in 0..50 {
9| 3| if a < 30 {
10| 0| break;
11| | }
12| 3| a -= 5;
13| 3| b -= 5;
14| 3| if b < 90 {
15| 1| a -= 10;
16| 1| if is_true {
17| 1| break 'outer;
18| | } else {
19| 0| a -= 2;
20| 0| }
21| 2| }
22| 3| }
23| 0| countdown -= 1;
24| 1| }
25| 1|}

View File

@ -0,0 +1,101 @@
1| |// This test confirms an earlier problem was resolved, supporting the MIR graph generated by the
2| |// structure of this test.
3| |
4| 2|#[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord)]
^1 ^1
5| |pub struct Version {
6| | major: usize,
7| 1| minor: usize,
8| | patch: usize,
9| |}
10| |
11| |impl Version {
12| | pub fn new(major: usize, minor: usize, patch: usize) -> Self {
13| 2| Self {
14| 2| major,
15| 2| minor,
16| 2| patch,
17| 2| }
18| 2| }
19| |}
20| |
21| 1|fn main() {
22| 1| let version_3_2_1 = Version::new(3, 2, 1);
23| 1| let version_3_3_0 = Version::new(3, 3, 0);
24| 1|
25| 1| println!("{:?} < {:?} = {}", version_3_2_1, version_3_3_0, version_3_2_1 < version_3_3_0);
26| 1|}
27| |
28| |/*
29| |
30| |This test verifies a bug was fixed that otherwise generated this error:
31| |
32| |thread 'rustc' panicked at 'No counters provided the source_hash for function:
33| | Instance {
34| | def: Item(WithOptConstParam {
35| | did: DefId(0:101 ~ autocfg[c44a]::version::{impl#2}::partial_cmp),
36| | const_param_did: None
37| | }),
38| | substs: []
39| | }'
40| |The `PartialOrd` derived by `Version` happened to generate a MIR that generated coverage
41| |without a code region associated with any `Counter`. Code regions were associated with at least
42| |one expression, which is allowed, but the `function_source_hash` was only passed to the codegen
43| |(coverage mapgen) phase from a `Counter`s code region. A new method was added to pass the
44| |`function_source_hash` without a code region, if necessary.
45| |
46| |*/
47| |
48| |// FIXME(richkadel): It may be worth investigating why the coverage report for this test produces
49| |// the following results:
50| |
51| |/*
52| |
53| |1. Why are their two counts below different characters (first and last) of `PartialOrd`, on line 17?
54| |
55| |2. Line 17 is counted twice, but the `::lt` instance shows a line count of 1? Is there a missing
56| | line count with a different instance? Or was it really only called once?
57| |
58| |3. Line 20 shows another line count (of 1) for a line within a `struct` declaration (on only one of
59| | its 3 fields). I doubt the specific field (`minor`) is relevant, but rather I suspect there's a
60| | problem computing the file position here, for some reason.
61| |
62| |<snip>
63| | 16| |
64| | 17| 2|#[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord)]
65| | ^1 ^1
66| |------------------
67| ||Unexecuted instantiation: <partial_eq_counter_without_region::Version as core::cmp::PartialOrd>::gt
68| |------------------
69| ||Unexecuted instantiation: <partial_eq_counter_without_region::Version as core::cmp::PartialOrd>::le
70| |------------------
71| ||Unexecuted instantiation: <partial_eq_counter_without_region::Version as core::cmp::PartialOrd>::ge
72| |------------------
73| ||<partial_eq_counter_without_region::Version as core::cmp::PartialOrd>::lt:
74| || 17| 1|#[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord)]
75| |------------------
76| | 18| |pub struct Version {
77| | 19| | major: usize,
78| | 20| 1| minor: usize,
79| | 21| | patch: usize,
80| | 22| |}
81| | 23| |
82| | 24| |impl Version {
83| | 25| | pub fn new(major: usize, minor: usize, patch: usize) -> Self {
84| | 26| 2| Version {
85| | 27| 2| major,
86| | 28| 2| minor,
87| | 29| 2| patch,
88| | 30| 2| }
89| | 31| 2| }
90| | 32| |}
91| | 33| |
92| | 34| 1|fn main() {
93| | 35| 1| let version_3_2_1 = Version::new(3, 2, 1);
94| | 36| 1| let version_3_3_0 = Version::new(3, 3, 0);
95| | 37| 1|
96| | 38| 1| println!("{:?} < {:?} = {}", version_3_2_1, version_3_3_0, version_3_2_1 < version
97| |_3_3_0);
98| | 39| 1|}
99| |*/

View File

@ -16,6 +16,7 @@
16| 1| 10
17| 1| ;
18| 1| }
^0
19| |
20| | loop
21| | {
@ -31,6 +32,6 @@
31| 10| -=
32| 10| 1
33| | ;
34| | }
34| 1| }
35| 1|}

View File

@ -10,22 +10,24 @@
10| 1| if is_true {
11| 1| countdown = 0;
12| 1| }
^0
13| |
14| 3| for
15| 3| _
14| | for
15| 2| _
16| | in
17| 1| 0..2
17| 3| 0..2
18| | {
19| | let z
20| | ;
21| | match
22| 2| countdown
23| 2| {
24| 2| x
25| 2| if
23| | {
24| 1| x
25| | if
26| 2| x
27| 2| <
28| 2| 1
^1
29| | =>
30| 1| {
31| 1| z = countdown
@ -39,6 +41,6 @@
39| | =>
40| 1| {}
41| | }
42| | }
42| 3| }
43| 1|}

View File

@ -0,0 +1,6 @@
1| |fn main() {
2| 1| if false {
3| | loop {}
4| | }
5| 1|}

View File

@ -6,22 +6,22 @@
6| 1| Err(())
7| | } else {
8| 5| Ok(())
9| | }
9| 1| }
10| 6|}
11| |
12| |fn main() -> Result<(),()> {
13| 1| let mut
14| 1| countdown = 10
15| | ;
16| 6| for
16| | for
17| 6| _
18| | in
19| 1| 0..10
19| 6| 0..10
20| | {
21| 6| countdown
22| 6| -= 1
23| | ;
24| | if
23| 6| ;
24| 6| if
25| 6| countdown < 5
26| | {
27| 1| call(/*return_error=*/ true)?;
@ -29,8 +29,9 @@
29| | else
30| | {
31| 5| call(/*return_error=*/ false)?;
32| | }
33| | }
^0
32| 5| }
33| 6| }
34| 0| Ok(())
35| 1|}
35| 2|}

View File

@ -65,5 +65,5 @@
64| | } else {
65| 0| return;
66| | };
67| 1|}
67| 2|}

View File

@ -0,0 +1,6 @@
1| |fn main() {
2| 1| let num = 9;
3| 1| while num >= 10 {
4| 0| }
5| 1|}

View File

@ -3,7 +3,7 @@
3| |
4| |fn main() -> Result<(),u8> {
5| 1| let mut countdown = 10;
6| 7| while
6| | while
7| 7| countdown
8| 7| >
9| 7| 0
@ -24,7 +24,7 @@
24| | else
25| | {
26| 1| Err(1)
27| | }
27| 0| }
28| | ;
29| | }
30| 6| countdown
@ -33,7 +33,7 @@
33| | ;
34| | }
35| 0| Ok(())
36| 1|}
36| 2|}
37| |
38| |// ISSUE(77553): Originally, this test had `Err(1)` on line 22 (instead of `Ok(())`) and
39| |// `std::process::exit(2)` on line 26 (instead of `Err(1)`); and this worked as expected on Linux

View File

@ -0,0 +1,95 @@
Args: /usr/local/google/home/richkadel/rust/build/x86_64-unknown-linux-gnu/llvm/build/bin/llvm-cov show --debug --Xdemangler=/usr/local/google/home/richkadel/rust/build/x86_64-unknown-linux-gnu/stage0-tools-bin/rust-demangler --show-line-counts-or-regions --instr-profile=/usr/local/google/home/richkadel/rust/build/x86_64-unknown-linux-gnu/test/run-make-fulldeps/coverage-reports-base/coverage-reports-base/closure.profdata /usr/local/google/home/richkadel/rust/build/x86_64-unknown-linux-gnu/test/run-make-fulldeps/coverage-reports-base/coverage-reports-base/closure
Counter in file 0 20:21 -> 20:38, #1
Counter in file 0 21:20 -> 21:28, (#1 + 0)
Counter in file 0 21:29 -> 23:18, #2
Counter in file 0 23:18 -> 23:19, #3
Counter in file 0 24:17 -> 25:14, #4
Counter in file 0 3:11 -> 18:13, #1
Counter in file 0 25:14 -> 33:9, (#1 + 0)
Counter in file 0 40:6 -> 60:13, (#1 + 0)
Counter in file 0 67:14 -> 75:9, (#1 + 0)
Counter in file 0 82:6 -> 93:2, (#1 + 0)
Counter in file 0 77:13 -> 77:30, #1
Counter in file 0 78:12 -> 78:20, (#1 + 0)
Counter in file 0 78:21 -> 80:10, #2
Counter in file 0 80:10 -> 80:11, #3
Counter in file 0 81:9 -> 82:6, #4
Counter in file 0 62:21 -> 62:38, #1
Counter in file 0 63:20 -> 63:28, (#1 + 0)
Counter in file 0 63:29 -> 65:18, #2
Counter in file 0 65:18 -> 65:19, #3
Counter in file 0 66:17 -> 67:14, #4
Counter in file 0 35:13 -> 35:30, #1
Counter in file 0 36:12 -> 36:20, (#1 + 0)
Counter in file 0 36:21 -> 38:10, #2
Counter in file 0 38:10 -> 38:11, #3
Counter in file 0 39:9 -> 40:6, #4
Emitting segments for file: ../coverage/closure.rs
Combined regions:
3:11 -> 18:13 (count=1)
20:21 -> 20:38 (count=0)
21:20 -> 21:28 (count=0)
21:29 -> 23:18 (count=0)
23:18 -> 23:19 (count=0)
24:17 -> 25:14 (count=0)
25:14 -> 33:9 (count=1)
35:13 -> 35:30 (count=0)
36:12 -> 36:20 (count=0)
36:21 -> 38:10 (count=0)
38:10 -> 38:11 (count=0)
39:9 -> 40:6 (count=0)
40:6 -> 60:13 (count=1)
62:21 -> 62:38 (count=1)
63:20 -> 63:28 (count=1)
63:29 -> 65:18 (count=0)
65:18 -> 65:19 (count=1)
66:17 -> 67:14 (count=1)
67:14 -> 75:9 (count=1)
77:13 -> 77:30 (count=1)
78:12 -> 78:20 (count=1)
78:21 -> 80:10 (count=0)
80:10 -> 80:11 (count=1)
81:9 -> 82:6 (count=1)
82:6 -> 93:2 (count=1)
Segment at 3:11 (count = 1), RegionEntry
Segment at 18:13 (count = 0), Skipped
Segment at 20:21 (count = 0), RegionEntry
Segment at 20:38 (count = 0), Skipped
Segment at 21:20 (count = 0), RegionEntry
Segment at 21:28 (count = 0), Skipped
Segment at 21:29 (count = 0), RegionEntry
Segment at 23:18 (count = 0), RegionEntry
Segment at 23:19 (count = 0), Skipped
Segment at 24:17 (count = 0), RegionEntry
Segment at 25:14 (count = 1), RegionEntry
Segment at 33:9 (count = 0), Skipped
Segment at 35:13 (count = 0), RegionEntry
Segment at 35:30 (count = 0), Skipped
Segment at 36:12 (count = 0), RegionEntry
Segment at 36:20 (count = 0), Skipped
Segment at 36:21 (count = 0), RegionEntry
Segment at 38:10 (count = 0), RegionEntry
Segment at 38:11 (count = 0), Skipped
Segment at 39:9 (count = 0), RegionEntry
Segment at 40:6 (count = 1), RegionEntry
Segment at 60:13 (count = 0), Skipped
Segment at 62:21 (count = 1), RegionEntry
Segment at 62:38 (count = 0), Skipped
Segment at 63:20 (count = 1), RegionEntry
Segment at 63:28 (count = 0), Skipped
Segment at 63:29 (count = 0), RegionEntry
Segment at 65:18 (count = 1), RegionEntry
Segment at 65:19 (count = 0), Skipped
Segment at 66:17 (count = 1), RegionEntry
Segment at 67:14 (count = 1), RegionEntry
Segment at 75:9 (count = 0), Skipped
Segment at 77:13 (count = 1), RegionEntry
Segment at 77:30 (count = 0), Skipped
Segment at 78:12 (count = 1), RegionEntry
Segment at 78:20 (count = 0), Skipped
Segment at 78:21 (count = 0), RegionEntry
Segment at 80:10 (count = 1), RegionEntry
Segment at 80:11 (count = 0), Skipped
Segment at 81:9 (count = 1), RegionEntry
Segment at 82:6 (count = 1), RegionEntry
Segment at 93:2 (count = 0), Skipped

View File

@ -0,0 +1,24 @@
Args: /usr/local/google/home/richkadel/rust/build/x86_64-unknown-linux-gnu/llvm/build/bin/llvm-cov show --debug --Xdemangler=/usr/local/google/home/richkadel/rust/build/x86_64-unknown-linux-gnu/stage0-tools-bin/rust-demangler --show-line-counts-or-regions --instr-profile=/usr/local/google/home/richkadel/rust/build/x86_64-unknown-linux-gnu/test/run-make-fulldeps/coverage-reports-base/coverage-reports-base/drop_trait.profdata /usr/local/google/home/richkadel/rust/build/x86_64-unknown-linux-gnu/test/run-make-fulldeps/coverage-reports-base/coverage-reports-base/drop_trait
Counter in file 0 9:24 -> 11:6, #1
Counter in file 0 15:9 -> 17:42, #1
Counter in file 0 19:8 -> 19:12, (#1 + 0)
Counter in file 0 20:9 -> 21:22, #2
Counter in file 0 27:1 -> 27:2, #4
Counter in file 0 27:1 -> 27:2, (#2 + 0)
Emitting segments for file: ../coverage/drop_trait.rs
Combined regions:
9:24 -> 11:6 (count=2)
15:9 -> 17:42 (count=1)
19:8 -> 19:12 (count=1)
20:9 -> 21:22 (count=1)
27:1 -> 27:2 (count=2)
Segment at 9:24 (count = 2), RegionEntry
Segment at 11:6 (count = 0), Skipped
Segment at 15:9 (count = 1), RegionEntry
Segment at 17:42 (count = 0), Skipped
Segment at 19:8 (count = 1), RegionEntry
Segment at 19:12 (count = 0), Skipped
Segment at 20:9 (count = 1), RegionEntry
Segment at 21:22 (count = 0), Skipped
Segment at 27:1 (count = 2), RegionEntry
Segment at 27:2 (count = 0), Skipped

View File

@ -0,0 +1,50 @@
Args: /usr/local/google/home/richkadel/rust/build/x86_64-unknown-linux-gnu/llvm/build/bin/llvm-cov show --debug --Xdemangler=/usr/local/google/home/richkadel/rust/build/x86_64-unknown-linux-gnu/stage0-tools-bin/rust-demangler --show-line-counts-or-regions --instr-profile=/usr/local/google/home/richkadel/rust/build/x86_64-unknown-linux-gnu/test/run-make-fulldeps/coverage-reports-base/coverage-reports-base/generics.profdata /usr/local/google/home/richkadel/rust/build/x86_64-unknown-linux-gnu/test/run-make-fulldeps/coverage-reports-base/coverage-reports-base/generics
Counter in file 0 17:24 -> 19:6, #1
Counter in file 0 17:24 -> 19:6, #1
Counter in file 0 23:9 -> 28:28, #1
Counter in file 0 30:8 -> 30:12, (#1 + 0)
Counter in file 0 31:9 -> 32:22, #2
Counter in file 0 38:1 -> 38:2, #4
Counter in file 0 38:1 -> 38:2, (#2 + 0)
Counter in file 0 10:49 -> 12:6, #1
Counter in file 0 10:49 -> 12:6, #1
Emitting segments for file: ../coverage/generics.rs
Combined regions:
10:49 -> 12:6 (count=3)
17:24 -> 19:6 (count=2)
23:9 -> 28:28 (count=1)
30:8 -> 30:12 (count=1)
31:9 -> 32:22 (count=1)
38:1 -> 38:2 (count=2)
Segment at 10:49 (count = 3), RegionEntry
Segment at 12:6 (count = 0), Skipped
Segment at 17:24 (count = 2), RegionEntry
Segment at 19:6 (count = 0), Skipped
Segment at 23:9 (count = 1), RegionEntry
Segment at 28:28 (count = 0), Skipped
Segment at 30:8 (count = 1), RegionEntry
Segment at 30:12 (count = 0), Skipped
Segment at 31:9 (count = 1), RegionEntry
Segment at 32:22 (count = 0), Skipped
Segment at 38:1 (count = 2), RegionEntry
Segment at 38:2 (count = 0), Skipped
Emitting segments for function: _RNvMCs4fqI2P2rA04_8genericsINtB2_8FireworkdE12set_strengthB2_
Combined regions:
10:49 -> 12:6 (count=2)
Segment at 10:49 (count = 2), RegionEntry
Segment at 12:6 (count = 0), Skipped
Emitting segments for function: _RNvMCs4fqI2P2rA04_8genericsINtB2_8FireworklE12set_strengthB2_
Combined regions:
10:49 -> 12:6 (count=1)
Segment at 10:49 (count = 1), RegionEntry
Segment at 12:6 (count = 0), Skipped
Emitting segments for function: _RNvXs_Cs4fqI2P2rA04_8genericsINtB4_8FireworklENtNtNtCs7f2nZg1zwMz_4core3ops4drop4Drop4dropB4_
Combined regions:
17:24 -> 19:6 (count=1)
Segment at 17:24 (count = 1), RegionEntry
Segment at 19:6 (count = 0), Skipped
Emitting segments for function: _RNvXs_Cs4fqI2P2rA04_8genericsINtB4_8FireworkdENtNtNtCs7f2nZg1zwMz_4core3ops4drop4Drop4dropB4_
Combined regions:
17:24 -> 19:6 (count=1)
Segment at 17:24 (count = 1), RegionEntry
Segment at 19:6 (count = 0), Skipped

View File

@ -0,0 +1,22 @@
Args: /usr/local/google/home/richkadel/rust/build/x86_64-unknown-linux-gnu/llvm/build/bin/llvm-cov show --debug --Xdemangler=/usr/local/google/home/richkadel/rust/build/x86_64-unknown-linux-gnu/stage0-tools-bin/rust-demangler --show-line-counts-or-regions --instr-profile=/usr/local/google/home/richkadel/rust/build/x86_64-unknown-linux-gnu/test/run-make-fulldeps/coverage-reports-base/coverage-reports-base/if.profdata /usr/local/google/home/richkadel/rust/build/x86_64-unknown-linux-gnu/test/run-make-fulldeps/coverage-reports-base/coverage-reports-base/if
Counter in file 0 8:5 -> 18:10, #1
Counter in file 0 21:9 -> 21:16, (#1 + 0)
Counter in file 0 22:5 -> 27:6, #2
Counter in file 0 27:6 -> 27:7, #3
Counter in file 0 28:1 -> 28:2, #4
Emitting segments for file: ../coverage/if.rs
Combined regions:
8:5 -> 18:10 (count=1)
21:9 -> 21:16 (count=1)
22:5 -> 27:6 (count=1)
27:6 -> 27:7 (count=0)
28:1 -> 28:2 (count=1)
Segment at 8:5 (count = 1), RegionEntry
Segment at 18:10 (count = 0), Skipped
Segment at 21:9 (count = 1), RegionEntry
Segment at 21:16 (count = 0), Skipped
Segment at 22:5 (count = 1), RegionEntry
Segment at 27:6 (count = 0), RegionEntry
Segment at 27:7 (count = 0), Skipped
Segment at 28:1 (count = 1), RegionEntry
Segment at 28:2 (count = 0), Skipped

View File

@ -0,0 +1,38 @@
Args: /usr/local/google/home/richkadel/rust/build/x86_64-unknown-linux-gnu/llvm/build/bin/llvm-cov show --debug --Xdemangler=/usr/local/google/home/richkadel/rust/build/x86_64-unknown-linux-gnu/stage0-tools-bin/rust-demangler --show-line-counts-or-regions --instr-profile=/usr/local/google/home/richkadel/rust/build/x86_64-unknown-linux-gnu/test/run-make-fulldeps/coverage-reports-base/coverage-reports-base/if_else.profdata /usr/local/google/home/richkadel/rust/build/x86_64-unknown-linux-gnu/test/run-make-fulldeps/coverage-reports-base/coverage-reports-base/if_else
Counter in file 0 7:9 -> 11:16, #1
Counter in file 0 12:5 -> 17:6, #2
Counter in file 0 20:9 -> 22:16, #3
Counter in file 0 23:6 -> 23:7, (#2 + 0)
Counter in file 0 26:9 -> 26:16, #4
Counter in file 0 27:5 -> 32:6, #5
Counter in file 0 34:5 -> 39:6, #6
Counter in file 0 39:6 -> 39:7, (#5 + 0)
Counter in file 0 40:1 -> 40:2, #7
Emitting segments for file: ../coverage/if_else.rs
Combined regions:
7:9 -> 11:16 (count=1)
12:5 -> 17:6 (count=1)
20:9 -> 22:16 (count=0)
23:6 -> 23:7 (count=1)
26:9 -> 26:16 (count=1)
27:5 -> 32:6 (count=1)
34:5 -> 39:6 (count=0)
39:6 -> 39:7 (count=1)
40:1 -> 40:2 (count=1)
Segment at 7:9 (count = 1), RegionEntry
Segment at 11:16 (count = 0), Skipped
Segment at 12:5 (count = 1), RegionEntry
Segment at 17:6 (count = 0), Skipped
Segment at 20:9 (count = 0), RegionEntry
Segment at 22:16 (count = 0), Skipped
Segment at 23:6 (count = 1), RegionEntry
Segment at 23:7 (count = 0), Skipped
Segment at 26:9 (count = 1), RegionEntry
Segment at 26:16 (count = 0), Skipped
Segment at 27:5 (count = 1), RegionEntry
Segment at 32:6 (count = 0), Skipped
Segment at 34:5 (count = 0), RegionEntry
Segment at 39:6 (count = 1), RegionEntry
Segment at 39:7 (count = 0), Skipped
Segment at 40:1 (count = 1), RegionEntry
Segment at 40:2 (count = 0), Skipped

View File

@ -0,0 +1,61 @@
Args: /usr/local/google/home/richkadel/rust/build/x86_64-unknown-linux-gnu/llvm/build/bin/llvm-cov show --debug --Xdemangler=/usr/local/google/home/richkadel/rust/build/x86_64-unknown-linux-gnu/stage0-tools-bin/rust-demangler --show-line-counts-or-regions --instr-profile=/usr/local/google/home/richkadel/rust/build/x86_64-unknown-linux-gnu/test/run-make-fulldeps/coverage-reports-base/coverage-reports-base/inner_items.profdata /usr/local/google/home/richkadel/rust/build/x86_64-unknown-linux-gnu/test/run-make-fulldeps/coverage-reports-base/coverage-reports-base/inner_items
Counter in file 0 19:13 -> 19:18, #1
Counter in file 0 20:13 -> 20:14, #2
Counter in file 0 20:17 -> 20:22, (#1 + 0)
Counter in file 0 21:9 -> 22:6, (#2 + 0)
Counter in file 0 7:9 -> 9:26, #1
Counter in file 0 10:8 -> 10:15, (#1 + 0)
Counter in file 0 10:16 -> 12:6, #2
Counter in file 0 12:6 -> 12:7, #3
Counter in file 0 48:8 -> 48:15, #4
Counter in file 0 48:16 -> 50:6, #5
Counter in file 0 50:6 -> 50:7, #6
Counter in file 0 52:9 -> 57:2, #7
Counter in file 0 33:42 -> 36:10, #1
Counter in file 0 41:37 -> 41:41, #1
Counter in file 0 42:13 -> 43:10, #2
Emitting segments for file: ../coverage/inner_items.rs
Combined regions:
7:9 -> 9:26 (count=1)
10:8 -> 10:15 (count=1)
10:16 -> 12:6 (count=1)
12:6 -> 12:7 (count=0)
19:13 -> 19:18 (count=3)
20:13 -> 20:14 (count=3)
20:17 -> 20:22 (count=3)
21:9 -> 22:6 (count=3)
33:42 -> 36:10 (count=1)
41:37 -> 41:41 (count=1)
42:13 -> 43:10 (count=1)
48:8 -> 48:15 (count=1)
48:16 -> 50:6 (count=1)
50:6 -> 50:7 (count=0)
52:9 -> 57:2 (count=1)
Segment at 7:9 (count = 1), RegionEntry
Segment at 9:26 (count = 0), Skipped
Segment at 10:8 (count = 1), RegionEntry
Segment at 10:15 (count = 0), Skipped
Segment at 10:16 (count = 1), RegionEntry
Segment at 12:6 (count = 0), RegionEntry
Segment at 12:7 (count = 0), Skipped
Segment at 19:13 (count = 3), RegionEntry
Segment at 19:18 (count = 0), Skipped
Segment at 20:13 (count = 3), RegionEntry
Segment at 20:14 (count = 0), Skipped
Segment at 20:17 (count = 3), RegionEntry
Segment at 20:22 (count = 0), Skipped
Segment at 21:9 (count = 3), RegionEntry
Segment at 22:6 (count = 0), Skipped
Segment at 33:42 (count = 1), RegionEntry
Segment at 36:10 (count = 0), Skipped
Segment at 41:37 (count = 1), RegionEntry
Segment at 41:41 (count = 0), Skipped
Segment at 42:13 (count = 1), RegionEntry
Segment at 43:10 (count = 0), Skipped
Segment at 48:8 (count = 1), RegionEntry
Segment at 48:15 (count = 0), Skipped
Segment at 48:16 (count = 1), RegionEntry
Segment at 50:6 (count = 0), RegionEntry
Segment at 50:7 (count = 0), Skipped
Segment at 52:9 (count = 1), RegionEntry
Segment at 57:2 (count = 0), Skipped

View File

@ -0,0 +1,138 @@
Args: /usr/local/google/home/richkadel/rust/build/x86_64-unknown-linux-gnu/llvm/build/bin/llvm-cov show --debug --Xdemangler=/usr/local/google/home/richkadel/rust/build/x86_64-unknown-linux-gnu/stage0-tools-bin/rust-demangler --show-line-counts-or-regions --instr-profile=/usr/local/google/home/richkadel/rust/build/x86_64-unknown-linux-gnu/test/run-make-fulldeps/coverage-reports-base/coverage-reports-base/lazy_boolean.profdata /usr/local/google/home/richkadel/rust/build/x86_64-unknown-linux-gnu/test/run-make-fulldeps/coverage-reports-base/coverage-reports-base/lazy_boolean
Counter in file 0 7:9 -> 9:42, #1
Counter in file 0 10:8 -> 10:15, (#1 + 0)
Counter in file 0 10:16 -> 14:6, #2
Counter in file 0 14:6 -> 14:7, #3
Counter in file 0 16:9 -> 16:17, #4
Counter in file 0 18:13 -> 18:18, #5
Counter in file 0 20:13 -> 20:18, #6
Counter in file 0 20:18 -> 20:19, #7
Counter in file 0 20:18 -> 20:19, #8
Counter in file 0 23:9 -> 23:17, #9
Counter in file 0 25:13 -> 25:18, (#4 + 0)
Counter in file 0 27:13 -> 27:18, #10
Counter in file 0 27:18 -> 27:19, #11
Counter in file 0 27:18 -> 27:19, #12
Counter in file 0 29:9 -> 29:17, #13
Counter in file 0 29:20 -> 29:25, (#9 + 0)
Counter in file 0 29:29 -> 29:34, #14
Counter in file 0 29:34 -> 29:35, #15
Counter in file 0 29:34 -> 29:35, #16
Counter in file 0 30:9 -> 30:17, #17
Counter in file 0 30:20 -> 30:25, (#13 + 0)
Counter in file 0 30:29 -> 30:34, #18
Counter in file 0 30:34 -> 30:35, #19
Counter in file 0 30:34 -> 30:35, #20
Counter in file 0 33:9 -> 34:16, (#17 + 0)
Counter in file 0 35:5 -> 38:6, #21
Counter in file 0 38:6 -> 38:7, #22
Counter in file 0 41:9 -> 41:16, #23
Counter in file 0 42:5 -> 45:6, #24
Counter in file 0 47:5 -> 50:6, #25
Counter in file 0 50:6 -> 50:7, (#24 + 0)
Counter in file 0 52:8 -> 52:16, #26
Counter in file 0 52:17 -> 54:6, #27
Counter in file 0 54:6 -> 54:7, #28
Counter in file 0 56:8 -> 56:15, #29
Counter in file 0 56:16 -> 58:6, #30
Counter in file 0 58:12 -> 60:6, #31
Counter in file 0 60:6 -> 60:7, (#30 + 0)
Counter in file 0 61:1 -> 61:2, #32
Emitting segments for file: ../coverage/lazy_boolean.rs
Combined regions:
7:9 -> 9:42 (count=1)
10:8 -> 10:15 (count=1)
10:16 -> 14:6 (count=1)
14:6 -> 14:7 (count=0)
16:9 -> 16:17 (count=1)
18:13 -> 18:18 (count=1)
20:13 -> 20:18 (count=0)
20:18 -> 20:19 (count=1)
23:9 -> 23:17 (count=1)
25:13 -> 25:18 (count=1)
27:13 -> 27:18 (count=1)
27:18 -> 27:19 (count=1)
29:9 -> 29:17 (count=1)
29:20 -> 29:25 (count=1)
29:29 -> 29:34 (count=1)
29:34 -> 29:35 (count=1)
30:9 -> 30:17 (count=1)
30:20 -> 30:25 (count=1)
30:29 -> 30:34 (count=0)
30:34 -> 30:35 (count=1)
33:9 -> 34:16 (count=1)
35:5 -> 38:6 (count=0)
38:6 -> 38:7 (count=1)
41:9 -> 41:16 (count=1)
42:5 -> 45:6 (count=1)
47:5 -> 50:6 (count=0)
50:6 -> 50:7 (count=1)
52:8 -> 52:16 (count=1)
52:17 -> 54:6 (count=0)
54:6 -> 54:7 (count=1)
56:8 -> 56:15 (count=1)
56:16 -> 58:6 (count=1)
58:12 -> 60:6 (count=0)
60:6 -> 60:7 (count=1)
61:1 -> 61:2 (count=1)
Segment at 7:9 (count = 1), RegionEntry
Segment at 9:42 (count = 0), Skipped
Segment at 10:8 (count = 1), RegionEntry
Segment at 10:15 (count = 0), Skipped
Segment at 10:16 (count = 1), RegionEntry
Segment at 14:6 (count = 0), RegionEntry
Segment at 14:7 (count = 0), Skipped
Segment at 16:9 (count = 1), RegionEntry
Segment at 16:17 (count = 0), Skipped
Segment at 18:13 (count = 1), RegionEntry
Segment at 18:18 (count = 0), Skipped
Segment at 20:13 (count = 0), RegionEntry
Segment at 20:18 (count = 1), RegionEntry
Segment at 20:19 (count = 0), Skipped
Segment at 23:9 (count = 1), RegionEntry
Segment at 23:17 (count = 0), Skipped
Segment at 25:13 (count = 1), RegionEntry
Segment at 25:18 (count = 0), Skipped
Segment at 27:13 (count = 1), RegionEntry
Segment at 27:18 (count = 1), RegionEntry
Segment at 27:19 (count = 0), Skipped
Segment at 29:9 (count = 1), RegionEntry
Segment at 29:17 (count = 0), Skipped
Segment at 29:20 (count = 1), RegionEntry
Segment at 29:25 (count = 0), Skipped
Segment at 29:29 (count = 1), RegionEntry
Segment at 29:34 (count = 1), RegionEntry
Segment at 29:35 (count = 0), Skipped
Segment at 30:9 (count = 1), RegionEntry
Segment at 30:17 (count = 0), Skipped
Segment at 30:20 (count = 1), RegionEntry
Segment at 30:25 (count = 0), Skipped
Segment at 30:29 (count = 0), RegionEntry
Segment at 30:34 (count = 1), RegionEntry
Segment at 30:35 (count = 0), Skipped
Segment at 33:9 (count = 1), RegionEntry
Segment at 34:16 (count = 0), Skipped
Segment at 35:5 (count = 0), RegionEntry
Segment at 38:6 (count = 1), RegionEntry
Segment at 38:7 (count = 0), Skipped
Segment at 41:9 (count = 1), RegionEntry
Segment at 41:16 (count = 0), Skipped
Segment at 42:5 (count = 1), RegionEntry
Segment at 45:6 (count = 0), Skipped
Segment at 47:5 (count = 0), RegionEntry
Segment at 50:6 (count = 1), RegionEntry
Segment at 50:7 (count = 0), Skipped
Segment at 52:8 (count = 1), RegionEntry
Segment at 52:16 (count = 0), Skipped
Segment at 52:17 (count = 0), RegionEntry
Segment at 54:6 (count = 1), RegionEntry
Segment at 54:7 (count = 0), Skipped
Segment at 56:8 (count = 1), RegionEntry
Segment at 56:15 (count = 0), Skipped
Segment at 56:16 (count = 1), RegionEntry
Segment at 58:6 (count = 0), Skipped
Segment at 58:12 (count = 0), RegionEntry
Segment at 60:6 (count = 1), RegionEntry
Segment at 60:7 (count = 0), Skipped
Segment at 61:1 (count = 1), RegionEntry
Segment at 61:2 (count = 0), Skipped

View File

@ -0,0 +1,7 @@
Args: /usr/local/google/home/richkadel/rust/build/x86_64-unknown-linux-gnu/llvm/build/bin/llvm-cov show --debug --Xdemangler=/usr/local/google/home/richkadel/rust/build/x86_64-unknown-linux-gnu/stage0-tools-bin/rust-demangler --show-line-counts-or-regions --instr-profile=/usr/local/google/home/richkadel/rust/build/x86_64-unknown-linux-gnu/test/run-make-fulldeps/coverage-reports-base/coverage-reports-base/loop_break_value.profdata /usr/local/google/home/richkadel/rust/build/x86_64-unknown-linux-gnu/test/run-make-fulldeps/coverage-reports-base/coverage-reports-base/loop_break_value
Counter in file 0 3:11 -> 13:2, #1
Emitting segments for file: ../coverage/loop_break_value.rs
Combined regions:
3:11 -> 13:2 (count=1)
Segment at 3:11 (count = 1), RegionEntry
Segment at 13:2 (count = 0), Skipped

View File

@ -0,0 +1,39 @@
Args: /usr/local/google/home/richkadel/rust/build/x86_64-unknown-linux-gnu/llvm/build/bin/llvm-cov show --debug --Xdemangler=/usr/local/google/home/richkadel/rust/build/x86_64-unknown-linux-gnu/stage0-tools-bin/rust-demangler --show-line-counts-or-regions --instr-profile=/usr/local/google/home/richkadel/rust/build/x86_64-unknown-linux-gnu/test/run-make-fulldeps/coverage-reports-base/coverage-reports-base/loops_and_branches.profdata /usr/local/google/home/richkadel/rust/build/x86_64-unknown-linux-gnu/test/run-make-fulldeps/coverage-reports-base/coverage-reports-base/loops_and_branches
Counter in file 0 10:12 -> 10:16, #1
Counter in file 0 11:16 -> 11:21, #2
Counter in file 0 14:14 -> 14:15, #6
Counter in file 0 15:13 -> 15:31, #7
Counter in file 0 15:31 -> 15:32, #8
Counter in file 0 17:10 -> 17:11, #10
Counter in file 0 18:9 -> 18:15, #11
Counter in file 0 19:5 -> 19:6, #12
Counter in file 0 19:5 -> 19:6, (#8 + 0)
Counter in file 0 22:11 -> 25:2, #1
Emitting segments for file: ../coverage/loops_and_branches.rs
Combined regions:
10:12 -> 10:16 (count=1)
11:16 -> 11:21 (count=1)
14:14 -> 14:15 (count=1)
15:13 -> 15:31 (count=1)
15:31 -> 15:32 (count=0)
17:10 -> 17:11 (count=1)
18:9 -> 18:15 (count=1)
19:5 -> 19:6 (count=1)
22:11 -> 25:2 (count=1)
Segment at 10:12 (count = 1), RegionEntry
Segment at 10:16 (count = 0), Skipped
Segment at 11:16 (count = 1), RegionEntry
Segment at 11:21 (count = 0), Skipped
Segment at 14:14 (count = 1), RegionEntry
Segment at 14:15 (count = 0), Skipped
Segment at 15:13 (count = 1), RegionEntry
Segment at 15:31 (count = 0), RegionEntry
Segment at 15:32 (count = 0), Skipped
Segment at 17:10 (count = 1), RegionEntry
Segment at 17:11 (count = 0), Skipped
Segment at 18:9 (count = 1), RegionEntry
Segment at 18:15 (count = 0), Skipped
Segment at 19:5 (count = 1), RegionEntry
Segment at 19:6 (count = 0), Skipped
Segment at 22:11 (count = 1), RegionEntry
Segment at 25:2 (count = 0), Skipped

View File

@ -0,0 +1,76 @@
Args: /usr/local/google/home/richkadel/rust/build/x86_64-unknown-linux-gnu/llvm/build/bin/llvm-cov show --debug --Xdemangler=/usr/local/google/home/richkadel/rust/build/x86_64-unknown-linux-gnu/stage0-tools-bin/rust-demangler --show-line-counts-or-regions --instr-profile=/usr/local/google/home/richkadel/rust/build/x86_64-unknown-linux-gnu/test/run-make-fulldeps/coverage-reports-base/coverage-reports-base/nested_loops.profdata /usr/local/google/home/richkadel/rust/build/x86_64-unknown-linux-gnu/test/run-make-fulldeps/coverage-reports-base/coverage-reports-base/nested_loops
Counter in file 0 2:9 -> 3:27, #1
Counter in file 0 5:19 -> 5:32, #2
Counter in file 0 6:13 -> 7:24, #3
Counter in file 0 8:13 -> 8:14, #4
Counter in file 0 8:18 -> 8:23, #5
Counter in file 0 9:16 -> 9:22, (#4 + 0)
Counter in file 0 10:17 -> 10:22, #6
Counter in file 0 12:13 -> 12:19, #7
Counter in file 0 13:13 -> 13:19, #8
Counter in file 0 14:16 -> 14:22, (#8 + 0)
Counter in file 0 15:17 -> 16:27, #9
Counter in file 0 17:21 -> 17:33, #10
Counter in file 0 19:21 -> 21:14, #11
Counter in file 0 21:14 -> 21:15, #12
Counter in file 0 22:10 -> 22:11, #13
Counter in file 0 22:10 -> 22:11, (#3 + 0)
Counter in file 0 23:9 -> 23:23, #14
Counter in file 0 24:6 -> 24:7, #15
Counter in file 0 24:6 -> 24:7, (#1 + 0)
Counter in file 0 25:1 -> 25:2, #16
Emitting segments for file: ../coverage/nested_loops.rs
Combined regions:
2:9 -> 3:27 (count=1)
5:19 -> 5:32 (count=1)
6:13 -> 7:24 (count=1)
8:13 -> 8:14 (count=3)
8:18 -> 8:23 (count=3)
9:16 -> 9:22 (count=3)
10:17 -> 10:22 (count=0)
12:13 -> 12:19 (count=3)
13:13 -> 13:19 (count=3)
14:16 -> 14:22 (count=3)
15:17 -> 16:27 (count=1)
17:21 -> 17:33 (count=1)
19:21 -> 21:14 (count=0)
21:14 -> 21:15 (count=2)
22:10 -> 22:11 (count=3)
23:9 -> 23:23 (count=0)
24:6 -> 24:7 (count=1)
25:1 -> 25:2 (count=1)
Segment at 2:9 (count = 1), RegionEntry
Segment at 3:27 (count = 0), Skipped
Segment at 5:19 (count = 1), RegionEntry
Segment at 5:32 (count = 0), Skipped
Segment at 6:13 (count = 1), RegionEntry
Segment at 7:24 (count = 0), Skipped
Segment at 8:13 (count = 3), RegionEntry
Segment at 8:14 (count = 0), Skipped
Segment at 8:18 (count = 3), RegionEntry
Segment at 8:23 (count = 0), Skipped
Segment at 9:16 (count = 3), RegionEntry
Segment at 9:22 (count = 0), Skipped
Segment at 10:17 (count = 0), RegionEntry
Segment at 10:22 (count = 0), Skipped
Segment at 12:13 (count = 3), RegionEntry
Segment at 12:19 (count = 0), Skipped
Segment at 13:13 (count = 3), RegionEntry
Segment at 13:19 (count = 0), Skipped
Segment at 14:16 (count = 3), RegionEntry
Segment at 14:22 (count = 0), Skipped
Segment at 15:17 (count = 1), RegionEntry
Segment at 16:27 (count = 0), Skipped
Segment at 17:21 (count = 1), RegionEntry
Segment at 17:33 (count = 0), Skipped
Segment at 19:21 (count = 0), RegionEntry
Segment at 21:14 (count = 2), RegionEntry
Segment at 21:15 (count = 0), Skipped
Segment at 22:10 (count = 3), RegionEntry
Segment at 22:11 (count = 0), Skipped
Segment at 23:9 (count = 0), RegionEntry
Segment at 23:23 (count = 0), Skipped
Segment at 24:6 (count = 1), RegionEntry
Segment at 24:7 (count = 0), Skipped
Segment at 25:1 (count = 1), RegionEntry
Segment at 25:2 (count = 0), Skipped

View File

@ -0,0 +1,28 @@
Args: /usr/local/google/home/richkadel/rust/build/x86_64-unknown-linux-gnu/llvm/build/bin/llvm-cov show --debug --Xdemangler=/usr/local/google/home/richkadel/rust/build/x86_64-unknown-linux-gnu/stage0-tools-bin/rust-demangler --show-line-counts-or-regions --instr-profile=/usr/local/google/home/richkadel/rust/build/x86_64-unknown-linux-gnu/test/run-make-fulldeps/coverage-reports-base/coverage-reports-base/partial_eq_counter_without_region.profdata /usr/local/google/home/richkadel/rust/build/x86_64-unknown-linux-gnu/test/run-make-fulldeps/coverage-reports-base/coverage-reports-base/partial_eq_counter_without_region
Counter in file 0 7:5 -> 7:6, #1
Counter in file 0 21:11 -> 26:2, #1
Counter in file 0 4:17 -> 4:22, #1
Counter in file 0 13:9 -> 18:6, #1
Counter in file 0 4:39 -> 4:40, #1
Counter in file 0 4:48 -> 4:49, (#1 + 0)
Counter in file 0 8:5 -> 8:17, #1
Emitting segments for file: ../coverage/partial_eq_counter_without_region.rs
Combined regions:
4:17 -> 4:22 (count=2)
4:39 -> 4:40 (count=1)
4:48 -> 4:49 (count=1)
7:5 -> 7:6 (count=1)
13:9 -> 18:6 (count=2)
21:11 -> 26:2 (count=1)
Segment at 4:17 (count = 2), RegionEntry
Segment at 4:22 (count = 0), Skipped
Segment at 4:39 (count = 1), RegionEntry
Segment at 4:40 (count = 0), Skipped
Segment at 4:48 (count = 1), RegionEntry
Segment at 4:49 (count = 0), Skipped
Segment at 7:5 (count = 1), RegionEntry
Segment at 7:6 (count = 0), Skipped
Segment at 13:9 (count = 2), RegionEntry
Segment at 18:6 (count = 0), Skipped
Segment at 21:11 (count = 1), RegionEntry
Segment at 26:2 (count = 0), Skipped

View File

@ -0,0 +1,38 @@
Args: /usr/local/google/home/richkadel/rust/build/x86_64-unknown-linux-gnu/llvm/build/bin/llvm-cov show --debug --Xdemangler=/usr/local/google/home/richkadel/rust/build/x86_64-unknown-linux-gnu/stage0-tools-bin/rust-demangler --show-line-counts-or-regions --instr-profile=/usr/local/google/home/richkadel/rust/build/x86_64-unknown-linux-gnu/test/run-make-fulldeps/coverage-reports-base/coverage-reports-base/simple_loop.profdata /usr/local/google/home/richkadel/rust/build/x86_64-unknown-linux-gnu/test/run-make-fulldeps/coverage-reports-base/coverage-reports-base/simple_loop
Counter in file 0 7:9 -> 9:26, #1
Counter in file 0 12:9 -> 12:16, (#1 + 0)
Counter in file 0 13:5 -> 18:6, #2
Counter in file 0 18:6 -> 18:7, #3
Counter in file 0 23:13 -> 25:14, #4
Counter in file 0 27:13 -> 27:18, #5
Counter in file 0 30:9 -> 32:10, #6
Counter in file 0 34:6 -> 34:7, #7
Counter in file 0 35:1 -> 35:2, (#5 + 0)
Emitting segments for file: ../coverage/simple_loop.rs
Combined regions:
7:9 -> 9:26 (count=1)
12:9 -> 12:16 (count=1)
13:5 -> 18:6 (count=1)
18:6 -> 18:7 (count=0)
23:13 -> 25:14 (count=11)
27:13 -> 27:18 (count=1)
30:9 -> 32:10 (count=10)
34:6 -> 34:7 (count=1)
35:1 -> 35:2 (count=1)
Segment at 7:9 (count = 1), RegionEntry
Segment at 9:26 (count = 0), Skipped
Segment at 12:9 (count = 1), RegionEntry
Segment at 12:16 (count = 0), Skipped
Segment at 13:5 (count = 1), RegionEntry
Segment at 18:6 (count = 0), RegionEntry
Segment at 18:7 (count = 0), Skipped
Segment at 23:13 (count = 11), RegionEntry
Segment at 25:14 (count = 0), Skipped
Segment at 27:13 (count = 1), RegionEntry
Segment at 27:18 (count = 0), Skipped
Segment at 30:9 (count = 10), RegionEntry
Segment at 32:10 (count = 0), Skipped
Segment at 34:6 (count = 1), RegionEntry
Segment at 34:7 (count = 0), Skipped
Segment at 35:1 (count = 1), RegionEntry
Segment at 35:2 (count = 0), Skipped

View File

@ -0,0 +1,58 @@
Args: /usr/local/google/home/richkadel/rust/build/x86_64-unknown-linux-gnu/llvm/build/bin/llvm-cov show --debug --Xdemangler=/usr/local/google/home/richkadel/rust/build/x86_64-unknown-linux-gnu/stage0-tools-bin/rust-demangler --show-line-counts-or-regions --instr-profile=/usr/local/google/home/richkadel/rust/build/x86_64-unknown-linux-gnu/test/run-make-fulldeps/coverage-reports-base/coverage-reports-base/simple_match.profdata /usr/local/google/home/richkadel/rust/build/x86_64-unknown-linux-gnu/test/run-make-fulldeps/coverage-reports-base/coverage-reports-base/simple_match
Counter in file 0 7:9 -> 9:26, #1
Counter in file 0 10:8 -> 10:15, (#1 + 0)
Counter in file 0 10:16 -> 12:6, #2
Counter in file 0 12:6 -> 12:7, #3
Counter in file 0 15:9 -> 15:10, #4
Counter in file 0 17:9 -> 17:13, #5
Counter in file 0 22:13 -> 22:22, (#4 + 0)
Counter in file 0 24:13 -> 24:14, #6
Counter in file 0 26:17 -> 28:18, (#4 + 0)
Counter in file 0 28:18 -> 28:19, #7
Counter in file 0 30:13 -> 37:14, (#6 + 0)
Counter in file 0 40:13 -> 40:15, #8
Counter in file 0 42:6 -> 42:7, #9
Counter in file 0 42:6 -> 42:7, #10
Counter in file 0 43:1 -> 43:2, #11
Emitting segments for file: ../coverage/simple_match.rs
Combined regions:
7:9 -> 9:26 (count=1)
10:8 -> 10:15 (count=1)
10:16 -> 12:6 (count=1)
12:6 -> 12:7 (count=0)
15:9 -> 15:10 (count=2)
17:9 -> 17:13 (count=3)
22:13 -> 22:22 (count=2)
24:13 -> 24:14 (count=1)
26:17 -> 28:18 (count=2)
28:18 -> 28:19 (count=1)
30:13 -> 37:14 (count=1)
40:13 -> 40:15 (count=1)
42:6 -> 42:7 (count=3)
43:1 -> 43:2 (count=1)
Segment at 7:9 (count = 1), RegionEntry
Segment at 9:26 (count = 0), Skipped
Segment at 10:8 (count = 1), RegionEntry
Segment at 10:15 (count = 0), Skipped
Segment at 10:16 (count = 1), RegionEntry
Segment at 12:6 (count = 0), RegionEntry
Segment at 12:7 (count = 0), Skipped
Segment at 15:9 (count = 2), RegionEntry
Segment at 15:10 (count = 0), Skipped
Segment at 17:9 (count = 3), RegionEntry
Segment at 17:13 (count = 0), Skipped
Segment at 22:13 (count = 2), RegionEntry
Segment at 22:22 (count = 0), Skipped
Segment at 24:13 (count = 1), RegionEntry
Segment at 24:14 (count = 0), Skipped
Segment at 26:17 (count = 2), RegionEntry
Segment at 28:18 (count = 1), RegionEntry
Segment at 28:19 (count = 0), Skipped
Segment at 30:13 (count = 1), RegionEntry
Segment at 37:14 (count = 0), Skipped
Segment at 40:13 (count = 1), RegionEntry
Segment at 40:15 (count = 0), Skipped
Segment at 42:6 (count = 3), RegionEntry
Segment at 42:7 (count = 0), Skipped
Segment at 43:1 (count = 1), RegionEntry
Segment at 43:2 (count = 0), Skipped

View File

@ -0,0 +1,11 @@
Args: /usr/local/google/home/richkadel/rust/build/x86_64-unknown-linux-gnu/llvm/build/bin/llvm-cov show --debug --Xdemangler=/usr/local/google/home/richkadel/rust/build/x86_64-unknown-linux-gnu/stage0-tools-bin/rust-demangler --show-line-counts-or-regions --instr-profile=/usr/local/google/home/richkadel/rust/build/x86_64-unknown-linux-gnu/test/run-make-fulldeps/coverage-reports-base/coverage-reports-base/tight_infinite_loop.profdata /usr/local/google/home/richkadel/rust/build/x86_64-unknown-linux-gnu/test/run-make-fulldeps/coverage-reports-base/coverage-reports-base/tight_infinite_loop
Counter in file 0 2:8 -> 2:13, #1
Counter in file 0 5:1 -> 5:2, #4
Emitting segments for file: ../coverage/tight_infinite_loop.rs
Combined regions:
2:8 -> 2:13 (count=1)
5:1 -> 5:2 (count=1)
Segment at 2:8 (count = 1), RegionEntry
Segment at 2:13 (count = 0), Skipped
Segment at 5:1 (count = 1), RegionEntry
Segment at 5:2 (count = 0), Skipped

View File

@ -0,0 +1,72 @@
Args: /usr/local/google/home/richkadel/rust/build/x86_64-unknown-linux-gnu/llvm/build/bin/llvm-cov show --debug --Xdemangler=/usr/local/google/home/richkadel/rust/build/x86_64-unknown-linux-gnu/stage0-tools-bin/rust-demangler --show-line-counts-or-regions --instr-profile=/usr/local/google/home/richkadel/rust/build/x86_64-unknown-linux-gnu/test/run-make-fulldeps/coverage-reports-base/coverage-reports-base/try_error_result.profdata /usr/local/google/home/richkadel/rust/build/x86_64-unknown-linux-gnu/test/run-make-fulldeps/coverage-reports-base/coverage-reports-base/try_error_result
Counter in file 0 13:9 -> 14:23, #1
Counter in file 0 17:9 -> 17:10, #2
Counter in file 0 19:9 -> 19:14, #3
Counter in file 0 21:9 -> 25:26, #4
Counter in file 0 27:13 -> 27:41, #5
Counter in file 0 27:41 -> 27:42, #6
Counter in file 0 31:13 -> 31:42, #7
Counter in file 0 31:42 -> 31:43, #8
Counter in file 0 32:10 -> 32:11, #9
Counter in file 0 32:10 -> 32:11, #10
Counter in file 0 33:6 -> 33:7, #11
Counter in file 0 33:6 -> 33:7, (#1 + 0)
Counter in file 0 34:5 -> 34:11, #12
Counter in file 0 35:1 -> 35:2, #13
Counter in file 0 35:1 -> 35:2, #14
Counter in file 0 5:8 -> 5:20, #1
Counter in file 0 6:9 -> 6:16, #2
Counter in file 0 8:9 -> 8:15, #3
Counter in file 0 9:6 -> 9:7, (#2 + 0)
Counter in file 0 10:1 -> 10:2, #4
Emitting segments for file: ../coverage/try_error_result.rs
Combined regions:
5:8 -> 5:20 (count=6)
6:9 -> 6:16 (count=1)
8:9 -> 8:15 (count=5)
9:6 -> 9:7 (count=1)
10:1 -> 10:2 (count=6)
13:9 -> 14:23 (count=1)
17:9 -> 17:10 (count=6)
19:9 -> 19:14 (count=6)
21:9 -> 25:26 (count=6)
27:13 -> 27:41 (count=1)
27:41 -> 27:42 (count=1)
31:13 -> 31:42 (count=5)
31:42 -> 31:43 (count=0)
32:10 -> 32:11 (count=5)
33:6 -> 33:7 (count=6)
34:5 -> 34:11 (count=0)
35:1 -> 35:2 (count=2)
Segment at 5:8 (count = 6), RegionEntry
Segment at 5:20 (count = 0), Skipped
Segment at 6:9 (count = 1), RegionEntry
Segment at 6:16 (count = 0), Skipped
Segment at 8:9 (count = 5), RegionEntry
Segment at 8:15 (count = 0), Skipped
Segment at 9:6 (count = 1), RegionEntry
Segment at 9:7 (count = 0), Skipped
Segment at 10:1 (count = 6), RegionEntry
Segment at 10:2 (count = 0), Skipped
Segment at 13:9 (count = 1), RegionEntry
Segment at 14:23 (count = 0), Skipped
Segment at 17:9 (count = 6), RegionEntry
Segment at 17:10 (count = 0), Skipped
Segment at 19:9 (count = 6), RegionEntry
Segment at 19:14 (count = 0), Skipped
Segment at 21:9 (count = 6), RegionEntry
Segment at 25:26 (count = 0), Skipped
Segment at 27:13 (count = 1), RegionEntry
Segment at 27:41 (count = 1), RegionEntry
Segment at 27:42 (count = 0), Skipped
Segment at 31:13 (count = 5), RegionEntry
Segment at 31:42 (count = 0), RegionEntry
Segment at 31:43 (count = 0), Skipped
Segment at 32:10 (count = 5), RegionEntry
Segment at 32:11 (count = 0), Skipped
Segment at 33:6 (count = 6), RegionEntry
Segment at 33:7 (count = 0), Skipped
Segment at 34:5 (count = 0), RegionEntry
Segment at 34:11 (count = 0), Skipped
Segment at 35:1 (count = 2), RegionEntry
Segment at 35:2 (count = 0), Skipped

View File

@ -0,0 +1,240 @@
Args: /usr/local/google/home/richkadel/rust/build/x86_64-unknown-linux-gnu/llvm/build/bin/llvm-cov show --debug --Xdemangler=/usr/local/google/home/richkadel/rust/build/x86_64-unknown-linux-gnu/stage0-tools-bin/rust-demangler --show-line-counts-or-regions --instr-profile=/usr/local/google/home/richkadel/rust/build/x86_64-unknown-linux-gnu/test/run-make-fulldeps/coverage-reports-base/coverage-reports-base/various_conditions.profdata /usr/local/google/home/richkadel/rust/build/x86_64-unknown-linux-gnu/test/run-make-fulldeps/coverage-reports-base/coverage-reports-base/various_conditions
Counter in file 0 4:9 -> 4:26, #1
Counter in file 0 5:8 -> 5:12, (#1 + 0)
Counter in file 0 5:13 -> 7:6, #2
Counter in file 0 10:9 -> 10:10, #4
Counter in file 0 10:16 -> 10:29, #5
Counter in file 0 11:9 -> 12:10, #6
Counter in file 0 13:15 -> 13:28, #7
Counter in file 0 14:12 -> 14:25, #8
Counter in file 0 14:29 -> 14:42, #9
Counter in file 0 14:42 -> 14:43, #10
Counter in file 0 14:42 -> 14:43, #11
Counter in file 0 14:46 -> 14:60, #12
Counter in file 0 14:60 -> 14:61, #13
Counter in file 0 14:60 -> 14:61, #14
Counter in file 0 14:61 -> 16:10, #15
Counter in file 0 16:10 -> 16:11, #16
Counter in file 0 17:9 -> 18:18, #17
Counter in file 0 20:9 -> 20:15, #18
Counter in file 0 23:9 -> 23:26, (#4 + 0)
Counter in file 0 24:8 -> 24:12, (#4 + 0)
Counter in file 0 24:13 -> 26:6, #19
Counter in file 0 28:8 -> 28:21, #21
Counter in file 0 29:9 -> 29:23, #22
Counter in file 0 30:15 -> 30:28, #23
Counter in file 0 31:12 -> 31:25, #24
Counter in file 0 31:29 -> 31:42, #25
Counter in file 0 31:42 -> 31:43, #26
Counter in file 0 31:42 -> 31:43, #27
Counter in file 0 31:46 -> 31:60, #28
Counter in file 0 31:60 -> 31:61, #29
Counter in file 0 31:60 -> 31:61, #30
Counter in file 0 31:61 -> 33:10, #31
Counter in file 0 33:10 -> 33:11, #32
Counter in file 0 34:9 -> 34:23, #33
Counter in file 0 36:9 -> 36:15, #34
Counter in file 0 39:9 -> 39:26, #35
Counter in file 0 40:8 -> 40:12, (#35 + 0)
Counter in file 0 40:13 -> 42:6, #36
Counter in file 0 44:9 -> 44:10, #38
Counter in file 0 44:16 -> 44:29, #39
Counter in file 0 45:9 -> 45:23, #40
Counter in file 0 46:15 -> 46:28, #41
Counter in file 0 47:12 -> 47:25, #42
Counter in file 0 47:29 -> 47:42, #43
Counter in file 0 47:42 -> 47:43, #44
Counter in file 0 47:42 -> 47:43, #45
Counter in file 0 47:46 -> 47:60, #46
Counter in file 0 47:60 -> 47:61, #47
Counter in file 0 47:60 -> 47:61, #48
Counter in file 0 47:61 -> 49:10, #49
Counter in file 0 49:10 -> 49:11, #50
Counter in file 0 50:9 -> 50:23, #51
Counter in file 0 52:13 -> 54:15, #52
Counter in file 0 57:9 -> 57:10, #53
Counter in file 0 57:16 -> 57:29, (#38 + 0)
Counter in file 0 58:9 -> 58:23, #54
Counter in file 0 59:15 -> 59:28, #55
Counter in file 0 60:12 -> 60:25, #56
Counter in file 0 60:29 -> 60:42, #57
Counter in file 0 60:42 -> 60:43, #58
Counter in file 0 60:42 -> 60:43, #59
Counter in file 0 60:46 -> 60:60, #60
Counter in file 0 60:60 -> 60:61, #61
Counter in file 0 60:60 -> 60:61, #62
Counter in file 0 60:61 -> 62:10, #63
Counter in file 0 62:10 -> 62:11, #64
Counter in file 0 63:9 -> 63:23, #65
Counter in file 0 65:9 -> 65:15, #66
Counter in file 0 67:1 -> 67:2, #67
Counter in file 0 67:1 -> 67:2, #68
Emitting segments for file: ../coverage/various_conditions.rs
Combined regions:
4:9 -> 4:26 (count=1)
5:8 -> 5:12 (count=1)
5:13 -> 7:6 (count=1)
10:9 -> 10:10 (count=1)
10:16 -> 10:29 (count=1)
11:9 -> 12:10 (count=1)
13:15 -> 13:28 (count=0)
14:12 -> 14:25 (count=0)
14:29 -> 14:42 (count=0)
14:42 -> 14:43 (count=0)
14:46 -> 14:60 (count=0)
14:60 -> 14:61 (count=0)
14:61 -> 16:10 (count=0)
16:10 -> 16:11 (count=0)
17:9 -> 18:18 (count=0)
20:9 -> 20:15 (count=0)
23:9 -> 23:26 (count=1)
24:8 -> 24:12 (count=1)
24:13 -> 26:6 (count=1)
28:8 -> 28:21 (count=1)
29:9 -> 29:23 (count=1)
30:15 -> 30:28 (count=0)
31:12 -> 31:25 (count=0)
31:29 -> 31:42 (count=0)
31:42 -> 31:43 (count=0)
31:46 -> 31:60 (count=0)
31:60 -> 31:61 (count=0)
31:61 -> 33:10 (count=0)
33:10 -> 33:11 (count=0)
34:9 -> 34:23 (count=0)
36:9 -> 36:15 (count=0)
39:9 -> 39:26 (count=1)
40:8 -> 40:12 (count=1)
40:13 -> 42:6 (count=1)
44:9 -> 44:10 (count=0)
44:16 -> 44:29 (count=1)
45:9 -> 45:23 (count=0)
46:15 -> 46:28 (count=1)
47:12 -> 47:25 (count=0)
47:29 -> 47:42 (count=0)
47:42 -> 47:43 (count=0)
47:46 -> 47:60 (count=0)
47:60 -> 47:61 (count=0)
47:61 -> 49:10 (count=0)
49:10 -> 49:11 (count=0)
50:9 -> 50:23 (count=0)
52:13 -> 54:15 (count=1)
57:9 -> 57:10 (count=0)
57:16 -> 57:29 (count=0)
58:9 -> 58:23 (count=0)
59:15 -> 59:28 (count=0)
60:12 -> 60:25 (count=0)
60:29 -> 60:42 (count=0)
60:42 -> 60:43 (count=0)
60:46 -> 60:60 (count=0)
60:60 -> 60:61 (count=0)
60:61 -> 62:10 (count=0)
62:10 -> 62:11 (count=0)
63:9 -> 63:23 (count=0)
65:9 -> 65:15 (count=0)
67:1 -> 67:2 (count=2)
Segment at 4:9 (count = 1), RegionEntry
Segment at 4:26 (count = 0), Skipped
Segment at 5:8 (count = 1), RegionEntry
Segment at 5:12 (count = 0), Skipped
Segment at 5:13 (count = 1), RegionEntry
Segment at 7:6 (count = 0), Skipped
Segment at 10:9 (count = 1), RegionEntry
Segment at 10:10 (count = 0), Skipped
Segment at 10:16 (count = 1), RegionEntry
Segment at 10:29 (count = 0), Skipped
Segment at 11:9 (count = 1), RegionEntry
Segment at 12:10 (count = 0), Skipped
Segment at 13:15 (count = 0), RegionEntry
Segment at 13:28 (count = 0), Skipped
Segment at 14:12 (count = 0), RegionEntry
Segment at 14:25 (count = 0), Skipped
Segment at 14:29 (count = 0), RegionEntry
Segment at 14:42 (count = 0), RegionEntry
Segment at 14:43 (count = 0), Skipped
Segment at 14:46 (count = 0), RegionEntry
Segment at 14:60 (count = 0), RegionEntry
Segment at 14:61 (count = 0), RegionEntry
Segment at 16:10 (count = 0), RegionEntry
Segment at 16:11 (count = 0), Skipped
Segment at 17:9 (count = 0), RegionEntry
Segment at 18:18 (count = 0), Skipped
Segment at 20:9 (count = 0), RegionEntry
Segment at 20:15 (count = 0), Skipped
Segment at 23:9 (count = 1), RegionEntry
Segment at 23:26 (count = 0), Skipped
Segment at 24:8 (count = 1), RegionEntry
Segment at 24:12 (count = 0), Skipped
Segment at 24:13 (count = 1), RegionEntry
Segment at 26:6 (count = 0), Skipped
Segment at 28:8 (count = 1), RegionEntry
Segment at 28:21 (count = 0), Skipped
Segment at 29:9 (count = 1), RegionEntry
Segment at 29:23 (count = 0), Skipped
Segment at 30:15 (count = 0), RegionEntry
Segment at 30:28 (count = 0), Skipped
Segment at 31:12 (count = 0), RegionEntry
Segment at 31:25 (count = 0), Skipped
Segment at 31:29 (count = 0), RegionEntry
Segment at 31:42 (count = 0), RegionEntry
Segment at 31:43 (count = 0), Skipped
Segment at 31:46 (count = 0), RegionEntry
Segment at 31:60 (count = 0), RegionEntry
Segment at 31:61 (count = 0), RegionEntry
Segment at 33:10 (count = 0), RegionEntry
Segment at 33:11 (count = 0), Skipped
Segment at 34:9 (count = 0), RegionEntry
Segment at 34:23 (count = 0), Skipped
Segment at 36:9 (count = 0), RegionEntry
Segment at 36:15 (count = 0), Skipped
Segment at 39:9 (count = 1), RegionEntry
Segment at 39:26 (count = 0), Skipped
Segment at 40:8 (count = 1), RegionEntry
Segment at 40:12 (count = 0), Skipped
Segment at 40:13 (count = 1), RegionEntry
Segment at 42:6 (count = 0), Skipped
Segment at 44:9 (count = 0), RegionEntry
Segment at 44:10 (count = 0), Skipped
Segment at 44:16 (count = 1), RegionEntry
Segment at 44:29 (count = 0), Skipped
Segment at 45:9 (count = 0), RegionEntry
Segment at 45:23 (count = 0), Skipped
Segment at 46:15 (count = 1), RegionEntry
Segment at 46:28 (count = 0), Skipped
Segment at 47:12 (count = 0), RegionEntry
Segment at 47:25 (count = 0), Skipped
Segment at 47:29 (count = 0), RegionEntry
Segment at 47:42 (count = 0), RegionEntry
Segment at 47:43 (count = 0), Skipped
Segment at 47:46 (count = 0), RegionEntry
Segment at 47:60 (count = 0), RegionEntry
Segment at 47:61 (count = 0), RegionEntry
Segment at 49:10 (count = 0), RegionEntry
Segment at 49:11 (count = 0), Skipped
Segment at 50:9 (count = 0), RegionEntry
Segment at 50:23 (count = 0), Skipped
Segment at 52:13 (count = 1), RegionEntry
Segment at 54:15 (count = 0), Skipped
Segment at 57:9 (count = 0), RegionEntry
Segment at 57:10 (count = 0), Skipped
Segment at 57:16 (count = 0), RegionEntry
Segment at 57:29 (count = 0), Skipped
Segment at 58:9 (count = 0), RegionEntry
Segment at 58:23 (count = 0), Skipped
Segment at 59:15 (count = 0), RegionEntry
Segment at 59:28 (count = 0), Skipped
Segment at 60:12 (count = 0), RegionEntry
Segment at 60:25 (count = 0), Skipped
Segment at 60:29 (count = 0), RegionEntry
Segment at 60:42 (count = 0), RegionEntry
Segment at 60:43 (count = 0), Skipped
Segment at 60:46 (count = 0), RegionEntry
Segment at 60:60 (count = 0), RegionEntry
Segment at 60:61 (count = 0), RegionEntry
Segment at 62:10 (count = 0), RegionEntry
Segment at 62:11 (count = 0), Skipped
Segment at 63:9 (count = 0), RegionEntry
Segment at 63:23 (count = 0), Skipped
Segment at 65:9 (count = 0), RegionEntry
Segment at 65:15 (count = 0), Skipped
Segment at 67:1 (count = 2), RegionEntry
Segment at 67:2 (count = 0), Skipped

View File

@ -0,0 +1,22 @@
Args: /usr/local/google/home/richkadel/rust/build/x86_64-unknown-linux-gnu/llvm/build/bin/llvm-cov show --debug --Xdemangler=/usr/local/google/home/richkadel/rust/build/x86_64-unknown-linux-gnu/stage0-tools-bin/rust-demangler --show-line-counts-or-regions --instr-profile=/usr/local/google/home/richkadel/rust/build/x86_64-unknown-linux-gnu/test/run-make-fulldeps/coverage-reports-base/coverage-reports-base/while.profdata /usr/local/google/home/richkadel/rust/build/x86_64-unknown-linux-gnu/test/run-make-fulldeps/coverage-reports-base/coverage-reports-base/while
Counter in file 0 2:9 -> 2:16, #1
Counter in file 0 3:11 -> 3:20, #2
Counter in file 0 3:21 -> 4:6, #3
Counter in file 0 4:6 -> 4:7, (#3 + 0)
Counter in file 0 5:1 -> 5:2, #4
Emitting segments for file: ../coverage/while.rs
Combined regions:
2:9 -> 2:16 (count=1)
3:11 -> 3:20 (count=1)
3:21 -> 4:6 (count=0)
4:6 -> 4:7 (count=0)
5:1 -> 5:2 (count=1)
Segment at 2:9 (count = 1), RegionEntry
Segment at 2:16 (count = 0), Skipped
Segment at 3:11 (count = 1), RegionEntry
Segment at 3:20 (count = 0), Skipped
Segment at 3:21 (count = 0), RegionEntry
Segment at 4:6 (count = 0), RegionEntry
Segment at 4:7 (count = 0), Skipped
Segment at 5:1 (count = 1), RegionEntry
Segment at 5:2 (count = 0), Skipped

View File

@ -0,0 +1,44 @@
Args: /usr/local/google/home/richkadel/rust/build/x86_64-unknown-linux-gnu/llvm/build/bin/llvm-cov show --debug --Xdemangler=/usr/local/google/home/richkadel/rust/build/x86_64-unknown-linux-gnu/stage0-tools-bin/rust-demangler --show-line-counts-or-regions --instr-profile=/usr/local/google/home/richkadel/rust/build/x86_64-unknown-linux-gnu/test/run-make-fulldeps/coverage-reports-base/coverage-reports-base/while_early_return.profdata /usr/local/google/home/richkadel/rust/build/x86_64-unknown-linux-gnu/test/run-make-fulldeps/coverage-reports-base/coverage-reports-base/while_early_return
Counter in file 0 5:9 -> 5:27, #1
Counter in file 0 7:9 -> 9:10, #2
Counter in file 0 12:13 -> 14:14, #3
Counter in file 0 18:21 -> 20:22, #4
Counter in file 0 22:21 -> 22:27, #5
Counter in file 0 26:21 -> 26:27, #6
Counter in file 0 27:18 -> 27:19, (#5 + 0)
Counter in file 0 30:9 -> 32:10, #7
Counter in file 0 35:5 -> 35:11, #8
Counter in file 0 36:1 -> 36:2, #9
Counter in file 0 36:1 -> 36:2, #10
Emitting segments for file: ../coverage/while_early_return.rs
Combined regions:
5:9 -> 5:27 (count=1)
7:9 -> 9:10 (count=7)
12:13 -> 14:14 (count=7)
18:21 -> 20:22 (count=1)
22:21 -> 22:27 (count=0)
26:21 -> 26:27 (count=1)
27:18 -> 27:19 (count=0)
30:9 -> 32:10 (count=6)
35:5 -> 35:11 (count=0)
36:1 -> 36:2 (count=2)
Segment at 5:9 (count = 1), RegionEntry
Segment at 5:27 (count = 0), Skipped
Segment at 7:9 (count = 7), RegionEntry
Segment at 9:10 (count = 0), Skipped
Segment at 12:13 (count = 7), RegionEntry
Segment at 14:14 (count = 0), Skipped
Segment at 18:21 (count = 1), RegionEntry
Segment at 20:22 (count = 0), Skipped
Segment at 22:21 (count = 0), RegionEntry
Segment at 22:27 (count = 0), Skipped
Segment at 26:21 (count = 1), RegionEntry
Segment at 26:27 (count = 0), Skipped
Segment at 27:18 (count = 0), RegionEntry
Segment at 27:19 (count = 0), Skipped
Segment at 30:9 (count = 6), RegionEntry
Segment at 32:10 (count = 0), Skipped
Segment at 35:5 (count = 0), RegionEntry
Segment at 35:11 (count = 0), Skipped
Segment at 36:1 (count = 2), RegionEntry
Segment at 36:2 (count = 0), Skipped

View File

@ -17,14 +17,14 @@
},
"lines": {
"count": 91,
"covered": 75,
"percent": 82.41758241758241
"covered": 77,
"percent": 84.61538461538461
},
"regions": {
"count": 21,
"covered": 11,
"notcovered": 10,
"percent": 52.38095238095239
"count": 25,
"covered": 13,
"notcovered": 12,
"percent": 52
}
}
}
@ -42,14 +42,14 @@
},
"lines": {
"count": 91,
"covered": 75,
"percent": 82.41758241758241
"covered": 77,
"percent": 84.61538461538461
},
"regions": {
"count": 21,
"covered": 11,
"notcovered": 10,
"percent": 52.38095238095239
"count": 25,
"covered": 13,
"notcovered": 12,
"percent": 52
}
}
}

View File

@ -21,8 +21,8 @@
"percent": 100
},
"regions": {
"count": 5,
"covered": 5,
"count": 6,
"covered": 6,
"notcovered": 0,
"percent": 100
}
@ -46,8 +46,8 @@
"percent": 100
},
"regions": {
"count": 5,
"covered": 5,
"count": 6,
"covered": 6,
"notcovered": 0,
"percent": 100
}

View File

@ -21,8 +21,8 @@
"percent": 100
},
"regions": {
"count": 6,
"covered": 6,
"count": 7,
"covered": 7,
"notcovered": 0,
"percent": 100
}
@ -46,8 +46,8 @@
"percent": 100
},
"regions": {
"count": 6,
"covered": 6,
"count": 7,
"covered": 7,
"notcovered": 0,
"percent": 100
}

View File

@ -21,10 +21,10 @@
"percent": 100
},
"regions": {
"count": 4,
"count": 5,
"covered": 4,
"notcovered": 0,
"percent": 100
"notcovered": 1,
"percent": 80
}
}
}
@ -46,10 +46,10 @@
"percent": 100
},
"regions": {
"count": 4,
"count": 5,
"covered": 4,
"notcovered": 0,
"percent": 100
"notcovered": 1,
"percent": 80
}
}
}

View File

@ -16,15 +16,15 @@
"percent": 100
},
"lines": {
"count": 28,
"covered": 19,
"percent": 67.85714285714286
"count": 29,
"covered": 21,
"percent": 72.41379310344827
},
"regions": {
"count": 7,
"covered": 5,
"count": 9,
"covered": 7,
"notcovered": 2,
"percent": 71.42857142857143
"percent": 77.77777777777779
}
}
}
@ -41,15 +41,15 @@
"percent": 100
},
"lines": {
"count": 28,
"covered": 19,
"percent": 67.85714285714286
"count": 29,
"covered": 21,
"percent": 72.41379310344827
},
"regions": {
"count": 7,
"covered": 5,
"count": 9,
"covered": 7,
"notcovered": 2,
"percent": 71.42857142857143
"percent": 77.77777777777779
}
}
}

View File

@ -21,10 +21,10 @@
"percent": 100
},
"regions": {
"count": 13,
"count": 15,
"covered": 13,
"notcovered": 0,
"percent": 100
"notcovered": 2,
"percent": 86.66666666666667
}
}
}
@ -46,10 +46,10 @@
"percent": 100
},
"regions": {
"count": 13,
"count": 15,
"covered": 13,
"notcovered": 0,
"percent": 100
"notcovered": 2,
"percent": 86.66666666666667
}
}
}

View File

@ -16,15 +16,15 @@
"percent": 100
},
"lines": {
"count": 21,
"covered": 19,
"percent": 90.47619047619048
"count": 40,
"covered": 32,
"percent": 80
},
"regions": {
"count": 16,
"covered": 14,
"notcovered": 2,
"percent": 87.5
"count": 39,
"covered": 28,
"notcovered": 11,
"percent": 71.7948717948718
}
}
}
@ -41,15 +41,15 @@
"percent": 100
},
"lines": {
"count": 21,
"covered": 19,
"percent": 90.47619047619048
"count": 40,
"covered": 32,
"percent": 80
},
"regions": {
"count": 16,
"covered": 14,
"notcovered": 2,
"percent": 87.5
"count": 39,
"covered": 28,
"notcovered": 11,
"percent": 71.7948717948718
}
}
}

View File

@ -0,0 +1,59 @@
{
"data": [
{
"files": [
{
"filename": "../coverage/loops_and_branches.rs",
"summary": {
"functions": {
"count": 2,
"covered": 2,
"percent": 100
},
"instantiations": {
"count": 2,
"covered": 2,
"percent": 100
},
"lines": {
"count": 11,
"covered": 11,
"percent": 100
},
"regions": {
"count": 10,
"covered": 8,
"notcovered": 2,
"percent": 80
}
}
}
],
"totals": {
"functions": {
"count": 2,
"covered": 2,
"percent": 100
},
"instantiations": {
"count": 2,
"covered": 2,
"percent": 100
},
"lines": {
"count": 11,
"covered": 11,
"percent": 100
},
"regions": {
"count": 10,
"covered": 8,
"notcovered": 2,
"percent": 80
}
}
}
],
"type": "llvm.coverage.json.export",
"version": "2.0.1"
}

View File

@ -0,0 +1,59 @@
{
"data": [
{
"files": [
{
"filename": "../coverage/nested_loops.rs",
"summary": {
"functions": {
"count": 1,
"covered": 1,
"percent": 100
},
"instantiations": {
"count": 1,
"covered": 1,
"percent": 100
},
"lines": {
"count": 21,
"covered": 17,
"percent": 80.95238095238095
},
"regions": {
"count": 20,
"covered": 16,
"notcovered": 4,
"percent": 80
}
}
}
],
"totals": {
"functions": {
"count": 1,
"covered": 1,
"percent": 100
},
"instantiations": {
"count": 1,
"covered": 1,
"percent": 100
},
"lines": {
"count": 21,
"covered": 17,
"percent": 80.95238095238095
},
"regions": {
"count": 20,
"covered": 16,
"notcovered": 4,
"percent": 80
}
}
}
],
"type": "llvm.coverage.json.export",
"version": "2.0.1"
}

View File

@ -0,0 +1,59 @@
{
"data": [
{
"files": [
{
"filename": "../coverage/partial_eq_counter_without_region.rs",
"summary": {
"functions": {
"count": 5,
"covered": 5,
"percent": 100
},
"instantiations": {
"count": 8,
"covered": 5,
"percent": 62.5
},
"lines": {
"count": 15,
"covered": 15,
"percent": 100
},
"regions": {
"count": 6,
"covered": 6,
"notcovered": 0,
"percent": 100
}
}
}
],
"totals": {
"functions": {
"count": 5,
"covered": 5,
"percent": 100
},
"instantiations": {
"count": 8,
"covered": 5,
"percent": 62.5
},
"lines": {
"count": 15,
"covered": 15,
"percent": 100
},
"regions": {
"count": 6,
"covered": 6,
"notcovered": 0,
"percent": 100
}
}
}
],
"type": "llvm.coverage.json.export",
"version": "2.0.1"
}

View File

@ -16,15 +16,15 @@
"percent": 100
},
"lines": {
"count": 18,
"covered": 18,
"count": 19,
"covered": 19,
"percent": 100
},
"regions": {
"count": 7,
"covered": 7,
"notcovered": 0,
"percent": 100
"count": 9,
"covered": 8,
"notcovered": 1,
"percent": 88.88888888888889
}
}
}
@ -41,15 +41,15 @@
"percent": 100
},
"lines": {
"count": 18,
"covered": 18,
"count": 19,
"covered": 19,
"percent": 100
},
"regions": {
"count": 7,
"covered": 7,
"notcovered": 0,
"percent": 100
"count": 9,
"covered": 8,
"notcovered": 1,
"percent": 88.88888888888889
}
}
}

View File

@ -16,15 +16,15 @@
"percent": 100
},
"lines": {
"count": 26,
"covered": 26,
"count": 24,
"covered": 24,
"percent": 100
},
"regions": {
"count": 9,
"covered": 9,
"notcovered": 0,
"percent": 100
"count": 15,
"covered": 14,
"notcovered": 1,
"percent": 93.33333333333333
}
}
}
@ -41,15 +41,15 @@
"percent": 100
},
"lines": {
"count": 26,
"covered": 26,
"count": 24,
"covered": 24,
"percent": 100
},
"regions": {
"count": 9,
"covered": 9,
"notcovered": 0,
"percent": 100
"count": 15,
"covered": 14,
"notcovered": 1,
"percent": 93.33333333333333
}
}
}

View File

@ -0,0 +1,59 @@
{
"data": [
{
"files": [
{
"filename": "../coverage/tight_infinite_loop.rs",
"summary": {
"functions": {
"count": 1,
"covered": 1,
"percent": 100
},
"instantiations": {
"count": 1,
"covered": 1,
"percent": 100
},
"lines": {
"count": 2,
"covered": 2,
"percent": 100
},
"regions": {
"count": 2,
"covered": 2,
"notcovered": 0,
"percent": 100
}
}
}
],
"totals": {
"functions": {
"count": 1,
"covered": 1,
"percent": 100
},
"instantiations": {
"count": 1,
"covered": 1,
"percent": 100
},
"lines": {
"count": 2,
"covered": 2,
"percent": 100
},
"regions": {
"count": 2,
"covered": 2,
"notcovered": 0,
"percent": 100
}
}
}
],
"type": "llvm.coverage.json.export",
"version": "2.0.1"
}

View File

@ -16,15 +16,15 @@
"percent": 100
},
"lines": {
"count": 16,
"covered": 15,
"percent": 93.75
"count": 20,
"covered": 19,
"percent": 95
},
"regions": {
"count": 13,
"covered": 12,
"notcovered": 1,
"percent": 92.3076923076923
"count": 20,
"covered": 17,
"notcovered": 3,
"percent": 85
}
}
}
@ -41,15 +41,15 @@
"percent": 100
},
"lines": {
"count": 16,
"covered": 15,
"percent": 93.75
"count": 20,
"covered": 19,
"percent": 95
},
"regions": {
"count": 13,
"covered": 12,
"notcovered": 1,
"percent": 92.3076923076923
"count": 20,
"covered": 17,
"notcovered": 3,
"percent": 85
}
}
}

View File

@ -21,10 +21,10 @@
"percent": 46.93877551020408
},
"regions": {
"count": 51,
"count": 70,
"covered": 19,
"notcovered": 32,
"percent": 37.254901960784316
"notcovered": 51,
"percent": 27.142857142857142
}
}
}
@ -46,10 +46,10 @@
"percent": 46.93877551020408
},
"regions": {
"count": 51,
"count": 70,
"covered": 19,
"notcovered": 32,
"percent": 37.254901960784316
"notcovered": 51,
"percent": 27.142857142857142
}
}
}

View File

@ -0,0 +1,59 @@
{
"data": [
{
"files": [
{
"filename": "../coverage/while.rs",
"summary": {
"functions": {
"count": 1,
"covered": 1,
"percent": 100
},
"instantiations": {
"count": 1,
"covered": 1,
"percent": 100
},
"lines": {
"count": 4,
"covered": 3,
"percent": 75
},
"regions": {
"count": 5,
"covered": 3,
"notcovered": 2,
"percent": 60
}
}
}
],
"totals": {
"functions": {
"count": 1,
"covered": 1,
"percent": 100
},
"instantiations": {
"count": 1,
"covered": 1,
"percent": 100
},
"lines": {
"count": 4,
"covered": 3,
"percent": 75
},
"regions": {
"count": 5,
"covered": 3,
"notcovered": 2,
"percent": 60
}
}
}
],
"type": "llvm.coverage.json.export",
"version": "2.0.1"
}

View File

@ -17,14 +17,14 @@
},
"lines": {
"count": 18,
"covered": 16,
"percent": 88.88888888888889
"covered": 15,
"percent": 83.33333333333334
},
"regions": {
"count": 9,
"covered": 7,
"notcovered": 2,
"percent": 77.77777777777779
"count": 11,
"covered": 8,
"notcovered": 3,
"percent": 72.72727272727273
}
}
}
@ -42,14 +42,14 @@
},
"lines": {
"count": 18,
"covered": 16,
"percent": 88.88888888888889
"covered": 15,
"percent": 83.33333333333334
},
"regions": {
"count": 9,
"covered": 7,
"notcovered": 2,
"percent": 77.77777777777779
"count": 11,
"covered": 8,
"notcovered": 3,
"percent": 72.72727272727273
}
}
}

View File

@ -62,7 +62,7 @@
62| 1| let mut countdown = 0;
63| 1| if is_false {
64| 0| countdown = 10;
65| 0| }
65| 1| }
66| 1| "alt string 3".to_owned()
67| 1| }
68| 1| )
@ -77,7 +77,7 @@
77| 1| let mut countdown = 0;
78| 1| if is_false {
79| 0| countdown = 10;
80| 0| }
80| 1| }
81| 1| "alt string 4".to_owned()
82| 1| };
83| 1| println!(

View File

@ -24,7 +24,7 @@
24| | let _ = Firework { strength: 1000 };
25| |
26| | Ok(())
27| 1|}
27| 2|}
28| |
29| |// Expected program output:
30| |// Exiting with error...

View File

@ -57,7 +57,7 @@
35| | let _ = Firework { strength: 1000 };
36| |
37| | Ok(())
38| 1|}
38| 2|}
39| |
40| |// Expected program output:
41| |// Exiting with error...

View File

@ -25,5 +25,6 @@
25| 1| 10
26| 1| ;
27| 1| }
^0
28| 1|}

View File

@ -20,7 +20,7 @@
20| 0| countdown
21| 0| =
22| 0| 100
23| | }
23| 1| }
24| |
25| | if
26| 1| is_true
@ -36,6 +36,6 @@
36| 0| =
37| 0| 100
38| 0| ;
39| 0| }
39| 1| }
40| 1|}

View File

@ -10,6 +10,7 @@
10| 1| if is_true {
11| 1| countdown = 10;
12| 1| }
^0
13| |
14| | mod in_mod {
15| | const IN_MOD_CONST: u32 = 1000;
@ -48,6 +49,7 @@
48| 1| if is_true {
49| 1| in_func(countdown);
50| 1| }
^0
51| |
52| 1| let mut val = InStruct {
53| 1| in_struct_field: 101,

View File

@ -12,12 +12,14 @@
12| 1| b = 10;
13| 1| c = 100;
14| 1| }
^0
15| | let
16| 1| somebool
17| | =
18| 1| a < b
19| | ||
20| 0| b < c
20| 1| b < c
^0
21| | ;
22| | let
23| 1| somebool
@ -26,19 +28,38 @@
26| | ||
27| 1| b < c
28| | ;
29| | let
30| 1| somebool
31| | =
32| 1| a < b
33| | &&
34| 1| b < c
35| | ;
36| | let
37| 1| somebool
38| | =
39| 1| b < a
40| | &&
41| 0| b < c
42| | ;
43| 1|}
29| 1| let somebool = a < b && b < c;
30| 1| let somebool = b < a && b < c;
^0
31| |
32| | if
33| 1| !
34| 1| is_true
35| 0| {
36| 0| a = 2
37| 0| ;
38| 1| }
39| |
40| | if
41| 1| is_true
42| 1| {
43| 1| b = 30
44| 1| ;
45| 1| }
46| | else
47| 0| {
48| 0| c = 400
49| 0| ;
50| 1| }
51| |
52| 1| if !is_true {
53| 0| a = 2;
54| 1| }
55| |
56| 1| if is_true {
57| 1| b = 30;
58| 1| } else {
59| 0| c = 400;
60| 1| }
61| 1|}

View File

@ -0,0 +1,38 @@
1| |#![allow(unused_assignments)]
2| |
3| |// This test confirms an earlier problem was resolved, supporting the MIR graph generated by the
4| |// structure of this `fmt` function.
5| |
6| |struct DebugTest;
7| |
8| |impl std::fmt::Debug for DebugTest {
9| | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
10| 1| if true {
11| 1| if false {
12| | while true {
13| | }
14| 1| }
15| 1| write!(f, "error")?;
^0
16| | } else {
17| 1| }
18| 1| Ok(())
19| 1| }
20| |}
21| |
22| 1|fn main() {
23| 1| let debug_test = DebugTest;
24| 1| println!("{:?}", debug_test);
25| 1|}
26| |
27| |/*
28| |
29| |This is the error message generated, before the issue was fixed:
30| |
31| |error: internal compiler error: compiler/rustc_mir/src/transform/coverage/mod.rs:374:42:
32| |Error processing: DefId(0:6 ~ bug_incomplete_cov_graph_traversal_simplified[317d]::{impl#0}::fmt):
33| |Error { message: "`TraverseCoverageGraphWithLoops` missed some `BasicCoverageBlock`s:
34| |[bcb6, bcb7, bcb9]" }
35| |
36| |*/

View File

@ -0,0 +1,26 @@
1| |fn main() {
2| 1| let is_true = std::env::args().len() == 1;
3| 1| let mut countdown = 10;
4| |
5| 1| 'outer: while countdown > 0 {
6| 1| let mut a = 100;
7| 1| let mut b = 100;
8| 3| for _ in 0..50 {
9| 3| if a < 30 {
10| 0| break;
11| | }
12| 3| a -= 5;
13| 3| b -= 5;
14| 3| if b < 90 {
15| 1| a -= 10;
16| 1| if is_true {
17| 1| break 'outer;
18| | } else {
19| 0| a -= 2;
20| 0| }
21| 2| }
22| 3| }
23| 0| countdown -= 1;
24| 1| }
25| 1|}

View File

@ -0,0 +1,111 @@
1| |// This test confirms an earlier problem was resolved, supporting the MIR graph generated by the
2| |// structure of this test.
3| |
4| 2|#[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord)]
^1 ^1
------------------
| Unexecuted instantiation: <partial_eq_counter_without_region::Version as core::cmp::PartialOrd>::gt
------------------
| Unexecuted instantiation: <partial_eq_counter_without_region::Version as core::cmp::PartialOrd>::le
------------------
| Unexecuted instantiation: <partial_eq_counter_without_region::Version as core::cmp::PartialOrd>::ge
------------------
| <partial_eq_counter_without_region::Version as core::cmp::PartialOrd>::lt:
| 4| 1|#[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord)]
------------------
5| |pub struct Version {
6| | major: usize,
7| 1| minor: usize,
8| | patch: usize,
9| |}
10| |
11| |impl Version {
12| | pub fn new(major: usize, minor: usize, patch: usize) -> Self {
13| 2| Self {
14| 2| major,
15| 2| minor,
16| 2| patch,
17| 2| }
18| 2| }
19| |}
20| |
21| 1|fn main() {
22| 1| let version_3_2_1 = Version::new(3, 2, 1);
23| 1| let version_3_3_0 = Version::new(3, 3, 0);
24| 1|
25| 1| println!("{:?} < {:?} = {}", version_3_2_1, version_3_3_0, version_3_2_1 < version_3_3_0);
26| 1|}
27| |
28| |/*
29| |
30| |This test verifies a bug was fixed that otherwise generated this error:
31| |
32| |thread 'rustc' panicked at 'No counters provided the source_hash for function:
33| | Instance {
34| | def: Item(WithOptConstParam {
35| | did: DefId(0:101 ~ autocfg[c44a]::version::{impl#2}::partial_cmp),
36| | const_param_did: None
37| | }),
38| | substs: []
39| | }'
40| |The `PartialOrd` derived by `Version` happened to generate a MIR that generated coverage
41| |without a code region associated with any `Counter`. Code regions were associated with at least
42| |one expression, which is allowed, but the `function_source_hash` was only passed to the codegen
43| |(coverage mapgen) phase from a `Counter`s code region. A new method was added to pass the
44| |`function_source_hash` without a code region, if necessary.
45| |
46| |*/
47| |
48| |// FIXME(richkadel): It may be worth investigating why the coverage report for this test produces
49| |// the following results:
50| |
51| |/*
52| |
53| |1. Why are their two counts below different characters (first and last) of `PartialOrd`, on line 17?
54| |
55| |2. Line 17 is counted twice, but the `::lt` instance shows a line count of 1? Is there a missing
56| | line count with a different instance? Or was it really only called once?
57| |
58| |3. Line 20 shows another line count (of 1) for a line within a `struct` declaration (on only one of
59| | its 3 fields). I doubt the specific field (`minor`) is relevant, but rather I suspect there's a
60| | problem computing the file position here, for some reason.
61| |
62| |<snip>
63| | 16| |
64| | 17| 2|#[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord)]
65| | ^1 ^1
66| |------------------
67| ||Unexecuted instantiation: <partial_eq_counter_without_region::Version as core::cmp::PartialOrd>::gt
68| |------------------
69| ||Unexecuted instantiation: <partial_eq_counter_without_region::Version as core::cmp::PartialOrd>::le
70| |------------------
71| ||Unexecuted instantiation: <partial_eq_counter_without_region::Version as core::cmp::PartialOrd>::ge
72| |------------------
73| ||<partial_eq_counter_without_region::Version as core::cmp::PartialOrd>::lt:
74| || 17| 1|#[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord)]
75| |------------------
76| | 18| |pub struct Version {
77| | 19| | major: usize,
78| | 20| 1| minor: usize,
79| | 21| | patch: usize,
80| | 22| |}
81| | 23| |
82| | 24| |impl Version {
83| | 25| | pub fn new(major: usize, minor: usize, patch: usize) -> Self {
84| | 26| 2| Version {
85| | 27| 2| major,
86| | 28| 2| minor,
87| | 29| 2| patch,
88| | 30| 2| }
89| | 31| 2| }
90| | 32| |}
91| | 33| |
92| | 34| 1|fn main() {
93| | 35| 1| let version_3_2_1 = Version::new(3, 2, 1);
94| | 36| 1| let version_3_3_0 = Version::new(3, 3, 0);
95| | 37| 1|
96| | 38| 1| println!("{:?} < {:?} = {}", version_3_2_1, version_3_3_0, version_3_2_1 < version
97| |_3_3_0);
98| | 39| 1|}
99| |*/

View File

@ -16,6 +16,7 @@
16| 1| 10
17| 1| ;
18| 1| }
^0
19| |
20| | loop
21| | {
@ -31,6 +32,6 @@
31| 10| -=
32| 10| 1
33| | ;
34| | }
34| 1| }
35| 1|}

View File

@ -10,22 +10,24 @@
10| 1| if is_true {
11| 1| countdown = 0;
12| 1| }
^0
13| |
14| 3| for
15| 3| _
14| | for
15| 2| _
16| | in
17| 1| 0..2
17| 3| 0..2
18| | {
19| | let z
20| | ;
21| | match
22| 2| countdown
23| 2| {
24| 2| x
25| 2| if
23| | {
24| 1| x
25| | if
26| 2| x
27| 2| <
28| 2| 1
^1
29| | =>
30| 1| {
31| 1| z = countdown
@ -39,6 +41,6 @@
39| | =>
40| 1| {}
41| | }
42| | }
42| 3| }
43| 1|}

View File

@ -0,0 +1,6 @@
1| |fn main() {
2| 1| if false {
3| | loop {}
4| | }
5| 1|}

View File

@ -6,22 +6,22 @@
6| 1| Err(())
7| | } else {
8| 5| Ok(())
9| | }
9| 1| }
10| 6|}
11| |
12| |fn main() -> Result<(),()> {
13| 1| let mut
14| 1| countdown = 10
15| | ;
16| 6| for
16| | for
17| 6| _
18| | in
19| 1| 0..10
19| 6| 0..10
20| | {
21| 6| countdown
22| 6| -= 1
23| | ;
24| | if
23| 6| ;
24| 6| if
25| 6| countdown < 5
26| | {
27| 1| call(/*return_error=*/ true)?;
@ -29,8 +29,9 @@
29| | else
30| | {
31| 5| call(/*return_error=*/ false)?;
32| | }
33| | }
^0
32| 5| }
33| 6| }
34| 0| Ok(())
35| 1|}
35| 2|}

View File

@ -65,5 +65,5 @@
64| | } else {
65| 0| return;
66| | };
67| 1|}
67| 2|}

Some files were not shown because too many files have changed in this diff Show More