1
1
//! Generates `DrCov` traces
2
2
use std:: {
3
- collections:: HashMap ,
4
3
hash:: { BuildHasher , Hasher } ,
5
4
path:: { Path , PathBuf } ,
6
5
rc:: Rc ,
@@ -25,7 +24,6 @@ pub struct DrCovRuntime {
25
24
pub drcov_basic_blocks : Vec < DrCovBasicBlock > ,
26
25
/// The memory ragnes of this target
27
26
ranges : RangeMap < usize , ( u16 , String ) > ,
28
- stalked_addresses : HashMap < usize , usize > ,
29
27
coverage_directory : PathBuf ,
30
28
}
31
29
@@ -77,29 +75,13 @@ impl DrCovRuntime {
77
75
..Self :: default ( )
78
76
}
79
77
}
80
-
81
- /// Add a stalked address to real address mapping.
82
- #[ inline]
83
- pub fn add_stalked_address ( & mut self , stalked : usize , real : usize ) {
84
- self . stalked_addresses . insert ( stalked, real) ;
85
- }
86
-
87
- /// Resolves the real address from a stalker stalked address if possible, if there is no
88
- /// real address, the stalked address is returned.
89
- #[ must_use]
90
- pub fn real_address_for_stalked ( & self , stalked : usize ) -> usize {
91
- self . stalked_addresses
92
- . get ( & stalked)
93
- . map_or ( stalked, |addr| * addr)
94
- }
95
78
}
96
79
97
80
impl Default for DrCovRuntime {
98
81
fn default ( ) -> Self {
99
82
Self {
100
83
drcov_basic_blocks : vec ! [ ] ,
101
84
ranges : RangeMap :: new ( ) ,
102
- stalked_addresses : HashMap :: new ( ) ,
103
85
coverage_directory : PathBuf :: from ( "./coverage" ) ,
104
86
}
105
87
}
0 commit comments