Skip to content

Commit 41b371e

Browse files
feat(prof): add I/O profiling for macOS (#3648)
* feat(prof): add I/O profiling for macOS Co-authored-by: Claude Opus 4.6 <[email protected]>
1 parent c034f2a commit 41b371e

7 files changed

Lines changed: 599 additions & 33 deletions

File tree

Cargo.lock

Lines changed: 11 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

profiling/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ thiserror = "2"
4040
tracing = { version = "0.1", optional = true }
4141
uuid = { version = "1.0", features = ["v4"] }
4242

43+
[target.'cfg(target_vendor = "apple")'.dependencies]
44+
mach2 = "0.5" # version 0.6 requires edition="2024"
45+
4346
[dependencies.tracing-subscriber]
4447
version = "0.3"
4548
optional = true
Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
use super::GotSymbolOverwrite;
12
use crate::bindings::{
23
Elf64_Dyn, Elf64_Rela, Elf64_Sym, Elf64_Xword, DT_JMPREL, DT_NULL, DT_PLTRELSZ, DT_STRTAB,
34
DT_SYMTAB, PT_DYNAMIC, R_AARCH64_JUMP_SLOT, R_X86_64_JUMP_SLOT,
@@ -15,12 +16,6 @@ fn elf64_r_sym(info: Elf64_Xword) -> u32 {
1516
(info >> 32) as u32
1617
}
1718

18-
pub struct GotSymbolOverwrite {
19-
pub symbol_name: &'static str,
20-
pub new_func: *mut (),
21-
pub orig_func: *mut *mut (),
22-
}
23-
2419
/// Override the GOT entry for symbols specified in `overwrites`.
2520
///
2621
/// See: https://cs4401.walls.ninja/notes/lecture/basics_global_offset_table.html

0 commit comments

Comments
 (0)