2
0

event-internal.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. /*
  2. * Interface for configuring and controlling the state of tracing events.
  3. *
  4. * Copyright (C) 2012-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. #ifndef TRACE__EVENT_INTERNAL_H
  10. #define TRACE__EVENT_INTERNAL_H
  11. /*
  12. * Special value for TraceEvent.vcpu_id field to indicate
  13. * that the event is not VCPU specific
  14. */
  15. #define TRACE_VCPU_EVENT_NONE ((uint32_t)-1)
  16. /**
  17. * TraceEvent:
  18. * @id: Unique event identifier.
  19. * @vcpu_id: Unique per-vCPU event identifier.
  20. * @name: Event name.
  21. * @sstate: Static tracing state.
  22. * @dstate: Dynamic tracing state
  23. *
  24. * Interpretation of @dstate depends on whether the event has the 'vcpu'
  25. * property:
  26. * - false: Boolean value indicating whether the event is active.
  27. * - true : Integral counting the number of vCPUs that have this event enabled.
  28. *
  29. * Opaque generic description of a tracing event.
  30. */
  31. typedef struct TraceEvent {
  32. uint32_t id;
  33. uint32_t vcpu_id;
  34. const char * name;
  35. const bool sstate;
  36. uint16_t *dstate;
  37. } TraceEvent;
  38. void trace_event_set_state_dynamic_init(TraceEvent *ev, bool state);
  39. #endif /* TRACE__EVENT_INTERNAL_H */