2014-08-25 19:19:57 +08:00
|
|
|
# -*- mode: python -*-
|
2021-12-20 22:56:24 +08:00
|
|
|
# vim: filetype=python
|
2014-08-25 19:19:57 +08:00
|
|
|
#
|
2016-07-11 18:53:57 +08:00
|
|
|
# Copyright (C) 2011-2016 Lluís Vilanova <vilanova@ac.upc.edu>
|
2014-08-25 19:19:57 +08: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 22:41:23 +08:00
|
|
|
##
|
2017-08-25 03:14:08 +08:00
|
|
|
# = Tracing
|
2017-01-13 22:41:23 +08:00
|
|
|
##
|
2014-08-25 19:19:57 +08: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 23:54:55 +08:00
|
|
|
# Since: 2.2
|
2014-08-25 19:19:57 +08:00
|
|
|
##
|
|
|
|
{ 'enum': 'TraceEventState',
|
|
|
|
'data': ['unavailable', 'disabled', 'enabled'] }
|
|
|
|
|
|
|
|
##
|
|
|
|
# @TraceEventInfo:
|
|
|
|
#
|
|
|
|
# Information of a tracing event.
|
|
|
|
#
|
|
|
|
# @name: Event name.
|
2023-04-28 18:54:29 +08:00
|
|
|
#
|
2014-08-25 19:19:57 +08:00
|
|
|
# @state: Tracing state.
|
2023-04-28 18:54:29 +08:00
|
|
|
#
|
2016-07-11 18:53:57 +08:00
|
|
|
# @vcpu: Whether this is a per-vCPU event (since 2.7).
|
|
|
|
#
|
2023-05-27 00:53:56 +08:00
|
|
|
# Features:
|
|
|
|
# @deprecated: Member @vcpu is deprecated, and always ignored.
|
2014-08-25 19:19:57 +08:00
|
|
|
#
|
2016-11-17 23:54:55 +08:00
|
|
|
# Since: 2.2
|
2014-08-25 19:19:57 +08:00
|
|
|
##
|
2015-05-04 23:05:27 +08:00
|
|
|
{ 'struct': 'TraceEventInfo',
|
2023-05-27 00:53:56 +08:00
|
|
|
'data': {'name': 'str', 'state': 'TraceEventState',
|
|
|
|
'vcpu': { 'type': 'bool', 'features': ['deprecated'] } } }
|
2014-08-25 19:19:57 +08:00
|
|
|
|
|
|
|
##
|
|
|
|
# @trace-event-get-state:
|
|
|
|
#
|
|
|
|
# Query the state of events.
|
|
|
|
#
|
|
|
|
# @name: Event name pattern (case-sensitive glob).
|
2023-04-28 18:54:29 +08:00
|
|
|
#
|
2023-05-27 00:53:56 +08:00
|
|
|
# @vcpu: The vCPU to query (since 2.7).
|
2014-08-25 19:19:57 +08:00
|
|
|
#
|
2023-05-27 00:53:56 +08:00
|
|
|
# Features:
|
|
|
|
# @deprecated: Member @vcpu is deprecated, and always ignored.
|
2020-02-14 01:56:33 +08:00
|
|
|
#
|
2023-05-27 00:53:56 +08:00
|
|
|
# Returns: a list of @TraceEventInfo for the matching events
|
2020-02-14 01:56:26 +08:00
|
|
|
#
|
2023-05-27 00:53:56 +08:00
|
|
|
# An event is returned if its name matches the @name pattern
|
|
|
|
# (There are no longer any per-vCPU events).
|
2016-07-11 18:53:57 +08:00
|
|
|
#
|
2016-11-17 23:54:55 +08:00
|
|
|
# Since: 2.2
|
2016-06-23 21:20:58 +08:00
|
|
|
#
|
|
|
|
# Example:
|
|
|
|
#
|
|
|
|
# -> { "execute": "trace-event-get-state",
|
|
|
|
# "arguments": { "name": "qemu_memalign" } }
|
2022-04-01 03:06:31 +08:00
|
|
|
# <- { "return": [ { "name": "qemu_memalign", "state": "disabled", "vcpu": false } ] }
|
2014-08-25 19:19:57 +08:00
|
|
|
##
|
|
|
|
{ 'command': 'trace-event-get-state',
|
2023-05-27 00:53:56 +08:00
|
|
|
'data': {'name': 'str',
|
|
|
|
'*vcpu': {'type': 'int', 'features': ['deprecated'] } },
|
2014-08-25 19:19:57 +08:00
|
|
|
'returns': ['TraceEventInfo'] }
|
|
|
|
|
|
|
|
##
|
|
|
|
# @trace-event-set-state:
|
|
|
|
#
|
|
|
|
# Set the dynamic tracing state of events.
|
|
|
|
#
|
|
|
|
# @name: Event name pattern (case-sensitive glob).
|
2023-04-28 18:54:29 +08:00
|
|
|
#
|
2014-08-25 19:19:57 +08:00
|
|
|
# @enable: Whether to enable tracing.
|
2023-04-28 18:54:29 +08:00
|
|
|
#
|
2017-03-15 20:57:06 +08:00
|
|
|
# @ignore-unavailable: Do not match unavailable events with @name.
|
2023-04-28 18:54:29 +08:00
|
|
|
#
|
2017-03-15 20:57:06 +08:00
|
|
|
# @vcpu: The vCPU to act upon (all by default; since 2.7).
|
2016-07-11 18:53:57 +08:00
|
|
|
#
|
2023-05-27 00:53:56 +08:00
|
|
|
# Features:
|
|
|
|
# @deprecated: Member @vcpu is deprecated, and always ignored.
|
2016-07-11 18:53:57 +08:00
|
|
|
#
|
2023-05-27 00:53:56 +08:00
|
|
|
# An event is enabled if its name matches the @name pattern
|
|
|
|
# (There are no longer any per-vCPU events).
|
2014-08-25 19:19:57 +08:00
|
|
|
#
|
2016-11-17 23:54:55 +08:00
|
|
|
# Since: 2.2
|
2016-06-23 21:21:49 +08:00
|
|
|
#
|
|
|
|
# Example:
|
|
|
|
#
|
|
|
|
# -> { "execute": "trace-event-set-state",
|
2021-08-27 17:06:27 +08:00
|
|
|
# "arguments": { "name": "qemu_memalign", "enable": true } }
|
2016-06-23 21:21:49 +08:00
|
|
|
# <- { "return": {} }
|
2014-08-25 19:19:57 +08:00
|
|
|
##
|
|
|
|
{ 'command': 'trace-event-set-state',
|
2016-07-11 18:53:57 +08:00
|
|
|
'data': {'name': 'str', 'enable': 'bool', '*ignore-unavailable': 'bool',
|
2023-05-27 00:53:56 +08:00
|
|
|
'*vcpu': {'type': 'int', 'features': ['deprecated'] } } }
|