Lluís | 23d15e8 | 2011-08-31 20:31:31 +0200 | [diff] [blame] | 1 | /* |
| 2 | * Interface for configuring and controlling the state of tracing events. |
| 3 | * |
Lluís Vilanova | 4815185 | 2016-07-11 12:53:41 +0200 | [diff] [blame] | 4 | * Copyright (C) 2011-2016 Lluís Vilanova <vilanova@ac.upc.edu> |
Lluís | 23d15e8 | 2011-08-31 20:31:31 +0200 | [diff] [blame] | 5 | * |
Lluís Vilanova | b1bae81 | 2013-03-05 14:47:38 +0100 | [diff] [blame] | 6 | * This work is licensed under the terms of the GNU GPL, version 2 or later. |
| 7 | * See the COPYING file in the top-level directory. |
Lluís | 23d15e8 | 2011-08-31 20:31:31 +0200 | [diff] [blame] | 8 | */ |
| 9 | |
Peter Maydell | d38ea87 | 2016-01-29 17:50:05 +0000 | [diff] [blame] | 10 | #include "qemu/osdep.h" |
Lluís | 23d15e8 | 2011-08-31 20:31:31 +0200 | [diff] [blame] | 11 | #include "trace/control.h" |
Veronia Bahaa | f348b6d | 2016-03-20 19:16:19 +0200 | [diff] [blame] | 12 | #include "qemu/help_option.h" |
Markus Armbruster | 922a01a | 2018-02-01 12:18:46 +0100 | [diff] [blame] | 13 | #include "qemu/option.h" |
Lluís Vilanova | 5b80827 | 2014-05-27 15:02:14 +0200 | [diff] [blame] | 14 | #ifdef CONFIG_TRACE_SIMPLE |
| 15 | #include "trace/simple.h" |
| 16 | #endif |
| 17 | #ifdef CONFIG_TRACE_FTRACE |
| 18 | #include "trace/ftrace.h" |
| 19 | #endif |
Paolo Bonzini | ed7f5f1 | 2016-01-07 16:55:30 +0300 | [diff] [blame] | 20 | #ifdef CONFIG_TRACE_LOG |
| 21 | #include "qemu/log.h" |
| 22 | #endif |
Paul Durrant | 0a85241 | 2016-08-04 14:44:14 +0100 | [diff] [blame] | 23 | #ifdef CONFIG_TRACE_SYSLOG |
| 24 | #include <syslog.h> |
| 25 | #endif |
Markus Armbruster | daa76aa | 2016-06-15 19:27:16 +0200 | [diff] [blame] | 26 | #include "qapi/error.h" |
Alexey Kardashevskiy | a35d9be | 2014-06-02 16:34:10 +1000 | [diff] [blame] | 27 | #include "qemu/error-report.h" |
Denis V. Lunev | e9e0bb2 | 2016-06-17 17:44:10 +0300 | [diff] [blame] | 28 | #include "qemu/config-file.h" |
Denis V. Lunev | acc6809 | 2016-03-16 14:36:51 +0300 | [diff] [blame] | 29 | #include "monitor/monitor.h" |
Paolo Bonzini | 243af02 | 2020-02-04 12:20:10 +0100 | [diff] [blame] | 30 | #include "trace/trace-root.h" |
Lluís | 23d15e8 | 2011-08-31 20:31:31 +0200 | [diff] [blame] | 31 | |
Paolo Bonzini | 43b48cf | 2015-10-28 07:06:26 +0100 | [diff] [blame] | 32 | int trace_events_enabled_count; |
| 33 | |
Daniel P. Berrange | fe4db84 | 2016-10-04 14:35:52 +0100 | [diff] [blame] | 34 | typedef struct TraceEventGroup { |
| 35 | TraceEvent **events; |
| 36 | } TraceEventGroup; |
| 37 | |
| 38 | static TraceEventGroup *event_groups; |
| 39 | static size_t nevent_groups; |
Daniel P. Berrange | ca3fa0e | 2016-10-04 14:35:54 +0100 | [diff] [blame] | 40 | static uint32_t next_id; |
| 41 | static uint32_t next_vcpu_id; |
Josh DuBois | 648b482 | 2020-08-16 12:46:10 -0500 | [diff] [blame] | 42 | static bool init_trace_on_startup; |
Daniel P. Berrange | fe4db84 | 2016-10-04 14:35:52 +0100 | [diff] [blame] | 43 | |
Denis V. Lunev | e9e0bb2 | 2016-06-17 17:44:10 +0300 | [diff] [blame] | 44 | QemuOptsList qemu_trace_opts = { |
| 45 | .name = "trace", |
| 46 | .implied_opt_name = "enable", |
| 47 | .head = QTAILQ_HEAD_INITIALIZER(qemu_trace_opts.head), |
| 48 | .desc = { |
| 49 | { |
| 50 | .name = "enable", |
| 51 | .type = QEMU_OPT_STRING, |
| 52 | }, |
| 53 | { |
| 54 | .name = "events", |
| 55 | .type = QEMU_OPT_STRING, |
| 56 | },{ |
| 57 | .name = "file", |
| 58 | .type = QEMU_OPT_STRING, |
| 59 | }, |
| 60 | { /* end of list */ } |
| 61 | }, |
| 62 | }; |
| 63 | |
| 64 | |
Daniel P. Berrange | fe4db84 | 2016-10-04 14:35:52 +0100 | [diff] [blame] | 65 | void trace_event_register_group(TraceEvent **events) |
| 66 | { |
Daniel P. Berrange | ca3fa0e | 2016-10-04 14:35:54 +0100 | [diff] [blame] | 67 | size_t i; |
| 68 | for (i = 0; events[i] != NULL; i++) { |
| 69 | events[i]->id = next_id++; |
Lluís Vilanova | d01c05c | 2017-07-04 10:34:19 +0200 | [diff] [blame] | 70 | if (events[i]->vcpu_id == TRACE_VCPU_EVENT_NONE) { |
| 71 | continue; |
| 72 | } |
| 73 | |
| 74 | if (likely(next_vcpu_id < CPU_TRACE_DSTATE_MAX_EVENTS)) { |
Daniel P. Berrange | ca3fa0e | 2016-10-04 14:35:54 +0100 | [diff] [blame] | 75 | events[i]->vcpu_id = next_vcpu_id++; |
Lluís Vilanova | d01c05c | 2017-07-04 10:34:19 +0200 | [diff] [blame] | 76 | } else { |
Alistair Francis | 55d527a | 2017-09-11 12:52:46 -0700 | [diff] [blame] | 77 | warn_report("too many vcpu trace events; dropping '%s'", |
| 78 | events[i]->name); |
Daniel P. Berrange | ca3fa0e | 2016-10-04 14:35:54 +0100 | [diff] [blame] | 79 | } |
| 80 | } |
Daniel P. Berrange | fe4db84 | 2016-10-04 14:35:52 +0100 | [diff] [blame] | 81 | event_groups = g_renew(TraceEventGroup, event_groups, nevent_groups + 1); |
| 82 | event_groups[nevent_groups].events = events; |
| 83 | nevent_groups++; |
| 84 | } |
| 85 | |
| 86 | |
Lluís Vilanova | b1bae81 | 2013-03-05 14:47:38 +0100 | [diff] [blame] | 87 | TraceEvent *trace_event_name(const char *name) |
| 88 | { |
| 89 | assert(name != NULL); |
| 90 | |
Daniel P. Berrange | 0d4e995 | 2016-10-04 14:35:43 +0100 | [diff] [blame] | 91 | TraceEventIter iter; |
| 92 | TraceEvent *ev; |
| 93 | trace_event_iter_init(&iter, NULL); |
| 94 | while ((ev = trace_event_iter_next(&iter)) != NULL) { |
Lluís Vilanova | b1bae81 | 2013-03-05 14:47:38 +0100 | [diff] [blame] | 95 | if (strcmp(trace_event_get_name(ev), name) == 0) { |
| 96 | return ev; |
| 97 | } |
| 98 | } |
| 99 | return NULL; |
| 100 | } |
| 101 | |
Daniel P. Berrange | 6a1b0f3 | 2016-10-04 14:35:42 +0100 | [diff] [blame] | 102 | void trace_event_iter_init(TraceEventIter *iter, const char *pattern) |
| 103 | { |
| 104 | iter->event = 0; |
Daniel P. Berrange | fe4db84 | 2016-10-04 14:35:52 +0100 | [diff] [blame] | 105 | iter->group = 0; |
Daniel P. Berrange | 6a1b0f3 | 2016-10-04 14:35:42 +0100 | [diff] [blame] | 106 | iter->pattern = pattern; |
| 107 | } |
| 108 | |
| 109 | TraceEvent *trace_event_iter_next(TraceEventIter *iter) |
| 110 | { |
Daniel P. Berrange | fe4db84 | 2016-10-04 14:35:52 +0100 | [diff] [blame] | 111 | while (iter->group < nevent_groups && |
| 112 | event_groups[iter->group].events[iter->event] != NULL) { |
| 113 | TraceEvent *ev = event_groups[iter->group].events[iter->event]; |
Daniel P. Berrange | 6a1b0f3 | 2016-10-04 14:35:42 +0100 | [diff] [blame] | 114 | iter->event++; |
Daniel P. Berrange | fe4db84 | 2016-10-04 14:35:52 +0100 | [diff] [blame] | 115 | if (event_groups[iter->group].events[iter->event] == NULL) { |
| 116 | iter->event = 0; |
| 117 | iter->group++; |
| 118 | } |
Daniel P. Berrange | 6a1b0f3 | 2016-10-04 14:35:42 +0100 | [diff] [blame] | 119 | if (!iter->pattern || |
Alex Bennée | e66eae7 | 2019-12-05 12:25:17 +0000 | [diff] [blame] | 120 | g_pattern_match_simple(iter->pattern, trace_event_get_name(ev))) { |
Daniel P. Berrange | 6a1b0f3 | 2016-10-04 14:35:42 +0100 | [diff] [blame] | 121 | return ev; |
| 122 | } |
| 123 | } |
| 124 | |
| 125 | return NULL; |
| 126 | } |
| 127 | |
Paolo Bonzini | e9527dd | 2016-01-07 16:55:27 +0300 | [diff] [blame] | 128 | void trace_list_events(void) |
| 129 | { |
Daniel P. Berrange | 0d4e995 | 2016-10-04 14:35:43 +0100 | [diff] [blame] | 130 | TraceEventIter iter; |
| 131 | TraceEvent *ev; |
| 132 | trace_event_iter_init(&iter, NULL); |
| 133 | while ((ev = trace_event_iter_next(&iter)) != NULL) { |
| 134 | fprintf(stderr, "%s\n", trace_event_get_name(ev)); |
Paolo Bonzini | e9527dd | 2016-01-07 16:55:27 +0300 | [diff] [blame] | 135 | } |
Philippe Mathieu-Daudé | 9f591a5 | 2019-08-23 16:22:03 +0200 | [diff] [blame] | 136 | #ifdef CONFIG_TRACE_DTRACE |
| 137 | fprintf(stderr, "This list of names of trace points may be incomplete " |
| 138 | "when using the DTrace/SystemTap backends.\n" |
| 139 | "Run 'qemu-trace-stap list %s' to print the full list.\n", |
| 140 | error_get_progname()); |
| 141 | #endif |
Paolo Bonzini | e9527dd | 2016-01-07 16:55:27 +0300 | [diff] [blame] | 142 | } |
| 143 | |
| 144 | static void do_trace_enable_events(const char *line_buf) |
Paolo Bonzini | 10578a2 | 2016-01-07 16:55:26 +0300 | [diff] [blame] | 145 | { |
| 146 | const bool enable = ('-' != line_buf[0]); |
| 147 | const char *line_ptr = enable ? line_buf : line_buf + 1; |
Daniel P. Berrange | 0d4e995 | 2016-10-04 14:35:43 +0100 | [diff] [blame] | 148 | TraceEventIter iter; |
| 149 | TraceEvent *ev; |
| 150 | bool is_pattern = trace_event_is_pattern(line_ptr); |
Paolo Bonzini | 10578a2 | 2016-01-07 16:55:26 +0300 | [diff] [blame] | 151 | |
Daniel P. Berrange | 0d4e995 | 2016-10-04 14:35:43 +0100 | [diff] [blame] | 152 | trace_event_iter_init(&iter, line_ptr); |
| 153 | while ((ev = trace_event_iter_next(&iter)) != NULL) { |
| 154 | if (!trace_event_get_state_static(ev)) { |
| 155 | if (!is_pattern) { |
Alistair Francis | 3dc6f86 | 2017-07-12 06:57:41 -0700 | [diff] [blame] | 156 | warn_report("trace event '%s' is not traceable", |
| 157 | line_ptr); |
Daniel P. Berrange | 0d4e995 | 2016-10-04 14:35:43 +0100 | [diff] [blame] | 158 | return; |
Paolo Bonzini | 10578a2 | 2016-01-07 16:55:26 +0300 | [diff] [blame] | 159 | } |
Daniel P. Berrange | 0d4e995 | 2016-10-04 14:35:43 +0100 | [diff] [blame] | 160 | continue; |
Paolo Bonzini | 10578a2 | 2016-01-07 16:55:26 +0300 | [diff] [blame] | 161 | } |
Daniel P. Berrange | 0d4e995 | 2016-10-04 14:35:43 +0100 | [diff] [blame] | 162 | |
| 163 | /* start tracing */ |
| 164 | trace_event_set_state_dynamic(ev, enable); |
| 165 | if (!is_pattern) { |
| 166 | return; |
Paolo Bonzini | 10578a2 | 2016-01-07 16:55:26 +0300 | [diff] [blame] | 167 | } |
| 168 | } |
Daniel P. Berrange | 0d4e995 | 2016-10-04 14:35:43 +0100 | [diff] [blame] | 169 | |
| 170 | if (!is_pattern) { |
Alistair Francis | 3dc6f86 | 2017-07-12 06:57:41 -0700 | [diff] [blame] | 171 | warn_report("trace event '%s' does not exist", |
| 172 | line_ptr); |
Daniel P. Berrange | 0d4e995 | 2016-10-04 14:35:43 +0100 | [diff] [blame] | 173 | } |
Paolo Bonzini | 10578a2 | 2016-01-07 16:55:26 +0300 | [diff] [blame] | 174 | } |
| 175 | |
Paolo Bonzini | e9527dd | 2016-01-07 16:55:27 +0300 | [diff] [blame] | 176 | void trace_enable_events(const char *line_buf) |
| 177 | { |
| 178 | if (is_help_option(line_buf)) { |
| 179 | trace_list_events(); |
Kevin Wolf | 947e474 | 2020-10-05 17:58:44 +0200 | [diff] [blame] | 180 | if (monitor_cur() == NULL) { |
Denis V. Lunev | acc6809 | 2016-03-16 14:36:51 +0300 | [diff] [blame] | 181 | exit(0); |
| 182 | } |
Paolo Bonzini | e9527dd | 2016-01-07 16:55:27 +0300 | [diff] [blame] | 183 | } else { |
| 184 | do_trace_enable_events(line_buf); |
| 185 | } |
| 186 | } |
| 187 | |
Denis V. Lunev | e9e0bb2 | 2016-06-17 17:44:10 +0300 | [diff] [blame] | 188 | static void trace_init_events(const char *fname) |
Lluís | 23d15e8 | 2011-08-31 20:31:31 +0200 | [diff] [blame] | 189 | { |
Alexey Kardashevskiy | a35d9be | 2014-06-02 16:34:10 +1000 | [diff] [blame] | 190 | Location loc; |
| 191 | FILE *fp; |
| 192 | char line_buf[1024]; |
| 193 | size_t line_idx = 0; |
| 194 | |
Lluís | 23d15e8 | 2011-08-31 20:31:31 +0200 | [diff] [blame] | 195 | if (fname == NULL) { |
| 196 | return; |
| 197 | } |
| 198 | |
Alexey Kardashevskiy | a35d9be | 2014-06-02 16:34:10 +1000 | [diff] [blame] | 199 | loc_push_none(&loc); |
| 200 | loc_set_file(fname, 0); |
| 201 | fp = fopen(fname, "r"); |
Lluís | 23d15e8 | 2011-08-31 20:31:31 +0200 | [diff] [blame] | 202 | if (!fp) { |
Alexey Kardashevskiy | a35d9be | 2014-06-02 16:34:10 +1000 | [diff] [blame] | 203 | error_report("%s", strerror(errno)); |
Lluís | 23d15e8 | 2011-08-31 20:31:31 +0200 | [diff] [blame] | 204 | exit(1); |
| 205 | } |
Lluís | 23d15e8 | 2011-08-31 20:31:31 +0200 | [diff] [blame] | 206 | while (fgets(line_buf, sizeof(line_buf), fp)) { |
Alexey Kardashevskiy | a35d9be | 2014-06-02 16:34:10 +1000 | [diff] [blame] | 207 | loc_set_file(fname, ++line_idx); |
Lluís | 23d15e8 | 2011-08-31 20:31:31 +0200 | [diff] [blame] | 208 | size_t len = strlen(line_buf); |
| 209 | if (len > 1) { /* skip empty lines */ |
| 210 | line_buf[len - 1] = '\0'; |
Alexey Kardashevskiy | 794b1f9 | 2012-06-14 14:41:40 +1000 | [diff] [blame] | 211 | if ('#' == line_buf[0]) { /* skip commented lines */ |
| 212 | continue; |
| 213 | } |
Paolo Bonzini | 10578a2 | 2016-01-07 16:55:26 +0300 | [diff] [blame] | 214 | trace_enable_events(line_buf); |
Lluís | 23d15e8 | 2011-08-31 20:31:31 +0200 | [diff] [blame] | 215 | } |
| 216 | } |
| 217 | if (fclose(fp) != 0) { |
Alexey Kardashevskiy | a35d9be | 2014-06-02 16:34:10 +1000 | [diff] [blame] | 218 | loc_set_file(fname, 0); |
| 219 | error_report("%s", strerror(errno)); |
Lluís | 23d15e8 | 2011-08-31 20:31:31 +0200 | [diff] [blame] | 220 | exit(1); |
| 221 | } |
Alexey Kardashevskiy | a35d9be | 2014-06-02 16:34:10 +1000 | [diff] [blame] | 222 | loc_pop(&loc); |
Lluís | 23d15e8 | 2011-08-31 20:31:31 +0200 | [diff] [blame] | 223 | } |
Lluís Vilanova | 5b80827 | 2014-05-27 15:02:14 +0200 | [diff] [blame] | 224 | |
Paolo Bonzini | 92eecff | 2020-11-02 06:58:41 -0500 | [diff] [blame] | 225 | void trace_init_file(void) |
Lluís Vilanova | 5b80827 | 2014-05-27 15:02:14 +0200 | [diff] [blame] | 226 | { |
Paolo Bonzini | 92eecff | 2020-11-02 06:58:41 -0500 | [diff] [blame] | 227 | QemuOpts *opts = qemu_find_opts_singleton("trace"); |
| 228 | const char *file = qemu_opt_get(opts, "file"); |
Lluís Vilanova | 5b80827 | 2014-05-27 15:02:14 +0200 | [diff] [blame] | 229 | #ifdef CONFIG_TRACE_SIMPLE |
Paolo Bonzini | 41fc57e | 2016-01-07 16:55:24 +0300 | [diff] [blame] | 230 | st_set_trace_file(file); |
Josh DuBois | 648b482 | 2020-08-16 12:46:10 -0500 | [diff] [blame] | 231 | if (init_trace_on_startup) { |
| 232 | st_set_trace_file_enabled(true); |
| 233 | } |
Paolo Bonzini | ed7f5f1 | 2016-01-07 16:55:30 +0300 | [diff] [blame] | 234 | #elif defined CONFIG_TRACE_LOG |
Alex Bennée | 3d88754 | 2020-02-25 12:47:00 +0000 | [diff] [blame] | 235 | /* |
| 236 | * If both the simple and the log backends are enabled, "--trace file" |
| 237 | * only applies to the simple backend; use "-D" for the log |
| 238 | * backend. However we should only override -D if we actually have |
| 239 | * something to override it with. |
Paolo Bonzini | ed7f5f1 | 2016-01-07 16:55:30 +0300 | [diff] [blame] | 240 | */ |
Alex Bennée | 3d88754 | 2020-02-25 12:47:00 +0000 | [diff] [blame] | 241 | if (file) { |
| 242 | qemu_set_log_filename(file, &error_fatal); |
| 243 | } |
Lluís Vilanova | 5b80827 | 2014-05-27 15:02:14 +0200 | [diff] [blame] | 244 | #else |
| 245 | if (file) { |
Yaowei Bai | db817b8 | 2018-07-04 11:17:27 +0800 | [diff] [blame] | 246 | fprintf(stderr, "error: --trace file=...: " |
Lluís Vilanova | 5b80827 | 2014-05-27 15:02:14 +0200 | [diff] [blame] | 247 | "option not supported by the selected tracing backends\n"); |
Paolo Bonzini | 41fc57e | 2016-01-07 16:55:24 +0300 | [diff] [blame] | 248 | exit(1); |
| 249 | } |
| 250 | #endif |
| 251 | } |
| 252 | |
Lluís Vilanova | 82e95ec | 2016-12-26 22:24:40 +0100 | [diff] [blame] | 253 | void trace_fini_vcpu(CPUState *vcpu) |
| 254 | { |
| 255 | TraceEventIter iter; |
| 256 | TraceEvent *ev; |
| 257 | |
Lluís Vilanova | a47e871 | 2016-12-26 22:24:46 +0100 | [diff] [blame] | 258 | trace_guest_cpu_exit(vcpu); |
| 259 | |
Lluís Vilanova | 82e95ec | 2016-12-26 22:24:40 +0100 | [diff] [blame] | 260 | trace_event_iter_init(&iter, NULL); |
| 261 | while ((ev = trace_event_iter_next(&iter)) != NULL) { |
| 262 | if (trace_event_is_vcpu(ev) && |
| 263 | trace_event_get_state_static(ev) && |
| 264 | trace_event_get_vcpu_state_dynamic(vcpu, ev)) { |
| 265 | /* must disable to affect the global counter */ |
| 266 | trace_event_set_vcpu_state_dynamic(vcpu, ev, false); |
| 267 | } |
| 268 | } |
| 269 | } |
| 270 | |
Paolo Bonzini | 41fc57e | 2016-01-07 16:55:24 +0300 | [diff] [blame] | 271 | bool trace_init_backends(void) |
| 272 | { |
| 273 | #ifdef CONFIG_TRACE_SIMPLE |
| 274 | if (!st_init()) { |
| 275 | fprintf(stderr, "failed to initialize simple tracing backend.\n"); |
Lluís Vilanova | 5b80827 | 2014-05-27 15:02:14 +0200 | [diff] [blame] | 276 | return false; |
| 277 | } |
| 278 | #endif |
| 279 | |
| 280 | #ifdef CONFIG_TRACE_FTRACE |
| 281 | if (!ftrace_init()) { |
| 282 | fprintf(stderr, "failed to initialize ftrace backend.\n"); |
| 283 | return false; |
| 284 | } |
| 285 | #endif |
| 286 | |
Paul Durrant | 0a85241 | 2016-08-04 14:44:14 +0100 | [diff] [blame] | 287 | #ifdef CONFIG_TRACE_SYSLOG |
| 288 | openlog(NULL, LOG_PID, LOG_DAEMON); |
| 289 | #endif |
| 290 | |
Lluís Vilanova | 5b80827 | 2014-05-27 15:02:14 +0200 | [diff] [blame] | 291 | return true; |
| 292 | } |
Denis V. Lunev | e9e0bb2 | 2016-06-17 17:44:10 +0300 | [diff] [blame] | 293 | |
Paolo Bonzini | 92eecff | 2020-11-02 06:58:41 -0500 | [diff] [blame] | 294 | void trace_opt_parse(const char *optarg) |
Denis V. Lunev | e9e0bb2 | 2016-06-17 17:44:10 +0300 | [diff] [blame] | 295 | { |
Denis V. Lunev | e9e0bb2 | 2016-06-17 17:44:10 +0300 | [diff] [blame] | 296 | QemuOpts *opts = qemu_opts_parse_noisily(qemu_find_opts("trace"), |
| 297 | optarg, true); |
| 298 | if (!opts) { |
| 299 | exit(1); |
| 300 | } |
| 301 | if (qemu_opt_get(opts, "enable")) { |
| 302 | trace_enable_events(qemu_opt_get(opts, "enable")); |
| 303 | } |
| 304 | trace_init_events(qemu_opt_get(opts, "events")); |
Josh DuBois | 648b482 | 2020-08-16 12:46:10 -0500 | [diff] [blame] | 305 | init_trace_on_startup = true; |
Denis V. Lunev | e9e0bb2 | 2016-06-17 17:44:10 +0300 | [diff] [blame] | 306 | qemu_opts_del(opts); |
Denis V. Lunev | e9e0bb2 | 2016-06-17 17:44:10 +0300 | [diff] [blame] | 307 | } |
Daniel P. Berrange | b7d4895 | 2016-10-04 14:35:53 +0100 | [diff] [blame] | 308 | |
| 309 | uint32_t trace_get_vcpu_event_count(void) |
| 310 | { |
Daniel P. Berrange | ca3fa0e | 2016-10-04 14:35:54 +0100 | [diff] [blame] | 311 | return next_vcpu_id; |
Daniel P. Berrange | b7d4895 | 2016-10-04 14:35:53 +0100 | [diff] [blame] | 312 | } |