summaryrefslogtreecommitdiffstats
path: root/trace-events
Commit message (Collapse)AuthorAgeFilesLines
* block: bdrv_aio_* do not return NULLPaolo Bonzini2011-12-151-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Initially done with the following semantic patch: @ rule1 @ expression E; statement S; @@ E = ( bdrv_aio_readv | bdrv_aio_writev | bdrv_aio_flush | bdrv_aio_discard | bdrv_aio_ioctl ) (...); ( - if (E == NULL) { ... } | - if (E) { <... S ...> } ) which however missed the occurrence in block/blkverify.c (as it should have done), and left behind some unused variables. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* dma-helpers: Add trace eventsKevin Wolf2011-12-051-0/+7
| | | | | Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
* block: core copy-on-read logicStefan Hajnoczi2011-12-051-0/+1
| | | | | Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* Merge remote-tracking branch 'kwolf/for-anthony' into stagingAnthony Liguori2011-10-311-0/+7
|\ | | | | | | | | Conflicts: block/vmdk.c
| * scsi: do not call transfer_data after canceling a requestPaolo Bonzini2011-10-281-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Otherwise, if cancellation is "faked" by the AIO layer and goes through qemu_aio_flush, the whole request is completed synchronously during scsi_req_cancel. Using the enqueued flag would work here, but not in the next patches, so I'm introducing a new io_canceled flag. That's because scsi_req_data is a synchronous callback and the enqueued flag might be reset by the time it returns. scsi-disk cannot unref the request until after calling scsi_req_data. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * iSCSI block driverRonnie Sahlberg2011-10-281-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This provides built-in support for iSCSI to QEMU. This has the advantage that the iSCSI devices need not be made visible to the host, which is useful if you have very many virtual machines and very many iscsi devices. It also has the benefit that non-root users of QEMU can access iSCSI devices across the network without requiring root privilege on the host. This driver interfaces with the multiplatform posix library for iscsi initiator/client access to iscsi devices hosted at git://github.com/sahlberg/libiscsi.git The patch adds the driver to interface with the iscsi library. It also updated the configure script to * by default, probe is libiscsi is available and if so, build qemu against libiscsi. * --enable-libiscsi Force a build against libiscsi. If libiscsi is not available the build will fail. * --disable-libiscsi Do not link against libiscsi, even if it is available. When linked with libiscsi, qemu gains support to access iscsi resources such as disks and cdrom directly, without having to make the devices visible to the host. You can specify devices using a iscsi url of the form : iscsi://[<username>[:<password>@]]<host>[:<port]/<target-iqn-name>/<lun> When using authentication, the password can optionally be set with LIBISCSI_CHAP_PASSWORD="password" to avoid it showing up in the process list Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com> Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* | hw/9pfs: Make VirtFS tracing work correctlyAneesh Kumar K.V2011-10-301-1/+1
|/ | | | | | | | | | this patch fix multiple issues with VirtFS tracing. a) Add tracepoint to the correct code path. We handle error in complete_pdu b) Fix indentation in python script c) Fix variable naming issue in python script Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* Sparc: convert win_helper to trace frameworkBlue Swirl2011-10-261-0/+8
| | | | | Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* Sparc: convert interrupt helpers to trace frameworkBlue Swirl2011-10-261-0/+7
| | | | | Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* Sparc: convert mmu_helper to trace frameworkBlue Swirl2011-10-261-0/+10
| | | | | Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* block: add bdrv_co_discard and bdrv_aio_discard supportPaolo Bonzini2011-10-211-0/+1
| | | | | | | This similarly adds support for coroutine and asynchronous discard. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* hw/9pfs: Fix broken compilation caused by wrong trace eventsStefan Weil2011-10-201-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | Commit c572f23a3e7180dbeab5e86583e43ea2afed6271 added trace events with mismatching format string and arguments. gcc reports these errors: In file included from trace.c:2:0: trace.h: In function ‘trace_v9fs_attach’: trace.h:2850:9: error: too many arguments for format [-Werror=format-extra-args] trace.h: In function ‘trace_v9fs_wstat’: trace.h:3039:9: error: too many arguments for format [-Werror=format-extra-args] trace.h: In function ‘trace_v9fs_mkdir’: trace.h:3088:9: error: too many arguments for format [-Werror=format-extra-args] trace.h: In function ‘trace_v9fs_mkdir_return’: trace.h:3095:9: error: too many arguments for format [-Werror=format-extra-args] Fix the format strings and also use %u instead of %d for unsigned values in the changed strings. There are more minor errors of this kind which I did not fix because that would make the review more difficult. v2: Fixed position of } for v9fs_mkdir_return. Cc: Harsh Prateek Bora <harsh@linux.vnet.ibm.com> Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Merge remote-tracking branch 'aneesh/for-upstream-6' into stagingAnthony Liguori2011-10-201-0/+46
|\ | | | | | | | | Conflicts: trace-events
| * hw/9pfs: Introduce tracing for 9p pdu handlersHarsh Prateek Bora2011-10-151-0/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Plan is to replace the existing debug infrastructure with Qemu tracing infrastructure so that user can dynamically enable/disable trace events and therefore a meaningful trace log can be generated which can be further filtered using an analysis script. Note: Because of current simpletrace limitations, the trace events are logging at max 6 args, however, once the more args are supported, we can change trace events to log more info as well. Also, This initial patch only provides a replacement for existing debug infra. More trace events to be added later for newly added handlers and sub-routines. Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Harsh Prateek Bora <harsh@linux.vnet.ibm.com> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
* | hw: add OpenCores 10/100 Mbps Ethernet controllerMax Filippov2011-10-161-0/+14
|/ | | | | | | | | This is OpenCores Ethernet MAC + subset of National Semiconductors DP83838C PHY. OpenCores Ethernet MAC project: http://opencores.org/project,ethmac Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* Merge branch 'for-upstream' of git://git.serverraum.org/git/mw/qemu-lm32Blue Swirl2011-10-081-2/+2
|\ | | | | | | | | | | | | * 'for-upstream' of git://git.serverraum.org/git/mw/qemu-lm32: milkymist: new interrupt map milkymist_uart: support new core version lm32: add missing qemu_init_vcpu() call
| * milkymist_uart: support new core versionMichael Walle2011-10-031-2/+2
| | | | | | | | | | | | The new version of the uart core introduces status and control bits. Signed-off-by: Michael Walle <michael@walle.cc>
* | trace: add arguments to bdrv_co_io_em() trace eventStefan Hajnoczi2011-10-031-1/+1
| | | | | | | | | | | | | | It is useful to know the BlockDriverState as well as the sector_num/nb_sectors of an emulated .bdrv_co_*() request. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
* | trace: trace monitor qmp dispatch/completionStefan Hajnoczi2011-10-031-0/+4
| | | | | | | | | | | | | | | | | | | | Add trace events for handle_qmp_command(), which dispatches qmp commands, and monitor_protocol_emitter(), which produces the reply to a qmp command. Also remove duplicate #include "trace/control.h". Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
* | trace: trace bdrv_open_common()Stefan Hajnoczi2011-10-031-0/+1
|/ | | | | | | bdrv_open_common() is a useful point to trace since it reveals the filename and block driver for a given BlockDriverState. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
* ESP: convert to trace frameworkBlue Swirl2011-10-011-0/+31
| | | | Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* fix compilation with stderr trace backendPaolo Bonzini2011-09-211-1/+1
| | | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
* 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>
OpenPOWER on IntegriCloud