| 1 | # -*- mode: python -*- |
| 2 | # vim: filetype=python |
| 3 | # |
| 4 | # Copyright (C) 2011-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 | # ******* |
| 11 | # Tracing |
| 12 | # ******* |
| 13 | ## |
| 14 | |
| 15 | ## |
| 16 | # @TraceEventState: |
| 17 | # |
| 18 | # State of a tracing event. |
| 19 | # |
| 20 | # @unavailable: The event is statically disabled. |
| 21 | # |
| 22 | # @disabled: The event is dynamically disabled. |
| 23 | # |
| 24 | # @enabled: The event is dynamically enabled. |
| 25 | # |
| 26 | # Since: 2.2 |
| 27 | ## |
| 28 | { 'enum': 'TraceEventState', |
| 29 | 'data': ['unavailable', 'disabled', 'enabled'] } |
| 30 | |
| 31 | ## |
| 32 | # @TraceEventInfo: |
| 33 | # |
| 34 | # Information of a tracing event. |
| 35 | # |
| 36 | # @name: Event name. |
| 37 | # |
| 38 | # @state: Tracing state. |
| 39 | # |
| 40 | # Since: 2.2 |
| 41 | ## |
| 42 | { 'struct': 'TraceEventInfo', |
| 43 | 'data': {'name': 'str', 'state': 'TraceEventState' } } |
| 44 | |
| 45 | ## |
| 46 | # @trace-event-get-state: |
| 47 | # |
| 48 | # Query the state of events. |
| 49 | # |
| 50 | # @name: Event name pattern (case-sensitive glob). |
| 51 | # |
| 52 | # Returns: a list of info for the matching events |
| 53 | # |
| 54 | # Since: 2.2 |
| 55 | # |
| 56 | # .. qmp-example:: |
| 57 | # |
| 58 | # -> { "execute": "trace-event-get-state", |
| 59 | # "arguments": { "name": "qemu_memalign" } } |
| 60 | # <- { "return": [ { "name": "qemu_memalign", "state": "disabled", "vcpu": false } ] } |
| 61 | ## |
| 62 | { 'command': 'trace-event-get-state', |
| 63 | 'data': {'name': 'str' }, |
| 64 | 'returns': ['TraceEventInfo'] } |
| 65 | |
| 66 | ## |
| 67 | # @trace-event-set-state: |
| 68 | # |
| 69 | # Set the dynamic tracing state of events. |
| 70 | # |
| 71 | # @name: Event name pattern (case-sensitive glob). |
| 72 | # |
| 73 | # @enable: Whether to enable tracing. |
| 74 | # |
| 75 | # @ignore-unavailable: Do not match unavailable events with @name. |
| 76 | # |
| 77 | # Since: 2.2 |
| 78 | # |
| 79 | # .. qmp-example:: |
| 80 | # |
| 81 | # -> { "execute": "trace-event-set-state", |
| 82 | # "arguments": { "name": "qemu_memalign", "enable": true } } |
| 83 | # <- { "return": {} } |
| 84 | ## |
| 85 | { 'command': 'trace-event-set-state', |
| 86 | 'data': {'name': 'str', 'enable': 'bool', '*ignore-unavailable': 'bool' } } |