Profile without ELF data

This commit is contained in:
2025-08-27 22:49:44 -04:00
parent 2936960cc9
commit 4785e5e11b
3 changed files with 34 additions and 21 deletions
+7 -7
View File
@@ -17,17 +17,17 @@ pub struct Recording {
impl Recording {
pub fn new(state: &ProgramState) -> Self {
let symbol_file = state.symbol_file();
let name = &symbol_file.name();
let reference_timestamp = ReferenceTimestamp::from_millis_since_unix_epoch(0.0);
let interval = SamplingInterval::from_hz(20_000_000.0);
let mut profile = Profile::new(name, reference_timestamp, interval);
let mut profile = Profile::new(state.name(), reference_timestamp, interval);
let process = profile.add_process(name, 1, Timestamp::from_nanos_since_reference(0));
let process =
profile.add_process(state.name(), 1, Timestamp::from_nanos_since_reference(0));
let lib = profile.add_lib(symbol_file.library_info().clone());
profile.add_lib_mapping(process, lib, 0x00000000, 0xffffffff, 0);
if let Some(symbol_file) = state.symbol_file() {
let lib = profile.add_lib(symbol_file.library_info().clone());
profile.add_lib_mapping(process, lib, 0x00000000, 0xffffffff, 0);
}
let mut me = Self {
profile,