[Qemu-devel] [PATCH v9 4/7] trace: Add per-vCPU tracing states for events with the 'vcpu' property

2016-07-11 Thread Lluís Vilanova
Each vCPU gets a 'trace_dstate' bitmap to control the per-vCPU dynamic tracing state of events with the 'vcpu' property. Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> --- bsd-user/main.c |1 + include/qom/cpu.h|6 + linux-user/main.c|1 + qom

[Qemu-devel] [PATCH v9 6/7] trace: Allow event name pattern in "info trace-events"

2016-07-11 Thread Lluís Vilanova
Homogenizes the command capabilities with QMP. Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> Reviewed-by: Eric Blake <ebl...@redhat.com> Reviewed-by: Markus Armbruster <arm...@redhat.com> --- hmp-commands-info.hx |8 +--- hmp.h|1 + monitor.c

[Qemu-devel] [PATCH v9 3/7] [trivial] trace: Cosmetic changes on fast-path tracing

2016-07-11 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> Reviewed-by: Stefan Hajnoczi <stefa...@redhat.com> --- trace/control-internal.h |7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/trace/control-internal.h b/trace/control-internal.h index 5e0a5ab..c5

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

2016-07-11 Thread Lluís Vilanova
itialization. * 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. Signed-off-by: Lluís Vilano

Re: [Qemu-devel] [PATCH v8 7/7] trace: Add QAPI/QMP interfaces to query and control per-vCPU tracing state

2016-07-05 Thread Lluís Vilanova
Eric Blake writes: > On 07/04/2016 03:41 AM, Lluís Vilanova wrote: >> Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> >> Reviewed-by: Stefan Hajnoczi <stefa...@redhat.com> >> --- >> hmp-commands-info.hx |6 +- >> hmp-commands.hx |7 +-

[Qemu-devel] [PATCH v8 7/7] trace: Add QAPI/QMP interfaces to query and control per-vCPU tracing state

2016-07-04 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> Reviewed-by: Stefan Hajnoczi <stefa...@redhat.com> --- hmp-commands-info.hx |6 +- hmp-commands.hx |7 +- monitor.c| 17 +- qapi/trace.json | 32 +-- qmp-commands.hx | 35 +++

[Qemu-devel] [PATCH v8 4/7] trace: Add per-vCPU tracing states for events with the 'vcpu' property

2016-07-04 Thread Lluís Vilanova
Each vCPU gets a 'trace_dstate' bitmap to control the per-vCPU dynamic tracing state of events with the 'vcpu' property. Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> --- bsd-user/main.c |1 + include/qom/cpu.h|6 + linux-user/main.c|1 + qom

[Qemu-devel] [PATCH v8 3/7] [trivial] trace: Cosmetic changes on fast-path tracing

2016-07-04 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> Reviewed-by: Stefan Hajnoczi <stefa...@redhat.com> --- trace/control-internal.h |7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/trace/control-internal.h b/trace/control-internal.h index 5e0a5ab..c5

[Qemu-devel] [PATCH v8 5/7] trace: Conditionally trace events based on their per-vCPU state

2016-07-04 Thread Lluís Vilanova
Events with the 'vcpu' property are conditionally emitted according to their per-vCPU state. Other events are emitted normally based on their global tracing state. Note that the per-vCPU condition check applies to all tracing backends. Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> Re

[Qemu-devel] [PATCH v8 6/7] trace: Allow event name pattern in "info trace-events"

2016-07-04 Thread Lluís Vilanova
Homogenizes the command capabilities with QMP. Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> Reviewed-by: Eric Blake <ebl...@redhat.com> Reviewed-by: Markus Armbruster <arm...@redhat.com> --- hmp-commands-info.hx |8 +--- hmp.h|1 + monitor.c

[Qemu-devel] [PATCH v8 1/7] trace: Identify events with the 'vcpu' property

2016-07-04 Thread Lluís Vilanova
A new event attribute 'cpu_id' is added to have a separate ID space ('TRACE_VCPU_*') for all events with the 'vcpu' property. These are later used to identify which events are enabled on each vCPU. Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> Reviewed-by: Stefan Hajnoczi

[Qemu-devel] [PATCH v8 0/7] trace: Per-vCPU tracing states

2016-07-04 Thread Lluís Vilanova
cpu' properties; now it's simply events with the 'vcpu' property). * Make tracing backends comply with the per-vCPU tracing state. Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> --- Lluís Vilanova (7): trace: Identify events with the 'vcpu' property disas: Remove unused macro '

Re: [Qemu-devel] [PATCH v7 7/7] trace: Add QAPI/QMP interfaces to query and control per-vCPU tracing state

2016-06-30 Thread Lluís Vilanova
Markus Armbruster writes: > Lluís Vilanova <vilan...@ac.upc.edu> writes: >> Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> >> Reviewed-by: Stefan Hajnoczi <stefa...@redhat.com> >> --- >> hmp-commands-info.hx |6 +- >> hmp-comman

Re: [Qemu-devel] [PATCH v2 1/2] trace: [linux-user] Commandline arguments to control tracing

2016-06-29 Thread Lluís Vilanova
Stefan Hajnoczi writes: > On Wed, Jun 22, 2016 at 12:04:35PM +0200, Lluís Vilanova wrote: >> @@ -4047,6 +4064,12 @@ static const struct qemu_argument arg_table[] = { >> "", "log system calls"}, >> {"seed", "QEMU_RAND_SEE

Re: [Qemu-devel] Executed Host Instructions

2016-06-28 Thread Lluís Vilanova
Ayaz Akram writes: > Hi All, > I want to count number of host instructions (only for guest code) executed > when qemu emulates an application. I wonder if helper functions are > supported with tcg back end as well, which can be a possible solution for > the mentioned problem ? If not, is there

Re: [Qemu-devel] [RFC 00/30] cmpxchg-based emulation of atomics

2016-06-28 Thread Lluís Vilanova
Emilio G Cota writes: [...] > - What to do when atomic ops are used on something other than RAM? > Should we have a "slow path" that is not atomic for these cases, or > it's OK to assume code is bogus? For now, I just wrote XXX. [...] You mean, for example, on I/O space? In these cases, it

[Qemu-devel] [PATCH v7 7/7] trace: Add QAPI/QMP interfaces to query and control per-vCPU tracing state

2016-06-27 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> Reviewed-by: Stefan Hajnoczi <stefa...@redhat.com> --- hmp-commands-info.hx |6 +- hmp-commands.hx |7 +- monitor.c| 17 +- qapi/trace.json | 32 +-- qmp-commands.hx | 35 +++

[Qemu-devel] [PATCH v7 6/7] trace: Allow event name pattern in "info trace-events"

2016-06-27 Thread Lluís Vilanova
Homogenizes the command capabilities with QMP. Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> Reviewed-by: Eric Blake <ebl...@redhat.com> --- hmp-commands-info.hx |8 +--- hmp.h|1 + monitor.c| 31 ++- 3 files

[Qemu-devel] [PATCH v7 2/7] disas: Remove unused macro '_'

2016-06-27 Thread Lluís Vilanova
Eliminates a future compilation error when UI code includes the tracing headers (indirectly pulling "disas/bfd.h" through "qom/cpu.h") and GLib's i18n '_' macro. Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> Reviewed-by: Stefan Hajnoczi <stefa...@redhat.com>

[Qemu-devel] [PATCH v7 1/7] trace: Identify events with the 'vcpu' property

2016-06-27 Thread Lluís Vilanova
A new event attribute 'cpu_id' is added to have a separate ID space ('TRACE_VCPU_*') for all events with the 'vcpu' property. These are later used to identify which events are enabled on each vCPU. Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> Reviewed-by: Stefan Hajnoczi

[Qemu-devel] [PATCH v7 4/7] trace: Add per-vCPU tracing states for events with the 'vcpu' property

2016-06-27 Thread Lluís Vilanova
Each vCPU gets a 'trace_dstate' bitmap to control the per-vCPU dynamic tracing state of events with the 'vcpu' property. Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> --- bsd-user/main.c |1 + include/qom/cpu.h|6 + linux-user/main.c|1 + qom

[Qemu-devel] [PATCH v7 3/7] [trivial] trace: Cosmetic changes on fast-path tracing

2016-06-27 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> Reviewed-by: Stefan Hajnoczi <stefa...@redhat.com> --- trace/control-internal.h |7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/trace/control-internal.h b/trace/control-internal.h index 5e0a5ab..c5

[Qemu-devel] [PATCH v7 5/7] trace: Conditionally trace events based on their per-vCPU state

2016-06-27 Thread Lluís Vilanova
Events with the 'vcpu' property are conditionally emitted according to their per-vCPU state. Other events are emitted normally based on their global tracing state. Note that the per-vCPU condition check applies to all tracing backends. Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> Re

[Qemu-devel] [PATCH v7 0/7] trace: Per-vCPU tracing states

2016-06-27 Thread Lluís Vilanova
f "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 wi

Re: [Qemu-devel] [PATCH v6 6/7] trace: Allow event name pattern in "info trace-events"

2016-06-27 Thread Lluís Vilanova
Eric Blake writes: > On 06/23/2016 09:21 AM, Lluís Vilanova wrote: >> Homogeinizes the command capabilities with QMP. > s/Homogeinizes/homogenizes/ >> >> Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> >> --- >> hmp-commands-info.hx |

[Qemu-devel] [PATCH v6 5/7] trace: Conditionally trace events based on their per-vCPU state

2016-06-23 Thread Lluís Vilanova
Events with the 'vcpu' property are conditionally emitted according to their per-vCPU state. Other events are emitted normally based on their global tracing state. Note that the per-vCPU condition check applies to all tracing backends. Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> Re

[Qemu-devel] [PATCH v6 7/7] trace: Add QAPI/QMP interfaces to query and control per-vCPU tracing state

2016-06-23 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> Reviewed-by: Stefan Hajnoczi <stefa...@redhat.com> --- hmp-commands-info.hx |6 +- hmp-commands.hx |7 +- monitor.c| 17 +- qapi/trace.json | 32 +-- qmp-commands.hx | 35 +++

[Qemu-devel] [PATCH v6 0/7] trace: Per-vCPU tracing states

2016-06-23 Thread Lluís Vilanova
te 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. Signed-off-by: Lluís V

[Qemu-devel] [PATCH v6 2/7] disas: Remove unused macro '_'

2016-06-23 Thread Lluís Vilanova
Eliminates a future compilation error when UI code includes the tracing headers (indirectly pulling "disas/bfd.h" through "qom/cpu.h") and GLib's i18n '_' macro. Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> Reviewed-by: Stefan Hajnoczi <stefa...@redhat.com>

[Qemu-devel] [PATCH v6 4/7] trace: Add per-vCPU tracing states for events with the 'vcpu' property

2016-06-23 Thread Lluís Vilanova
Each vCPU gets a 'trace_dstate' bitmap to control the per-vCPU dynamic tracing state of events with the 'vcpu' property. Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> --- bsd-user/main.c |1 + include/qom/cpu.h|6 + linux-user/main.c|1 + qom

[Qemu-devel] [PATCH v6 3/7] [trivial] trace: Cosmetic changes on fast-path tracing

2016-06-23 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> Reviewed-by: Stefan Hajnoczi <stefa...@redhat.com> --- trace/control-internal.h |7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/trace/control-internal.h b/trace/control-internal.h index 5e0a5ab..c5

[Qemu-devel] [PATCH v6 6/7] trace: Allow event name pattern in "info trace-events"

2016-06-23 Thread Lluís Vilanova
Homogeinizes the command capabilities with QMP. Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> --- hmp-commands-info.hx |8 +--- hmp.h|1 + monitor.c| 31 ++- 3 files changed, 36 insertions(+), 4 deletions(-) diff

[Qemu-devel] [PATCH v6 1/7] trace: Identify events with the 'vcpu' property

2016-06-23 Thread Lluís Vilanova
A new event attribute 'cpu_id' is added to have a separate ID space ('TRACE_VCPU_*') for all events with the 'vcpu' property. These are later used to identify which events are enabled on each vCPU. Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> Reviewed-by: Stefan Hajnoczi

Re: [Qemu-devel] [PATCH 1/2] trace: [linux-user] Commandline arguments to control tracing

2016-06-22 Thread Lluís Vilanova
Eric Blake writes: > On 06/21/2016 07:23 AM, Lluís Vilanova wrote: >> Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> >> --- >> linux-user/main.c | 28 >> 1 file changed, 28 insertions(+) >> >> +

[Qemu-devel] [PATCH v2 2/2] trace: [bsd-user] Commandline arguments to control tracing

2016-06-22 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> --- bsd-user/main.c | 19 +++ 1 file changed, 19 insertions(+) diff --git a/bsd-user/main.c b/bsd-user/main.c index 9f592be..542e50e 100644 --- a/bsd-user/main.c +++ b/bsd-user/main.c @@ -30,6 +30,7 @@ #include "q

[Qemu-devel] [PATCH v2 1/2] trace: [linux-user] Commandline arguments to control tracing

2016-06-22 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> --- linux-user/main.c | 28 1 file changed, 28 insertions(+) diff --git a/linux-user/main.c b/linux-user/main.c index f8a8764..6d70821 100644 --- a/linux-user/main.c +++ b/linux-user/main.c @@ -33,6

[Qemu-devel] [PATCH v2 0/2] trace: [*-user] Add commandline arguments to control tracing

2016-06-22 Thread Lluís Vilanova
Blake]. Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> --- Lluís Vilanova (2): trace: [linux-user] Commandline arguments to control tracing trace: [bsd-user] Commandline arguments to control tracing bsd-user/main.c | 19 +++ linux-user/main.c

Re: [Qemu-devel] [PATCH 2/2] trace: [bsd-user] Commandline arguments to control tracing

2016-06-22 Thread Lluís Vilanova
Eric Blake writes: > On 06/21/2016 07:23 AM, Lluís Vilanova wrote: >> Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> >> --- >> bsd-user/main.c | 21 + >> 1 file changed, 21 insertions(+) >> >> diff --git a/bsd-user/main.

[Qemu-devel] [PATCH v5 6/7] trace: Allow event name pattern in "info trace-events"

2016-06-21 Thread Lluís Vilanova
Homogeinizes the command capabilities with QMP. Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> --- hmp-commands-info.hx |8 +--- hmp.h|1 + monitor.c| 31 ++- 3 files changed, 36 insertions(+), 4 deletions(-) diff

[Qemu-devel] [PATCH] trace: [*-user] Add events to trace guest syscalls in syscall emulation mode

2016-06-21 Thread Lluís Vilanova
. Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> --- bsd-user/syscall.c |9 + linux-user/syscall.c |2 ++ trace-events | 16 3 files changed, 27 insertions(+) diff --git a/bsd-user/syscall.c b/bsd-user/syscall.c index a9fe869..66492aa 100644 ---

[Qemu-devel] [PATCH v5 0/7] trace: Per-vCPU tracing states

2016-06-21 Thread Lluís Vilanova
with 'tcg' and 'vcpu' properties; now it's simply events with the 'vcpu' property). * Make tracing backends comply with the per-vCPU tracing state. Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> --- Lluís Vilanova (7): trace: Identify events with the 'vcpu' property disa

[Qemu-devel] [PATCH v5 2/7] disas: Remove unused macro '_'

2016-06-21 Thread Lluís Vilanova
Eliminates a future compilation error when UI code includes the tracing headers (indirectly pulling "disas/bfd.h" through "qom/cpu.h") and GLib's i18n '_' macro. Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> Reviewed-by: Stefan Hajnoczi <stefa...@redhat.com>

[Qemu-devel] [PATCH v5 5/7] trace: Conditionally trace events based on their per-vCPU state

2016-06-21 Thread Lluís Vilanova
Events with the 'vcpu' property are conditionally emitted according to their per-vCPU state. Other events are emitted normally based on their global tracing state. Note that the per-vCPU condition check applies to all tracing backends. Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> Re

[Qemu-devel] [PATCH v5 3/7] [trivial] trace: Cosmetic changes on fast-path tracing

2016-06-21 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> Reviewed-by: Stefan Hajnoczi <stefa...@redhat.com> --- trace/control-internal.h |7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/trace/control-internal.h b/trace/control-internal.h index 5e0a5ab..c5

[Qemu-devel] [PATCH v5 7/7] trace: Add QAPI/QMP interfaces to query and control per-vCPU tracing state

2016-06-21 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> Reviewed-by: Stefan Hajnoczi <stefa...@redhat.com> --- hmp-commands-info.hx |6 +- hmp-commands.hx |7 +- monitor.c| 17 +- qapi/trace.json | 32 +-- qmp-commands.hx | 35 +++

[Qemu-devel] [PATCH 0/2] trace: [*-user] Add commandline arguments to control tracing

2016-06-21 Thread Lluís Vilanova
Adds three commandline arguments to the main *-user programs, following what's already available in softmmu: * -trace-enable * -trace-events * -trace-file Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> --- Lluís Vilanova (2): trace: [linux-user] Commandline arguments to c

[Qemu-devel] [PATCH v5 1/7] trace: Identify events with the 'vcpu' property

2016-06-21 Thread Lluís Vilanova
A new event attribute 'cpu_id' is added to have a separate ID space ('TRACE_VCPU_*') for all events with the 'vcpu' property. These are later used to identify which events are enabled on each vCPU. Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> Reviewed-by: Stefan Hajnoczi

[Qemu-devel] [PATCH v5 4/7] trace: Add per-vCPU tracing states for events with the 'vcpu' property

2016-06-21 Thread Lluís Vilanova
Each vCPU gets a 'trace_dstate' bitmap to control the per-vCPU dynamic tracing state of events with the 'vcpu' property. Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> --- bsd-user/main.c |1 + include/qom/cpu.h|6 + linux-user/main.c|1 + qom

[Qemu-devel] [PATCH 1/2] trace: [linux-user] Commandline arguments to control tracing

2016-06-21 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> --- linux-user/main.c | 28 1 file changed, 28 insertions(+) diff --git a/linux-user/main.c b/linux-user/main.c index f8a8764..b0d7d2b 100644 --- a/linux-user/main.c +++ b/linux-user/main.c @@ -33,6

[Qemu-devel] [PATCH 2/2] trace: [bsd-user] Commandline arguments to control tracing

2016-06-21 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> --- bsd-user/main.c | 21 + 1 file changed, 21 insertions(+) diff --git a/bsd-user/main.c b/bsd-user/main.c index 9f592be..ce2cc17 100644 --- a/bsd-user/main.c +++ b/bsd-user/main.c @@ -30,6 +30,7 @@ #include

Re: [Qemu-devel] [PATCH v4 6/6] trace: Add QAPI/QMP interfaces to query and control per-vCPU tracing state

2016-06-20 Thread Lluís Vilanova
Markus Armbruster writes: > Lluís Vilanova <vilan...@ac.upc.edu> writes: >> Markus Armbruster writes: >> >>> Lluís Vilanova <vilan...@ac.upc.edu> writes: [...] >>>> diff --git a/qapi/trace.json b/qapi/trace.json >>>> index 01b0a5

Re: [Qemu-devel] [PATCH v4 4/6] trace: Add per-vCPU tracing states for events with the 'vcpu' property

2016-06-20 Thread Lluís Vilanova
Stefan Hajnoczi writes: > On Fri, Jun 17, 2016 at 10:16:25PM +0200, Lluís Vilanova wrote: >> Stefan Hajnoczi writes: >> >> > On Tue, Jun 14, 2016 at 03:11:12PM +0200, Lluís Vilanova wrote: >> >> @@ -1116,6 +1117,7 @@ int main(int argc, char **argv)

Re: [Qemu-devel] [PATCH v4 6/6] trace: Add QAPI/QMP interfaces to query and control per-vCPU tracing state

2016-06-20 Thread Lluís Vilanova
Markus Armbruster writes: > Lluís Vilanova <vilan...@ac.upc.edu> writes: >> Markus Armbruster writes: >> >>> Lluís Vilanova <vilan...@ac.upc.edu> writes: >>>> Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> >>>> Reviewed

Re: [Qemu-devel] [PATCH v4 6/6] trace: Add QAPI/QMP interfaces to query and control per-vCPU tracing state

2016-06-20 Thread Lluís Vilanova
Markus Armbruster writes: > Lluís Vilanova <vilan...@ac.upc.edu> writes: >> Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> >> Reviewed-by: Stefan Hajnoczi <stefa...@redhat.com> >> --- >> monitor.c |4 +- >> qapi/trace.json | 20

Re: [Qemu-devel] [PATCH v4 6/6] trace: Add QAPI/QMP interfaces to query and control per-vCPU tracing state

2016-06-20 Thread Lluís Vilanova
Markus Armbruster writes: > Lluís Vilanova <vilan...@ac.upc.edu> writes: >> Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> >> Reviewed-by: Stefan Hajnoczi <stefa...@redhat.com> >> --- >> monitor.c |4 +- >> qapi/trace.json | 20

Re: [Qemu-devel] [PATCH v4 4/6] trace: Add per-vCPU tracing states for events with the 'vcpu' property

2016-06-17 Thread Lluís Vilanova
Stefan Hajnoczi writes: > On Tue, Jun 14, 2016 at 03:11:12PM +0200, Lluís Vilanova wrote: >> @@ -1116,6 +1117,7 @@ int main(int argc, char **argv) >> gdbserver_start (gdbstub_port); >> gdb_handlesig(cpu, 0); >> } >> +trace_init_vcpu_events(); > Do vcpu ev

[Qemu-devel] [PATCH v4 5/6] trace: Conditionally trace events based on their per-vCPU state

2016-06-14 Thread Lluís Vilanova
Events with the 'vcpu' property are conditionally emitted according to their per-vCPU state. Other events are emitted normally based on their global tracing state. Note that the per-vCPU condition check applies to all tracing backends. Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> Re

[Qemu-devel] [PATCH v4 3/6] [trivial] trace: Cosmetic changes on fast-path tracing

2016-06-14 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> Reviewed-by: Stefan Hajnoczi <stefa...@redhat.com> --- trace/control-internal.h |7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/trace/control-internal.h b/trace/control-internal.h index 0ba10fe..3f

[Qemu-devel] [PATCH v4 2/6] disas: Remove unused macro '_'

2016-06-14 Thread Lluís Vilanova
Eliminates a future compilation error when UI code includes the tracing headers (indirectly pulling "disas/bfd.h" through "qom/cpu.h") and GLib's i18n '_' macro. Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> --- disas/alpha.c |6 +++--- disas/arm.c

[Qemu-devel] [PATCH v4 1/6] trace: Identify events with the 'vcpu' property

2016-06-14 Thread Lluís Vilanova
A new event attribute 'cpu_id' is added to have a separate ID space ('TRACE_VCPU_*') for all events with the 'vcpu' property. These are later used to identify which events are enabled on each vCPU. Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> Reviewed-by: Stefan Hajnoczi

[Qemu-devel] [PATCH v4 0/6] trace: Per-vCPU tracing states

2016-06-14 Thread Lluís Vilanova
mplify 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. Signed-off-by: Ll

[Qemu-devel] [PATCH v4 6/6] trace: Add QAPI/QMP interfaces to query and control per-vCPU tracing state

2016-06-14 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> Reviewed-by: Stefan Hajnoczi <stefa...@redhat.com> --- monitor.c |4 +- qapi/trace.json | 20 ++-- qmp-commands.hx | 17 ++- trace/qmp.c | 143 --- 4 f

[Qemu-devel] [PATCH v4 4/6] trace: Add per-vCPU tracing states for events with the 'vcpu' property

2016-06-14 Thread Lluís Vilanova
Each vCPU gets a 'trace_dstate' bitmap to control the per-vCPU dynamic tracing state of events with the 'vcpu' property. Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> --- Makefile.objs|1 + bsd-user/main.c |2 ++ include/qom/cpu.h|6 +

Re: [Qemu-devel] [PATCH 4/6] trace: Add per-vCPU tracing states for events with the 'vcpu' property

2016-06-14 Thread Lluís Vilanova
Paolo Bonzini writes: > On 14/06/2016 10:39, Stefan Hajnoczi wrote: >> On Mon, Jun 13, 2016 at 06:39:46PM +0200, Lluís Vilanova wrote: >>> Paolo Bonzini writes: >>> >>>> On 13/06/2016 14:15, Lluís Vilanova wrote: >>>>>> That sai

Re: [Qemu-devel] [PATCH 4/6] trace: Add per-vCPU tracing states for events with the 'vcpu' property

2016-06-13 Thread Lluís Vilanova
Paolo Bonzini writes: > On 13/06/2016 14:15, Lluís Vilanova wrote: >> > That said, I am skeptical about the benefit of the interfaces you are >> > adding. They add a lot of complication and overhead (especially >> > regarding the memory/cache overhead of the

Re: [Qemu-devel] [PATCH 4/6] trace: Add per-vCPU tracing states for events with the 'vcpu' property

2016-06-13 Thread Lluís Vilanova
Lluís Vilanova writes: > Paolo Bonzini writes: >> First of all, a generic problem I see with your patches is that the >> newly-introduced APIs are not providing a good abstraction. >> If something is only used internally, as is the case for >> trace_event_get_cpu_i

Re: [Qemu-devel] [PATCH 3/6] [trivial] trace: Cosmetic changes on fast-path tracing

2016-06-13 Thread Lluís Vilanova
Paolo Bonzini writes: > On 25/02/2016 16:03, Lluís Vilanova wrote: >> static inline bool trace_event_get_state_dynamic(TraceEvent *ev) >> { >> -int id = trace_event_get_id(ev); >> +TraceEventID id; >> +assert(ev != NULL); > Please don't add "

Re: [Qemu-devel] [PATCH 4/6] trace: Add per-vCPU tracing states for events with the 'vcpu' property

2016-06-13 Thread Lluís Vilanova
t "cpu" in the C file. My suggestion is to > prefix functions with vcpu_trace_event if they refer to per-VCPU trace > events, and only use the VCPU ids in those functions. I'll fix these two. > On 25/02/2016 16:03, Lluís Vilanova wrote: >> +stat

Re: [Qemu-devel] [PATCH 4/6] trace: Add per-vCPU tracing states for events with the 'vcpu' property

2016-06-13 Thread Lluís Vilanova
Paolo Bonzini writes: > On 10/06/2016 19:52, Lluís Vilanova wrote: >> Fair point. But now I feel tempted to change both trace_events_dstate and >> trace_events_enabled_count into unsigned int... it burns me when I see signed >> types used only on their positives by design. &

Re: [Qemu-devel] [PATCH 4/6] trace: Add per-vCPU tracing states for events with the 'vcpu' property

2016-06-10 Thread Lluís Vilanova
Stefan Hajnoczi writes: > On Thu, Jun 09, 2016 at 04:17:11PM +0200, Lluís Vilanova wrote: >> >> @@ -61,7 +69,7 @@ static inline bool >> >> trace_event_get_state_static(TraceEvent *ev) >> >> static inline bool trace_event_get_state_dynamic_by_id(TraceEventID

[Qemu-devel] [PATCH v3 6/6] trace: Add QAPI/QMP interfaces to query and control per-vCPU tracing state

2016-06-10 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> Reviewed-by: Stefan Hajnoczi <stefa...@redhat.com> --- monitor.c |4 +- qapi/trace.json | 20 ++-- qmp-commands.hx | 17 ++- trace/qmp.c | 143 --- 4 f

[Qemu-devel] [PATCH v3 2/6] disas: Remove unused macro '_'

2016-06-10 Thread Lluís Vilanova
Eliminates a future compilation error when UI code includes the tracing headers (indirectly pulling "disas/bfd.h" through "qom/cpu.h") and GLib's i18n '_' macro. Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> --- disas/alpha.c |6 +++--- disas/arm.c

[Qemu-devel] [PATCH v3 3/6] [trivial] trace: Cosmetic changes on fast-path tracing

2016-06-10 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> Reviewed-by: Stefan Hajnoczi <stefa...@redhat.com> --- trace/control-internal.h |8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/trace/control-internal.h b/trace/control-internal.h index c78a45a..d1

[Qemu-devel] [PATCH v3 4/6] trace: Add per-vCPU tracing states for events with the 'vcpu' property

2016-06-10 Thread Lluís Vilanova
Each vCPU gets a 'trace_dstate' bitmap to control the per-vCPU dynamic tracing state of events with the 'vcpu' property. Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> --- Makefile.objs|1 + bsd-user/main.c |2 + include/qom/cpu.h|6 linu

[Qemu-devel] [PATCH v3 1/6] trace: Identify events with the 'vcpu' property

2016-06-10 Thread Lluís Vilanova
A new event attribute 'cpu_id' is added to have a separate ID space ('TRACE_VCPU_*') for all events with the 'vcpu' property. These are later used to identify which events are enabled on each vCPU. Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> Reviewed-by: Stefan Hajnoczi

[Qemu-devel] [PATCH v3 5/6] trace: Conditionally trace events based on their per-vCPU state

2016-06-10 Thread Lluís Vilanova
Events with the 'vcpu' property are conditionally emitted according to their per-vCPU state. Other events are emitted normally based on their global tracing state. Note that the per-vCPU condition check applies to all tracing backends. Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> Re

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

2016-06-10 Thread Lluís Vilanova
ents 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. Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> --- Lluís Vilano

Re: [Qemu-devel] [PATCH v2 6/6] trace: Add QAPI/QMP interfaces to query and control per-vCPU tracing state

2016-06-10 Thread Lluís Vilanova
Eric Blake writes: > On 06/09/2016 11:34 AM, Lluís Vilanova wrote: >> Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> >> Reviewed-by: Stefan Hajnoczi <stefa...@redhat.com> >> --- >> monitor.c |4 +- >> qapi/trace.json | 20 ++-- >

[Qemu-devel] [PATCH v2 2/6] disas: Remove unused macro '_'

2016-06-09 Thread Lluís Vilanova
Eliminates a future compilation error when UI code includes the tracing headers (indirectly pulling "disas/bfd.h" through "qom/cpu.h") and GLib's i18n '_' macro. Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> --- disas/alpha.c |6 +++--- disas/arm.c

[Qemu-devel] [PATCH v2 1/6] trace: Identify events with the 'vcpu' property

2016-06-09 Thread Lluís Vilanova
A new event attribute 'cpu_id' is added to have a separate ID space ('TRACE_VCPU_*') for all events with the 'vcpu' property. These are later used to identify which events are enabled on each vCPU. Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> Reviewed-by: Stefan Hajnoczi

Re: [Qemu-devel] [PATCH v1 00/40] Split up the trace-events file

2016-06-09 Thread Lluís Vilanova
Daniel P Berrange writes: > To quote Peter today: > pm215: "trace-events: causing merge conflicts since 2010" [...] Silly note. You can skip the documentation header on all trace-events file and just reference a single global one (is /trace-events gonna survive for some events?). Otherwise

[Qemu-devel] [PATCH v2 6/6] trace: Add QAPI/QMP interfaces to query and control per-vCPU tracing state

2016-06-09 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> Reviewed-by: Stefan Hajnoczi <stefa...@redhat.com> --- monitor.c |4 +- qapi/trace.json | 20 ++-- qmp-commands.hx | 18 ++- trace/qmp.c | 143 --- 4 f

[Qemu-devel] [PATCH v5 2/2] trace: [all] Add "guest_mem_before" event

2016-06-09 Thread Lluís Vilanova
The event is described in "trace-events". Note that the "MO_AMASK" flag is not traced, since it does not seem to affect the visible semantics of instructions. Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> --- include/exec/cpu_ldst_template.h | 25

[Qemu-devel] [PATCHv20/6] trace: Per-vCPU tracing states

2016-06-09 Thread Lluís Vilanova
u' properties; now it's simply events with the 'vcpu' property). * Make tracing backends comply with the per-vCPU tracing state. Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> --- Lluís Vilanova (6): trace: Identify events with the 'vcpu' property disas: Remove un

[Qemu-devel] [PATCH v5 0/2] trace: Add event for vCPU memory accesses

2016-06-09 Thread Lluís Vilanova
This series adds an event to track information related to memory accesses performed by the guest CPUs ("guest_mem_before"). A future series might extend this to contain the physical address and memory value (e.g., "guest_mem_after"). Signed-off-by: Lluís Vilanova

[Qemu-devel] [PATCH v2 5/6] trace: Conditionally trace events based on their per-vCPU state

2016-06-09 Thread Lluís Vilanova
Events with the 'vcpu' property are conditionally emitted according to their per-vCPU state. Other events are emitted normally based on their global tracing state. Note that the per-vCPU condition check applies to all tracing backends. Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> Re

Re: [Qemu-devel] [PATCH v4 2/2] trace: [all] Add "guest_mem_before" event

2016-06-09 Thread Lluís Vilanova
Richard Henderson writes: > On 05/27/2016 09:01 AM, Lluís Vilanova wrote: >> -void tcg_gen_qemu_ld_i32(TCGv_i32 val, TCGv addr, TCGArg idx, TCGMemOp >> memop) >> +static inline void do_tcg_gen_qemu_ld_i32(TCGv_i32 val, TCGv

[Qemu-devel] [PATCH v2 4/6] trace: Add per-vCPU tracing states for events with the 'vcpu' property

2016-06-09 Thread Lluís Vilanova
Each vCPU gets a 'trace_dstate' bitmap to control the per-vCPU dynamic tracing state of events with the 'vcpu' property. Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> --- Makefile.objs|1 + bsd-user/main.c |2 + include/qom/cpu.h|6 linu

[Qemu-devel] [PATCH v2 3/6] [trivial] trace: Cosmetic changes on fast-path tracing

2016-06-09 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> Reviewed-by: Stefan Hajnoczi <stefa...@redhat.com> --- trace/control-internal.h |8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/trace/control-internal.h b/trace/control-internal.h index c78a45a..d1

[Qemu-devel] [PATCH v5 1/2] exec: [tcg] Track which vCPU is performing translation and execution

2016-06-09 Thread Lluís Vilanova
"). Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> Reviewed-by: Peter Maydell <peter.mayd...@linaro.org> Reviewed-by: Richard Henderson <r...@twiddle.net> --- target-alpha/translate.c |1 + target-arm/translate.c|1 + target-cris/translate.c

Re: [Qemu-devel] [PATCH 4/6] trace: Add per-vCPU tracing states for events with the 'vcpu' property

2016-06-09 Thread Lluís Vilanova
Stefan Hajnoczi writes: > On Thu, Feb 25, 2016 at 04:03:06PM +0100, Lluís Vilanova wrote: > @@ -332,6 +334,16 @@ struct CPUState { >> struct KVMState *kvm_state; >> struct kvm_run *kvm_run; >> >> +#define TRACE_VCPU_DSTATE_TYPE uint32_t >> +TRACE_VCPU_DST

Re: [Qemu-devel] [PATCH 2/6] disas: Remove unused macro '_'

2016-06-09 Thread Lluís Vilanova
Stefan Hajnoczi writes: > On Thu, Feb 25, 2016 at 04:02:55PM +0100, Lluís Vilanova wrote: >> Eliminates a future compilation error when UI code includes the tracing >> headers (indirectly pulling "disas/bfd.h" through "qom/cpu.h") and >> GLib's i18n '_' ma

Re: [Qemu-devel] [PATCH0/6] trace: Per-vCPU tracing states

2016-06-01 Thread Lluís Vilanova
Lluís Vilanova writes: > There was not much discussion about this before the soft-freeze, but I'm > pinging > just in case (feel free to ignore until next window opens). [...] Ping. Thanks, Lluis

[Qemu-devel] [PATCH v4 1/2] exec: [tcg] Track which vCPU is performing translation and execution

2016-05-27 Thread Lluís Vilanova
"). Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> Reviewed-by: Peter Maydell <peter.mayd...@linaro.org> Reviewed-by: Richard Henderson <r...@twiddle.net> --- target-alpha/translate.c |1 + target-arm/translate.c|1 + target-cris/translate.c

[Qemu-devel] [PATCH v4 2/2] trace: [all] Add "guest_mem_before" event

2016-05-27 Thread Lluís Vilanova
The event is described in "trace-events". Note that the "MO_AMASK" flag is not traced, since it does not seem to affect the visible semantics of instructions. Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> --- include/exec/cpu_ldst_template.h | 25

[Qemu-devel] [PATCH v4 0/2] trace: Add event for vCPU memory accesses

2016-05-27 Thread Lluís Vilanova
This series adds an event to track information related to memory accesses performed by the guest CPUs ("guest_mem_before"). A future series might extend this to contain the physical address and memory value (e.g., "guest_mem_after"). Signed-off-by: Lluís Vilanova

Re: [Qemu-devel] [PATCH v2 01/12] Introduce TCGOpcode for fence instruction

2016-05-27 Thread Lluís Vilanova
Richard Henderson writes: > This commit introduces the TCGOpcode for fence instruction. [...] I think this patch sould also document the opcpde in "tcg/README". Cheers, Lluis

Re: [Qemu-devel] [PATCH v3 2/2] trace: [all] Add "guest_mem_before" event

2016-05-18 Thread Lluís Vilanova
Richard Henderson writes: > On 05/18/2016 03:47 AM, Lluís Vilanova wrote: >> Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> >> --- >> include/exec/cpu_ldst_template.h | 25 >> include/exec/cpu_ldst_useronly_template.h |

[Qemu-devel] [PATCH v3 2/2] trace: [all] Add "guest_mem_before" event

2016-05-18 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> --- include/exec/cpu_ldst_template.h | 25 include/exec/cpu_ldst_useronly_template.h | 22 ++ tcg/tcg-op.c | 32 ++-- trace-

[Qemu-devel] [PATCH v3 1/2] exec: [tcg] Track which vCPU is performing translation and execution

2016-05-18 Thread Lluís Vilanova
"). Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> Reviewed-by: Peter Maydell <peter.mayd...@linaro.org> --- target-alpha/translate.c |1 + target-arm/translate.c|1 + target-cris/translate.c |1 + target-cris/translate_v10.c |1 + targ

<    3   4   5   6   7   8   9   10   11   12   >