qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v4 0/9] trace: Per-vCPU tracing states
@ 2016-01-15 16:37 Lluís Vilanova
  2016-01-15 16:37 ` [Qemu-devel] [PATCH v4 1/9] trace: Add support for vCPU pointers in trace events Lluís Vilanova
                   ` (8 more replies)
  0 siblings, 9 replies; 13+ messages in thread
From: Lluís Vilanova @ 2016-01-15 16:37 UTC (permalink / raw)
  To: qemu-devel; +Cc: Stefan Hajnoczi, Eduardo Habkost

NOTE: This series completes the framework for guest code tracing. Next series
      will add actual events.

Provides per-vCPU dynamic controls of the tracing state of events tied to a
specific virtual CPU.

Events with the "vcpu" property are identified as being tied to a particular
virtual CPU, like executing an instruction. The state of such events can be
controlled idependently; this is specially useful to, for example, trace memory
access events of a process executing on a specific virtual CPU.

This event property plays in combination with the "tcg" property to avoid
generating a call to the execution-time event tracer when a vCPU is not actively
tracing such event (i.e., avoids adding tracing overheads).

Virtual CPUs tracing the same set of events use the same physical translation
cache, improving their reuse. The system has 2^N physical translation caches,
where "N" is the number of TCG events with the "vcpu" property. Every vCPU has a
bitmap with the states of these events, which can be controlled separately, and
uses it to select its physical translation cache. At translation time, QEMU
generates the code to trace an event at execution time only if the event is
enabled.


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

* Fix typo in commit message (Stefan Hajnoczi).
* Simplify per-vCPU tracing state initialization (Stefan Hajnoczi).
* Update copyright years.


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

* Update QAPI version (Eric Blake).
* Fix '#optional' annotation in QAPI (Eric Blake).


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

* Rebase on 5522a84.
* Improve patch descriptions.
* Refactor code generation into a separate patch.
* Fix forward declarations (Stefan Hajnoczi & Eduardo Habkost).
* Fix "since" tags in QAPI interface (Eric Blake).
* Unify QAPI/QMP interface with an optional 'vcpu' argument (Eric Blake).
* Fix QMP+GTK header workaround (Stefan Hajnoczi).


Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu>
Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
---

Lluís Vilanova (9):
      trace: Add support for vCPU pointers in trace events
      trace: Add 'vcpu' event property
      trace: [tcg] Identify events with the 'vcpu' property
      exec: [tcg] Refactor flush of per-CPU virtual TB cache
      exec: [tcg] Use multiple physical TB caches
      exec: [tcg] Track which vCPU is performing translation and execution
      disas: Remove unused macro '_'
      trace: [tcg] Add per-vCPU tracing states for events with the 'vcpu' property
      trace: [tcg] Generate TCG code to trace guest events on a per-vCPU basis


 Makefile.objs                            |    1 
 bsd-user/main.c                          |    2 
 cpu-exec.c                               |   17 +++
 cputlb.c                                 |    2 
 disas/i386.c                             |    2 
 docs/tracing.txt                         |   40 ++++++++
 include/disas/bfd.h                      |    1 
 include/exec/exec-all.h                  |   16 +++
 include/qemu/typedefs.h                  |    1 
 include/qom/cpu.h                        |   15 +++
 linux-user/main.c                        |    2 
 monitor.c                                |    4 -
 qapi/trace.json                          |   16 ++-
 qmp-commands.hx                          |   17 +++
 qom/cpu.c                                |    9 ++
 scripts/tracetool/__init__.py            |   24 ++++-
 scripts/tracetool/format/events_c.py     |   11 ++
 scripts/tracetool/format/events_h.py     |   14 ++-
 scripts/tracetool/format/h.py            |    4 +
 scripts/tracetool/format/tcg_h.py        |   21 +++-
 scripts/tracetool/format/tcg_helper_c.py |   11 ++
 scripts/tracetool/format/ust_events_c.py |    1 
 scripts/tracetool/transform.py           |    9 ++
 target-alpha/translate.c                 |    3 -
 target-arm/translate.c                   |    3 -
 target-arm/translate.h                   |    2 
 target-cris/translate.c                  |    3 -
 target-cris/translate_v10.c              |    1 
 target-i386/translate.c                  |    3 -
 target-lm32/translate.c                  |    3 -
 target-m68k/translate.c                  |    3 -
 target-microblaze/translate.c            |    3 -
 target-mips/translate.c                  |    3 -
 target-moxie/translate.c                 |    3 -
 target-openrisc/translate.c              |    3 -
 target-ppc/translate.c                   |    3 -
 target-s390x/translate.c                 |    3 -
 target-sh4/translate.c                   |    3 -
 target-sparc/translate.c                 |    6 +
 target-tilegx/translate.c                |    3 -
 target-tricore/translate.c               |    3 -
 target-unicore32/translate.c             |    3 -
 target-xtensa/translate.c                |    3 -
 tcg/tcg-op.h                             |    2 
 tcg/tcg.h                                |   10 ++
 trace/Makefile.objs                      |    2 
 trace/control-internal.h                 |   21 +++-
 trace/control-stub.c                     |   29 ++++++
 trace/control-target.c                   |   69 +++++++++++++
 trace/control.c                          |   17 +++
 trace/control.h                          |   65 ++++++++++++-
 trace/event-internal.h                   |    6 +
 trace/qmp.c                              |  139 ++++++++++++++++++++++-----
 translate-all.c                          |  156 ++++++++++++++++++++++++++----
 translate-all.h                          |   49 +++++++++
 vl.c                                     |    1 
 56 files changed, 758 insertions(+), 108 deletions(-)
 create mode 100644 trace/control-stub.c
 create mode 100644 trace/control-target.c


To: qemu-devel@nongnu.org
Cc: Stefan Hajnoczi <stefanha@gmail.com>
Cc: Eduardo Habkost <ehabkost@redhat.com>
Cc: Eric Blake <eblake@redhat.com>

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2016-01-19 22:06 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-15 16:37 [Qemu-devel] [PATCH v4 0/9] trace: Per-vCPU tracing states Lluís Vilanova
2016-01-15 16:37 ` [Qemu-devel] [PATCH v4 1/9] trace: Add support for vCPU pointers in trace events Lluís Vilanova
2016-01-15 16:38 ` [Qemu-devel] [PATCH v4 2/9] trace: Add 'vcpu' event property Lluís Vilanova
2016-01-15 16:38 ` [Qemu-devel] [PATCH v4 3/9] trace: [tcg] Identify events with the 'vcpu' property Lluís Vilanova
2016-01-15 16:38 ` [Qemu-devel] [PATCH v4 4/9] exec: [tcg] Refactor flush of per-CPU virtual TB cache Lluís Vilanova
2016-01-15 16:38 ` [Qemu-devel] [PATCH v4 5/9] exec: [tcg] Use multiple physical TB caches Lluís Vilanova
2016-01-15 16:38 ` [Qemu-devel] [PATCH v4 6/9] exec: [tcg] Track which vCPU is performing translation and execution Lluís Vilanova
2016-01-15 16:38 ` [Qemu-devel] [PATCH v4 7/9] disas: Remove unused macro '_' Lluís Vilanova
2016-01-15 16:38 ` [Qemu-devel] [PATCH v4 8/9] trace: [tcg] Add per-vCPU tracing states for events with the 'vcpu' property Lluís Vilanova
2016-01-18 10:50   ` Paolo Bonzini
2016-01-18 11:55     ` Lluís Vilanova
2016-01-19 22:06   ` Eric Blake
2016-01-15 16:38 ` [Qemu-devel] [PATCH v4 9/9] trace: [tcg] Generate TCG code to trace guest events on a per-vCPU basis Lluís Vilanova

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).