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 14 void trace_event_set_state_dynamic_init(TraceEvent *ev, bool state) 15 { 16 trace_event_set_state_dynamic(ev, state); 17 } 18 19 void trace_event_set_state_dynamic(TraceEvent *ev, bool state) 20 { 21 TraceEventID id; 22 assert(trace_event_get_state_static(ev)); 23 id = trace_event_get_id(ev); 24 trace_events_enabled_count += state - trace_events_dstate[id]; 25 trace_events_dstate[id] = state; 26 } 27 28 void trace_event_set_vcpu_state_dynamic(CPUState *vcpu, 29 TraceEvent *ev, bool state) 30 { 31 /* should never be called on non-target binaries */ 32 abort(); 33 } 34