]> git.proxmox.com Git - mirror_qemu.git/blame - stubs/trace-control.c
numa: deprecate implict memory distribution between nodes
[mirror_qemu.git] / stubs / trace-control.c
CommitLineData
48151859
LV
1/*
2 * Interface for configuring and controlling the state of tracing events.
3 *
4 * Copyright (C) 2014-2016 Lluís Vilanova <vilanova@ac.upc.edu>
5 *
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.
8 */
9
10#include "qemu/osdep.h"
11#include "trace/control.h"
12
13
a4d50b1d
LV
14void trace_event_set_state_dynamic_init(TraceEvent *ev, bool state)
15{
16 trace_event_set_state_dynamic(ev, state);
17}
18
48151859
LV
19void trace_event_set_state_dynamic(TraceEvent *ev, bool state)
20{
8eb1b9db 21 bool state_pre;
48151859 22 assert(trace_event_get_state_static(ev));
93977402 23
8eb1b9db
LV
24 /*
25 * We ignore the "vcpu" property here, since there's no target code. Then
26 * dstate can only be 1 or 0.
27 */
93977402 28 state_pre = *(ev->dstate);
8eb1b9db
LV
29 if (state_pre != state) {
30 if (state) {
31 trace_events_enabled_count++;
93977402 32 *(ev->dstate) = 1;
8eb1b9db
LV
33 } else {
34 trace_events_enabled_count--;
93977402 35 *(ev->dstate) = 0;
8eb1b9db
LV
36 }
37 }
48151859
LV
38}
39
40void trace_event_set_vcpu_state_dynamic(CPUState *vcpu,
41 TraceEvent *ev, bool state)
42{
43 /* should never be called on non-target binaries */
44 abort();
45}
2bfe11c8
LV
46
47void trace_init_vcpu(CPUState *vcpu)
48{
49 /* should never be called on non-target binaries */
50 abort();
51}