From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47376) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XWwmk-0006GO-PZ for qemu-devel@nongnu.org; Wed, 24 Sep 2014 20:19:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XWwme-0003jS-H9 for qemu-devel@nongnu.org; Wed, 24 Sep 2014 20:19:50 -0400 Received: from mail-pd0-f169.google.com ([209.85.192.169]:58451) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XWwme-0003j9-Bk for qemu-devel@nongnu.org; Wed, 24 Sep 2014 20:19:44 -0400 Received: by mail-pd0-f169.google.com with SMTP id fp1so5410953pdb.0 for ; Wed, 24 Sep 2014 17:19:38 -0700 (PDT) Message-ID: <54235F94.3090607@ozlabs.ru> Date: Thu, 25 Sep 2014 10:19:32 +1000 From: Alexey Kardashevskiy MIME-Version: 1.0 References: <1411467581-2982-1-git-send-email-aik@ozlabs.ru> <20140924094759.GG21137@stefanha-thinkpad.redhat.com> In-Reply-To: <20140924094759.GG21137@stefanha-thinkpad.redhat.com> Content-Type: text/plain; charset=koi8-r Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] ohci: Fix compile errors without --enable-trace-backend List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: qemu-devel@nongnu.org, Gerd Hoffmann 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 >> --- >> >> 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