trace.json (9b112b1b79f0e93242a9ce9bffd1113458e93e03) trace.json (a937b6aa739f65f2cae2ad9a7eb65a309ad2a359)
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

--- 18 unchanged lines hidden (view full) ---

27 'data': ['unavailable', 'disabled', 'enabled'] }
28
29##
30# @TraceEventInfo:
31#
32# Information of a tracing event.
33#
34# @name: Event name.
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

--- 18 unchanged lines hidden (view full) ---

27 'data': ['unavailable', 'disabled', 'enabled'] }
28
29##
30# @TraceEventInfo:
31#
32# Information of a tracing event.
33#
34# @name: Event name.
35#
35# @state: Tracing state.
36# @state: Tracing state.
37#
36# @vcpu: Whether this is a per-vCPU event (since 2.7).
37#
38# @vcpu: Whether this is a per-vCPU event (since 2.7).
39#
38# An event is per-vCPU if it has the "vcpu" property in the "trace-events"
39# files.
40# An event is per-vCPU if it has the "vcpu" property in the
41# "trace-events" files.
40#
41# Since: 2.2
42##
43{ 'struct': 'TraceEventInfo',
44 'data': {'name': 'str', 'state': 'TraceEventState', 'vcpu': 'bool'} }
45
46##
47# @trace-event-get-state:
48#
49# Query the state of events.
50#
51# @name: Event name pattern (case-sensitive glob).
42#
43# Since: 2.2
44##
45{ 'struct': 'TraceEventInfo',
46 'data': {'name': 'str', 'state': 'TraceEventState', 'vcpu': 'bool'} }
47
48##
49# @trace-event-get-state:
50#
51# Query the state of events.
52#
53# @name: Event name pattern (case-sensitive glob).
54#
52# @vcpu: The vCPU to query (any by default; since 2.7).
53#
54# Returns: a list of @TraceEventInfo for the matching events
55#
55# @vcpu: The vCPU to query (any by default; since 2.7).
56#
57# Returns: a list of @TraceEventInfo for the matching events
58#
56# An event is returned if:
59# An event is returned if:
57#
60#
58# - its name matches the @name pattern, and
59# - if @vcpu is given, the event has the "vcpu" property.
61# - its name matches the @name pattern, and
62# - if @vcpu is given, the event has the "vcpu" property.
60#
63#
61# Therefore, if @vcpu is given, the operation will only match per-vCPU events,
62# returning their state on the specified vCPU. Special case: if @name is an
63# exact match, @vcpu is given and the event does not have the "vcpu" property,
64# an error is returned.
64# Therefore, if @vcpu is given, the operation will only match per-vCPU
65# events, returning their state on the specified vCPU. Special case:
66# if @name is an exact match, @vcpu is given and the event does not
67# have the "vcpu" property, an error is returned.
65#
66# Since: 2.2
67#
68# Example:
69#
70# -> { "execute": "trace-event-get-state",
71# "arguments": { "name": "qemu_memalign" } }
72# <- { "return": [ { "name": "qemu_memalign", "state": "disabled", "vcpu": false } ] }
68#
69# Since: 2.2
70#
71# Example:
72#
73# -> { "execute": "trace-event-get-state",
74# "arguments": { "name": "qemu_memalign" } }
75# <- { "return": [ { "name": "qemu_memalign", "state": "disabled", "vcpu": false } ] }
73#
74##
75{ 'command': 'trace-event-get-state',
76 'data': {'name': 'str', '*vcpu': 'int'},
77 'returns': ['TraceEventInfo'] }
78
79##
80# @trace-event-set-state:
81#
82# Set the dynamic tracing state of events.
83#
84# @name: Event name pattern (case-sensitive glob).
76##
77{ 'command': 'trace-event-get-state',
78 'data': {'name': 'str', '*vcpu': 'int'},
79 'returns': ['TraceEventInfo'] }
80
81##
82# @trace-event-set-state:
83#
84# Set the dynamic tracing state of events.
85#
86# @name: Event name pattern (case-sensitive glob).
87#
85# @enable: Whether to enable tracing.
88# @enable: Whether to enable tracing.
89#
86# @ignore-unavailable: Do not match unavailable events with @name.
90# @ignore-unavailable: Do not match unavailable events with @name.
91#
87# @vcpu: The vCPU to act upon (all by default; since 2.7).
88#
89# An event's state is modified if:
90#
91# - its name matches the @name pattern, and
92# - if @vcpu is given, the event has the "vcpu" property.
93#
92# @vcpu: The vCPU to act upon (all by default; since 2.7).
93#
94# An event's state is modified if:
95#
96# - its name matches the @name pattern, and
97# - if @vcpu is given, the event has the "vcpu" property.
98#
94# Therefore, if @vcpu is given, the operation will only match per-vCPU events,
95# setting their state on the specified vCPU. Special case: if @name is an exact
96# match, @vcpu is given and the event does not have the "vcpu" property, an
97# error is returned.
99# Therefore, if @vcpu is given, the operation will only match per-vCPU
100# events, setting their state on the specified vCPU. Special case: if
101# @name is an exact match, @vcpu is given and the event does not have
102# the "vcpu" property, an error is returned.
98#
99# Since: 2.2
100#
101# Example:
102#
103# -> { "execute": "trace-event-set-state",
104# "arguments": { "name": "qemu_memalign", "enable": true } }
105# <- { "return": {} }
103#
104# Since: 2.2
105#
106# Example:
107#
108# -> { "execute": "trace-event-set-state",
109# "arguments": { "name": "qemu_memalign", "enable": true } }
110# <- { "return": {} }
106#
107##
108{ 'command': 'trace-event-set-state',
109 'data': {'name': 'str', 'enable': 'bool', '*ignore-unavailable': 'bool',
110 '*vcpu': 'int'} }
111##
112{ 'command': 'trace-event-set-state',
113 'data': {'name': 'str', 'enable': 'bool', '*ignore-unavailable': 'bool',
114 '*vcpu': 'int'} }