summaryrefslogtreecommitdiff
path: root/trace-events
AgeCommit message (Collapse)AuthorFilesLines
2012-06-15Add rate limiting of RTC_CHANGE, BALLOON_CHANGE & WATCHDOG eventsDaniel P. Berrange1-0/+5
Allow certain event types to be rate limited to avoid flooding monitor clients. The monitor_protocol_event() method is changed such that instead of immediately emitting the event to Monitor instances, it will call a new monitor_protocol_event_queue() method. This will check to see if the rate limit for the event has been exceeded, and if so schedule a timer to wakeup at the end of the rate limit period. If further events arrive before the timer fires, the previously queued event will be discarded in favour of the new event. The event will eventually be emitted when the timer fires. This logic is applied to RTC_CHANGE, BALLOON_CHANGE & WATCHDOG events, since the data associated with these events is stateless * monitor.c: Add support for rate limiting * monitor.h: Define monitor_global_init for one-time setup tasks * vl.c: Invoke monitor_global_init * trace-events: Add hooks for monitor event tracing Signed-off-by: Daniel P. Berrange <berrange@redhat.com> Acked-by: Amit Shah <amit.shah@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2012-06-07ehci: add EHCIPacketGerd Hoffmann1-0/+1
Add a separate EHCIPacket struct and move fields over from EHCIQueue. Preparing for supporting multiple packets per queue being in flight at the same time. No functional changes yet. Fix some codestyle issues along the way. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-06-07xhci: trace: slotsGerd Hoffmann1-0/+6
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-06-07xhci: trace: transfersGerd Hoffmann1-0/+6
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-06-07xhci: trace: endpointsGerd Hoffmann1-0/+5
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-06-07xhci: trace: ring fetchGerd Hoffmann1-0/+1
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-06-07xhci: trace: irq + eventsGerd Hoffmann1-0/+3
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-06-07xhci: trace: run+stopGerd Hoffmann1-0/+2
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-06-07xhci: trace: mmio reads+writesGerd Hoffmann1-0/+12
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-06-07uhci: fix trace format stringsGerd Hoffmann1-4/+4
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-06-07uhci: fix bandwidth managementGerd Hoffmann1-1/+1
uhci_process_frame() can be invoked multiple times per frame, so accounting usb bandwith in a local variable doesn't fly, use a variable in UHCIState instead. Also check the limit more frequently. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-05-28ISCSI: Switch to using READ16/WRITE16 for I/O to the LUNRonnie Sahlberg1-2/+2
This allows using LUNs bigger than 2TB. Keep using READ10 for other device types such as MMC. Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2012-04-18Merge remote-tracking branch 'spice/spice.v52' into stagingAnthony Liguori1-1/+0
* spice/spice.v52: qxl-render: fix broken vnc+spice since commit f934493 qxl: set default values of vram*_size_mb to -1 trace-events: remove unused qxl_vga_ioport_while_not_in_vga_mode
2012-04-18trace-events: remove unused qxl_vga_ioport_while_not_in_vga_modeAlon Levy1-1/+0
The resulting stp file fails to load because of an unresolvable probe. Signed-off-by: Alon Levy <alevy@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-04-17usb-host: rewrite usb_linux_update_endp_tableGerd Hoffmann1-0/+6
This patch carries a complete rewrite of the usb descriptor parser. Changes / improvements: * We are using the USBDescriptor struct instead of hard-coded offsets now to access descriptor data. * (debug) printfs are all gone, tracepoints have been added instead. * We don't try (and fail) to skip over unneeded descriptors. We parse them all one by one. We keep track of which configuration, interface and altsetting we are looking at and use this information to figure which desciptors are in use and which we can ignore. * On parse errors we clear all endpoint information, which will disallow any communication with the device, except control endpoint messages. This makes sure we don't end up with a silly device state where half of the endpoints got enabled and the other half was left disabled. * Some sanity checks have been added. The new parser is more robust and also leaves complete device information in the trace log if you enable the ush_host_parse_* tracepoints. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-04-17usb-hub: add tracepointsGerd Hoffmann1-1/+10
Add tracepoints to the usb hub emulation. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-04-17usb-host: add usb packet to request tracepointsGerd Hoffmann1-5/+5
Add pointer to USBPacket to all tracepoints tracking requests to make it easier to identify them when multiple requests are in flight. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-04-17usb-host: trace canceled requestsGerd Hoffmann1-0/+2
Add tracepoints to track canceled requests. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-04-17usb-host: trace emulated requestsGerd Hoffmann1-0/+1
Add tracepoint to track completion of emulated control requests. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-04-05trace-events: Rename 'next' argumentKevin Wolf1-1/+1
'next' is a systemtap keyword, so it's a bad idea to use it as an argument name. Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2012-03-26trace-events: Fix broken build caused by wrong format specifierStefan Weil1-1/+1
mem is an uint64_t value, so %lx was wrong. Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2012-03-19qxl/qxl_render.c: add trace eventsAlon Levy1-0/+7
Signed-off-by: Alon Levy <alevy@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-03-19qxl: switch qxl.c to trace-eventsAlon Levy1-0/+59
dprint is still used for qxl_init_common one time prints. also switched parts of spice-display.c over, mainly all the callbacks to spice server. All qxl device trace events start with the qxl device id. Signed-off-by: Alon Levy <alevy@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-03-13uhci: tracing supportGerd Hoffmann1-0/+31
Zap DPRINTF, add tracepoints instead. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-03-13usb: improve packet state sanity checksGerd Hoffmann1-0/+1
Add a new function to check whenever the packet state is as expected, log more informations in case it isn't. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-03-13usb: the big renameGerd Hoffmann1-4/+4
Reorganize usb source files. Create a new hw/usb/ directory and move all usb source code to that place. Also make filenames a bit more descriptive. Host adapters are prefixed with "hch-" now, usb device emulations are prefixed with "dev-". Fixup paths Makefile and include paths to make it compile. No code changes. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-03-12Merge remote-tracking branch 'kwolf/for-anthony' into stagingAnthony Liguori1-0/+25
* kwolf/for-anthony: test-coroutine: add performance test for nesting coroutine: adding configure option for sigaltstack coroutine backend coroutine: adding configure choose mechanism for coroutine backend coroutine: adding sigaltstack method (.c source) qcow2: Reduce number of I/O requests qcow2: Add qcow2_alloc_clusters_at() qcow2: Factor out count_cow_clusters qmp: convert blockdev-snapshot-sync to a wrapper around transactions add mode field to blockdev-snapshot-sync transaction item rename blockdev-group-snapshot-sync qapi: complete implementation of unions use QSIMPLEQ_FOREACH_SAFE when freeing list elements Add 'make check-block' make check: Add qemu-iotests subset qemu-iotests: Mark some tests as quick qcow2: Add error messages in qcow2_truncate block: handle -EBUSY in bdrv_commit_all() qcow2: Add some tracing qed: do not evict in-use L2 table cache entries Group snapshot: Fix format name for backing file
2012-03-12qcow2: Reduce number of I/O requestsKevin Wolf1-0/+1
If the first part of a write request is allocated, but the second isn't and it can be allocated so that the resulting area is contiguous, handle it at once. This is a common case for sequential writes. After this patch, alloc_cluster_offset() only checks if the clusters are already allocated or how many new clusters can be allocated contigouosly. The actual cluster allocation is split off into a new function do_alloc_cluster_offset(). Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2012-03-12qcow2: Add some tracingKevin Wolf1-0/+24
Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2012-03-12vga: add trace event for ppm_saveAlon Levy1-0/+3
Signed-off-by: Alon Levy <alevy@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2012-03-12console: add some trace eventsAlon Levy1-0/+4
Signed-off-by: Alon Levy <alevy@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2012-02-27usb: add tracepoint for usb packet state changes.Gerd Hoffmann1-0/+3
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-02-22jazz-led: use trace frameworkHervé Poussineau1-0/+4
Signed-off-by: Hervé Poussineau <hpoussin@reactos.org> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-02-09qed: replace is_write with flags fieldStefan Hajnoczi1-1/+1
Per-request attributes like read/write are currently implemented as bool fields in the QEDAIOCB struct. This becomes unwiedly as the number of attributes grows. For example, the qed_aio_setup() function would have to take multiple bool arguments and at call sites it would be hard to distinguish the meaning of each bool. Instead use a flags field with bitmask constants. This will be used when zero write support is added. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2012-02-09block: add .bdrv_co_write_zeroes() interfaceStefan Hajnoczi1-0/+1
The ability to zero regions of an image file is a useful primitive for higher-level features such as image streaming or zero write detection. Image formats may support an optimized metadata representation instead of writing zeroes into the image file. This allows zero writes to be potentially faster than regular write operations and also preserve sparseness of the image file. The .bdrv_co_write_zeroes() interface should be implemented by block drivers that wish to provide efficient zeroing. Note that this operation is different from the discard operation, which may leave the contents of the region indeterminate. That means discarded blocks are not guaranteed to contain zeroes and may contain junk data instead. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2012-01-30GRLIB UART: Add RX channelFabien Chouteau1-0/+1
This patch implements the RX channel of GRLIB UART with a FIFO to improve data rate. Signed-off-by: Fabien Chouteau <chouteau@adacore.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-01-26virtio-blk: add virtio_blk_handle_read trace eventStefan Hajnoczi1-0/+1
There already exists a virtio_blk_handle_write trace event as well as completion events. Add the virtio_blk_handle_read event so it's easy to trace virtio-blk requests for both read and write operations. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2012-01-26qmp: add block_job_cancel commandStefan Hajnoczi1-0/+1
Add block_job_cancel, which stops an active block streaming operation. When the operation has been cancelled the new BLOCK_JOB_CANCELLED event is emitted. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Acked-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2012-01-26qmp: add block_stream commandStefan Hajnoczi1-0/+4
Add the block_stream command, which starts copy backing file contents into the image file. Also add the BLOCK_JOB_COMPLETED QMP event which is emitted when image streaming completes. Later patches add control over the background copy speed, cancelation, and querying running streaming operations. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Acked-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2012-01-26block: add image streaming block jobStefan Hajnoczi1-0/+4
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2012-01-26block: make copy-on-read a per-request flagStefan Hajnoczi1-1/+2
Previously copy-on-read could only be enabled for all requests to a block device. This means requests coming from the guest as well as QEMU's internal requests would perform copy-on-read when enabled. For image streaming we want to support finer-grained behavior than just populating the image file from its backing image. Image streaming supports partial streaming where a common backing image is preserved. In this case guest requests should not perform copy-on-read because they would indiscriminately copy data which should be left in a backing image from the backing chain. Introduce a per-request flag for copy-on-read so that a block device can process both regular and copy-on-read requests. Overlapping reads and writes still need to be serialized for correctness when copy-on-read is happening, so add an in-flight reference count to track this. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2012-01-23Merge remote-tracking branch 'qemu-kvm/uq/master' into stagingAnthony Liguori1-1/+1
* qemu-kvm/uq/master: kvm: Activate in-kernel irqchip support kvm: x86: Add user space part for in-kernel IOAPIC kvm: x86: Add user space part for in-kernel i8259 kvm: x86: Add user space part for in-kernel APIC kvm: x86: Establish IRQ0 override control kvm: Introduce core services for in-kernel irqchip support memory: Introduce memory_region_init_reservation ioapic: Factor out base class for KVM reuse ioapic: Drop post-load irr initialization i8259: Factor out base class for KVM reuse i8259: Completely privatize PicState apic: Open-code timer save/restore apic: Factor out base class for KVM reuse apic: Introduce apic_report_irq_delivered apic: Inject external NMI events via LINT1 apic: Stop timer on reset kvm: Move kvmclock into hw/kvm folder msi: Generalize msix_supported to msi_supported hyper-v: initialize Hyper-V CPUID leaves. hyper-v: introduce Hyper-V support infrastructure. Conflicts: Makefile.target Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-01-19apic: Introduce apic_report_irq_deliveredJan Kiszka1-1/+1
The in-kernel i8259 and IOAPIC backends for KVM will need this, so encapsulate the shared bits. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
2012-01-13usb: track altsetting in USBDeviceGerd Hoffmann1-0/+1
Also handle {GET,SET}_INTERFACE in common code (usb-desc.c). Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-01-03Merge remote-tracking branch 'qemu-kvm/memory/page_desc' into stagingAnthony Liguori1-1/+1
* qemu-kvm/memory/page_desc: (22 commits) Remove cpu_get_physical_page_desc() sparc: avoid cpu_get_physical_page_desc() virtio-balloon: avoid cpu_get_physical_page_desc() vhost: avoid cpu_get_physical_page_desc() kvm: avoid cpu_get_physical_page_desc() memory: remove CPUPhysMemoryClient xen: convert to MemoryListener API memory: temporarily add memory_region_get_ram_addr() xen, vga: add API for registering the framebuffer vhost: convert to MemoryListener API kvm: convert to MemoryListener API kvm: switch kvm slots to use host virtual address instead of ram_addr_t memory: add API for observing updates to the physical memory map memory: replace cpu_physical_sync_dirty_bitmap() with a memory API framebuffer: drop use of cpu_physical_sync_dirty_bitmap() loader: remove calls to cpu_get_physical_page_desc() framebuffer: drop use of cpu_get_physical_page_desc() memory: introduce memory_region_find() memory: add memory_region_is_logging() memory: add memory_region_is_rom() ...
2012-01-03xen: convert to MemoryListener APIAvi Kivity1-1/+1
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-12-21hw/9pfs: Use the correct signed type for different variablesAneesh Kumar K.V1-4/+4
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
2011-12-15block: bdrv_aio_* do not return NULLPaolo Bonzini1-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>
2011-12-05dma-helpers: Add trace eventsKevin Wolf1-0/+7
Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2011-12-05block: core copy-on-read logicStefan Hajnoczi1-0/+1
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>