From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:36741) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ShLXY-0005dp-41 for qemu-devel@nongnu.org; Wed, 20 Jun 2012 10:05:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ShLXO-0000mH-I7 for qemu-devel@nongnu.org; Wed, 20 Jun 2012 10:05:47 -0400 Received: from mx1.redhat.com ([209.132.183.28]:19599) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ShLXO-0000lV-AA for qemu-devel@nongnu.org; Wed, 20 Jun 2012 10:05:38 -0400 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q5KE5aOq015816 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 20 Jun 2012 10:05:36 -0400 From: Gerd Hoffmann Date: Wed, 20 Jun 2012 16:05:31 +0200 Message-Id: <1340201134-21109-4-git-send-email-kraxel@redhat.com> In-Reply-To: <1340201134-21109-1-git-send-email-kraxel@redhat.com> References: <1340201134-21109-1-git-send-email-kraxel@redhat.com> Subject: [Qemu-devel] [PATCH 3/6] ehci: tracing improvements List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Gerd Hoffmann Signed-off-by: Gerd Hoffmann --- hw/usb/hcd-ehci.c | 7 +++++-- trace-events | 5 +++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/hw/usb/hcd-ehci.c b/hw/usb/hcd-ehci.c index 45b774d..6d2d549 100644 --- a/hw/usb/hcd-ehci.c +++ b/hw/usb/hcd-ehci.c @@ -569,6 +569,7 @@ static inline void ehci_set_interrupt(EHCIState *s, int intr) level = 1; } + trace_usb_ehci_interrupt(level, s->usbsts, s->usbintr); qemu_set_irq(s->irq, level); } @@ -822,8 +823,9 @@ static void ehci_attach(USBPort *port) { EHCIState *s = port->opaque; uint32_t *portsc = &s->portsc[port->index]; + const char *owner = (*portsc & PORTSC_POWNER) ? "comp" : "ehci"; - trace_usb_ehci_port_attach(port->index, port->dev->product_desc); + trace_usb_ehci_port_attach(port->index, owner, port->dev->product_desc); if (*portsc & PORTSC_POWNER) { USBPort *companion = s->companion_ports[port->index]; @@ -842,8 +844,9 @@ static void ehci_detach(USBPort *port) { EHCIState *s = port->opaque; uint32_t *portsc = &s->portsc[port->index]; + const char *owner = (*portsc & PORTSC_POWNER) ? "comp" : "ehci"; - trace_usb_ehci_port_detach(port->index); + trace_usb_ehci_port_detach(port->index, owner); if (*portsc & PORTSC_POWNER) { USBPort *companion = s->companion_ports[port->index]; diff --git a/trace-events b/trace-events index 5c82b3a..c935ba2 100644 --- a/trace-events +++ b/trace-events @@ -252,12 +252,13 @@ usb_ehci_qtd_fields(uint32_t addr, int tbytes, int cpage, int cerr, int pid) "QT usb_ehci_qtd_bits(uint32_t addr, int ioc, int active, int halt, int babble, int xacterr) "QTD @ %08x - ioc %d, active %d, halt %d, babble %d, xacterr %d" usb_ehci_itd(uint32_t addr, uint32_t nxt, uint32_t mplen, uint32_t mult, uint32_t ep, uint32_t devaddr) "ITD @ %08x: next %08x - mplen %d, mult %d, ep %d, dev %d" usb_ehci_sitd(uint32_t addr, uint32_t nxt, uint32_t active) "ITD @ %08x: next %08x - active %d" -usb_ehci_port_attach(uint32_t port, const char *device) "attach port #%d - %s" -usb_ehci_port_detach(uint32_t port) "detach port #%d" +usb_ehci_port_attach(uint32_t port, const char *owner, const char *device) "attach port #%d, owner %s, device %s" +usb_ehci_port_detach(uint32_t port, const char *owner) "detach port #%d, owner %s" usb_ehci_port_reset(uint32_t port, int enable) "reset port #%d - %d" usb_ehci_data(int rw, uint32_t cpage, uint32_t offset, uint32_t addr, uint32_t len, uint32_t bufpos) "write %d, cpage %d, offset 0x%03x, addr 0x%08x, len %d, bufpos %d" usb_ehci_queue_action(void *q, const char *action) "q %p: %s" usb_ehci_packet_action(void *q, void *p, const char *action) "q %p p %p: %s" +usb_ehci_interrupt(uint32_t level, uint32_t sts, uint32_t mask) "level %d, sts 0x%x, mask 0x%x" # hw/usb/hcd-uhci.c usb_uhci_reset(void) "=== RESET ===" -- 1.7.1