2014-08-25 15:19:57 +04:00
|
|
|
# -*- mode: python -*-
|
2021-12-20 17:56:24 +03:00
|
|
|
# vim: filetype=python
|
2014-08-25 15:19:57 +04:00
|
|
|
#
|
2016-07-11 13:53:57 +03:00
|
|
|
# Copyright (C) 2011-2016 Lluís Vilanova <vilanova@ac.upc.edu>
|
2014-08-25 15:19:57 +04:00
|
|
|
#
|
|
|
|
# This work is licensed under the terms of the GNU GPL, version 2 or later.
|
|
|
|
# See the COPYING file in the top-level directory.
|
|
|
|
|
2017-01-13 17:41:23 +03:00
|
|
|
##
|
2017-08-24 22:14:08 +03:00
|
|
|
# = Tracing
|
2017-01-13 17:41:23 +03:00
|
|
|
##
|
2014-08-25 15:19:57 +04:00
|
|
|
|
|
|
|
##
|
|
|
|
# @TraceEventState:
|
|
|
|
#
|
|
|
|
# State of a tracing event.
|
|
|
|
#
|
|
|
|
# @unavailable: The event is statically disabled.
|
|
|
|
#
|
|
|
|
# @disabled: The event is dynamically disabled.
|
|
|
|
#
|
|
|
|
# @enabled: The event is dynamically enabled.
|
|
|
|
#
|
2016-11-17 18:54:55 +03:00
|
|
|
# Since: 2.2
|
2014-08-25 15:19:57 +04:00
|
|
|
##
|
|
|
|
{ 'enum': 'TraceEventState',
|
|
|
|
'data': ['unavailable', 'disabled', 'enabled'] }
|
|
|
|
|
|
|
|
##
|
|
|
|
# @TraceEventInfo:
|
|
|
|
#
|
|
|
|
# Information of a tracing event.
|
|
|
|
#
|
|
|
|
# @name: Event name.
|
2023-04-28 13:54:29 +03:00
|
|
|
#
|
2014-08-25 15:19:57 +04:00
|
|
|
# @state: Tracing state.
|
2023-04-28 13:54:29 +03:00
|
|
|
#
|
2016-11-17 18:54:55 +03:00
|
|
|
# Since: 2.2
|
2014-08-25 15:19:57 +04:00
|
|
|
##
|
2015-05-04 18:05:27 +03:00
|
|
|
{ 'struct': 'TraceEventInfo',
|
2024-05-30 09:59:30 +03:00
|
|
|
'data': {'name': 'str', 'state': 'TraceEventState' } }
|
2014-08-25 15:19:57 +04:00
|
|
|
|
|
|
|
##
|
|
|
|
# @trace-event-get-state:
|
|
|
|
#
|
|
|
|
# Query the state of events.
|
|
|
|
#
|
|
|
|
# @name: Event name pattern (case-sensitive glob).
|
2023-04-28 13:54:29 +03:00
|
|
|
#
|
2023-05-26 19:53:56 +03:00
|
|
|
# Returns: a list of @TraceEventInfo for the matching events
|
2020-02-13 20:56:26 +03:00
|
|
|
#
|
2016-11-17 18:54:55 +03:00
|
|
|
# Since: 2.2
|
2016-06-23 16:20:58 +03:00
|
|
|
#
|
2024-07-17 05:13:08 +03:00
|
|
|
# .. qmp-example::
|
2016-06-23 16:20:58 +03:00
|
|
|
#
|
2024-02-16 17:58:34 +03:00
|
|
|
# -> { "execute": "trace-event-get-state",
|
|
|
|
# "arguments": { "name": "qemu_memalign" } }
|
|
|
|
# <- { "return": [ { "name": "qemu_memalign", "state": "disabled", "vcpu": false } ] }
|
2014-08-25 15:19:57 +04:00
|
|
|
##
|
|
|
|
{ 'command': 'trace-event-get-state',
|
2024-05-30 09:59:30 +03:00
|
|
|
'data': {'name': 'str' },
|
2014-08-25 15:19:57 +04:00
|
|
|
'returns': ['TraceEventInfo'] }
|
|
|
|
|
|
|
|
##
|
|
|
|
# @trace-event-set-state:
|
|
|
|
#
|
|
|
|
# Set the dynamic tracing state of events.
|
|
|
|
#
|
|
|
|
# @name: Event name pattern (case-sensitive glob).
|
2023-04-28 13:54:29 +03:00
|
|
|
#
|
2014-08-25 15:19:57 +04:00
|
|
|
# @enable: Whether to enable tracing.
|
2023-04-28 13:54:29 +03:00
|
|
|
#
|
2017-03-15 15:57:06 +03:00
|
|
|
# @ignore-unavailable: Do not match unavailable events with @name.
|
2023-04-28 13:54:29 +03:00
|
|
|
#
|
2016-11-17 18:54:55 +03:00
|
|
|
# Since: 2.2
|
2016-06-23 16:21:49 +03:00
|
|
|
#
|
2024-07-17 05:13:08 +03:00
|
|
|
# .. qmp-example::
|
2016-06-23 16:21:49 +03:00
|
|
|
#
|
2024-02-16 17:58:34 +03:00
|
|
|
# -> { "execute": "trace-event-set-state",
|
|
|
|
# "arguments": { "name": "qemu_memalign", "enable": true } }
|
|
|
|
# <- { "return": {} }
|
2014-08-25 15:19:57 +04:00
|
|
|
##
|
|
|
|
{ 'command': 'trace-event-set-state',
|
2024-05-30 09:59:30 +03:00
|
|
|
'data': {'name': 'str', 'enable': 'bool', '*ignore-unavailable': 'bool' } }
|