[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 --- bsd-user/main.c |1 + include/qom/cpu.h|6 + linux-user/main.c|1 + qom/cpu.c

[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 Reviewed-by: Eric Blake Reviewed-by: Markus Armbruster --- hmp-commands-info.hx |8 +--- hmp.h|1 + monitor.c| 31 ++- 3 files changed, 36

[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 Reviewed-by: Stefan Hajnoczi --- 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..c5f5f3d 100644 --- a/trace/control-internal.h +++ b/trace

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

2016-07-11 Thread Lluís Vilanova
t;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' pro

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 >> Reviewed-by: Stefan Hajnoczi >> --- >> hmp-commands-info.hx |6 +- >> hmp-commands.hx |7 +- >> monitor.c| 17 +- >> q

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

2016-07-04 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 Reviewed-by: Stefan Hajnoczi --- disas/alpha.c |6

[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 Reviewed-by: Stefan Hajnoczi --- hmp-commands-info.hx |6 +- hmp-commands.hx |7 +- monitor.c| 17 +- qapi/trace.json | 32 +-- qmp-commands.hx | 35 +++- trace/qmp.c | 148

[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 --- bsd-user/main.c |1 + include/qom/cpu.h|6 + linux-user/main.c|1 + qom/cpu.c

[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 Reviewed-by: Stefan Hajnoczi --- 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..c5f5f3d 100644 --- a/trace/control-internal.h +++ b/trace

[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 Reviewed-by: Stefa

[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 Reviewed-by: Eric Blake Reviewed-by: Markus Armbruster --- hmp-commands-info.hx |8 +--- hmp.h|1 + monitor.c| 31 ++- 3 files changed, 36

[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 Reviewed-by: Stefan Hajnoczi

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

2016-07-04 Thread Lluís Vilanova
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 --- Lluís Vilanova (7): trace:

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 writes: >> Signed-off-by: Lluís Vilanova >> Reviewed-by: Stefan Hajnoczi >> --- >> hmp-commands-info.hx |6 +- >> hmp-commands.hx |7 +- >> monitor.c| 17 +- >> qapi/trace.js

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_SEED&qu

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 an

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 dep

[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 Reviewed-by: Stefan Hajnoczi --- hmp-commands-info.hx |6 +- hmp-commands.hx |7 +- monitor.c| 17 +- qapi/trace.json | 32 +-- qmp-commands.hx | 35 +++- trace/qmp.c | 148

[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 Reviewed-by: Eric Blake --- hmp-commands-info.hx |8 +--- hmp.h|1 + monitor.c| 31 ++- 3 files changed, 36 insertions(+), 4 deletions(-) diff

[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 Reviewed-by: Stefan Hajnoczi --- disas/alpha.c |6

[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 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 --- bsd-user/main.c |1 + include/qom/cpu.h|6 + linux-user/main.c|1 + qom/cpu.c

[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 Reviewed-by: Stefan Hajnoczi --- 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..c5f5f3d 100644 --- a/trace/control-internal.h +++ b/trace

[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 Reviewed-by: Stefa

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

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

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 >> --- >> hmp-commands-info.hx |8 +--- >>

[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 Reviewed-by: Stefa

[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 Reviewed-by: Stefan Hajnoczi --- hmp-commands-info.hx |6 +- hmp-commands.hx |7 +- monitor.c| 17 +- qapi/trace.json | 32 +-- qmp-commands.hx | 35 +++- trace/qmp.c | 148

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

2016-06-23 Thread Lluís Vilanova
"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' pro

[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 Reviewed-by: Stefan Hajnoczi --- disas/alpha.c |6

[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 --- bsd-user/main.c |1 + include/qom/cpu.h|6 + linux-user/main.c|1 + qom/cpu.c

[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 Reviewed-by: Stefan Hajnoczi --- 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..c5f5f3d 100644 --- a/trace/control-internal.h +++ b/trace

[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 --- hmp-commands-info.hx |8 +--- hmp.h|1 + monitor.c| 31 ++- 3 files changed, 36 insertions(+), 4 deletions(-) diff --git a/hmp-commands

[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 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 >> --- >> linux-user/main.c | 28 >> 1 file changed, 28 insertions(+) >> >> +{"trace-enable", "QEMU_TRACE_

[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 --- 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 "qemu/timer.h" #inc

[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 --- 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 +33,7 @@ #include "qemu/envl

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

2016-06-22 Thread Lluís Vilanova
t docs for bsd-user [Eric Blake]. Signed-off-by: Lluís Vilanova --- 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 +++

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 >> --- >> bsd-user/main.c | 21 + >> 1 file changed, 21 insertions(+) >> >> diff --git a/bsd-user/main.c b/bsd-user/main.c >> in

[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 --- hmp-commands-info.hx |8 +--- hmp.h|1 + monitor.c| 31 ++- 3 files changed, 36 insertions(+), 4 deletions(-) diff --git a/hmp-commands

[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 --- 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 --- a/bsd-user/syscall.c +++ b/bsd

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

2016-06-21 Thread Lluís Vilanova
s 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 --- Lluís Vilanova

[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 Reviewed-by: Stefan Hajnoczi --- disas/alpha.c |6

[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 Reviewed-by: Stefa

[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 Reviewed-by: Stefan Hajnoczi --- 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..c5f5f3d 100644 --- a/trace/control-internal.h +++ b/trace

[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 Reviewed-by: Stefan Hajnoczi --- hmp-commands-info.hx |6 +- hmp-commands.hx |7 +- monitor.c| 17 +- qapi/trace.json | 32 +-- qmp-commands.hx | 35 +++- trace/qmp.c | 148

[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 --- Lluís Vilanova (2): trace: [linux-user] Commandline arguments to control tracing trace:

[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 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 --- bsd-user/main.c |1 + include/qom/cpu.h|6 + linux-user/main.c|1 + qom/cpu.c

[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 --- 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 +33,7 @@ #include "qemu/envl

[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 --- 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 "qemu/timer.h" #inc

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 writes: >> Markus Armbruster writes: >> >>> Lluís Vilanova writes: [...] >>>> diff --git a/qapi/trace.json b/qapi/trace.json >>>> index 01b0a52..25d8095 100644 >>>> --- a/qapi/trace.json >

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 writes: >> Markus Armbruster writes: >> >>> Lluís Vilanova writes: >>>> Signed-off-by: Lluís Vilanova >>>> Reviewed-by: Stefan Hajnoczi >>>> --- >>>> monitor.c |

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 writes: >> Signed-off-by: Lluís Vilanova >> Reviewed-by: Stefan Hajnoczi >> --- >> monitor.c |4 +- >> qapi/trace.json | 20 ++-- >> qmp-commands.hx |

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 writes: >> Signed-off-by: Lluís Vilanova >> Reviewed-by: Stefan Hajnoczi >> --- >> monitor.c |4 +- >> qapi/trace.json | 20 ++-- >> qmp-commands.hx |

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 Reviewed-by: Stefa

[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 Reviewed-by: Stefan Hajnoczi --- 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..3f368fd 100644 --- a/trace/control-internal.h +++ b/trace

[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 --- 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 Reviewed-by: Stefan Hajnoczi

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

2016-06-14 Thread Lluís Vilanova
ace: 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 t

[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 Reviewed-by: Stefan Hajnoczi --- monitor.c |4 +- qapi/trace.json | 20 ++-- qmp-commands.hx | 17 ++- trace/qmp.c | 143 --- 4 files changed, 147 insertions(+), 37 deletions(-) diff

[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 --- 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 said, I

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
"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: >

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 Reviewed-by: Stefan Hajnoczi --- monitor.c |4 +- qapi/trace.json | 20 ++-- qmp-commands.hx | 17 ++- trace/qmp.c | 143 --- 4 files changed, 147 insertions(+), 37 deletions(-) diff

[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 --- 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 Reviewed-by: Stefan Hajnoczi --- 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..d1f99e3 100644 --- a/trace/control-internal.h +++ b/trace

[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 --- Makefile.objs|1 + bsd-user/main.c |2 + include/qom/cpu.h|6 linux-user/

[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 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 Reviewed-by: Stefa

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

2016-06-10 Thread Lluís Vilanova
ic 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 Vil

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 >> Reviewed-by: Stefan Hajnoczi >> --- >> monitor.c |4 +- >> qapi/trace.json | 20 ++-- >> qmp-commands.hx |

[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 Reviewed-by: Stefan Hajnoczi

[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 --- disas/alpha.c |6 +++--- disas/arm.c |

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 it's

[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 Reviewed-by: Stefan Hajnoczi --- monitor.c |4 +- qapi/trace.json | 20 ++-- qmp-commands.hx | 18 ++- trace/qmp.c | 143 --- 4 files changed, 147 insertions(+), 38 deletions(-) diff

[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 --- include/exec/cpu_ldst_template.h | 25 ++

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

2016-06-09 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 --- Lluís Vilanova (6): trace: Identify events with the 'vcpu'

[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 Reviewed-by: Stefa

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 --- Makefile.objs|1 + bsd-user/main.c |2 + include/qom/cpu.h|6 linux-user/

[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 Reviewed-by: Stefan Hajnoczi --- 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..d1f99e3 100644 --- a/trace/control-internal.h +++ b/trace

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

2016-06-09 Thread Lluís Vilanova
t to execution-time events ("*_exec"). Signed-off-by: Lluís Vilanova Reviewed-by: Peter Maydell Reviewed-by: Richard Henderson --- target-alpha/translate.c |1 + target-arm/translate.c|1 + target-cris/translate.c |1 + target-cris/translate_v10.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 &

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
t to execution-time events ("*_exec"). Signed-off-by: Lluís Vilanova Reviewed-by: Peter Maydell Reviewed-by: Richard Henderson --- target-alpha/translate.c |1 + target-arm/translate.c|1 + target-cris/translate.c |1 + target-cris/translate_v10.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 --- 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 >> --- >> include/exec/cpu_ldst_template.h | 25 >> include/exec/cpu_ldst_useronly_template.h | 22 +++

[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 --- include/exec/cpu_ldst_template.h | 25 include/exec/cpu_ldst_useronly_template.h | 22 ++ tcg/tcg-op.c | 32 ++-- trace-events | 22

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