Commit fdf92762 authored by Peter Maydell's avatar Peter Maydell
Browse files

Merge remote-tracking branch 'remotes/armbru/tags/pull-monitor-2015-10-30' into staging



QMP and QObject patches

# gpg: Signature made Fri 30 Oct 2015 08:06:26 GMT using RSA key ID EB918653
# gpg: Good signature from "Markus Armbruster <armbru@redhat.com>"
# gpg:                 aka "Markus Armbruster <armbru@pond.sub.org>"

* remotes/armbru/tags/pull-monitor-2015-10-30:
  docs: Document QMP event rate limiting
  monitor: Throttle event VSERPORT_CHANGE separately by "id"
  monitor: Turn monitor_qapi_event_state[] into a hash table
  glib: add compatibility interface for g_hash_table_add()
  monitor: Split MonitorQAPIEventConf off MonitorQAPIEventState
  monitor: Switch from timer_new() to timer_new_ns()
  monitor: Simplify event throttling
  monitor: Reduce casting of QAPI event QDict
  qstring: Make conversion from QObject * accept null
  qlist: Make conversion from QObject * accept null
  qfloat qint: Make conversion from QObject * accept null
  qdict: Make conversion from QObject * accept null
  qbool: Make conversion from QObject * accept null
  qobject: Drop QObject_HEAD

Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
parents 7bc8e0c9 7f1e7b23
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -28,6 +28,8 @@ Example:
    "data": { "actual": 944766976 },
    "timestamp": { "seconds": 1267020223, "microseconds": 435656 } }

Note: this event is rate-limited.

BLOCK_IMAGE_CORRUPTED
---------------------

@@ -296,6 +298,8 @@ Example:
     "data": { "reference": "usr1", "sector-num": 345435, "sectors-count": 5 },
     "timestamp": { "seconds": 1344522075, "microseconds": 745528 } }

Note: this event is rate-limited.

QUORUM_REPORT_BAD
-----------------

@@ -318,6 +322,8 @@ Example:
     "data": { "node-name": "1.raw", "sector-num": 345435, "sectors-count": 5 },
     "timestamp": { "seconds": 1344522075, "microseconds": 745528 } }

Note: this event is rate-limited.

RESET
-----

@@ -358,6 +364,8 @@ Example:
    "data": { "offset": 78 },
    "timestamp": { "seconds": 1267020223, "microseconds": 435656 } }

Note: this event is rate-limited.

SHUTDOWN
--------

@@ -632,6 +640,8 @@ Example:
    "data": { "id": "channel0", "open": true },
    "timestamp": { "seconds": 1401385907, "microseconds": 422329 } }

Note: this event is rate-limited separately for each "id".

WAKEUP
------

@@ -662,3 +672,5 @@ Example:

Note: If action is "reset", "shutdown", or "pause" the WATCHDOG event is
followed respectively by the RESET, SHUTDOWN, or STOP events.

Note: this event is rate-limited.
+5 −0
Original line number Diff line number Diff line
@@ -175,6 +175,11 @@ The format of asynchronous events is:
For a listing of supported asynchronous events, please, refer to the
qmp-events.txt file.

Some events are rate-limited to at most one per second.  If additional
"similar" events arrive within one second, all but the last one are
dropped, and the last one is delayed.  "Similar" normally means same
event type.  See qmp-events.txt for details.

2.5 QGA Synchronization
-----------------------

+8 −0
Original line number Diff line number Diff line
@@ -165,6 +165,14 @@ static inline GThread *g_thread_new(const char *name,
#define CompatGCond GCond
#endif /* glib 2.31 */

#if !GLIB_CHECK_VERSION(2, 32, 0)
/* Beware, function returns gboolean since 2.39.2, see GLib commit 9101915 */
static inline void g_hash_table_add(GHashTable *hash_table, gpointer key)
{
    g_hash_table_replace(hash_table, key, key);
}
#endif

#ifndef g_assert_true
#define g_assert_true(expr)                                                    \
    do {                                                                       \
+1 −1
Original line number Diff line number Diff line
@@ -18,7 +18,7 @@
#include "qapi/qmp/qobject.h"

typedef struct QBool {
    QObject_HEAD;
    QObject base;
    bool value;
} QBool;

+1 −1
Original line number Diff line number Diff line
@@ -28,7 +28,7 @@ typedef struct QDictEntry {
} QDictEntry;

typedef struct QDict {
    QObject_HEAD;
    QObject base;
    size_t size;
    QLIST_HEAD(,QDictEntry) table[QDICT_BUCKET_MAX];
} QDict;
Loading