dtrace 0.1.1

Rust-like bindings to dtrace
Documentation
  • Coverage
  • 0%
    0 out of 5 items documented0 out of 1 items with examples
  • Size
  • Source code size: 666.97 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 3.52 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 20s Average build duration of successful builds.
  • all releases: 19s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • xiaopengli89/dtrace-rs
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • xiaopengli89

dtrace

Rust-like bindings to dtrace.

let pid = 1324;
let mut dt = dtrace::Dtrace::new().unwrap();
dt.setopt_c(c"strsize", c"4096").unwrap();
dt.setopt_c(c"bufsize", c"4m").unwrap();
dt.exec_program(&format!(
    r#"pid{}::__exit:entry{{printf("exit"); exit(0)}}"#,
    pid
))
.unwrap();
dt.go().unwrap();

println!("waiting for exit...");
while let Ok(false) = dt.work(|output| {
    println!(">> {output}");
}) {}
dt.stop().unwrap();