ohci: Fix compile errors without --enable-trace-backend
PATCH 1/1 ohci: Fix compile errors without --enable-trace-backend
This adds a stub for ohci_td_pkt() function (which traces packets) when configured without --enable-trace-backend
---
It should probably be squashed to
[PATCH] ohci: Convert fprint/DPRINTF/print to traces
Sorry about that...
--- hw/usb/hcd-ohci.c | 6 ++++++ 1 file changed, 6 insertions(+)
hw/usb/hcd-ohci.c +6 -0
@@ -920,6 +920,7 @@ static int ohci_service_iso_td(OHCIState *ohci, struct ohci_ed *ed,return 1 ; } +#ifdef trace_event_get_statestatic void ohci_td_pkt (const char *msg,const uint8_t *buf,size_t len) {bool print16 = !!trace_event_get_state (TRACE_USB_OHCI_TD_PKT_SHORT );
@@ -950,6 +951,11 @@ static void ohci_td_pkt(const char *msg, const uint8_t *buf, size_t len) p += sprintf(p, " %.2x", buf[i]); } } +#else +static void ohci_td_pkt (const char *msg,const uint8_t *buf,size_t len) +{ +} +#endif /* Service a transport descriptor. Returns nonzero to terminate processing of this endpoint. */
Signature · 1 line
2.0.0
Quoted 2 lines · Alexey Kardashevskiy
This adds a stub for
ohci_td_pkt()function (which traces packets) when configured without --enable-trace-backend
Ah, cool. Just noticed that, while doing usb patch queue test builds for the next pull req.
Quoted 2 lines
It should probably be squashed to
[PATCH] ohci: Convert fprint/DPRINTF/print to traces
Done.
thanks,
Gerd
Quoted 11 lines · Gerd Hoffmann
Quoted 2 lines · Alexey Kardashevskiy
This adds a stub for
ohci_td_pkt()function (which traces packets) when configured without --enable-trace-backendAh, cool. Just noticed that, while doing usb patch queue test builds for the next pull req.
Quoted 2 lines
It should probably be squashed to
[PATCH] ohci: Convert fprint/DPRINTF/print to tracesDone.
Posted another patch for dtrace backend... Sorry for too much noise.
Signature · 1 line
Alexey
Quoted 20 lines · Alexey Kardashevskiy
This adds a stub for
ohci_td_pkt()function (which traces packets) when configured without --enable-trace-backendSigned-off-by Alexey Kardashevskiy <[email protected]>---
It should probably be squashed to
[PATCH] ohci: Convert fprint/DPRINTF/print to tracesSorry about that...
--- hw/usb/hcd-ohci.c | 6 ++++++ 1 file changed, 6 insertions(+)hw/usb/hcd-ohci.c +0
-0
hw/usb/hcd-ohci.c static int ohci_service_iso_td(OHCIState *ohci, struct ohci_ed *ed, · line 926
Quoted 7 lines
hw/usb/hcd-ohci.c +1
-0@@ -920,6 +920,7 @@ static int ohci_service_iso_td(OHCIState *ohci, struct ohci_ed *ed,return 1 ; } +#ifdef trace_event_get_statestatic void ohci_td_pkt (const char *msg,const uint8_t *buf,size_t len) {bool print16 = !!trace_event_get_state (TRACE_USB_OHCI_TD_PKT_SHORT );
The preferred define for this is CONFIG_TRACE_NOP.
Checking for trace_event_get_state could break if trace/control.h changes in the future.
Stefan
Quoted 31 lines · Stefan Hajnoczi
Quoted 20 lines · Alexey Kardashevskiy
This adds a stub for
ohci_td_pkt()function (which traces packets) when configured without --enable-trace-backendSigned-off-by Alexey Kardashevskiy <[email protected]>---
It should probably be squashed to
[PATCH] ohci: Convert fprint/DPRINTF/print to tracesSorry about that...
--- hw/usb/hcd-ohci.c | 6 ++++++ 1 file changed, 6 insertions(+)hw/usb/hcd-ohci.c +0
-0hw/usb/hcd-ohci.c static int ohci_service_iso_td(OHCIState *ohci, struct ohci_ed *ed, · line 926
Quoted 7 lines
hw/usb/hcd-ohci.c +1
-0@@ -920,6 +920,7 @@ static int ohci_service_iso_td(OHCIState *ohci, struct ohci_ed *ed,return 1 ; } +#ifdef trace_event_get_statestatic void ohci_td_pkt (const char *msg,const uint8_t *buf,size_t len) {bool print16 = !!trace_event_get_state (TRACE_USB_OHCI_TD_PKT_SHORT );The preferred define for this is
CONFIG_TRACE_NOP.
Quoted 2 lines
Checking for
trace_event_get_statecould break iftrace/control.hchanges in the future.
I am not familiar with "dtrace" - are traces configurable with it? With --enable-trace-backend=dtrace, trace_event_get_state is not defined.
Signature · 1 line
Alexey
Quoted 32 lines · Alexey Kardashevskiy
Quoted 31 lines · Stefan Hajnoczi
Quoted 20 lines · Alexey Kardashevskiy
This adds a stub for
ohci_td_pkt()function (which traces packets) when configured without --enable-trace-backendSigned-off-by Alexey Kardashevskiy <[email protected]>---
It should probably be squashed to
[PATCH] ohci: Convert fprint/DPRINTF/print to tracesSorry about that...
--- hw/usb/hcd-ohci.c | 6 ++++++ 1 file changed, 6 insertions(+)hw/usb/hcd-ohci.c +0
-0hw/usb/hcd-ohci.c static int ohci_service_iso_td(OHCIState *ohci, struct ohci_ed *ed, · line 926
Quoted 7 lines
hw/usb/hcd-ohci.c +1
-0@@ -920,6 +920,7 @@ static int ohci_service_iso_td(OHCIState *ohci, struct ohci_ed *ed,return 1 ; } +#ifdef trace_event_get_statestatic void ohci_td_pkt (const char *msg,const uint8_t *buf,size_t len) {bool print16 = !!trace_event_get_state (TRACE_USB_OHCI_TD_PKT_SHORT );The preferred define for this is
CONFIG_TRACE_NOP.
Quoted 5 lines
Quoted 2 lines
Checking for
trace_event_get_statecould break iftrace/control.hchanges in the future.I am not familiar with "dtrace" - are traces configurable with it? With --enable-trace-backend=dtrace,
trace_event_get_stateis not defined.
dtrace has its own tools for enabling/disabling trace events. QEMU's command cannot be used with dtrace.