[Qemu-devel] [PATCH v4 7/9] disas: Remove unused macro '_'

2016-01-15 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/i386.c|2 +- include/disas/bfd.h |1 -

[Qemu-devel] [PATCH v4 1/9] trace: Add support for vCPU pointers in trace events

2016-01-15 Thread Lluís Vilanova
to 'TCGv_ptr'), but that could change in the future to enforce the difference. Signed-off-by: Lluís Vilanova --- include/qemu/typedefs.h|1 + scripts/tracetool/transform.py |9 - target-alpha/translate.c |2 +- target-arm/translate.c |2 +

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

2016-01-15 Thread Lluís Vilanova
t to execution-time events ("*_exec"). Signed-off-by: Lluís Vilanova --- target-alpha/translate.c |1 + target-arm/translate.c|1 + target-cris/translate.c |1 + target-cris/translate_v10.c |1 + target-i386/translate.c |1 + target-lm32/tran

Re: [Qemu-devel] [PATCH v1 1/2] tcg: Add support for constant value promises

2016-01-15 Thread Lluís Vilanova
Richard Henderson writes: > On 01/15/2016 07:35 AM, Lluís Vilanova wrote: >> +TCGv_i64 tcg_promise_i64(TCGv_promise_i64 *promise) >> +{ >> +int pi = tcg_ctx.gen_next_parm_idx; >> +*promise = (TCGv_promise_i64)&tcg_ctx.gen_opparam_buf[pi]; >>

Re: [Qemu-devel] [PATCH v1 1/2] tcg: Add support for constant value promises

2016-01-16 Thread Lluís Vilanova
Richard Henderson writes: > On 01/15/2016 12:12 PM, Lluís Vilanova wrote: >> Richard Henderson writes: >> >>> On 01/15/2016 07:35 AM, Lluís Vilanova wrote: >>>> +TCGv_i64 tcg_promise_i64(TCGv_promise_i64 *promise) >>>> +{ >>>>

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

2016-01-18 Thread Lluís Vilanova
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 pe

Re: [Qemu-devel] [PATCH v1 1/2] tcg: Add support for constant value promises

2016-01-19 Thread Lluís Vilanova
Edgar E Iglesias writes: > On Sat, Jan 16, 2016 at 09:57:36PM +0100, Lluís Vilanova wrote: >> Richard Henderson writes: >> >> > On 01/15/2016 12:12 PM, Lluís Vilanova wrote: >> >> Richard Henderson writes: >> >> >> >>>

Re: [Qemu-devel] [PATCH v3 ] doc: Introduce coding style for errors

2016-01-20 Thread Lluís Vilanova
Thomas Huth writes: > On 18.01.2016 21:26, Eric Blake wrote: >> On 01/15/2016 06:54 AM, Lluís Vilanova wrote: >>> Gives some general guidelines for reporting errors in QEMU. >>> >>> Signed-off-by: Lluís Vilanova >>> --- >>> HACKING | 36 +

Re: [Qemu-devel] Request for Help (Generate Trace for Individual Instructions)

2015-12-23 Thread Lluís Vilanova
Junaid Aslam writes: > Dear Sir > I am a student in Netherlands TU/e and intend to explore QEMU for a project. I > need help in understanding how i can trace an individual instruction which is > translated by TCG. For this moment in am more interested in Guest load store > and > Function call ins

Re: [Qemu-devel] [PATCH v2 1/2] utils: Add warning messages

2015-12-29 Thread Lluís Vilanova
Markus Armbruster writes: > Lluís Vilanova writes: >> Adds a special error object that transforms error messages into >> immediately reported warnings. > Before I dive into details: my fundamental objection is that &error_warn > is new infrastructure without a use.

Re: [Qemu-devel] [PATCH v2 05/10] exec: [ŧcg] Use multiple physical TB caches

2016-01-07 Thread Lluís Vilanova
Stefan Hajnoczi writes: > On Tue, Nov 24, 2015 at 06:09:14PM +0100, Lluís Vilanova wrote: > Commit message uses 'LATIN SMALL LETTER T WITH STROKE' (U+0167) instead > of regular 't' character :). Woops! Thanks :)

Re: [Qemu-devel] [PATCHv71/4] trace: Extend API to manage event arguments

2016-02-18 Thread Lluís Vilanova
Eric Blake writes: > On 02/17/2016 02:20 PM, Lluís Vilanova wrote: >> Lets the user to manage event arguments as a list, and simplifies > s/to // Fixed. >> argument concatenation. > [meta-comment] The subject line was formatted as "[PATCHv71/4]", which > l

Re: [Qemu-devel] [PATCH v7 0/4] trace: Show vCPU info in guest code events

2016-02-22 Thread Lluís Vilanova
Lluís Vilanova writes: > NOTE: This series should complete the framework for guest code tracing. From > here on, other series can concurrently add actual events and improve the > guest code tracing features and performance (e.g., control tracing > independently

Re: [Qemu-devel] [PATCH v7 0/4] trace: Show vCPU info in guest code events

2016-02-23 Thread Lluís Vilanova
Alex Bennée writes: > Lluís Vilanova writes: >> Lluís Vilanova writes: >> >>> NOTE: This series should complete the framework for guest code tracing. From >>> here on, other series can concurrently add actual events and improve the >>> guest code traci

[Qemu-devel] [PATCH v8 0/6] trace: Show vCPU info in guest code events

2016-02-23 Thread Lluís Vilanova
t). * 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 Acked-by: Stefan Hajnoczi --- Lluís Vilanova (6): trace: Extend A

[Qemu-devel] [PATCH v8 2/6] trace: Remove unnecessary intermediate event copies

2016-02-23 Thread Lluís Vilanova
The current code forces the use of a chain of ".original" dereferences, which looks odd. Signed-off-by: Lluís Vilanova --- scripts/tracetool/__init__.py|5 ++--- scripts/tracetool/format/events_h.py |4 ++-- scripts/tracetool/format/tcg_h.py|4 ++-- 3 files

[Qemu-devel] [PATCH v8 5/6] [trivial] trace: Add helper function to cast event arguments

2016-02-23 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova --- scripts/tracetool/__init__.py |4 1 file changed, 4 insertions(+) diff --git a/scripts/tracetool/__init__.py b/scripts/tracetool/__init__.py index 26878f4..9e02f73 100644 --- a/scripts/tracetool/__init__.py +++ b/scripts/tracetool/__init__.py @@ -121,6

[Qemu-devel] [PATCH v8 6/6] trace: Add 'vcpu' event property to trace guest vCPU

2016-02-23 Thread Lluís Vilanova
e*" argument at execution time. Signed-off-by: Lluís Vilanova --- docs/tracing.txt | 41 + include/qemu/typedefs.h |1 scripts/tracetool/__init__.py| 11 +++ scripts/tracetool/format/h.py

[Qemu-devel] [PATCH v8 1/6] trace: Extend API to manage event arguments

2016-02-23 Thread Lluís Vilanova
Lets the user manage event arguments as a list, and simplifies argument concatenation. Signed-off-by: Lluís Vilanova Reviewed-by: Eric Blake --- scripts/tracetool/__init__.py | 15 +-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/scripts/tracetool/__init__.py b

[Qemu-devel] [PATCH v8 4/6] tcg: Move definition of type TCGv

2016-02-23 Thread Lluís Vilanova
The target-dependant type TCGv must be defined in "tcg/tcg.h" before including the tracing helper wrappers in "tcg/tcg-op.h". It also makes more sense to define it here, where other TCG types are defined too. Signed-off-by: Lluís Vilanova --- tcg/tcg-op.h |2 --

[Qemu-devel] [PATCH v8 3/6] tcg: Add type for vCPU pointers

2016-02-23 Thread Lluís Vilanova
r'. As of now, the change is merely cosmetic ('TCGv_env' translates into 'TCGv_ptr'), but that could change in the future to enforce the difference. Note that a 'TCGv_env' type (for 'CPUState') is not added, since all helpers currently receive the architec

[Qemu-devel] [PATCH 0/5] trace: Add events for vCPU memory accesses

2016-02-23 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova --- Lluís Vilanova (5): exec: [tcg] Track which vCPU is performing translation and execution trace: [all] Add "guest_vmem" event user: Refactor lock_user body into do_lock_user user: Set current vCPU during syscall execution

[Qemu-devel] [PATCH 2/5] trace: [all] Add "guest_vmem" event

2016-02-23 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova --- include/exec/cpu_ldst_template.h | 17 +++ include/exec/cpu_ldst_useronly_template.h | 14 tcg/tcg-op.c | 34 ++--- trace-events | 13

[Qemu-devel] [PATCH 3/5] user: Refactor lock_user body into do_lock_user

2016-02-23 Thread Lluís Vilanova
Lock user will later be hooked to raise a tracing event, while the internal 'do_lock_user' will be used by non-interface code (e.g., string length computation). Signed-off-by: Lluís Vilanova --- bsd-user/qemu.h | 11 --- bsd-user/uaccess.c |2 +- linux-user/qemu.h

[Qemu-devel] [PATCH 4/5] user: Set current vCPU during syscall execution

2016-02-23 Thread Lluís Vilanova
Will be later used by tracing events. Signed-off-by: Lluís Vilanova --- bsd-user/syscall.c |2 ++ linux-user/syscall.c |2 ++ 2 files changed, 4 insertions(+) diff --git a/bsd-user/syscall.c b/bsd-user/syscall.c index 35f784c..ce941b0 100644 --- a/bsd-user/syscall.c +++ b/bsd-user

[Qemu-devel] [PATCH 5/5] trace: [all] Add "guest_vmem_user_syscall" event

2016-02-23 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova --- bsd-user/qemu.h | 10 ++ linux-user/qemu.h | 10 ++ trace-events | 10 ++ 3 files changed, 30 insertions(+) diff --git a/bsd-user/qemu.h b/bsd-user/qemu.h index 4dad254..090c09b 100644 --- a/bsd-user/qemu.h +++ b/bsd-user

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

2016-02-23 Thread Lluís Vilanova
t to execution-time events ("*_exec"). Signed-off-by: Lluís Vilanova --- target-alpha/translate.c |1 + target-arm/translate.c|1 + target-cris/translate.c |1 + target-cris/translate_v10.c |1 + target-i386/translate.c |1 + target-lm32/tran

[Qemu-devel] [PATCH] [trivial] trace: Add a proper API to manage auto-generated events from the 'tcg' property

2016-02-25 Thread Lluís Vilanova
Formalizes the existence of the 'event_trans' and 'event_exec' event attributes, which until now were monkey-patched only when necessary. Signed-off-by: Lluís Vilanova --- scripts/tracetool/__init__.py | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-)

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

2016-02-25 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 --- scripts/trace

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

2016-02-25 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 --- Lluís Vi

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

2016-02-25 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova --- 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/control-internal.h @@ -58,14

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

2016-02-25 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 --- scripts

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

2016-02-25 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/i386.c|2 +- include/disas/bfd.h |1 -

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

2016-02-25 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova --- monitor.c |4 +- qapi/trace.json | 20 ++-- qmp-commands.hx | 18 ++- trace/qmp.c | 143 --- 4 files changed, 147 insertions(+), 38 deletions(-) diff --git a/monitor.c b/monitor.c

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

2016-02-25 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| 12 +++

Re: [Qemu-devel] [PATCH v8 0/6] trace: Show vCPU info in guest code events

2016-02-25 Thread Lluís Vilanova
Stefan Hajnoczi writes: > On Tue, Feb 23, 2016 at 07:19:10PM +0100, Lluís Vilanova wrote: >> Changes in v8 >> = >> >> * Rebase on 1b16240. >> * Minor fix in message formatting ('tracetool.vcpu' module). >> * Fix management of event a

Re: [Qemu-devel] [PATCH v3 2/2] build: [bsd-user] Rename "syscall.h" to "target_syscall.h" in target directories

2016-02-25 Thread Lluís Vilanova
Lluís Vilanova writes: > This fixes double-definitions in bsd-user builds when using the UST > tracing backend (which indirectly includes the system's "syscall.h"). > Signed-off-by: Lluís Vilanova > Reviewed-by: Peter Maydell ping > --- > bsd-use

[Qemu-devel] [PATCH v9 0/7] trace: Show vCPU info in guest code events

2016-02-25 Thread Lluís Vilanova
nges 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 opti

[Qemu-devel] [PATCH v9 1/7] trace: Extend API to manage event arguments

2016-02-25 Thread Lluís Vilanova
Lets the user manage event arguments as a list, and simplifies argument concatenation. Signed-off-by: Lluís Vilanova Reviewed-by: Eric Blake --- scripts/tracetool/__init__.py | 15 +-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/scripts/tracetool/__init__.py b

[Qemu-devel] [PATCH v9 2/7] trace: Remove unnecessary intermediate event copies

2016-02-25 Thread Lluís Vilanova
The current code forces the use of a chain of ".original" dereferences, which looks odd. Signed-off-by: Lluís Vilanova --- scripts/tracetool/__init__.py|5 ++--- scripts/tracetool/format/events_h.py |4 ++-- scripts/tracetool/format/tcg_h.py|4 ++-- 3 files

[Qemu-devel] [PATCH v9 4/7] tcg: Move definition of type TCGv

2016-02-25 Thread Lluís Vilanova
The target-dependant type TCGv must be defined in "tcg/tcg.h" before including the tracing helper wrappers in "tcg/tcg-op.h". It also makes more sense to define it here, where other TCG types are defined too. Signed-off-by: Lluís Vilanova --- tcg/tcg-op.h |2 --

[Qemu-devel] [PATCH v9 6/7] typedefs: Add CPUState

2016-02-25 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova --- include/qemu/typedefs.h|1 + include/qom/cpu.h |1 - stubs/target-get-monitor-def.c |3 +-- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/include/qemu/typedefs.h b/include/qemu/typedefs.h index 6ed91b4..9a5ead6

[Qemu-devel] [PATCH v9 5/7] [trivial] trace: Add helper function to cast event arguments

2016-02-25 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova --- scripts/tracetool/__init__.py |4 1 file changed, 4 insertions(+) diff --git a/scripts/tracetool/__init__.py b/scripts/tracetool/__init__.py index 26878f4..9e02f73 100644 --- a/scripts/tracetool/__init__.py +++ b/scripts/tracetool/__init__.py @@ -121,6

[Qemu-devel] [PATCH v9 7/7] trace: Add 'vcpu' event property to trace guest vCPU

2016-02-25 Thread Lluís Vilanova
e*" argument at execution time. Signed-off-by: Lluís Vilanova --- docs/tracing.txt | 41 + scripts/tracetool/__init__.py| 11 +++ scripts/tracetool/format/h.py|3 + scripts/tracetool/format/

[Qemu-devel] [PATCH v9 3/7] tcg: Add type for vCPU pointers

2016-02-25 Thread Lluís Vilanova
r'. As of now, the change is merely cosmetic ('TCGv_env' translates into 'TCGv_ptr'), but that could change in the future to enforce the difference. Note that a 'TCGv_env' type (for 'CPUState') is not added, since all helpers currently receive the architec

Re: [Qemu-devel] [PATCH v9 0/7] trace: Show vCPU info in guest code events

2016-03-01 Thread Lluís Vilanova
Lluís Vilanova writes: > NOTE: This series should complete the framework for guest code tracing. From > here on, other series can concurrently add actual events and improve the > guest code tracing features and performance (e.g., control tracing > independently

Re: [Qemu-devel] How to break cpu_tb_exec()?

2015-07-06 Thread Lluís Vilanova
Jun Koi writes: > On Sat, Jul 4, 2015 at 1:12 AM, Peter Maydell > wrote: > On 3 July 2015 at 18:10, Jun Koi wrote: >> On Sat, Jul 4, 2015 at 1:06 AM, Peter Maydell >> wrote: >>> On 3 July 2015 at 18:02, Jun Koi wrote: >>> > If this is true, then what if this TB is running infinitely, and

[Qemu-devel] [PATCH v9 0/7] trace: Generic event state description

2013-01-10 Thread Lluís Vilanova
escription information. Signed-off-by: Lluís Vilanova --- Changes in v9: * Rebase on 7cd5da7 from master. * Change dynamic tracing state from monitor only in enabled events. * Assert dynamic tracing state changes are performed only on enabled events. * Split 'trace_event_set_state_dynamic'

[Qemu-devel] [PATCH v9 1/7] trace: [tracetool] Explicitly identify public backends

2013-01-10 Thread Lluís Vilanova
Public backends are those printed by "--list-backends" and thus considered valid by the configure script. Signed-off-by: Lluís Vilanova --- scripts/tracetool.py |4 ++-- scripts/tracetool/backend/__init__.py | 16 +++- scripts/tracetool/backend

[Qemu-devel] [PATCH v9 7/7] trace: [stderr] Port to generic event information and new control interface

2013-01-10 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova --- scripts/tracetool/backend/stderr.py | 27 --- trace/stderr.c | 34 ++ trace/stderr.h | 11 --- 3 files changed, 14 insertions(+), 58 deletions

[Qemu-devel] [PATCH v9 3/7] trace: Provide a detailed event control interface

2013-01-10 Thread Lluís Vilanova
This interface decouples event obtaining from interaction. Events can be obtained through three different methods: * identifier * name * simple wildcard pattern Signed-off-by: Lluís Vilanova --- docs/tracing.txt | 44 --- trace/control-internal.h | 67

[Qemu-devel] [PATCH v9 4/7] trace: [monitor] Use new event control interface

2013-01-10 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova --- monitor.c | 20 +--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/monitor.c b/monitor.c index 9cf419b..4c40541 100644 --- a/monitor.c +++ b/monitor.c @@ -735,10 +735,24 @@ static void do_trace_event_set_state(Monitor *mon

[Qemu-devel] [PATCH v9 2/7] trace: Provide a generic tracing event descriptor

2013-01-10 Thread Lluís Vilanova
is also moved to the "events" backend ("events-h" frontend). Signed-off-by: Lluís Vilanova --- Makefile |3 ++ scripts/tracetool/backend/events.py | 23 scripts/tracetool/format/events_c.py | 39 +

[Qemu-devel] [PATCH v9 6/7] trace: [simple] Port to generic event information and new control interface

2013-01-10 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova --- scripts/tracetool/backend/simple.py | 18 +- trace/simple.c | 32 +--- trace/simple.h |6 +- 3 files changed, 11 insertions(+), 45 deletions(-) diff --git a

[Qemu-devel] [PATCH v9 5/7] trace: [default] Port to generic event information and new control interface

2013-01-10 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova --- trace/default.c |5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/trace/default.c b/trace/default.c index c9b27a2..6e07a47 100644 --- a/trace/default.c +++ b/trace/default.c @@ -1,7 +1,7 @@ /* * Default implementation for backend

Re: [Qemu-devel] [PATCH 25/27] build: some simplifications for "trace/Makefile.objs"

2013-01-14 Thread Lluís Vilanova
Paolo Bonzini writes: > Signed-off-by: Lluís Vilanova > Signed-off-by: Paolo Bonzini > --- > trace.h => include/trace.h | 0 > trace/Makefile.objs| 26 +- > 2 files changed, 13 insertions(+), 13 deletions(-) > rename trace.h => inc

Re: [Qemu-devel] [PATCH v9 3/7] trace: Provide a detailed event control interface

2013-01-23 Thread Lluís Vilanova
Stefan Hajnoczi writes: > On Thu, Jan 10, 2013 at 08:23:13PM +0100, Lluís Vilanova wrote: >> diff --git a/trace/control-internal.h b/trace/control-internal.h >> new file mode 100644 >> index 000..188253a >> --- /dev/null >> +++ b/trace/co

Re: [Qemu-devel] [PATCH v9 4/7] trace: [monitor] Use new event control interface

2013-01-23 Thread Lluís Vilanova
Stefan Hajnoczi writes: > On Thu, Jan 10, 2013 at 08:23:19PM +0100, Lluís Vilanova wrote: >> Signed-off-by: Lluís Vilanova >> --- >> monitor.c | 20 +--- >> 1 file changed, 17 insertions(+), 3 deletions(-) >> >> diff --git a/monitor.

[Qemu-devel] [RFC][PATCH 00/22] instrument: Let the user wrap/override specific event tracing routines

2013-03-26 Thread Lluís Vilanova
into QEMU). As a side-effect this series adds an API for the instrumentation code to have some basic interaction with QEMU. See the documentation added in the first patch for more information. Signed-off-by: Lluís Vilanova --- Lluís Vilanova (22): instrument: Add documentation

[Qemu-devel] [PATCH 03/22] trace: Let the user specify her own trace-events file

2013-03-26 Thread Lluís Vilanova
With this option the user can perform multiple builds of QEMU with different tracing event properties. Signed-off-by: Lluís Vilanova --- Makefile.target |2 +- configure | 19 +++ trace/Makefile.objs | 10 +- 3 files changed, 25 insertions(+), 6

[Qemu-devel] [PATCH 04/22] tracetool: Use method 'Event.api' to get the name of public routines

2013-03-26 Thread Lluís Vilanova
This ensures proper naming across tracing backends, even when someone overrides the value without backends knowing it. Signed-off-by: Lluís Vilanova --- scripts/tracetool/__init__.py |8 scripts/tracetool/backend/dtrace.py |4 ++-- scripts/tracetool/backend/simple.py

[Qemu-devel] [PATCH 07/22] linux-user: Use absolute include path

2013-03-26 Thread Lluís Vilanova
Lets the include directive work regardless of the current directory. This is needed for code compiled in directories deeper than one level from the build root. Signed-off-by: Lluís Vilanova --- Makefile.target |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a

[Qemu-devel] [PATCH 01/22] instrument: Add documentation

2013-03-26 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova --- docs/instrumentation.txt | 481 ++ docs/tracing.txt |9 + 2 files changed, 490 insertions(+) create mode 100644 docs/instrumentation.txt diff --git a/docs/instrumentation.txt b/docs/instrumentation.txt

[Qemu-devel] [PATCH 09/22] instrument: [dynamic] Call dynamically linked user-provided routines

2013-03-26 Thread Lluís Vilanova
Provides a mechanism to dynamically change the routine invoked by 'trace_*'. Signed-off-by: Lluís Vilanova --- .gitignore |1 Makefile |4 + Makefile.objs |5 ++

[Qemu-devel] [PATCH 10/22] instrument: Add internal control interface

2013-03-26 Thread Lluís Vilanova
QEMU starts and exits. Signed-off-by: Lluís Vilanova --- Makefile.objs |2 configure |3 + instrument/Makefile.objs |6 + instrument/control-internal.h | 33 +++ instrument/control.c

[Qemu-devel] [PATCH 02/22] trace: [simple] Do not include "trace/simple.h" in generated tracer headers

2013-03-26 Thread Lluís Vilanova
The header is not necessary, given that the simple backend does not define any inlined tracing routines. Signed-off-by: Lluís Vilanova --- scripts/tracetool/backend/simple.py |3 --- trace/simple.c |2 ++ 2 files changed, 2 insertions(+), 3 deletions(-) diff --git

[Qemu-devel] [PATCH 06/22] instrument: [none] Add null instrumentation

2013-03-26 Thread Lluís Vilanova
providing the original tracing behaviour). Signed-off-by: Lluís Vilanova --- .gitignore |2 + Makefile|3 + configure | 31 ++ include/trace.h |2

[Qemu-devel] [PATCH 11/22] instrument: [hmp] Add control interface

2013-03-26 Thread Lluís Vilanova
Add HMP commands to control (un)loading of dynamic instrumentation library. Signed-off-by: Lluís Vilanova --- Makefile.objs|1 + hmp-commands.hx | 42 ++ instrument/Makefile.objs |2 + instrument/hmp.c | 65

[Qemu-devel] [PATCH 12/22] qapi: Add a primitive to include other files from a QAPI schema file

2013-03-26 Thread Lluís Vilanova
Adds the "input(...)" primitive to the syntax of QAPI schema files. Signed-off-by: Lluís Vilanova --- scripts/qapi-commands.py | 10 +++--- scripts/qapi-types.py| 10 +++--- scripts/qapi-visit.py| 10 +++--- scripts/qapi.py | 12 +++- 4 fil

[Qemu-devel] [PATCH 08/22] instrument: [static] Call statically linked user-provided routines

2013-03-26 Thread Lluís Vilanova
Compiles a user-provided static library during QEMU compilation. This library must provide the implementation of the 'qi_event_*' routines. Signed-off-by: Lluís Vilanova --- Makefile.target |2 + configure

[Qemu-devel] [PATCH 13/22] [trivial] Set the input root directory when parsing QAPI files

2013-03-26 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova --- Makefile | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 6d49378..9137b31 100644 --- a/Makefile +++ b/Makefile @@ -204,13 +204,19 @@ $(SRC_PATH)/qga/qapi-schema.json $(SRC_PATH)/scripts/qapi

[Qemu-devel] [PATCH 19/22] instrument: Add client-side API to control event instrumentation

2013-03-26 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova --- instrument/qemu-instr/control-internal.h | 16 instrument/qemu-instr/control.h | 61 ++ 2 files changed, 77 insertions(+) diff --git a/instrument/qemu-instr/control-internal.h b/instrument/qemu-instr/control

[Qemu-devel] [PATCH 15/22] Let makefiles add entries to the set of target architecture objects

2013-03-26 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova --- Makefile.target |1 + 1 file changed, 1 insertion(+) diff --git a/Makefile.target b/Makefile.target index a26f2ca..03c2f2a 100644 --- a/Makefile.target +++ b/Makefile.target @@ -148,6 +148,7 @@ include $(SRC_PATH)/Makefile.objs all-obj-y = $(obj-y) all

[Qemu-devel] [PATCH 14/22] instrument: [qmp, qapi] Add control interface

2013-03-26 Thread Lluís Vilanova
Add QMP commands to control (un)loading of dynamic instrumentation library. Signed-off-by: Lluís Vilanova --- include/qapi/qmp/qerror.h |9 + instrument/Makefile.objs|1 + instrument/qapi-schema.json | 33 instrument/qmp.c| 59

[Qemu-devel] [PATCH 20/22] build: Fix installation of target-dependant files

2013-03-26 Thread Lluís Vilanova
Pass all the relevant sub-directory make variables. Signed-off-by: Lluís Vilanova --- Cc: Anthony Liguori Cc: Paul Brook --- Makefile |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index feb395c..8b0155d 100644 --- a/Makefile +++ b/Makefile

[Qemu-devel] [PATCH 21/22] instrument: Install headers for dynamic instrumentation clients

2013-03-26 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova --- Makefile | 24 +++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 8b0155d..c97b66c 100644 --- a/Makefile +++ b/Makefile @@ -317,7 +317,29 @@ install-confdir: install-sysconfig: install-datadir

[Qemu-devel] [PATCH 16/22] instrument: Add commandline options to start with an instrumentation library

2013-03-26 Thread Lluís Vilanova
Add commandline options to control initial loading of dynamic instrumentation library. Signed-off-by: Lluís Vilanova --- bsd-user/main.c | 24 bsd-user/syscall.c |5 ++ instrument/Makefile.objs |2 + instrument/cmdline.c | 94

[Qemu-devel] [PATCH 22/22] trace: Do not use the word 'new' in event arguments

2013-03-26 Thread Lluís Vilanova
This lets instrumentation clients in C++ use the auto-generated headers. Signed-off-by: Lluís Vilanova --- trace-events |8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/trace-events b/trace-events index a27ae43..be71eb7 100644 --- a/trace-events +++ b/trace-events

[Qemu-devel] [PATCH 18/22] instrument: Add client-side API to control tracing state of events

2013-03-26 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova --- instrument/Makefile.objs |1 instrument/api-trace.c | 14 + instrument/qemu-instr/trace-internal.h | 27 + instrument/qemu-instr/trace.h | 91 4 files changed, 133

[Qemu-devel] [PATCH 17/22] instrument: Add client-side API to enumerate events

2013-03-26 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova --- .gitignore |1 Makefile|1 configure |1 instrument/Makefile.objs| 13 +++ instrument/api-control.c

[Qemu-devel] [PATCH 05/22] trace: Minimize inclusions of "qemu-common.h" to avoid inclusion loops

2013-03-26 Thread Lluís Vilanova
This problem arises in the following patches. Signed-off-by: Lluís Vilanova --- hw/virtio.c |1 + monitor.c |4 +++- scripts/tracetool/format/h.py |9 - trace/control-internal.h |2 ++ trace/control.c |2

Re: [Qemu-devel] [PATCH 07/22] linux-user: Use absolute include path

2013-03-26 Thread Lluís Vilanova
Peter Maydell writes: > On 26 March 2013 14:01, Lluís Vilanova wrote: >> Lets the include directive work regardless of the current directory. >> >> This is needed for code compiled in directories deeper than one level from >> the >> build root. > Somethi

Re: [Qemu-devel] [PATCH 14/22] instrument: [qmp, qapi] Add control interface

2013-03-26 Thread Lluís Vilanova
Eric Blake writes: > On 03/26/2013 08:01 AM, Lluís Vilanova wrote: >> Add QMP commands to control (un)loading of dynamic instrumentation library. >> >> Signed-off-by: Lluís Vilanova >> --- >> include/qapi/qmp/qerror.h |9 + >> instrument/Makef

Re: [Qemu-devel] [PATCH 1/4] tracetool: use Python 2.4-compatible exception handling syntax

2012-04-27 Thread Lluís Vilanova
Stefan Hajnoczi writes: > The newer "except as :" syntax is not > supported by Python 2.4, we need to use "except , > :". > Tested all trace backends with Python 2.4. > Reported-by: Andreas Färber > Signed-off-by: Stefan Hajnoczi Reviewed-by: Lluís Vi

Re: [Qemu-devel] [PATCH 2/4] tracetool: use Python 2.4-compatible __import__() arguments

2012-04-27 Thread Lluís Vilanova
Stefan Hajnoczi writes: > In Python 2.5 keyword arguments were added to __import__(). Avoid using > them to achieve Python 2.4 compatibility. > Signed-off-by: Stefan Hajnoczi Reviewed-by: Lluís Vilanova > --- > scripts/tracetool/__init__.py |2 +- > 1 file changed,

Re: [Qemu-devel] [PATCH 3/4] tracetool: avoid str.rpartition() Python 2.5 function

2012-04-27 Thread Lluís Vilanova
; Signed-off-by: Stefan Hajnoczi Reviewed-by: Lluís Vilanova > --- > scripts/tracetool/__init__.py | 17 ++--- > 1 file changed, 10 insertions(+), 7 deletions(-) > diff --git a/scripts/tracetool/__init__.py b/scripts/tracetool/__init__.py > index 49858c9..175df08 10

Re: [Qemu-devel] [PATCH 4/4] configure: check for supported Python 2.x versions

2012-04-27 Thread Lluís Vilanova
Stefan Hajnoczi writes: > The tracetool code requires Python 2.4, which was released in 2004. > Check for a supported Python version so we can give a clear error > message. > Signed-off-by: Stefan Hajnoczi > --- > configure |7 --- > 1 file changed, 4 insertions(+), 3 deletions(-) > di

Re: [Qemu-devel] [PATCH v2 4/5] configure: check for supported Python 2.x versions

2012-05-01 Thread Lluís Vilanova
Stefan Hajnoczi writes: > The tracetool code requires Python 2.4, which was released in 2004. > Check for a supported Python version so we can give a clear error > message. > Signed-off-by: Stefan Hajnoczi > --- > configure |7 --- > 1 file changed, 4 insertions(+), 3 deletions(-) > di

Re: [Qemu-devel] [PATCH v2 5/5] tracetool: avoid pkgutil.iter_modules() Python 2.7 function

2012-05-01 Thread Lluís Vilanova
Stefan Hajnoczi writes: > The pkgutil.iter_modules() function provides a way to enumerate child > modules. Unfortunately it's missing in Python <2.7 so we must implement > similar behavior ourselves. > Signed-off-by: Stefan Hajnoczi Reviewed-by: Lluís Vilanova > -

Re: [Qemu-devel] [PATCH v3 5/5] configure: check for supported Python 2.x versions

2012-05-01 Thread Lluís Vilanova
Stefan Hajnoczi writes: > The tracetool code requires Python 2.4, which was released in 2004. > Check for a supported Python version so we can give a clear error > message. > Signed-off-by: Stefan Hajnoczi Reviewed-by: Lluís Vilanova > --- > configure |7 --- &g

Re: [Qemu-devel] [PATCH 1/3] monitor: remove unused do_info_trace

2012-05-07 Thread Lluís Vilanova
Harsh Prateek Bora writes: > Going forward with simpletrace v2 variable size trace records, we cannot > have a generic function to print trace event info and therefore this > interface becomes invalid. > As per Stefan Hajnoczi: > "This command is only available from the human monitor. It's not

[Qemu-devel] [PATCH v4 0/7] trace: Generic event state description

2012-05-08 Thread Lluís Vilanova
Provides a generic event state description and a more detailed event control and query interface. Signed-off-by: Lluís Vilanova --- Changes in v4: * Documentation fixes and (re)formatting. Changes in v3: * Add some assertions. * Remove debugging printf's. * Improve documentation. *

[Qemu-devel] [PATCH v4 2/7] trace: Provide a generic tracing event descriptor

2012-05-08 Thread Lluís Vilanova
Uses tracetool to generate a backend-independent tracing event description. Signed-off-by: Lluís Vilanova --- Makefile |5 +++ Makefile.objs| 21 ++ scripts/tracetool/backend/events.py | 23 scripts

[Qemu-devel] [PATCH v4 1/7] tracetool: Explicitly identify public backends

2012-05-08 Thread Lluís Vilanova
Public backends are those printed by "--list-backends" and thus considered valid by the configure script. Signed-off-by: Lluís Vilanova --- scripts/tracetool.py |4 ++-- scripts/tracetool/backend/__init__.py | 16 +++- scripts/tracetool/backend

[Qemu-devel] [PATCH v4 3/7] trace: Provide a detailed event control interface

2012-05-08 Thread Lluís Vilanova
This interface decouples event obtention from interaction. Events can be obtained through three different methods: * identifier * name * simple wildcard pattern Signed-off-by: Lluís Vilanova --- docs/tracing.txt | 42 -- trace/control-internal.h | 60 +++ trace

[Qemu-devel] [PATCH v4 7/7] trace: [stderr] Port to generic event information and new control interface

2012-05-08 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova --- scripts/tracetool/backend/stderr.py | 27 --- trace/stderr.c | 35 +++ 2 files changed, 15 insertions(+), 47 deletions(-) diff --git a/scripts/tracetool/backend/stderr.py b

[Qemu-devel] [PATCH v4 6/7] trace: [simple] Port to generic event information and new control interface

2012-05-08 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova --- scripts/tracetool/backend/simple.py | 12 +-- trace/simple.c | 37 +-- trace/simple.h |6 +- trace/stderr.h | 11 -- 4 files changed, 11

[Qemu-devel] [PATCH v4 4/7] trace: [monitor] Use new event control interface

2012-05-08 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova --- monitor.c | 15 --- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/monitor.c b/monitor.c index 8946a10..86c2538 100644 --- a/monitor.c +++ b/monitor.c @@ -625,10 +625,19 @@ static void do_trace_event_set_state(Monitor *mon, const

[Qemu-devel] [PATCH v4 5/7] trace: [default] Use new event control interface

2012-05-08 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova --- trace/default.c |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/trace/default.c b/trace/default.c index c9b27a2..3c41990 100644 --- a/trace/default.c +++ b/trace/default.c @@ -1,7 +1,7 @@ /* * Default implementation for backend

Re: [Qemu-devel] [PATCH 1.1 2/2] tracetool: allow parenthesis in trace-events format strings

2012-05-22 Thread Lluís Vilanova
t while 'test_paren(int n) ' becomes the > properties of the event. > Prevent greedy matching from going too far by explicitly saying the name > cannot have a '"'. This forces the regular expression engine to > backtrack to the desired match. > Reporte

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