Skip to content

Commit 9027ea3

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

5 files changed

Lines changed: 19 additions & 19 deletions

File tree

crates/runner-shared/src/metadata.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ use std::path::PathBuf;
88

99
use crate::debug_info::{DebugInfoPidMapping, ModuleDebugInfo};
1010
use crate::fifo::MarkerType;
11-
use crate::perf_map::ProcessModuleLoadBias;
11+
use crate::perf_map::MappedProcessModuleSymbols;
1212
use crate::unwind_data::MappedProcessUnwindData;
1313

1414
#[derive(Serialize, Deserialize)]
@@ -45,16 +45,16 @@ pub struct PerfMetadata {
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")]
48-
pub unwind_data_pid_mappings_by_pid: HashMap<pid_t, Vec<MappedProcessUnwindData>>,
48+
pub mapped_process_unwind_data_by_pid: HashMap<pid_t, Vec<MappedProcessUnwindData>>,
4949

5050
/// Per-pid symbol references, mapping PID to list of perf map index + load bias
5151
#[serde(default, skip_serializing_if = "HashMap::is_empty")]
52-
pub symbol_pid_mappings_by_pid: HashMap<pid_t, Vec<ProcessModuleLoadBias>>,
52+
pub mapped_process_module_symbols: HashMap<pid_t, Vec<MappedProcessModuleSymbols>>,
5353

54-
/// Mapping from semantic key to original binary path
54+
/// Mapping from semantic `path_key` to original binary path on host disk
5555
/// Kept for traceability, and if we ever need to reconstruct the original paths from the keys
5656
#[serde(default, skip_serializing_if = "HashMap::is_empty")]
57-
pub key_to_path: HashMap<String, PathBuf>,
57+
pub path_key_to_path: HashMap<String, PathBuf>,
5858
}
5959

6060
impl PerfMetadata {

crates/runner-shared/src/perf_map.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ pub const SYMBOLS_MAP_SUFFIX: &str = "symbols.map";
55

66
/// Per-pid mounting info referencing a deduplicated perf map entry.
77
#[derive(Serialize, Deserialize, Clone, Debug)]
8-
pub struct ProcessModuleLoadBias {
8+
pub struct MappedProcessModuleSymbols {
99
pub perf_map_key: String,
1010
pub load_bias: u64,
1111
}

src/bin/compare_walltime_output.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ fn load_new_format(
162162
// Combine with per-pid metadata
163163
let mut result: BTreeMap<i32, Vec<NormalizedEntry>> = BTreeMap::new();
164164

165-
for (pid, mappings) in &metadata.unwind_data_pid_mappings_by_pid {
165+
for (pid, mappings) in &metadata.mapped_process_unwind_data_by_pid {
166166
let entries = result.entry(*pid).or_default();
167167
for mapping in mappings {
168168
let v3 = unwind_by_key
@@ -313,7 +313,7 @@ fn load_new_perf_maps(
313313
// Combine with per-pid metadata to apply load_bias
314314
let mut result: BTreeMap<i32, Vec<PerfMapSymbol>> = BTreeMap::new();
315315

316-
for (pid, mappings) in &metadata.symbol_pid_mappings_by_pid {
316+
for (pid, mappings) in &metadata.mapped_process_module_symbols {
317317
let entries = result.entry(*pid).or_default();
318318
for mapping in mappings {
319319
let raw_symbols = maps_by_key.get(&mapping.perf_map_key).with_context(|| {

src/executor/wall_time/perf/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -325,9 +325,9 @@ impl BenchmarkData {
325325
markers: self.marker_result.markers.clone(),
326326
debug_info: artifacts.debug_info,
327327
debug_info_pid_mappings_by_pid: artifacts.debug_info_pid_mappings_by_pid,
328-
unwind_data_pid_mappings_by_pid: artifacts.unwind_data_pid_mappings_by_pid,
329-
symbol_pid_mappings_by_pid: artifacts.symbol_pid_mappings_by_pid,
330-
key_to_path: artifacts.key_to_path,
328+
mapped_process_unwind_data_by_pid: artifacts.mapped_process_unwind_data_by_pid,
329+
mapped_process_module_symbols: artifacts.symbol_pid_mappings_by_pid,
330+
path_key_to_path: artifacts.key_to_path,
331331
debug_info_by_pid: Default::default(), // No longer used
332332
};
333333
metadata.save_to(&path).unwrap();

src/executor/wall_time/perf/save_artifacts.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,16 @@ use crate::prelude::*;
66
use libc::pid_t;
77
use rayon::prelude::*;
88
use runner_shared::debug_info::{DebugInfoPidMapping, ModuleDebugInfo};
9-
use runner_shared::perf_map::ProcessModuleLoadBias;
9+
use runner_shared::perf_map::MappedProcessModuleSymbols;
1010
use runner_shared::unwind_data::{MappedProcessUnwindData, ProcessUnwindData, UnwindData};
1111
use std::collections::HashMap;
1212
use std::path::{Path, PathBuf};
1313

1414
pub struct SavedArtifacts {
15-
pub symbol_pid_mappings_by_pid: HashMap<pid_t, Vec<ProcessModuleLoadBias>>,
15+
pub symbol_pid_mappings_by_pid: HashMap<pid_t, Vec<MappedProcessModuleSymbols>>,
1616
pub debug_info: HashMap<String, ModuleDebugInfo>,
1717
pub debug_info_pid_mappings_by_pid: HashMap<pid_t, Vec<DebugInfoPidMapping>>,
18-
pub unwind_data_pid_mappings_by_pid: HashMap<pid_t, Vec<MappedProcessUnwindData>>,
18+
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>,
2121
}
@@ -36,7 +36,7 @@ pub fn save_artifacts(
3636
let (debug_info, debug_info_pid_mappings_by_pid) =
3737
save_debug_info(mounted_modules_by_path, &mut path_to_key);
3838

39-
let unwind_data_pid_mappings_by_pid = save_unwind_data(
39+
let mapped_process_unwind_data_by_pid = save_unwind_data(
4040
profile_folder,
4141
mounted_modules_by_path,
4242
jit_unwind_data_by_pid,
@@ -54,7 +54,7 @@ pub fn save_artifacts(
5454
symbol_pid_mappings_by_pid,
5555
debug_info,
5656
debug_info_pid_mappings_by_pid,
57-
unwind_data_pid_mappings_by_pid,
57+
mapped_process_unwind_data_by_pid,
5858
ignored_modules,
5959
key_to_path,
6060
}
@@ -86,7 +86,7 @@ fn save_symbols(
8686
profile_folder: &Path,
8787
mounted_modules_by_path: &HashMap<PathBuf, MountedModule>,
8888
path_to_key: &HashMap<PathBuf, String>,
89-
) -> HashMap<pid_t, Vec<ProcessModuleLoadBias>> {
89+
) -> HashMap<pid_t, Vec<MappedProcessModuleSymbols>> {
9090
let symbols_count = mounted_modules_by_path
9191
.values()
9292
.filter(|m| m.module_symbols.is_some())
@@ -100,7 +100,7 @@ fn save_symbols(
100100
}
101101
});
102102

103-
let mut mappings_by_pid: HashMap<pid_t, Vec<ProcessModuleLoadBias>> = HashMap::new();
103+
let mut mappings_by_pid: HashMap<pid_t, Vec<MappedProcessModuleSymbols>> = HashMap::new();
104104
for (path, m) in mounted_modules_by_path {
105105
if m.module_symbols.is_none() {
106106
continue;
@@ -111,7 +111,7 @@ fn save_symbols(
111111
mappings_by_pid
112112
.entry(pid)
113113
.or_default()
114-
.push(ProcessModuleLoadBias {
114+
.push(MappedProcessModuleSymbols {
115115
perf_map_key: key.clone(),
116116
load_bias,
117117
});

0 commit comments

Comments
 (0)