On Thu, Sep 11, 2025 at 02:10:15PM +0200, Markus Armbruster wrote: > * Tracing vs. "log items" > > Tracing and "log items" both provide opt-in logging. > > Why do we have two? Feels like an accident to me. > > When to use which? I guess people pick whatever they're familiar > with. > > Would we be better off with just one? I wish... > > Which one? Clearly tracing, because tracing backends provide plenty > of useful functionality "log items" lack. > > "Log items" support per-thread log files. With tracing, you could > instead split by thread names once Daniel's series is in. > > Address range filtering is only used with "log items". It could just > as easily be used with tracing.
Paolo mentioned that tracing is structured (each event has typed parameters) whereas logging consists of an arbitrary string. The reason for this is that tracers are usually designed for low overhead and for processing trace events. Tracing is used to instrument QEMU for detailed analysis of control flow or performance investigation. It's a different use case from logging although there is some overlap. People like to use tools like perf(1), SystemTap, etc and tracing allows QEMU to support them. It's not a use case where regular log files are used. Stefan
signature.asc
Description: PGP signature
