Skip to content

Commit 984fc10

Browse files
fix: filter out empty named symbols when building perf-map
1 parent dc07014 commit 984fc10

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

src/executor/wall_time/perf/perf_map.rs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,16 @@ impl ModuleSymbols {
100100
}
101101
}
102102

103-
// Filter out any symbols that still have zero size
104-
symbols.retain(|symbol| symbol.size > 0);
103+
// Filter out any symbols that still have zero size or an empty name
104+
symbols.retain(|symbol| {
105+
let should_keep = symbol.size > 0 && !symbol.name.is_empty();
106+
107+
if !should_keep {
108+
trace!("Filtering out symbol: {symbol:?}");
109+
}
110+
111+
should_keep
112+
});
105113

106114
if symbols.is_empty() {
107115
return Err(anyhow::anyhow!("No symbols found"));

0 commit comments

Comments
 (0)