summaryrefslogtreecommitdiffstats
path: root/trace-events
Commit message (Collapse)AuthorAgeFilesLines
* trace: add virtio_set_status() trace eventStefan Hajnoczi2011-09-171-0/+1
| | | | | | | | | | The virtio device lifecycle can be observed by looking at the sequence of set status operations. This is especially important for catching the reset operation (status value 0), which resets the device and all virtqueues. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* trace: remove trailing double quotes after PRI*64Stefan Hajnoczi2011-09-171-17/+17
| | | | | | | | Now that format strings can end in a PRI*64 macro, remove the workarounds from the trace-events file. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* trace: remove newline from grlib_irqmp_check_irqs format stringStefan Hajnoczi2011-09-171-1/+1
| | | | | | | | | | There is no need to put a newline in trace event format strings. The backend may use the format string within some context and takes care of how to display the event. The stderr backend automatically appends "\n" whereas the ust backend does not want a newline at all. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* block: Rename bdrv_set_locked() to bdrv_lock_medium()Markus Armbruster2011-09-121-1/+1
| | | | | | | While there, make the locked parameter bool. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* mipsnet: use trace frameworkHervé Poussineau2011-09-101-0/+7
| | | | | Signed-off-by: Hervé Poussineau <hpoussin@reactos.org> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* usb: claim port at device initialization time.Gerd Hoffmann2011-09-071-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | This patch makes qemu assign a port when creating the device, not when attaching it. For most usb devices this isn't a noticable difference because they are in attached state all the time. The change affects usb-host devices which live in detached state while the real device is unplugged from the host. They have a fixed port assigned all the time now instead of getting grabbing one on attach and releasing it at detach, i.e. they stop floating around at the usb bus. The change also allows to simplify usb-hub. It doesn't need the handle_attach() callback any more to configure the downstream ports. This can be done at device initialitation time now. The changed initialization order (first grab upstream port, then register downstream ports) also fixes some icky corner cases. For example it is not possible any more to plug the hub into one of its own downstream ports. The usb host adapters must care too. USBPort->dev being non-NULL doesn't imply any more the device is in attached state. The host adapters must additionally check the USBPort->dev->attached flag. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* usb-ehci: handle siTDsGerd Hoffmann2011-09-071-0/+1
| | | | | | | | | | This patch adds code to do minimal siTD handling, which is basically just following the next pointer. This is good enougth to handle the inactive siTDs used by FreeBSD. Active siTDs are skipped too as we don't have split transfer support in qemu, additionally a warning is printed. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* usb-host: claim portGerd Hoffmann2011-09-071-0/+1
| | | | | | | | | | When configured to pass through a specific host port (using hostbus and hostport properties), try to claim the port if supported by the kernel. That will avoid any kernel drivers binding to devices plugged into that port. It will not stop any userspace apps (such as usb_modeswitch) access the device via usbfs though. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* usb-host: start tracing supportGerd Hoffmann2011-09-071-0/+24
| | | | | | | | Add a bunch of trace points to usb-linux.c Drop a bunch of DPRINTK's in favor of the trace points. Also cleanup error reporting a bit while being at it. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* rename qemu_malloc and related to glib names for coherenceFrediano Ziglio2011-09-021-4/+4
| | | | | | Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Frediano Ziglio <freddy77@gmail.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* trace: enable all eventsLluís2011-09-011-324/+324
| | | | | | | Given that all events with programmatically-controlled state are disabled by default, we can delete the "disable" property from all events. Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu>
* trace: [simple] disable all trace points by defaultLluís2011-09-011-3/+0
| | | | | | | | Note that this refers to the backend-specific state (whether the output must be generated), not the event "disabled" property (which always uses the "nop" backend). Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu>
* g364fb: use trace frameworkHervé Poussineau2011-08-271-0/+4
| | | | | Signed-off-by: Hervé Poussineau <hpoussin@reactos.org> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* target-i386: Remove unused polarity arguments from APIC APIJan Kiszka2011-08-221-1/+1
| | | | | | | | Polarity of external interrupts needs to be handled in the IOAPIC. Passing it to the APIC is pointless. So remove all these arguments. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* escc: replace DPRINTFs with tracepointsBlue Swirl2011-08-211-0/+15
| | | | Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* scsi: add special traces for common commandsPaolo Bonzini2011-08-121-0/+4
| | | | | | | Can be useful when debugging the device scan phase. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* scsi: move sense handling to generic codePaolo Bonzini2011-08-121-0/+1
| | | | | | | | | | | | | With this patch, sense data is stored in the generic data structures for SCSI devices and requests. The SCSI layer takes care of storing sense data in the SCSIDevice for the subsequent REQUEST SENSE command. At the same time, get_sense is removed and scsi_req_get_sense can use an entirely generic implementation. Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* coroutines: LocksKevin Wolf2011-08-021-0/+8
| | | | Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* block: Add bdrv_co_readv/writev emulationKevin Wolf2011-08-021-0/+1
| | | | | | | | In order to be able to call bdrv_co_readv/writev for drivers that don't implement the functions natively, add an emulation that uses the AIO functions to implement them. Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* block: Add bdrv_co_readv/writevKevin Wolf2011-08-021-0/+2
| | | | | | | | | Add new block driver callbacks bdrv_co_readv/writev, which work on a QEMUIOVector like bdrv_aio_*, but don't need a callback. The function may only be called inside a coroutine, so a block driver implementing this interface can yield instead of blocking during I/O. Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* coroutine: introduce coroutinesKevin Wolf2011-08-011-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Asynchronous code is becoming very complex. At the same time synchronous code is growing because it is convenient to write. Sometimes duplicate code paths are even added, one synchronous and the other asynchronous. This patch introduces coroutines which allow code that looks synchronous but is asynchronous under the covers. A coroutine has its own stack and is therefore able to preserve state across blocking operations, which traditionally require callback functions and manual marshalling of parameters. Creating and starting a coroutine is easy: coroutine = qemu_coroutine_create(my_coroutine); qemu_coroutine_enter(coroutine, my_data); The coroutine then executes until it returns or yields: void coroutine_fn my_coroutine(void *opaque) { MyData *my_data = opaque; /* do some work */ qemu_coroutine_yield(); /* do some more work */ } Yielding switches control back to the caller of qemu_coroutine_enter(). This is typically used to switch back to the main thread's event loop after issuing an asynchronous I/O request. The request callback will then invoke qemu_coroutine_enter() once more to switch back to the coroutine. Note that if coroutines are used only from threads which hold the global mutex they will never execute concurrently. This makes programming with coroutines easier than with threads. Race conditions cannot occur since only one coroutine may be active at any time. Other coroutines can only run across yield. This coroutines implementation is based on the gtk-vnc implementation written by Anthony Liguori <anthony@codemonkey.ws> but it has been significantly rewritten by Kevin Wolf <kwolf@redhat.com> to use setjmp()/longjmp() instead of the more expensive swapcontext() and by Paolo Bonzini <pbonzini@redhat.com> for Windows Fibers support. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
* usb-ehci: trace: rename "next" to "nxt".Gerd Hoffmann2011-07-221-3/+3
| | | | | | | | "next" is reserved in systemtap thus using this as a trace parameter name causes trouble when trying to trace with systemtap. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* ds1225y: use trace frameworkHervé Poussineau2011-07-201-0/+4
| | | | | Signed-off-by: Hervé Poussineau <hpoussin@reactos.org> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* Merge remote-tracking branch 'agraf/xen-next' into stagingAnthony Liguori2011-07-191-3/+3
|\
| * xen: Clean up map cache API namingJan Kiszka2011-07-171-3/+3
| | | | | | | | | | | | | | The map cache is a Xen thing, so its API should make this clear. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Alexander Graf <agraf@suse.de>
* | virtio-console: Add some trace eventsAmit Shah2011-07-181-0/+5
| | | | | | | | | | | | | | Add some trace events for messages passed between the char layer and the virtio-serial bus. Signed-off-by: Amit Shah <amit.shah@redhat.com>
* | virtio-serial-bus: Add trace eventsAmit Shah2011-07-181-0/+6
|/ | | | | | Add some trace events for messages passed between the guest and host. Signed-off-by: Amit Shah <amit.shah@redhat.com>
* xen: Add the Xen platform pci deviceSteven Smith2011-06-191-0/+3
| | | | | | | | | | Introduce a new emulated PCI device, specific to fully virtualized Xen guests. The device is necessary for PV on HVM drivers to work. Signed-off-by: Steven Smith <ssmith@xensource.com> Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Signed-off-by: Alexander Graf <agraf@suse.de>
* xen: Introduce VGA sync dirty bitmap supportAnthony PERARD2011-06-191-0/+1
| | | | | | | | | | | | | This patch introduces phys memory client for Xen. Only sync dirty_bitmap and set_memory are actually implemented. migration_log will stay empty for the moment. Xen can only log one range for bit change, so only the range in the first call will be synced. Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Signed-off-by: Alexander Graf <agraf@suse.de>
* usb-ehci: split trace calls to handle arg count limitsGerd Hoffmann2011-06-141-2/+6
| | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* usb-ehci: itd handling fixes.Gerd Hoffmann2011-06-141-1/+1
| | | | | | | | | | | | | | | | | | This patch fixes a bunch of issues in the itd descriptor handling. Most important fix is to handle transfers which cross page borders correctly by looking up the address of the next page. Luckily the linux uses physically contigous memory so the data used to hits the correct location even with this bug instead of corrupting guest memory. Also the transfer length updates for outgoing transfers wasn't correct. While being at it DPRINTFs have been replaced by tracepoints. The isoch_pause logic has been disabled. Not clear to me which propose this serves and I think it is incorrect too as we just skip processing itds. Even when no xfer happens we have to clear the active bit. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* usb-ehci: multiqueue supportGerd Hoffmann2011-06-141-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for keeping multiple queues going at the same time. One slow device will not affect other devices any more. The patch adds code to manage EHCIQueue structs. It also does a number of changes to the state machine: * The state machine will never ever stop in EXECUTING any more. Instead it will continue with the next queue (aka HORIZONTALQH) when the usb device returns USB_RET_ASYNC. * The state machine will stop processing when it figures it walks in circles (easy to figure now that we have a EHCIQueue struct for each QH we've processed). The bailout logic should not be needed any more. For now it is still in, but will assert() in case it triggers. * The state machine will just skip queues with a async USBPacket in flight. * The state machine will resume processing as soon as the async USBPacket is finished. The patch also takes care to flush the QH struct back to guest memory when needed, so we don't get stale data when (re-)loading it from guest memory in FETCHQH state. It also makes the writeback code to not touch the first three dwords of the QH struct as the EHCI must not write them. This actually fixes a bug where QH chaining changes (next ptr) by the linux ehci driver where overwritten by the emulated EHCI. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* usb-ehci: trace buffer copyGerd Hoffmann2011-06-141-0/+1
| | | | | | | | Add a trace point for buffer copies and drop the DPRINTF's. No change in behavior. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* usb-ehci: improve mmio tracingGerd Hoffmann2011-06-141-1/+2
| | | | | | | | | | Add a separate tracepoint to log how register values change in response to a mmio write. Especially useful for registers which have read-only or clear-on-write bits in them. No change in behavior. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* usb-ehci: trace port stateGerd Hoffmann2011-06-141-0/+3
| | | | | | | | | Trace usb port operations (attach, detach, reset), drop a few obsolete DPRINTF's. No change in behavior. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* usb-ehci: trace state machine changesGerd Hoffmann2011-06-141-0/+4
| | | | | | | | | | | | Add functions to get and set the current state of the state machine, add tracepoints there to trace state transitions. Add support for traceing the queue heads and transfer descriptors as we look at them. Drop a few DPRINTFs and all DPRINTF_ST lines, they are obsolete now. No change in behavior. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* usb-ehci: trace mmio and usbstsGerd Hoffmann2011-06-141-0/+6
| | | | | | | | | | | | | | | This patch starts adding trace support to ehci. It traces updates of the status register (USBSTS), mmio access and controller reset. It also adds functions to set and clear status register bits and puts them in use everywhere. Some DPRINTF's are dropped in favor of the new tracepoints. No change in behavior. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* scsi: fix tracing of scsi requests with simple backendPaolo Bonzini2011-06-051-1/+2
| | | | | | | | The simple backend only supports a maximum of 6 arguments. Split the scsi_req_parsed event in two parts to cope with the limit. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* scsi: introduce scsi_req_continuePaolo Bonzini2011-05-261-0/+1
| | | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Cc: Christoph Hellwig <hch@lst.de>
* scsi: introduce scsi_req_dataPaolo Bonzini2011-05-261-0/+1
| | | | | | | | This abstracts calling the command_complete callback, reducing churn in the following patches. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Christoph Hellwig <hch@lst.de>
* scsi: add tracing of scsi requestsPaolo Bonzini2011-05-261-0/+6
| | | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Christoph Hellwig <hch@lst.de>
* qed: Periodically flush and clear need check bitStefan Hajnoczi2011-05-181-0/+3
| | | | | | | | | | | | | | | | | | | | | One strategy to limit the startup delay of consistency check when opening image files is to ensure that the file is marked dirty for as little time as possible. QED currently marks the image dirty when the first allocating write request is issued and clears the dirty bit again when the image is cleanly closed. In practice that means the image is marked dirty for most of a guest's lifetime and prone to being in a dirty state upon crash or power failure. It is safe to clear the dirty bit after all allocating write requests have completed and a flush has been performed. This patch adds a timer after the last allocating write request completes. When the timer fires it will flush and then clear the dirty bit. The timer is set to 5 seconds and is cancelled upon arrival of a new allocating write request. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* Introduce qemu_put_ram_ptrAnthony PERARD2011-05-081-0/+3
| | | | | | | | | | This function allows to unlock a ram_ptr give by qemu_get_ram_ptr. After a call to qemu_put_ram_ptr, the pointer may be unmap from QEMU when used with Xen. Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Acked-by: Alexander Graf <agraf@suse.de> Signed-off-by: Alexander Graf <agraf@suse.de>
* xen: Introduce the Xen mapcacheJun Nakajima2011-05-081-0/+10
| | | | | | | | | | | | | | | | | | | | | On IA32 host or IA32 PAE host, at present, generally, we can't create an HVM guest with more than 2G memory, because generally it's almost impossible for Qemu to find a large enough and consecutive virtual address space to map an HVM guest's whole physical address space. The attached patch fixes this issue using dynamic mapping based on little blocks of memory. Each call to qemu_get_ram_ptr makes a call to qemu_map_cache with the lock option, so mapcache will not unmap these ram_ptr. Blocks that do not belong to the RAM, but usually to a device ROM or to a framebuffer, are handled in a separate function. So the whole RAMBlock can be map. Signed-off-by: Jun Nakajima <jun.nakajima@intel.com> Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Signed-off-by: Alexander Graf <agraf@suse.de>
* lm32: add Milkymist Minimac2 supportMichael Walle2011-05-031-11/+12
| | | | | | | | This patch adds support for Milkymist's minimal Ethernet MAC v2. It superseds minimac1. Signed-off-by: Michael Walle <michael@walle.cc> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
* trace: [trace-events] fix print formats in some eventsLluís2011-04-261-2/+2
| | | | | Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
* trace: Remove %s in grlib trace eventsStefan Hajnoczi2011-04-261-5/+5
| | | | | | | | | | | | | | Trace events cannot use %s in their format strings because trace backends vary in how they can deference pointers (if at all). Recording const char * values is not meaningful if their contents are not recorded too. Change grlib trace events that rely on strings so that they communicate similar information without using strings. A follow-up patch explains this limitation and updates docs/tracing.txt. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
* trace: Trace bdrv_set_locked()Stefan Hajnoczi2011-04-071-0/+1
| | | | | | | | It can be handy to know when the guest locks/unlocks the CD-ROM tray. This trace event makes that possible. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* lm32: add Milkymist VGAFB supportMichael Walle2011-04-041-0/+4
| | | | | | | This patch adds support for Milkymist's VGA framebuffer. Signed-off-by: Michael Walle <michael@walle.cc> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
* lm32: add Milkymist UART supportMichael Walle2011-04-041-0/+6
| | | | | | | This patch adds support for Milkymist's simple UART. Signed-off-by: Michael Walle <michael@walle.cc> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
OpenPOWER on IntegriCloud