aboutsummaryrefslogtreecommitdiff
path: root/trace-events
diff options
context:
space:
mode:
authorDaniel P. Berrange <berrange@redhat.com>2012-06-14 18:12:57 +0100
committerLuiz Capitulino <lcapitulino@redhat.com>2012-06-15 13:35:00 -0300
commitafeecec2e8e99ba184c487633d5d0dde68a002ac (patch)
tree684e8964ba4d983d23841760b45de6661fb3309e /trace-events
parent973603a813c5d60534b4fa0313f83be40e2b9c47 (diff)
downloadqemu-afeecec2e8e99ba184c487633d5d0dde68a002ac.zip
qemu-afeecec2e8e99ba184c487633d5d0dde68a002ac.tar.gz
qemu-afeecec2e8e99ba184c487633d5d0dde68a002ac.tar.bz2
Add rate limiting of RTC_CHANGE, BALLOON_CHANGE & WATCHDOG events
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>
Diffstat (limited to 'trace-events')
-rw-r--r--trace-events5
1 files changed, 5 insertions, 0 deletions
diff --git a/trace-events b/trace-events
index f70523c..5c82b3a 100644
--- a/trace-events
+++ b/trace-events
@@ -677,6 +677,11 @@ esp_mem_writeb_cmd_ensel(uint32_t val) "Enable selection (%2.2x)"
# monitor.c
handle_qmp_command(void *mon, const char *cmd_name) "mon %p cmd_name \"%s\""
monitor_protocol_emitter(void *mon) "mon %p"
+monitor_protocol_event(uint32_t event, const char *evname, void *data) "event=%d name \"%s\" data %p"
+monitor_protocol_event_handler(uint32_t event, void *data, uint64_t last, uint64_t now) "event=%d data=%p last=%" PRId64 " now=%" PRId64
+monitor_protocol_event_emit(uint32_t event, void *data) "event=%d data=%p"
+monitor_protocol_event_queue(uint32_t event, void *data, uint64_t rate, uint64_t last, uint64_t now) "event=%d data=%p rate=%" PRId64 " last=%" PRId64 " now=%" PRId64
+monitor_protocol_event_throttle(uint32_t event, uint64_t rate) "event=%d rate=%" PRId64
# hw/opencores_eth.c
open_eth_mii_write(unsigned idx, uint16_t v) "MII[%02x] <- %04x"