Skip to content

trace: Per-vCPU tracing states

Lluís Vilanova qemu-arm qemu-devel 13 versions – Applied

Status from this message: Thanks, applied to my tracing tree:

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v9 Latest posting 2/27 patches 2 repliesApplied
  2. v8 posting 2/27 patches 3 repliesSuperseded
  3. v7 posting 2/27 patches 3 repliesSuperseded
Earlier versions · 10
VersionPostedPatchesRepliesStatus
v6 posting 2/27 patches2 repliesSuperseded
v5 posting 2/27 patches0 repliesSuperseded
v4 posting 2/26 patches13 repliesSuperseded
v9 posting 1/27 patches2 repliesApplied
v8 posting 1/26 patches3 repliesApplied
v7 posting 1/24 patches3 repliesSuperseded
v6 posting 1/24 patches4 repliesSuperseded
v5 posting 1/22 patches5 repliesSuperseded
v4 posting 1/29 patches3 repliesSuperseded
v210 patches9 repliesSuperseded

Changes in v9 from the cover letter

=============

* Clarify that "vcpu" property can be on any of the "trace-events" files [Eric Blake].

Patches in v9 posting 2/2 Applied

#Subject and filesSizeRepliesApplied
1/7trace: Identify events with the 'vcpu' propertyscripts/tracetool/format/events_c.py scripts/tracetool/format/events_h.py trace/control-internal.h +2 more+51 -50 replies
2/7disas: Remove unused macro '_'disas/alpha.c disas/arm.c disas/i386.c +5 more+46 -470 replies
3/7trace: Cosmetic changes on fast-path tracingtrace/control-internal.h+5 -20 replies
4/7trace: Add per-vCPU tracing states for events with the 'vcpu' propertybsd-user/main.c include/qom/cpu.h linux-user/main.c +10 more+207 -100 replies
5/7trace: Conditionally trace events based on their per-vCPU statescripts/tracetool/backend/dtrace.py scripts/tracetool/backend/ftrace.py scripts/tracetool/backend/log.py +3 more+57 -290 replies
6/7trace: Allow event name pattern in "info trace-events"hmp-commands-info.hx hmp.h monitor.c+36 -40 replies
7/7trace: Add QAPI/QMP interfaces to query and control per-vCPU tracing statehmp-commands-info.hx hmp-commands.hx monitor.c +3 more+203 -430 replies

Reviews trailers per patch

6 of 7 patches have a Reviewed-by or Acked-by.

PatchStefan HajnocziEric BlakeMarkus Armbruster
1/7R-b
2/7R-b
3/7R-b
4/7
5/7R-b
6/7R-b R-b
7/7R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v9 thread

Cover letter [Qemu-devel] [PATCH v9 0/7] trace: Per-vCPU tracing states

NOTE: This series applies on top of "trace: [*-user] Add commandline arguments
to control tracing".

Provides per-vCPU dynamic controls of the tracing state of events with the "vcpu" property.

A later series proposes an optimization where tracing code can be elided for dynamically disabled events (it uses multiple virtual TB caches optimized for the current tracing state of the executing vCPU).

Changes in v9
=============

* Clarify that "vcpu" property can be on any of the "trace-events" files [Eric Blake].

Changes in v8
=============

* Fix detection of negative vCPU values in HMP [Markus Armbruster].

Changes in v7
=============

* Fix typo in commit message.

Changes in v6
=============

* Rebase on 6f1d2d1.
* Add missing include in "scripts/tracetool/format/h.py".

Changes in v5
=============

* Fix 'trace_event_is_vcpu()'.
* Move stub code into the "stubs/" directory [Stefan Hajnoczi].
* Improve docs on QAPI and QMP commands [Markus Armbruster].
* Rewrite 'get_cpu()' to be more in line with use of QEMU's Error objects [Markus Armbruster].
* Add "name" argument to HMP command "info trace-events".
* Add "vcpu" argument to HMP commands [Markus Armbruster].

Changes in v4
=============

* Make trace_events_dstate an uint16_t [Paolo Bonzini].
* Revert trace_event_get_state_dynamic_by_id [Stefan Hajnoczi].
* Do not add superfluous asserts [Paolo Bonzini].
* Replace cpu -> vcpu in function names and arguments [Paolo Bonzini].
* Add 'trace_event_is_vcpu' [Paolo Bonzini].
* Remove 'trace_event_cpu_count' [Paolo Bonzini].

Changes in v3
=============

* Update QAPI version annotations [Eric Blake].

Changes in v2
=============

* Rebase on 9bbbf64.
* Fix removal of macro '_' in all target architectures.
* Document behaviour of 'trace_events_dstate'.
* Use a proper bitmap for CPUState::trace_dstate [Stefan Hajnoczi].

Changes in v1
=============

* Rebase on 1b16240.
* Split from v4 of "trace: Per-vCPU tracing states".
* Simplify event state initialization.
* Simplify logic deciding which events are treated by this patch (previously, execution-time events with 'tcg' and 'vcpu' properties; now it's simply events with the 'vcpu' property).
* Make tracing backends comply with the per-vCPU tracing state.

---

Lluís Vilanova (7):
trace: Identify events with the 'vcpu' property
disas: Remove unused macro '_'
[trivial] trace: Cosmetic changes on fast-path tracing
trace: Add per-vCPU tracing states for events with the 'vcpu' property
trace: Conditionally trace events based on their per-vCPU state
trace: Allow event name pattern in "info trace-events"
trace: Add QAPI/QMP interfaces to query and control per-vCPU tracing state

 bsd-user/main.c                      |    1 
 disas/alpha.c                        |    6 +
 disas/arm.c                          |    2 
 disas/i386.c                         |    2 
 disas/m68k.c                         |    4 -
 disas/mips.c                         |   50 ++++++-----
 disas/ppc.c                          |   22 +++--
 disas/sparc.c                        |    6 +
 hmp-commands-info.hx                 |    8 +-
 hmp-commands.hx                      |    7 +-
 hmp.h                                |    1 
 include/disas/bfd.h                  |    1 
 include/qom/cpu.h                    |    6 +
 linux-user/main.c                    |    1 
 monitor.c                            |   46 ++++++++++-
 qapi/trace.json                      |   33 +++++++-
 qmp-commands.hx                      |   35 ++++++++
 qom/cpu.c                            |    1 
 scripts/tracetool/backend/dtrace.py  |    4 -
 scripts/tracetool/backend/ftrace.py  |   20 ++---
 scripts/tracetool/backend/log.py     |   26 ++++--
 scripts/tracetool/backend/simple.py  |   13 ++-
 scripts/tracetool/backend/ust.py     |    4 -
 scripts/tracetool/format/events_c.py |   11 ++-
 scripts/tracetool/format/events_h.py |   12 +++
 scripts/tracetool/format/h.py        |   19 ++++
 stubs/Makefile.objs                  |    1 
 stubs/trace-control.c                |   28 ++++++
 trace/Makefile.objs                  |    4 +
 trace/control-internal.h             |   47 +++++++++--
 trace/control-target.c               |   53 ++++++++++++
 trace/control.c                      |   29 ++++++-
 trace/control.h                      |   78 ++++++++++++++++++
 trace/event-internal.h               |    4 +
 trace/qmp.c                          |  148 +++++++++++++++++++++++++++-------
 translate-all.h                      |    3 +
 vl.c                                 |    1 
 37 files changed, 601 insertions(+), 136 deletions(-)
 create mode 100644 stubs/trace-control.c
 create mode 100644 trace/control-target.c

To: [email protected]
Cc: Stefan Hajnoczi <[email protected]>
Cc: Eduardo Habkost <[email protected]>
Cc: Eric Blake <[email protected]>
Cc: Paolo Bonzini <[email protected]>