trace-control.c 804 B

12345678910111213141516171819202122232425262728
  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. #include "qemu/osdep.h"
  10. #include "trace/control.h"
  11. void trace_event_set_state_dynamic(TraceEvent *ev, bool state)
  12. {
  13. TraceEventID id;
  14. assert(trace_event_get_state_static(ev));
  15. id = trace_event_get_id(ev);
  16. trace_events_enabled_count += state - trace_events_dstate[id];
  17. trace_events_dstate[id] = state;
  18. }
  19. void trace_event_set_vcpu_state_dynamic(CPUState *vcpu,
  20. TraceEvent *ev, bool state)
  21. {
  22. /* should never be called on non-target binaries */
  23. abort();
  24. }