aboutsummaryrefslogtreecommitdiff
path: root/monitor.c
diff options
context:
space:
mode:
authorWenchao Xia <wenchaoqemu@gmail.com>2014-06-18 08:43:41 +0200
committerLuiz Capitulino <lcapitulino@redhat.com>2014-06-23 11:12:27 -0400
commite010ad8f1e14def33117576916a954d7a3778458 (patch)
treeca61b833134a38ba5896fd983eef9fc527a3f951 /monitor.c
parent7a906f7ffb467576507956fe455dd1f55f6ba4ff (diff)
downloadqemu-e010ad8f1e14def33117576916a954d7a3778458.zip
qemu-e010ad8f1e14def33117576916a954d7a3778458.tar.gz
qemu-e010ad8f1e14def33117576916a954d7a3778458.tar.bz2
qapi event: convert RTC_CHANGE
This patch also eliminates build time warning caused by no caller of monitor_qapi_event_throttle(). Signed-off-by: Wenchao Xia <wenchaoqemu@gmail.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Diffstat (limited to 'monitor.c')
-rw-r--r--monitor.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/monitor.c b/monitor.c
index 2c0b747..41ef40e 100644
--- a/monitor.c
+++ b/monitor.c
@@ -614,6 +614,9 @@ monitor_qapi_event_throttle(QAPIEvent event, int64_t rate)
static void monitor_qapi_event_init(void)
{
+ /* Limit guest-triggerable events to 1 per second */
+ monitor_qapi_event_throttle(QAPI_EVENT_RTC_CHANGE, 1000);
+
qmp_event_set_func_emit(monitor_qapi_event_queue);
}
@@ -740,7 +743,6 @@ monitor_protocol_event_throttle(MonitorEvent event,
static void monitor_protocol_event_init(void)
{
/* Limit RTC & BALLOON events to 1 per second */
- monitor_protocol_event_throttle(QEVENT_RTC_CHANGE, 1000);
monitor_protocol_event_throttle(QEVENT_BALLOON_CHANGE, 1000);
monitor_protocol_event_throttle(QEVENT_WATCHDOG, 1000);
/* limit the rate of quorum events to avoid hammering the management */