[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v4 8/9] trace: [tcg] Add per-vCPU tracing states
From: |
Lluís Vilanova |
Subject: |
Re: [Qemu-devel] [PATCH v4 8/9] trace: [tcg] Add per-vCPU tracing states for events with the 'vcpu' property |
Date: |
Mon, 18 Jan 2016 12:55:21 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) |
Paolo Bonzini writes:
> On 15/01/2016 17:38, Lluís Vilanova wrote:
>> Each event with the 'vcpu' property gets a per-vCPU dynamic tracing state.
>>
>> The set of enabled events with the 'vcpu' and 'tcg' properties is used
>> to select a per-vCPU physical TB cache. The number of events with both
>> properties is used to select the number of physical TB caches, and a
>> bitmap of the identifiers of such enabled events is used to select a
>> physical TB cache.
>>
>> Signed-off-by: Lluís Vilanova <address@hidden>
> I may be wrong, but this patch and patches 3+5 seem overengineered. Why
> can't you just flush the TB cache entirely whenever the set of trace
> events changes, independent of whether they use the vcpu attribute?
> That's a very rare event.
A request for this was discussed some time ago, while the current simple version
was merged. Right now, an event is enabled for al vCPUs. This series allows
enabling events on a per-vCPU basis (e.g., trace memory accesses of a specific
vCPU, or with the necessary logic, trace a specific guest process).
This series contains three different new features that are closely related:
* Identify the guest vCPU that is generating an event (when it has the 'vcpu'
property).
* Set dynamic event state on a per-vCPU basis (when it has the 'tcg' and 'vcpu'
properties).
* Use a different virtual TB cache for each vCPU, so that they can efficiently
share TBs. If vCPUs have different events enabled, those with the disabled
events won't pay for the extra tracing code generated in the TB.
Would it be better to split these into three separate series? It would probably
make reviewing more manageable.
Also, I have more patches on my queue to start adding meaningful guest code
events (memory access and instruction traces), but they depend on this new
'vcpu' property.
Thanks,
Lluis
- [Qemu-devel] [PATCH v4 0/9] trace: Per-vCPU tracing states, Lluís Vilanova, 2016/01/15
- [Qemu-devel] [PATCH v4 2/9] trace: Add 'vcpu' event property, Lluís Vilanova, 2016/01/15
- [Qemu-devel] [PATCH v4 3/9] trace: [tcg] Identify events with the 'vcpu' property, Lluís Vilanova, 2016/01/15
- [Qemu-devel] [PATCH v4 4/9] exec: [tcg] Refactor flush of per-CPU virtual TB cache, Lluís Vilanova, 2016/01/15
- [Qemu-devel] [PATCH v4 5/9] exec: [tcg] Use multiple physical TB caches, Lluís Vilanova, 2016/01/15
- [Qemu-devel] [PATCH v4 7/9] disas: Remove unused macro '_', Lluís Vilanova, 2016/01/15
- [Qemu-devel] [PATCH v4 9/9] trace: [tcg] Generate TCG code to trace guest events on a per-vCPU basis, Lluís Vilanova, 2016/01/15
- [Qemu-devel] [PATCH v4 8/9] trace: [tcg] Add per-vCPU tracing states for events with the 'vcpu' property, Lluís Vilanova, 2016/01/15
- [Qemu-devel] [PATCH v4 1/9] trace: Add support for vCPU pointers in trace events, Lluís Vilanova, 2016/01/15
- [Qemu-devel] [PATCH v4 6/9] exec: [tcg] Track which vCPU is performing translation and execution, Lluís Vilanova, 2016/01/15