Profiling #7

Merged
SonicSwordcane merged 15 commits from profiling into main 2025-09-01 21:51:34 +00:00
1 changed files with 8 additions and 2 deletions
Showing only changes of commit 2936960cc9 - Show all commits

View File

@ -200,8 +200,14 @@ impl ProfilerSession {
}
async fn start_profiling(&mut self, file_path: PathBuf) -> Result<()> {
self.program = Some(ProgramState::new(file_path).await?);
self.recording = None;
let program = ProgramState::new(file_path).await?;
let recording = if self.recording.is_some() {
Some(Recording::new(&program))
} else {
None
};
self.program = Some(program);
self.recording = recording;
Ok(())
}