Skip to content
This repository was archived by the owner on Nov 1, 2023. It is now read-only.

Commit 25ccdfd

Browse files
authored
Merge branch 'main' into tevoinea/MoreGranularScaleInProtectionErrors
2 parents dec09bc + a040aa2 commit 25ccdfd

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/agent/coverage/src/binary.rs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,20 @@ pub fn find_coverage_sites(
120120
let mut offsets = BTreeSet::new();
121121

122122
for function in debuginfo.functions() {
123+
if let Some(location) = symcache.lookup(function.offset.0).next() {
124+
if let Some(file) = location.file() {
125+
if !allowlist.source_files.is_allowed(file.full_path()) {
126+
debug!(
127+
"skipping sweep of `{}:{}` due to excluded source path `{}`",
128+
module.executable_path(),
129+
function.name,
130+
file.full_path(),
131+
);
132+
continue;
133+
}
134+
}
135+
}
136+
123137
let blocks = block::sweep_region(module, &debuginfo, function.offset, function.size)?;
124138

125139
for block in &blocks {

0 commit comments

Comments
 (0)