aboutsummaryrefslogtreecommitdiffstats
path: root/trace-events
AgeCommit message (Collapse)AuthorFilesLines
2011-01-11usb: add device qualifier supportGerd Hoffmann1-0/+2
Add support for device_qualifier and other_speed_config descriptors. These are used to query the "other speed" configuration of usb 2.0 devices, i.e. in high-speed mode they return the full-speed configuration and visa versa. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2011-01-11usb: move remote wakeup handling to common codeGerd Hoffmann1-0/+2
This patch moves setting and clearing the remote_wakeup feature bit (via USB_REQ_{SET,CLEAR}_FEATURE) to common code. Also USB_REQ_GET_STATUS handling is moved to common code. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2011-01-11usb: move USB_REQ_{GET,SET}_CONFIGURATION handling to common codeGerd Hoffmann1-0/+1
This patch adds fields to the USBDevice struct for the current speed (hard-wired to full speed for now) and current device configuration. Also a init function is added which inializes these fields. This allows USB_REQ_{GET,SET}_CONFIGURATION handling to be moved to common code. For most drivers the conversion is trivial ad they support a single configuration only anyway. One exception is bluetooth where some device-specific setup code runs after get/set configuration. The other is usb-net which actually has two configurations so the the code to check for the active configuration has been adapted. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2011-01-11usb: move USB_REQ_SET_ADDRESS handling to common codeGerd Hoffmann1-0/+1
USB_REQ_SET_ADDRESS handling is identical in *all* emulated devices. Move it to common code. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2011-01-11usb: data structs and helpers for usb descriptors.Gerd Hoffmann1-0/+5
This patch adds hw/usb-desc.[ch] files. They carry data structures for various usb descriptors and helper functions to generate usb packets from the structures. The intention is to have a internal representation of the device desription which is more usable than the current char array blobs, so we can have common code handle common usb device emulation using the device description. The usage of this infrastructure is optional for usb drivers as there are cases such as pass-through where it probably isn't very useful. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2010-12-17qed: Read/write supportStefan Hajnoczi1-0/+10
This patch implements the read/write state machine. Operations are fully asynchronous and multiple operations may be active at any time. Allocating writes lock tables to ensure metadata updates do not interfere with each other. If two allocating writes need to update the same L2 table they will run sequentially. If two allocating writes need to update different L2 tables they will run in parallel. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2010-12-17qed: Table, L2 cache, and cluster functionsStefan Hajnoczi1-0/+11
This patch adds code to look up data cluster offsets in the image via the L1/L2 tables. The L2 tables are writethrough cached in memory for performance (each read/write requires a lookup so it is essential to cache the tables). With cluster lookup code in place it is possible to implement bdrv_is_allocated() to query the number of contiguous allocated/unallocated clusters. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2010-11-21trace: Trace vm_start()/vm_stop()Stefan Hajnoczi1-0/+3
VM state change notifications are invoked from vm_start()/vm_stop(). Trace these state changes so we can reason about the state of the VM from trace output. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-10-31sparc32: convert debug printf statements to tracepointsBlue Swirl1-0/+108
Replace debug printf statements with tracepoints. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-10-20apic: convert debug printf statements to tracepointsBlue Swirl1-0/+12
Replace debug printf statements with tracepoints. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-10-09trace: Trace bdrv_aio_{readv,writev}Stefan Hajnoczi1-0/+2
Observing block layer aio readv/writev operations is useful for debugging image formats or understanding guest disk I/O patterns. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-10-09trace: Use portable format stringsStefan Hajnoczi1-2/+2
It is not portable to use "%ld" for int64_t because int64_t may have type long on 64-bit platforms and long long on 32-bit platforms. Use the standard library PRId64 macros to keep format strings portable. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-09-10trace: fix a typoBlue Swirl1-1/+1
There is no qemu_valloc() but qemu_vmalloc(). Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-09-09trace: Trace entry point of balloon request handlerPrerna Saxena1-0/+4
Signed-off-by: Prerna Saxena <prerna@linux.vnet.ibm.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2010-09-09trace: Trace port IOPrerna Saxena1-0/+4
Signed-off-by: Prerna Saxena <prerna@linux.vnet.ibm.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2010-09-09trace: Trace virtqueue operationsStefan Hajnoczi1-0/+8
This patch adds trace events for virtqueue operations including adding/removing buffers, notifying the guest, and receiving a notify from the guest. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2010-09-09trace: Trace virtio-blk, multiwrite, and paio_submitStefan Hajnoczi1-0/+14
This patch adds trace events that make it possible to observe virtio-blk. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2010-09-09trace: Trace qemu_malloc() and qemu_vmalloc()Stefan Hajnoczi1-0/+10
It is often useful to instrument memory management functions in order to find leaks or performance problems. This patch adds trace events for the memory allocation primitives. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2010-09-09trace: Support disabled events in trace-eventsStefan Hajnoczi1-1/+6
Sometimes it is useful to disable a trace event. Removing the event from trace-events is not enough since source code will call the trace_*() function for the event. This patch makes it easy to build without specific trace events by marking them disabled in trace-events: disable multiwrite_cb(void *mcb, int ret) "mcb %p ret %d" This builds without the multiwrite_cb trace event. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> trace: Allow bulk enabling/disabling of trace events at compile time For 'simple' trace backend, allow bulk enabling/disabling of trace events at compile time. Trace events that are preceded by 'disable' keyword are compiled in, but turned off by default. These can individually be turned on using the monitor. All other trace events are enabled by default. TODO : This could be enhanced when the trace-event namespace is partitioned into a group and an ID within that group. In such a case, marking a group as enabled would automatically enable all trace-events listed under it. Signed-off-by: Prerna Saxena <prerna@linux.vnet.ibm.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2010-09-09trace: Add trace-events file for declaring trace eventsStefan Hajnoczi1-0/+24
This patch introduces the trace-events file where trace events can be declared like so: qemu_malloc(size_t size) "size %zu" qemu_free(void *ptr) "ptr %p" These trace event declarations are processed by a new tool called tracetool to generate code for the trace events. Trace event declarations are independent of the backend tracing system (LTTng User Space Tracing, ftrace markers, DTrace). The default "nop" backend generates empty trace event functions. Therefore trace events are disabled by default. The trace-events file serves two purposes: 1. Adding trace events is easy. It is not necessary to understand the details of a backend tracing system. The trace-events file is a single location where trace events can be declared without code duplication. 2. QEMU is not tightly coupled to one particular backend tracing system. In order to support tracing across QEMU host platforms and to anticipate new backend tracing systems that are currently maturing, it is important to be flexible and not tied to one system. This commit includes fixes from Prerna Saxena <prerna@linux.vnet.ibm.com> and Blue Swirl <blauwirbel@gmail.com>. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>