News for hackers. Stuff that matters.
Re:Rust in QEMU Roadmap by bonzini on Tuesday December 03, 2024 @02:53AM (#42303900)
QEMU has several tracepoint providers, the main ones are (a slightly fancy version of) printf and USDT. There is a Python program that generates the C code for the chosen backend(s), so the thing to do would be to adjust the script to produce either an FFI bridge or the equivalent Rust code.
Re:Rust in QEMU Roadmap by aapoalas on Tuesday December 03, 2024 @04:52AM (#42304537)
Can you link the script? This sounds vaguely like something that would be no skin off my back, so I'd be quite happy to help with this.
Re:Rust in QEMU Roadmap by bonzini on Tuesday December 03, 2024 @05:17AM (#42304690)
Re:Rust in QEMU Roadmap by aapoalas on Wednesday December 04, 2024 @09:45AM (#42317913)
Here's my WIP addition to Oxide Computer's usdt crate: https://github.com/oxidecomputer/usdt/pull/340

This crate gives you a nifty macro that translates Rust probe definitions into the correct ELF sections and other related assembly. Other ways to declare probes are also supported, though.

Their support is currently only for illumos and OS X but I managed to get Linux SystemTap SDTs working as well, and a PR for FreeBSD exists as well but has been languishing in review purgatory for two years: I imagine QEMU might enjoy this wide support (if they land).