Skip to content

Commit 8c864c5

Browse files
--wip-- [skip ci]
1 parent 9027ea3 commit 8c864c5

5 files changed

Lines changed: 16 additions & 16 deletions

File tree

crates/runner-shared/src/debug_info.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ impl std::fmt::Debug for DebugInfo {
2323

2424
/// Per-pid mounting info referencing a deduplicated debug info entry.
2525
#[derive(Serialize, Deserialize, Clone, Debug)]
26-
pub struct DebugInfoPidMapping {
26+
pub struct MappedProcessDebugInfo {
2727
pub debug_info_key: String,
2828
pub load_bias: u64,
2929
}

crates/runner-shared/src/metadata.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use std::io::BufWriter;
66
use std::path::Path;
77
use std::path::PathBuf;
88

9-
use crate::debug_info::{DebugInfoPidMapping, ModuleDebugInfo};
9+
use crate::debug_info::{MappedProcessDebugInfo, ModuleDebugInfo};
1010
use crate::fifo::MarkerType;
1111
use crate::perf_map::MappedProcessModuleSymbols;
1212
use crate::unwind_data::MappedProcessUnwindData;
@@ -32,7 +32,7 @@ pub struct PerfMetadata {
3232

3333
/// Kept for backward compatibility, was used before deduplication of debug info entries.
3434
#[serde(default, skip_serializing_if = "HashMap::is_empty")]
35-
#[deprecated(note = "Use 'debug_info' + 'debug_info_pid_mappings_by_pid' instead")]
35+
#[deprecated(note = "Use 'debug_info' + 'mapped_process_debug_info_by_pid' instead")]
3636
pub debug_info_by_pid: HashMap<pid_t, Vec<ModuleDebugInfo>>,
3737

3838
/// Deduplicated debug info entries, keyed by semantic key
@@ -41,7 +41,7 @@ pub struct PerfMetadata {
4141

4242
/// Per-pid debug info references, mapping PID to list of debug info index + load bias
4343
#[serde(default, skip_serializing_if = "HashMap::is_empty")]
44-
pub debug_info_pid_mappings_by_pid: HashMap<pid_t, Vec<DebugInfoPidMapping>>,
44+
pub mapped_process_debug_info_by_pid: HashMap<pid_t, Vec<MappedProcessDebugInfo>>,
4545

4646
/// Per-pid unwind data references, mapping PID to list of unwind data index + mounting info
4747
#[serde(default, skip_serializing_if = "HashMap::is_empty")]

src/bin/compare_walltime_output.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -475,10 +475,10 @@ fn load_old_debug_info(dir: &Path) -> Result<BTreeMap<i32, Vec<NormalizedDebugIn
475475
.collect())
476476
}
477477

478-
/// Load debug info from new format: `debug_info` HashMap + `debug_info_pid_mappings_by_pid`.
478+
/// Load debug info from new format: `debug_info` HashMap + `mapped_process_debug_info_by_pid`.
479479
fn load_new_debug_info(metadata: &PerfMetadata) -> BTreeMap<i32, Vec<NormalizedDebugInfoEntry>> {
480480
metadata
481-
.debug_info_pid_mappings_by_pid
481+
.mapped_process_debug_info_by_pid
482482
.iter()
483483
.map(|(pid, mappings)| {
484484
let mut entries: Vec<_> = mappings
@@ -840,9 +840,9 @@ fn main() -> Result<()> {
840840

841841
println!("Loading new debug info from: {}", new_dir.display());
842842
println!(
843-
" (metadata has {} debug_info entries, {} pids in debug_info_pid_mappings_by_pid)",
843+
" (metadata has {} debug_info entries, {} pids in mapped_process_debug_info_by_pid)",
844844
metadata.debug_info.len(),
845-
metadata.debug_info_pid_mappings_by_pid.len()
845+
metadata.mapped_process_debug_info_by_pid.len()
846846
);
847847
let new_debug_by_pid = load_new_debug_info(&metadata);
848848
println!(

src/executor/wall_time/perf/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ impl BenchmarkData {
324324
ignored_modules: artifacts.ignored_modules,
325325
markers: self.marker_result.markers.clone(),
326326
debug_info: artifacts.debug_info,
327-
debug_info_pid_mappings_by_pid: artifacts.debug_info_pid_mappings_by_pid,
327+
mapped_process_debug_info_by_pid: artifacts.mapped_process_debug_info_by_pid,
328328
mapped_process_unwind_data_by_pid: artifacts.mapped_process_unwind_data_by_pid,
329329
mapped_process_module_symbols: artifacts.symbol_pid_mappings_by_pid,
330330
path_key_to_path: artifacts.key_to_path,

src/executor/wall_time/perf/save_artifacts.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use crate::executor::wall_time::perf::parse_perf_file::MountedModule;
55
use crate::prelude::*;
66
use libc::pid_t;
77
use rayon::prelude::*;
8-
use runner_shared::debug_info::{DebugInfoPidMapping, ModuleDebugInfo};
8+
use runner_shared::debug_info::{MappedProcessDebugInfo, ModuleDebugInfo};
99
use runner_shared::perf_map::MappedProcessModuleSymbols;
1010
use runner_shared::unwind_data::{MappedProcessUnwindData, ProcessUnwindData, UnwindData};
1111
use std::collections::HashMap;
@@ -14,7 +14,7 @@ use std::path::{Path, PathBuf};
1414
pub struct SavedArtifacts {
1515
pub symbol_pid_mappings_by_pid: HashMap<pid_t, Vec<MappedProcessModuleSymbols>>,
1616
pub debug_info: HashMap<String, ModuleDebugInfo>,
17-
pub debug_info_pid_mappings_by_pid: HashMap<pid_t, Vec<DebugInfoPidMapping>>,
17+
pub mapped_process_debug_info_by_pid: HashMap<pid_t, Vec<MappedProcessDebugInfo>>,
1818
pub mapped_process_unwind_data_by_pid: HashMap<pid_t, Vec<MappedProcessUnwindData>>,
1919
pub ignored_modules: Vec<(String, u64, u64)>,
2020
pub key_to_path: HashMap<String, PathBuf>,
@@ -33,7 +33,7 @@ pub fn save_artifacts(
3333
let symbol_pid_mappings_by_pid =
3434
save_symbols(profile_folder, mounted_modules_by_path, &path_to_key);
3535

36-
let (debug_info, debug_info_pid_mappings_by_pid) =
36+
let (debug_info, mapped_process_debug_info_by_pid) =
3737
save_debug_info(mounted_modules_by_path, &mut path_to_key);
3838

3939
let mapped_process_unwind_data_by_pid = save_unwind_data(
@@ -53,7 +53,7 @@ pub fn save_artifacts(
5353
SavedArtifacts {
5454
symbol_pid_mappings_by_pid,
5555
debug_info,
56-
debug_info_pid_mappings_by_pid,
56+
mapped_process_debug_info_by_pid,
5757
mapped_process_unwind_data_by_pid,
5858
ignored_modules,
5959
key_to_path,
@@ -130,7 +130,7 @@ fn save_debug_info(
130130
path_to_key: &mut HashMap<PathBuf, String>,
131131
) -> (
132132
HashMap<String, ModuleDebugInfo>,
133-
HashMap<pid_t, Vec<DebugInfoPidMapping>>,
133+
HashMap<pid_t, Vec<MappedProcessDebugInfo>>,
134134
) {
135135
debug!("Saving debug_info");
136136

@@ -148,7 +148,7 @@ fn save_debug_info(
148148
})
149149
.collect();
150150

151-
let mut mappings_by_pid: HashMap<pid_t, Vec<DebugInfoPidMapping>> = HashMap::new();
151+
let mut mappings_by_pid: HashMap<pid_t, Vec<MappedProcessDebugInfo>> = HashMap::new();
152152
for (path, m) in mounted_modules_by_path {
153153
if m.module_symbols.is_none() {
154154
continue;
@@ -161,7 +161,7 @@ fn save_debug_info(
161161
mappings_by_pid
162162
.entry(pid)
163163
.or_default()
164-
.push(DebugInfoPidMapping {
164+
.push(MappedProcessDebugInfo {
165165
debug_info_key: key.clone(),
166166
load_bias,
167167
});

0 commit comments

Comments
 (0)