[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] ohci: Fix compile errors without --enable-trace
From: |
Alexey Kardashevskiy |
Subject: |
Re: [Qemu-devel] [PATCH] ohci: Fix compile errors without --enable-trace-backend |
Date: |
Thu, 25 Sep 2014 10:19:32 +1000 |
User-agent: |
Mozilla/5.0 (X11; Linux i686 on x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.1.1 |
On 09/24/2014 07:47 PM, Stefan Hajnoczi wrote:
> On Tue, Sep 23, 2014 at 08:19:41PM +1000, Alexey Kardashevskiy wrote:
>> This adds a stub for ohci_td_pkt() function (which traces packets)
>> when configured without --enable-trace-backend
>>
>> Signed-off-by: Alexey Kardashevskiy <address@hidden>
>> ---
>>
>> 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(+)
>>
>> diff --git a/hw/usb/hcd-ohci.c b/hw/usb/hcd-ohci.c
>> index 4a4dd02..7ea871d 100644
>> --- a/hw/usb/hcd-ohci.c
>> +++ b/hw/usb/hcd-ohci.c
>> @@ -920,6 +920,7 @@ static int ohci_service_iso_td(OHCIState *ohci, struct
>> ohci_ed *ed,
>> return 1;
>> }
>>
>> +#ifdef trace_event_get_state
>> static 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.
I am not familiar with "dtrace" - are traces configurable with it? With
--enable-trace-backend=dtrace, trace_event_get_state is not defined.
--
Alexey