diff options
author | 2017-04-25 03:31:15 -0700 | |
---|---|---|
committer | 2017-05-22 06:48:08 +0000 | |
commit | bb756eebdac6fd24e8919e2c43f7d2c8c4091f59 (patch) | |
tree | ca11e03542edf2d8f631efeca5e1626d211107e3 /qemu/trace/qmp.c | |
parent | a14b48d18a9ed03ec191cf16b162206998a895ce (diff) |
Adding qemu as a submodule of KVMFORNFV
This Patch includes the changes to add qemu as a submodule to
kvmfornfv repo and make use of the updated latest qemu for the
execution of all testcase
Change-Id: I1280af507a857675c7f81d30c95255635667bdd7
Signed-off-by:RajithaY<rajithax.yerrumsetty@intel.com>
Diffstat (limited to 'qemu/trace/qmp.c')
-rw-r--r-- | qemu/trace/qmp.c | 75 |
1 files changed, 0 insertions, 75 deletions
diff --git a/qemu/trace/qmp.c b/qemu/trace/qmp.c deleted file mode 100644 index 8aa2660aa..000000000 --- a/qemu/trace/qmp.c +++ /dev/null @@ -1,75 +0,0 @@ -/* - * QMP commands for tracing events. - * - * Copyright (C) 2014 LluĂs Vilanova <vilanova@ac.upc.edu> - * - * This work is licensed under the terms of the GNU GPL, version 2 or later. - * See the COPYING file in the top-level directory. - */ - -#include "qemu/osdep.h" -#include "qmp-commands.h" -#include "trace/control.h" - - -TraceEventInfoList *qmp_trace_event_get_state(const char *name, Error **errp) -{ - TraceEventInfoList *events = NULL; - bool found = false; - TraceEvent *ev; - - ev = NULL; - while ((ev = trace_event_pattern(name, ev)) != NULL) { - TraceEventInfoList *elem = g_new(TraceEventInfoList, 1); - elem->value = g_new(TraceEventInfo, 1); - elem->value->name = g_strdup(trace_event_get_name(ev)); - if (!trace_event_get_state_static(ev)) { - elem->value->state = TRACE_EVENT_STATE_UNAVAILABLE; - } else if (!trace_event_get_state_dynamic(ev)) { - elem->value->state = TRACE_EVENT_STATE_DISABLED; - } else { - elem->value->state = TRACE_EVENT_STATE_ENABLED; - } - elem->next = events; - events = elem; - found = true; - } - - if (!found && !trace_event_is_pattern(name)) { - error_setg(errp, "unknown event \"%s\"", name); - } - - return events; -} - -void qmp_trace_event_set_state(const char *name, bool enable, - bool has_ignore_unavailable, - bool ignore_unavailable, Error **errp) -{ - bool found = false; - TraceEvent *ev; - - /* Check all selected events are dynamic */ - ev = NULL; - while ((ev = trace_event_pattern(name, ev)) != NULL) { - found = true; - if (!(has_ignore_unavailable && ignore_unavailable) && - !trace_event_get_state_static(ev)) { - error_setg(errp, "cannot set dynamic tracing state for \"%s\"", - trace_event_get_name(ev)); - return; - } - } - if (!found && !trace_event_is_pattern(name)) { - error_setg(errp, "unknown event \"%s\"", name); - return; - } - - /* Apply changes */ - ev = NULL; - while ((ev = trace_event_pattern(name, ev)) != NULL) { - if (trace_event_get_state_static(ev)) { - trace_event_set_state_dynamic(ev, enable); - } - } -} |