qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Alexey Kardashevskiy <aik@ozlabs.ru>
To: Stefan Hajnoczi <stefanha@gmail.com>
Cc: qemu-devel@nongnu.org, Gerd Hoffmann <kraxel@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] ohci: Fix compile errors without --enable-trace-backend
Date: Thu, 25 Sep 2014 10:19:32 +1000	[thread overview]
Message-ID: <54235F94.3090607@ozlabs.ru> (raw)
In-Reply-To: <20140924094759.GG21137@stefanha-thinkpad.redhat.com>

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 <aik@ozlabs.ru>
>> ---
>>
>> 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

  reply	other threads:[~2014-09-25  0:19 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-23 10:19 [Qemu-devel] [PATCH] ohci: Fix compile errors without --enable-trace-backend Alexey Kardashevskiy
2014-09-23 10:52 ` Gerd Hoffmann
2014-09-25  0:17   ` Alexey Kardashevskiy
2014-09-24  9:47 ` Stefan Hajnoczi
2014-09-25  0:19   ` Alexey Kardashevskiy [this message]
2014-09-26  8:32     ` Stefan Hajnoczi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=54235F94.3090607@ozlabs.ru \
    --to=aik@ozlabs.ru \
    --cc=kraxel@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).