Skip to content

Commit 5720fe4

Browse files
committed
chore: add debug logs for perf.map collection
1 parent 7e1f6d9 commit 5720fe4

2 files changed

Lines changed: 7 additions & 4 deletions

File tree

src/run/runner/wall_time/perf/helpers.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
use std::collections::HashMap;
2-
3-
use anyhow::{anyhow, bail};
1+
use crate::prelude::*;
42
use linux_perf_data::{PerfFileReader, PerfFileRecord, linux_perf_event_reader::EventRecord};
3+
use std::collections::HashMap;
54

65
/// Tries to find the pid of the sampled process within a perf.data file.
76
pub fn find_pid<P: AsRef<std::path::Path>>(perf_file: P) -> anyhow::Result<i32> {
@@ -48,6 +47,7 @@ pub fn find_pid<P: AsRef<std::path::Path>>(perf_file: P) -> anyhow::Result<i32>
4847
}
4948
}
5049
}
50+
debug!("Pid frequency: {pid_freq:?}");
5151

5252
// Choose the pid with the highest frequency. However, we can only use a pid if more than N% of the
5353
// events are from that pid.

src/run/runner/wall_time/perf/mod.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,10 @@ impl PerfRunner {
198198
let perf_map_pids = futures::future::try_join_all(copy_tasks)
199199
.await?
200200
.into_iter()
201-
.filter_map(Result::ok)
201+
.filter_map(|result| {
202+
debug!("Copy task result: {result:?}");
203+
result.ok()
204+
})
202205
.collect::<HashSet<_>>();
203206
harvest_perf_maps_for_pids(profile_folder, &perf_map_pids).await?;
204207

0 commit comments

Comments
 (0)