Skip to content

trace: Per-vCPU tracing states

Lluís Vilanova qemu-arm qemu-devel 3 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest6 patches 0 repliesNew
  2. v26 patches 2 repliesSuperseded
  3. v16 patches 22 repliesSuperseded

Changes in v3 from the cover letter

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

* Update QAPI version annotations [Eric Blake].

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6trace: Identify events with the 'vcpu' propertyscripts/tracetool/format/events_c.py scripts/tracetool/format/events_h.py trace/control-internal.h +2 more+40 -50 replies
2/6disas: Remove unused macro '_'disas/alpha.c disas/arm.c disas/i386.c +5 more+46 -470 replies
3/6trace: Cosmetic changes on fast-path tracingtrace/control-internal.h+6 -20 replies
4/6trace: Add per-vCPU tracing states for events with the 'vcpu' propertyMakefile.objs bsd-user/main.c include/qom/cpu.h +10 more+251 -90 replies
5/6trace: 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+56 -290 replies
6/6trace: Add QAPI/QMP interfaces to query and control per-vCPU tracing statemonitor.c qapi/trace.json qmp-commands.hx +1 more+147 -370 replies

Reviews trailers per patch

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

PatchStefan Hajnoczi
1/6R-b
2/6
3/6R-b
4/6
5/6R-b
6/6R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

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

NOTE: This series applies on top of "trace: Show vCPU info in guest code events"

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 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 (6):
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: Add QAPI/QMP interfaces to query and control per-vCPU tracing state

 Makefile.objs                        |    1 
 bsd-user/main.c                      |    2 
 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 +
 include/disas/bfd.h                  |    1 
 include/qom/cpu.h                    |    6 +
 linux-user/main.c                    |    2 
 monitor.c                            |    4 -
 qapi/trace.json                      |   20 ++++-
 qmp-commands.hx                      |   17 ++++
 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        |   18 ++++
 trace/Makefile.objs                  |   26 ++++++
 trace/control-internal.h             |   50 ++++++++++--
 trace/control-stub.c                 |   29 +++++++
 trace/control-target.c               |   56 +++++++++++++
 trace/control.c                      |   31 +++++++
 trace/control.h                      |   78 ++++++++++++++++++-
 trace/event-internal.h               |    4 +
 trace/qmp.c                          |  143 +++++++++++++++++++++++++++-------
 translate-all.h                      |    3 +
 vl.c                                 |    1 
 34 files changed, 546 insertions(+), 129 deletions(-)
 create mode 100644 trace/control-stub.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]>