[Qemu-devel] [PATCH v4 09/20] instrument: Add basic control interface

2017-09-06 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> --- Makefile |5 +++ configure |1 + instrument/Makefile.objs |2 + instrument/control.c | 28 + instrument/control.h

[Qemu-devel] [PATCH v4 08/20] instrument: [hmp] Add library loader

2017-09-06 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> --- hmp-commands.hx | 28 ++ monitor.c | 60 +++ 2 files changed, 88 insertions(+) diff --git a/hmp-commands.hx b/hmp-commands.hx index 1941e19932..703d

[Qemu-devel] [PATCH v4 07/20] instrument: [qapi] Add library loader

2017-09-06 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> --- instrument/Makefile.objs |1 instrument/load.h|4 ++ instrument/qmp.c | 88 ++ qapi-schema.json |3 + qapi/instrument.json

[Qemu-devel] [PATCH v4 06/20] instrument: [softmmu] Add command line library loader

2017-09-06 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> --- qemu-options.hx | 19 +++ vl.c| 15 +++ 2 files changed, 34 insertions(+) diff --git a/qemu-options.hx b/qemu-options.hx index 9f6e2adfff..6947388aab 100644 --- a/qemu-options.hx +++

[Qemu-devel] [PATCH v4 05/20] instrument: [bsd-user] Add command line library loader

2017-09-06 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> --- bsd-user/main.c| 15 +++ bsd-user/syscall.c |5 + 2 files changed, 20 insertions(+) diff --git a/bsd-user/main.c b/bsd-user/main.c index 8a6706a1c8..2cf75290cd 100644 --- a/bsd-user/main.c +++ b/bsd-user/

[Qemu-devel] [PATCH v4 04/20] instrument: [linux-user] Add command line library loader

2017-09-06 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> --- linux-user/main.c| 19 +++ linux-user/syscall.c |4 2 files changed, 23 insertions(+) diff --git a/linux-user/main.c b/linux-user/main.c index 03666ef657..25253bc28a 100644 --- a/linux-user/main.c +++ b

[Qemu-devel] [PATCH v4 03/20] instrument: Add generic library loader

2017-09-06 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> --- MAINTAINERS |1 Makefile.objs|4 + configure|2 + instrument/Makefile.objs |4 + instrument/cmdline.c | 124 instrument/cmdline.h

[Qemu-devel] [PATCH v4 02/20] instrument: Add configure-time flag

2017-09-06 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> --- configure |9 + 1 file changed, 9 insertions(+) diff --git a/configure b/configure index dd73cce62f..80dcc91c98 100755 --- a/configure +++ b/configure @@ -352,6 +352,7 @@ pie="" qom_cast_debug="yes&

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

2017-09-06 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> --- MAINTAINERS |6 ++ docs/instrument.txt | 174 +++ 2 files changed, 180 insertions(+) create mode 100644 docs/instrument.txt diff --git a/MAINTAINERS b/MAINTAINERS

[Qemu-devel] [PATCH v4 00/20] instrument: Add basic event instrumentation

2017-09-06 Thread Lluís Vilanova
loaded as a library into QEMU either when it starts or later using its remote control interfaces. Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> --- Changes in v4 = * Add missing stub function. Changes in v3 = * Use a separate event set for instrumentation (i.

[Qemu-devel] [PATCH v3 00/21] instrument: Add basic event instrumentation

2017-09-06 Thread Lluís Vilanova
loaded as a library into QEMU either when it starts or later using its remote control interfaces. Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> --- Changes in v3 = * Use a separate event set for instrumentation (i.e., do not instrument tracing events) [Stefan Hajnoczi].

[Qemu-devel] [PATCH] trace: Immediately apply per-vCPU state changes if a vCPU is being created

2017-09-06 Thread Lluís Vilanova
Right now, function trace_event_set_vcpu_state_dynamic() asynchronously enables events in the case a vCPU is executing TCG code. If the vCPU is being created this makes some events like "guest_cpu_enter" to not be traced. Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> --

Re: [Qemu-devel] [PATCH v8 0/5] hypertrace: Lightweight guest-to-QEMU trace channel

2017-08-31 Thread Lluís Vilanova
Stefan Hajnoczi writes: > On Fri, Aug 25, 2017 at 08:34:54PM -0400, Emilio G. Cota wrote: >> On Sun, Jul 30, 2017 at 17:08:18 +0300, Lluís Vilanova wrote: >> > The hypertrace channel allows guest code to emit events in QEMU (the host) >> > using >> > i

Re: [Qemu-devel] [PATCH v8 0/5] hypertrace: Lightweight guest-to-QEMU trace channel

2017-08-04 Thread Lluís Vilanova
Stefan Hajnoczi writes: > On Sun, Jul 30, 2017 at 05:08:18PM +0300, Lluís Vilanova wrote: >> The hypertrace channel allows guest code to emit events in QEMU (the host) >> using >> its tracing infrastructure (see "docs/trace.txt"). This works in both

Re: [Qemu-devel] [PATCH 00/13] instrument: Add basic event instrumentation

2017-08-02 Thread Lluís Vilanova
Stefan Hajnoczi writes: > On Wed, Aug 02, 2017 at 12:10:14PM +0100, Peter Maydell wrote: >> On 2 August 2017 at 12:04, Stefan Hajnoczi wrote: >> > On Tue, Aug 01, 2017 at 02:54:29PM +0100, Peter Maydell wrote: >> >> and I don't need the TCG engine to be a library to do

Re: [Qemu-devel] [PATCH v2 2/2] trace: add trace_event_get_state_backends()

2017-07-31 Thread Lluís Vilanova
Stefan Hajnoczi writes: > On Mon, Jul 31, 2017 at 06:09:56PM +0300, Lluís Vilanova wrote: >> Stefan Hajnoczi writes: >> >> > Code that checks dstate is unaware of SystemTap and LTTng UST dstate, so >> > the following trace event will not fire when solely enabl

Re: [Qemu-devel] [PATCH v2 2/2] trace: add trace_event_get_state_backends()

2017-07-31 Thread Lluís Vilanova
Stefan Hajnoczi writes: > Code that checks dstate is unaware of SystemTap and LTTng UST dstate, so > the following trace event will not fire when solely enabled by SystemTap > or LTTng UST: > if (trace_event_get_state(TRACE_MY_EVENT)) { > str = g_strdup_printf("Expensive string to

[Qemu-devel] [PATCH v8 5/5] hypertrace: Add guest-side user-level library

2017-07-30 Thread Lluís Vilanova
Provides guest library "libqemu-hypertrace-guest.a" to abstract access to the hypertrace channel. Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> --- Makefile |5 + configure |2 hypertrace/guest/Makefile

[Qemu-devel] [PATCH v8 4/5] hypertrace: [softmmu] Add QEMU-side proxy to "guest_hypertrace" event

2017-07-30 Thread Lluís Vilanova
Uses a virtual device to trigger the hypertrace channel event. Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> --- hypertrace/Makefile.objs |4 + hypertrace/softmmu.c | 237 ++ include/hw/pci/pci.h |2 3 files change

[Qemu-devel] [PATCH v8 3/5] hypertrace: [*-user] Add QEMU-side proxy to "guest_hypertrace" event

2017-07-30 Thread Lluís Vilanova
QEMU detects when the guest uses 'mmap' on hypertrace's control channel file, and then uses 'mprotect' to detect accesses to it, which are used to trigger tracing event "guest_hypertrace". Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> --- Makefile.objs|4

[Qemu-devel] [PATCH v8 2/5] hypertrace: Add tracing event "guest_hypertrace"

2017-07-30 Thread Lluís Vilanova
Generates the "guest_hypertrace" event with a user-configurable number of arguments. Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> --- Makefile |6 -- Makefile.objs |2 ++ configure | 34 ++ rules.mak |2

[Qemu-devel] [PATCH v8 1/5] hypertrace: Add documentation

2017-07-30 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> --- docs/devel/tracing.txt |3 + docs/hypertrace.txt| 225 2 files changed, 228 insertions(+) create mode 100644 docs/hypertrace.txt diff --git a/docs/devel/tracing.txt b/docs

[Qemu-devel] [PATCH v8 0/5] hypertrace: Lightweight guest-to-QEMU trace channel

2017-07-30 Thread Lluís Vilanova
use-cases and an example. Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> --- Changes in v8 = * Do not use 'seq' when there's no extra hypertrace arguments (BSD behaves differently for "seq 0"). * Fix compilation for bsd-user. Changes in v7 =

Re: [Qemu-devel] [PATCH v7 0/5] hypertrace: Lightweight guest-to-QEMU trace channel

2017-07-30 Thread Lluís Vilanova
Lluís Vilanova writes: > no-reply writes: >> Hi, >> This series failed build test on FreeBSD host. Please find the details below. >> Subject: [Qemu-devel] [PATCH v7 0/5] hypertrace: Lightweight guest-to-QEMU >> trace channel >> Type: series >> Message-id

Re: [Qemu-devel] [PATCH v7 0/5] hypertrace: Lightweight guest-to-QEMU trace channel

2017-07-30 Thread Lluís Vilanova
no-reply writes: > Hi, > This series failed build test on FreeBSD host. Please find the details below. > Subject: [Qemu-devel] [PATCH v7 0/5] hypertrace: Lightweight guest-to-QEMU > trace channel > Type: series > Message-id: 150141363372.9857.9055094189388759132.st...@frigg.lan > === TEST

Re: [Qemu-devel] [PATCH v7 0/5] hypertrace: Lightweight guest-to-QEMU trace channel

2017-07-30 Thread Lluís Vilanova
no-reply writes: > Hi, > This series seems to have some coding style problems. See output below for > more information: > Subject: [Qemu-devel] [PATCH v7 0/5] hypertrace: Lightweight guest-to-QEMU > trace channel > Message-id: 150141363372.9857.9055094189388759132.st...@frigg.lan > Type:

[Qemu-devel] [PATCH v7 5/5] hypertrace: Add guest-side user-level library

2017-07-30 Thread Lluís Vilanova
Provides guest library "libqemu-hypertrace-guest.a" to abstract access to the hypertrace channel. Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> --- Makefile |5 + configure |2 hypertrace/guest/Makefile

[Qemu-devel] [PATCH v7 4/5] hypertrace: [softmmu] Add QEMU-side proxy to "guest_hypertrace" event

2017-07-30 Thread Lluís Vilanova
Uses a virtual device to trigger the hypertrace channel event. Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> --- hypertrace/Makefile.objs |4 + hypertrace/softmmu.c | 237 ++ include/hw/pci/pci.h |2 3 files change

[Qemu-devel] [PATCH v7 3/5] hypertrace: [*-user] Add QEMU-side proxy to "guest_hypertrace" event

2017-07-30 Thread Lluís Vilanova
QEMU detects when the guest uses 'mmap' on hypertrace's control channel file, and then uses 'mprotect' to detect accesses to it, which are used to trigger tracing event "guest_hypertrace". Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> --- Makefile.objs|4

[Qemu-devel] [PATCH v7 2/5] hypertrace: Add tracing event "guest_hypertrace"

2017-07-30 Thread Lluís Vilanova
Generates the "guest_hypertrace" event with a user-configurable number of arguments. Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> --- Makefile |6 -- Makefile.objs |2 ++ configure | 34 ++ rules.mak |2

[Qemu-devel] [PATCH v7 1/5] hypertrace: Add documentation

2017-07-30 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> --- docs/devel/tracing.txt |3 + docs/hypertrace.txt| 225 2 files changed, 228 insertions(+) create mode 100644 docs/hypertrace.txt diff --git a/docs/devel/tracing.txt b/docs

[Qemu-devel] [PATCH v7 0/5] hypertrace: Lightweight guest-to-QEMU trace channel

2017-07-30 Thread Lluís Vilanova
use-cases and an example. Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> --- Changes in v7 = * Use 'expr' instead of assuming 'bash' when generating the "emit.c" file. * Restore generation of trace-events-all. Changes in v6 = * Fix compilati

Re: [Qemu-devel] [PATCH 2/2] trace: check backend dstate in trace_event_get_state()

2017-07-28 Thread Lluís Vilanova
Daniel P Berrange writes: > On Fri, Jul 28, 2017 at 10:20:53AM +0100, Stefan Hajnoczi wrote: >> Code that checks dstate is unaware of SystemTap and LTTng UST dstate, so >> the following trace event will not fire when solely enabled by SystemTap >> or LTTng UST: >> >> if

Re: [Qemu-devel] [PATCH 00/13] instrument: Add basic event instrumentation

2017-07-28 Thread Lluís Vilanova
Stefan Hajnoczi writes: > On Thu, Jul 27, 2017 at 11:40:17AM +0100, Peter Maydell wrote: >> On 27 July 2017 at 11:32, Stefan Hajnoczi <stefa...@redhat.com> wrote: >> > On Wed, Jul 26, 2017 at 03:44:39PM +0300, Lluís Vilanova wrote: >> >> And why exactly is t

Re: [Qemu-devel] [PATCH 00/13] instrument: Add basic event instrumentation

2017-07-28 Thread Lluís Vilanova
Daniel P Berrange writes: > On Fri, Jul 28, 2017 at 02:34:30PM +0100, Stefan Hajnoczi wrote: >> On Thu, Jul 27, 2017 at 04:45:35PM +0100, Daniel P. Berrange wrote: >> > On Thu, Jul 27, 2017 at 04:33:01PM +0100, Peter Maydell wrote: >> > > On 27 July 2017 at 16:21, Daniel P. Berrange

Re: [Qemu-devel] [PATCH 00/13] instrument: Add basic event instrumentation

2017-07-28 Thread Lluís Vilanova
Daniel P Berrange writes: > On Fri, Jul 28, 2017 at 02:41:19PM +0100, Peter Maydell wrote: >> On 28 July 2017 at 14:34, Stefan Hajnoczi wrote: >> > Lluís/Peter: What are the requirements for instrumentation code >> > interacting with the running QEMU instance? simpletrace

Re: [Qemu-devel] [PATCH 00/13] instrument: Add basic event instrumentation

2017-07-28 Thread Lluís Vilanova
Stefan Hajnoczi writes: > On Thu, Jul 27, 2017 at 04:45:35PM +0100, Daniel P. Berrange wrote: >> On Thu, Jul 27, 2017 at 04:33:01PM +0100, Peter Maydell wrote: >> > On 27 July 2017 at 16:21, Daniel P. Berrange wrote: >> > > On Thu, Jul 27, 2017 at 11:54:29AM +0100, Peter

Re: [Qemu-devel] [PATCH 00/13] instrument: Add basic event instrumentation

2017-07-27 Thread Lluís Vilanova
Daniel P Berrange writes: > On Thu, Jul 27, 2017 at 11:54:29AM +0100, Peter Maydell wrote: >> On 27 July 2017 at 11:43, Daniel P. Berrange wrote: >> > Maybe I'm missing something, but aren't all these things >> > already possible via either the statically defined tracepoints

Re: [Qemu-devel] [PATCH 00/13] instrument: Add basic event instrumentation

2017-07-27 Thread Lluís Vilanova
Peter Maydell writes: > On 27 July 2017 at 11:43, Daniel P. Berrange wrote: >> Maybe I'm missing something, but aren't all these things >> already possible via either the statically defined tracepoints >> QEMU exposes, or by placing dynamic tracepoints on arbitrary >> code

[Qemu-devel] [PATCH v6 5/5] hypertrace: Add guest-side user-level library

2017-07-27 Thread Lluís Vilanova
Provides guest library "libqemu-hypertrace-guest.a" to abstract access to the hypertrace channel. Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> --- Makefile |5 + configure |2 hypertrace/guest/Makefile

[Qemu-devel] [PATCH v6 4/5] hypertrace: [softmmu] Add QEMU-side proxy to "guest_hypertrace" event

2017-07-27 Thread Lluís Vilanova
Uses a virtual device to trigger the hypertrace channel event. Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> --- hypertrace/Makefile.objs |4 + hypertrace/softmmu.c | 237 ++ include/hw/pci/pci.h |2 3 files change

[Qemu-devel] [PATCH v6 3/5] hypertrace: [*-user] Add QEMU-side proxy to "guest_hypertrace" event

2017-07-27 Thread Lluís Vilanova
QEMU detects when the guest uses 'mmap' on hypertrace's control channel file, and then uses 'mprotect' to detect accesses to it, which are used to trigger tracing event "guest_hypertrace". Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> --- Makefile.objs|4

[Qemu-devel] [PATCH v6 2/5] hypertrace: Add tracing event "guest_hypertrace"

2017-07-27 Thread Lluís Vilanova
Generates the "guest_hypertrace" event with a user-configurable number of arguments. Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> --- Makefile |7 --- Makefile.objs |2 ++ configure | 34 ++ rules.mak |2

[Qemu-devel] [PATCH v6 1/5] hypertrace: Add documentation

2017-07-27 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> --- docs/devel/tracing.txt |3 + docs/hypertrace.txt| 225 2 files changed, 228 insertions(+) create mode 100644 docs/hypertrace.txt diff --git a/docs/devel/tracing.txt b/docs

[Qemu-devel] [PATCH v6 0/5] hypertrace: Lightweight guest-to-QEMU trace channel

2017-07-27 Thread Lluís Vilanova
use-cases and an example. Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> --- Changes in v6 = * Fix compilation errors. Changes in v5 = * Rebase on 5a477a7806. * Fix typo in "bsd-user/main.c" [Stephan Hajnoczi]. * Replace abort() with exit() in co

[Qemu-devel] [PATCH v5 5/5] hypertrace: Add guest-side user-level library

2017-07-26 Thread Lluís Vilanova
Provides guest library "libqemu-hypertrace-guest.a" to abstract access to the hypertrace channel. Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> --- Makefile |5 + configure |2 hypertrace/guest/Makefile

[Qemu-devel] [PATCH v5 4/5] hypertrace: [softmmu] Add QEMU-side proxy to "guest_hypertrace" event

2017-07-26 Thread Lluís Vilanova
Uses a virtual device to trigger the hypertrace channel event. Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> --- hypertrace/Makefile.objs |4 + hypertrace/softmmu.c | 235 ++ include/hw/pci/pci.h |2 3 files change

[Qemu-devel] [PATCH v5 3/5] hypertrace: [*-user] Add QEMU-side proxy to "guest_hypertrace" event

2017-07-26 Thread Lluís Vilanova
QEMU detects when the guest uses 'mmap' on hypertrace's control channel file, and then uses 'mprotect' to detect accesses to it, which are used to trigger tracing event "guest_hypertrace". Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> --- Makefile.objs|4

[Qemu-devel] [PATCH v5 2/5] hypertrace: Add tracing event "guest_hypertrace"

2017-07-26 Thread Lluís Vilanova
Generates the "guest_hypertrace" event with a user-configurable number of arguments. Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> --- Makefile |7 --- Makefile.objs |2 ++ configure | 34 ++ trace-events | 11

[Qemu-devel] [PATCH v5 1/5] hypertrace: Add documentation

2017-07-26 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> --- docs/devel/tracing.txt |3 + docs/hypertrace.txt| 225 2 files changed, 228 insertions(+) create mode 100644 docs/hypertrace.txt diff --git a/docs/devel/tracing.txt b/docs

[Qemu-devel] [PATCH v5 0/5] hypertrace: Lightweight guest-to-QEMU trace channel

2017-07-26 Thread Lluís Vilanova
use-cases and an example. Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> --- Changes in v5 = * Rebase on 5a477a7806. * Fix typo in "bsd-user/main.c" [Stephan Hajnoczi]. * Replace abort() with exit() in command-line errors [Stephan Hajnoczi]. * Fix alignment of

Re: [Qemu-devel] [PATCH 00/13] instrument: Add basic event instrumentation

2017-07-26 Thread Lluís Vilanova
Stefan Hajnoczi writes: > On Tue, Jul 25, 2017 at 06:11:43PM +0300, Lluís Vilanova wrote: >> Peter Maydell writes: >> >> > On 25 July 2017 at 14:19, Stefan Hajnoczi <stefa...@gmail.com> wrote: >> >> Instead I suggest adding a trace backend generates call

Re: [Qemu-devel] [PATCH 00/13] instrument: Add basic event instrumentation

2017-07-26 Thread Lluís Vilanova
Stefan Hajnoczi writes: > On Tue, Jul 25, 2017 at 05:47:08PM +0300, Lluís Vilanova wrote: >> Stefan Hajnoczi writes: >> >> > On Mon, Jul 24, 2017 at 08:02:24PM +0300, Lluís Vilanova wrote: >> >> This series adds a basic interface to instrume

Re: [Qemu-devel] [PATCH 00/13] instrument: Add basic event instrumentation

2017-07-26 Thread Lluís Vilanova
Peter Maydell writes: > On 26 July 2017 at 12:26, Stefan Hajnoczi wrote: >> On Tue, Jul 25, 2017 at 02:30:06PM +0100, Peter Maydell wrote: >>> Is your proposal that my-instrumentation.c gets compiled into >>> QEMU at this point? That doesn't seem like a great idea to >>> me,

Re: [Qemu-devel] [PATCH 00/13] instrument: Add basic event instrumentation

2017-07-25 Thread Lluís Vilanova
Peter Maydell writes: > On 25 July 2017 at 14:19, Stefan Hajnoczi wrote: >> Instead I suggest adding a trace backend generates calls to registered >> "callback" functions: >> >> $ cat >my-instrumentation.c >> #include "trace/control.h" >> >> static void my_cpu_in(unsigned

Re: [Qemu-devel] [PATCH 00/13] instrument: Add basic event instrumentation

2017-07-25 Thread Lluís Vilanova
Stefan Hajnoczi writes: > On Mon, Jul 24, 2017 at 08:02:24PM +0300, Lluís Vilanova wrote: >> This series adds a basic interface to instrument tracing events and control >> their tracing state. >> >> The instrumentation code is dynamically loaded into QEMU (either whe

Re: [Qemu-devel] [PATCH 11/13] instrument: [qapi] Add library loader

2017-07-25 Thread Lluís Vilanova
Eric Blake writes: > On 07/25/2017 03:24 AM, Lluís Vilanova wrote: >> Eric Blake writes: >> >>> On 07/24/2017 12:46 PM, Lluís Vilanova wrote: >>>> Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> >>>> --- >>>> inst

Re: [Qemu-devel] [PATCH 11/13] instrument: [qapi] Add library loader

2017-07-25 Thread Lluís Vilanova
Eric Blake writes: > On 07/24/2017 12:46 PM, Lluís Vilanova wrote: >> Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> >> --- >> instrument/Makefile.objs |1 + >> instrument/qmp.c | 71 >> qap

[Qemu-devel] [PATCH 13/13] trace: Rename C++-specific names in event arguments

2017-07-24 Thread Lluís Vilanova
Allows instrumentation clients in C++ to use the auto-generated headers. Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> --- scripts/tracetool/__init__.py | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/scripts/tracetool/__init__.py b/scripts/tra

[Qemu-devel] [PATCH 12/13] instrument: [hmp] Add library loader

2017-07-24 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> --- hmp-commands.hx | 28 monitor.c | 55 +++ 2 files changed, 83 insertions(+) diff --git a/hmp-commands.hx b/hmp-commands.hx index 1941

[Qemu-devel] [PATCH 11/13] instrument: [qapi] Add library loader

2017-07-24 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> --- instrument/Makefile.objs |1 + instrument/qmp.c | 71 qapi-schema.json |3 ++ qapi/instrument.json | 92 ++ 4 files change

[Qemu-devel] [PATCH 10/13] instrument: [softmmu] Add command line library loader

2017-07-24 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> --- qemu-options.hx | 17 + vl.c| 11 +++ 2 files changed, 28 insertions(+) diff --git a/qemu-options.hx b/qemu-options.hx index 9bd6bf0eee..aacd01cee7 100644 --- a/qemu-options.hx +++ b/qemu-opti

[Qemu-devel] [PATCH 09/13] instrument: [bsd-user] Add command line library loader

2017-07-24 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> --- bsd-user/main.c| 16 bsd-user/syscall.c |5 + 2 files changed, 21 insertions(+) diff --git a/bsd-user/main.c b/bsd-user/main.c index fa9c012c9f..37bf6a435c 100644 --- a/bsd-user/main.c +++ b/bsd-user/

[Qemu-devel] [PATCH 08/13] instrument: [linux-user] Add command line library loader

2017-07-24 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> --- linux-user/main.c| 20 linux-user/syscall.c |4 2 files changed, 24 insertions(+) diff --git a/linux-user/main.c b/linux-user/main.c index ad03c9e8b2..fdb7ddb199 100644 --- a/linux-user/main.c +++ b

[Qemu-devel] [PATCH 07/13] instrument: Add generic command line library loader

2017-07-24 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> --- instrument/Makefile.objs |1 instrument/cmdline.c | 117 ++ instrument/cmdline.h | 58 +++ 3 files changed, 176 insertions(+) create mode 100644 inst

[Qemu-devel] [PATCH 06/13] instrument: Add event control interface

2017-07-24 Thread Lluís Vilanova
Adds public and internal APIs to control event instrumentation. It also adds an event object (QI_EVENT_${NAME}) and define to know if it's staically enabled (QI_EVENT_${NAME}_ENABLED). Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> --- Makefile

[Qemu-devel] [PATCH 05/13] instrument: [dynamic] Add default public per-event functions

2017-07-24 Thread Lluís Vilanova
, regardless of whether they are instrumented or disabled (used later). Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> --- .gitignore |1 Makefile| 14 + configure

[Qemu-devel] [PATCH 04/13] instrument: Allow adding the "instrument" property without modifying event files

2017-07-24 Thread Lluís Vilanova
Adds a configure argument to allow users to add the instrument property to events without having to modify any trace event files. Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> --- configure | 17 + rules.mak |3 +++ s

[Qemu-devel] [PATCH 03/13] instrument: [dynamic] Add dynamic instrumentation mode

2017-07-24 Thread Lluís Vilanova
This mode uses a function pointer in "trace_*" routines. By default, it points to the original tracing function (now "_backend__trace_*"). Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> --- .gitignore

[Qemu-devel] [PATCH 02/13] instrument: [none] Add null instrumentation mode

2017-07-24 Thread Lluís Vilanova
Renames existing tracing routines into "_backend__trace_*", and instead adds an instrumentation-aware "trace_*". Since we're in a "null" instrumentation mode for tracing events, the new routines simply call the original tracing code. Signed-off-by: Lluís

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

2017-07-24 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> --- docs/devel/tracing.txt |9 ++ docs/instrumentation.txt | 264 ++ 2 files changed, 273 insertions(+) create mode 100644 docs/instrumentation.txt diff --git a/docs/devel/tracing.txt

[Qemu-devel] [PATCH 00/13] instrument: Add basic event instrumentation

2017-07-24 Thread Lluís Vilanova
be explicitly specified at configure time. Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> --- Lluís Vilanova (13): instrument: Add documentation instrument: [none] Add null instrumentation mode instrument: [dynamic] Add dynamic instrumentation mode instrument: Allow

Re: [Qemu-devel] [PATCH 0/2] improve tracing

2017-07-24 Thread Lluís Vilanova
Denis V Lunev writes: > On 07/24/2017 05:43 PM, Lluís Vilanova wrote: >> Denis V Lunev writes: >> >>> On 07/24/2017 02:34 PM, Stefan Hajnoczi wrote: >>>> On Fri, Jul 21, 2017 at 05:31:47PM +0300, Vladimir Sementsov-Ogievskiy >>>> wrote: >&g

Re: [Qemu-devel] [PATCH 0/2] improve tracing

2017-07-24 Thread Lluís Vilanova
Denis V Lunev writes: > On 07/24/2017 02:34 PM, Stefan Hajnoczi wrote: >> On Fri, Jul 21, 2017 at 05:31:47PM +0300, Vladimir Sementsov-Ogievskiy wrote: >>> Current trace system have a drawback: parameters of trace functions >>> are calculated even if corresponding tracepoint is disabled. Also, it

Re: [Qemu-devel] [PATCH 0/2] improve tracing

2017-07-24 Thread Lluís Vilanova
Vladimir Sementsov-Ogievskiy writes: > 21.07.2017 20:04, Lluís Vilanova wrote: >> Vladimir Sementsov-Ogievskiy writes: >> >>> Current trace system have a drawback: parameters of trace functions >>> are calculated even if corresponding tracepoint is disabl

Re: [Qemu-devel] [PATCH v14 32/34] target/arm: Move ss check to init_disas_context

2017-07-22 Thread Lluís Vilanova
Richard Henderson writes: > We can check for single-step just once. > Signed-off-by: Richard Henderson <r...@twiddle.net> Reviewed-by: Lluís Vilanova <vilan...@ac.upc.edu> > --- > target/arm/translate.c | 13 - > 1 file changed, 8 insertions(+), 5

Re: [Qemu-devel] [PATCH v14 08/34] tcg: Add generic translation framework

2017-07-21 Thread Lluís Vilanova
Richard Henderson writes: > From: Lluís Vilanova <vilan...@ac.upc.edu> > Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> > Message-Id: <150002073981.22386.9870422422367410100.st...@frigg.lan> > [rth: Moved max_insns adjustment from tb_start to init_disas_context.

Re: [Qemu-devel] [PATCH v14 07/34] target/arm: Set is_jmp properly after single-stepping

2017-07-21 Thread Lluís Vilanova
Richard Henderson writes: > We have generated an exception, so use DISAS_NORETURN. Shouldn't this be folded into patch 4? Thanks, Lluis > Signed-off-by: Richard Henderson > --- > target/arm/translate-a64.c | 1 + > target/arm/translate.c | 4 +++- > 2 files changed,

Re: [Qemu-devel] [PATCH v14 03/34] target/i386: Use generic DISAS_* enumerators

2017-07-21 Thread Lluís Vilanova
Richard Henderson writes: > This target is not sophisticated in its use of cleanups at the > end of the translation loop. For the most part, any condition > that exits the TB is dealt with by emitting the exiting opcode > right then and there. Therefore the only is_jmp indicator that > is

Re: [Qemu-devel] [PATCH v14 02/34] tcg: Add generic DISAS_NORETURN

2017-07-21 Thread Lluís Vilanova
Richard Henderson writes: > This will allow some amount of cleanup to happen before > switching the backends over to enum DisasJumpType. > Signed-off-by: Richard Henderson <r...@twiddle.net> Reviewed-by: Lluís Vilanova <vilan...@ac.upc.edu> > --- > include/exec

Re: [Qemu-devel] [PATCH 0/2] improve tracing

2017-07-21 Thread Lluís Vilanova
Vladimir Sementsov-Ogievskiy writes: > Current trace system have a drawback: parameters of trace functions > are calculated even if corresponding tracepoint is disabled. Also, it > looks like trace function are not actually inlined by compiler (at > least for me). > Here is a fix proposal: move

Re: [Qemu-devel] [PATCH v13 22/26] target/arm: [tcg] Port to tb_stop

2017-07-15 Thread Lluís Vilanova
Richard Henderson writes: > On 07/13/2017 11:42 PM, Lluís Vilanova wrote: >> -dc->base.is_jmp = DISAS_SKIP; >> +dc->base.is_jmp = DISAS_NORETURN; > Really should fold this back into the patch that introduced SKIP temporarily. Sorry, I don't understand

Re: [Qemu-devel] [PATCH v13 18/26] target/arm: [tcg] Port to breakpoint_check

2017-07-15 Thread Lluís Vilanova
Richard Henderson writes: > On 07/14/2017 07:26 AM, Richard Henderson wrote: >> On 07/13/2017 11:26 PM, Lluís Vilanova wrote: >>> Incrementally paves the way towards using the generic instruction >>> translation >>> loop. >>> >>> Signed-off

Re: [Qemu-devel] [PATCH v13 18/26] target/arm: [tcg] Port to breakpoint_check

2017-07-15 Thread Lluís Vilanova
Richard Henderson writes: > On 07/13/2017 11:26 PM, Lluís Vilanova wrote: >> Incrementally paves the way towards using the generic instruction translation >> loop. >> >> Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> >> Reviewed-by: Richard Henderson

Re: [Qemu-devel] [PATCH v13 03/26] target: [tcg] Add generic translation framework

2017-07-15 Thread Lluís Vilanova
Richard Henderson writes: > On 07/13/2017 10:25 PM, Lluís Vilanova wrote: >> +/* Pass breakpoint hits to target for further processing */ >> +if (unlikely(!QTAILQ_EMPTY(>breakpoints))) { >> +CPUBreakpoint *bp; >> +QTAILQ_F

[Qemu-devel] [PATCH v13 26/26] target/arm: [tcg] Port to generic translation framework

2017-07-14 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> --- target/arm/translate-a64.c | 106 +++ target/arm/translate.c | 108 target/arm/translate.h |8 --- 3 files changed, 38 insertions(+

[Qemu-devel] [PATCH v13 24/26] target/arm: [tcg] Port to disas_log

2017-07-14 Thread Lluís Vilanova
Incrementally paves the way towards using the generic instruction translation loop. Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> Reviewed-by: Richard Henderson <r...@twiddle.net> Reviewed-by: Alex Benneé <alex.be...@linaro.org> --- target/arm/translate.c | 13 +++

[Qemu-devel] [PATCH v13 25/26] target/arm: [tcg, a64] Port to disas_log

2017-07-14 Thread Lluís Vilanova
Incrementally paves the way towards using the generic instruction translation loop. Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> Reviewed-by: Richard Henderson <r...@twiddle.net> --- target/arm/translate-a64.c | 14 +++--- 1 file changed, 11 insertions(+), 3 deleti

[Qemu-devel] [PATCH v13 23/26] target/arm: [tcg, a64] Port to tb_stop

2017-07-14 Thread Lluís Vilanova
Incrementally paves the way towards using the generic instruction translation loop. Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> Reviewed-by: Richard Henderson <r...@twiddle.net> --- target/arm/translate-a64.c | 123 +++- 1 file

[Qemu-devel] [PATCH v13 22/26] target/arm: [tcg] Port to tb_stop

2017-07-14 Thread Lluís Vilanova
Incrementally paves the way towards using the generic instruction translation loop. Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> --- target/arm/translate.c | 165 +--- target/arm/translate.h |1 2 files changed, 87 insertions(

[Qemu-devel] [PATCH v13 21/26] target/arm: [tcg, a64] Port to translate_insn

2017-07-14 Thread Lluís Vilanova
Incrementally paves the way towards using the generic instruction translation loop. Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> --- target/arm/translate-a64.c | 74 +++- 1 file changed, 46 insertions(+), 28 deletions(-) diff --git a/targ

[Qemu-devel] [PATCH v13 20/26] target/arm: [tcg] Port to translate_insn

2017-07-14 Thread Lluís Vilanova
Incrementally paves the way towards using the generic instruction translation loop. Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> --- target/arm/translate.c | 148 target/arm/translate.h |2 + 2 files changed, 87 insertions(

[Qemu-devel] [PATCH v13 19/26] target/arm: [tcg, a64] Port to breakpoint_check

2017-07-14 Thread Lluís Vilanova
Incrementally paves the way towards using the generic instruction translation loop. Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> Reviewed-by: Richard Henderson <r...@twiddle.net> --- target/arm/translate-a64.c | 48 1 file

[Qemu-devel] [PATCH v13 18/26] target/arm: [tcg] Port to breakpoint_check

2017-07-14 Thread Lluís Vilanova
Incrementally paves the way towards using the generic instruction translation loop. Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> Reviewed-by: Richard Henderson <r...@twiddle.net> --- target/arm/translate.c | 53 +++- 1 file

[Qemu-devel] [PATCH v13 17/26] target/arm: [tcg, a64] Port to insn_start

2017-07-14 Thread Lluís Vilanova
Incrementally paves the way towards using the generic instruction translation loop. Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> Reviewed-by: Richard Henderson <r...@twiddle.net> Reviewed-by: Alex Benneé <alex.be...@linaro.org> --- target/arm/translate-a64.c | 11 +

[Qemu-devel] [PATCH v13 15/26] target/arm: [tcg] Port to tb_start

2017-07-14 Thread Lluís Vilanova
Incrementally paves the way towards using the generic instruction translation loop. Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> Reviewed-by: Richard Henderson <r...@twiddle.net> Reviewed-by: Alex Benneé <alex.be...@linaro.org> --- target/arm/

[Qemu-devel] [PATCH v13 14/26] target/arm: [tcg, a64] Port to init_disas_context

2017-07-14 Thread Lluís Vilanova
Incrementally paves the way towards using the generic instruction translation loop. Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> Reviewed-by: Richard Henderson <r...@twiddle.net> Reviewed-by: Alex Benneé <alex.be...@linaro.org> --- target/arm/tran

[Qemu-devel] [PATCH v13 16/26] target/arm: [tcg] Port to insn_start

2017-07-14 Thread Lluís Vilanova
Incrementally paves the way towards using the generic instruction translation loop. Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> Reviewed-by: Richard Henderson <r...@twiddle.net> Reviewed-by: Alex Benneé <alex.be...@linaro.org> --- target/arm/

[Qemu-devel] [PATCH v13 08/26] target/i386: [tcg] Port to translate_insn

2017-07-14 Thread Lluís Vilanova
Incrementally paves the way towards using the generic instruction translation loop. Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> Reviewed-by: Richard Henderson <r...@twiddle.net> Reviewed-by: Emilio G. Cota <c...@braap.org> --- target/i386/

[Qemu-devel] [PATCH v13 13/26] target/arm: [tcg] Port to init_disas_context

2017-07-14 Thread Lluís Vilanova
Incrementally paves the way towards using the generic instruction translation loop. Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> Reviewed-by: Richard Henderson <r...@twiddle.net> Reviewed-by: Alex Benneé <alex.be...@linaro.org> --- target/arm/

<    1   2   3   4   5   6   7   8   9   10   >