On Mon, Sep 5, 2011 at 9:38 AM, Gerd Hoffmann <kra...@redhat.com> wrote: > On 09/03/11 17:22, Stefan Hajnoczi wrote: >> >> String arguments are not supported by all trace backends. This patch >> replaces existing string arguments in hw/usb-ehci.c either with >> individual trace events that remain human-friendly or by printing raw >> addresses when there is no alternative or downside to that. > > Printing raw addresses *is* a downside. > >> States and usbsts bits remain human-friendly since it is hard to >> remember all of them. MMIO addresses are printed raw because they would >> create many individual trace events and the addresses are usually easy >> to remember when debugging. > > I find it hard to rememeber them. There is a reason why the code to print > the names for the mmio addresses is there in the first place. I don't want > to loose that. > > Can't we just fix the backends instead? Replacing debug fprintf with trace > points isn't going to work if tracing can't handle strings.
I looked at the capabilities of the backends again and I think we *can* allow strings. The simple trace backend does not support them but it's possible to add that. I thought SystemTap doesn't either but it turns out there is a userspace string copy function available. Both stderr and ust are fine with strings. Let's drop this patch. I will update the tracing documentation. Stefan